public static NewReportEmbeddingData GetNewReportEmbeddingDataFirstParty() { string embedUrl = "https://app.powerbi.com/reportEmbed?groupId=" + workspaceId; return(new NewReportEmbeddingData { workspaceId = workspaceId.ToString(), datasetId = datasetId.ToString(), embedUrl = embedUrl, accessToken = TokenManager.GetAccessToken() }); }
public static NewReportEmbeddingData GetNewReportEmbeddingDataUserOwnsData() { string embedUrl = "https://embedded.powerbi.com/ReportEmbed"; return(new NewReportEmbeddingData { workspaceId = workspaceId.ToString(), datasetId = datasetId.ToString(), embedUrl = embedUrl, accessToken = TokenManager.GetAccessToken() }); }
public static ReportEmbeddingData GetReportEmbeddingDataFirstParty() { PowerBIClient pbiClient = TokenManager.GetPowerBiClient(); var report = pbiClient.Reports.GetReportInGroup(workspaceId, reportId); var embedUrl = report.EmbedUrl; var reportName = report.Name; var accessToken = TokenManager.GetAccessToken(); return(new ReportEmbeddingData { reportId = reportId.ToString(), reportName = reportName, embedUrl = embedUrl, accessToken = accessToken }); }
public static ReportEmbeddingData GetReportEmbeddingDataUserOwnsData() { PowerBIClient pbiClient = TokenManager.GetPowerBiClient(PowerBiPermissionScopes.EditExisitngWorkspaceAssets); var report = pbiClient.Reports.GetReportInGroup(workspaceId, reportId); var embedUrl = "https://app.powerbi.com/reportEmbed"; var reportName = report.Name; var accessToken = TokenManager.GetAccessToken(PowerBiPermissionScopes.EditExisitngWorkspaceAssets); return(new ReportEmbeddingData { reportId = reportId.ToString(), reportName = reportName, embedUrl = embedUrl, accessToken = accessToken }); }
public static ReportEmbeddingData GetPaginatedReportEmbeddingData() { PowerBIClient pbiClient = TokenManager.GetPowerBiClient(); Guid wsId = new Guid("8ecc4996-2746-49c4-a378-6ce0519c57d0"); Guid pagReportId = new Guid("3ea30594-2470-4be0-8557-023fdb9c65e6"); var report = pbiClient.Reports.GetReportInGroup(wsId, pagReportId); var embedUrl = report.EmbedUrl; var reportName = report.Name; return(new ReportEmbeddingData { reportId = pagReportId.ToString(), reportName = reportName, embedUrl = embedUrl, accessToken = TokenManager.GetAccessToken() }); }