Forum Discussion

JAnder's avatar
JAnder
Helper II
4 years ago
Solved

Embedded paginated report with PowerBI dataset

In Feb the option of using a Power BI dataset was introduced for embedded paginated reports. 

https://powerbi.microsoft.com/en-us/blog/power-bi-february-2022-feature-summary/#post-18588-_Toc95419023

 

I understand the requirement is slightly different in that you need to now pass the datasetId as well as xmlaPermissions as described here

https://docs.microsoft.com/en-gb/rest/api/power-bi/embed-token/generate-token

 

I have 2 questions based on this, firstly is there a way to extract the datasetId from a report? If I open the RDL file in a text editor I can see it in there, can this be obtained programatically to then use in a request for the token?

 

The second part is, if possible, is there a code example of this being used? The github examples (linked below) do not seem to show this scenario yet. I intend to use the PowerBIClient from the Microsoft.PowerBi.APi nuget.

 

https://github.com/microsoft/PowerBI-Developer-Samples/blob/master/.NET%20Framework/Embed%20for%20your%20customers/AppOwnsData/Services/EmbedService.cs

12 Replies