.NET Framework/Embed for your organization/UserOwnsData/Controllers/EmbedInfoController.cs
/// <summary>
/// Returns tiles names and their corresponding Ids to the client
/// </summary>
/// <param name="workspaceId">Workspace Id to get the list of tiles</param>
/// <param name="dashboardId">Dashboard Id to get list of tiles</param>
/// <returns>JSON containing list of Power BI tiles</returns>
Returns tiles names and their corresponding Ids to the client
Returns tiles names and their corresponding Ids to the client
[Authorize]
		[HttpPost]
		[Route("/embedinfo/gettile")]
		public async Task<JsonResult> GetTile(string workspaceId, string dashboardId)
		{
			try
			{
				if (string.IsNullOrWhiteSpace(workspaceId))
				{
					throw new ArgumentNullException(nameof(workspaceId));
				}
				else if (string.IsNullOrWhiteSpace(dashboardId))
				{
					throw new ArgumentNullException(nameof(dashboardId));
				}
				else
				{
					return this.Json(await PowerBIService.GetTilesAsync(workspaceId, dashboardId));
				}
			}
			catch (HttpRequestException ex)
			{
				Console.Error.WriteLine(ex);
				throw;
			}
			catch (FormatException ex)
			{
				Console.Error.WriteLine(ex);
				throw;
			}
		}
[ Authorize ] [ HttpPost ] [ Route ( " " ) ] public async Task < JsonResult > GetTile ( string workspaceId , string dashboardId ) { try { if ( string . IsNullOrWhiteSpace ( workspaceId ) ) { throw new ArgumentNullException ( nameof ( workspaceId ) ) ; } else if ( string . IsNullOrWhiteSpace ( dashboardId ) ) { throw new ArgumentNullException ( nameof ( dashboardId ) ) ; } else { return this . Json ( await PowerBIService . GetTilesAsync ( workspaceId , dashboardId ) ) ; } } catch ( HttpRequestException ex ) { Console . Error . WriteLine ( ex ) ; throw ; } catch ( FormatException ex ) { Console . Error . WriteLine ( ex ) ; throw ; } }
Returns tiles names and their corresponding Ids to the client
Returns tiles names and their corresponding Ids to the client
// Retrieving tiles in a dashboard
JSON containing list of Power BI tiles
JSON containing list of Power BI tiles
workspaceId
string
Workspace Id to get the list of tiles
Workspace Id to get the list of tiles
dashboardId
string
Dashboard Id to get list of tiles
Dashboard Id to get list of tiles