Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Power BI Embed - issue with Paginated report visual

I am starting with Power BI Embed, so not an expert. I have started with sample code for Power bI Embed and having issue with Power BI report having Paginated report visual.

Information about my content:
> I am using "service principal", have completed Tenant setting to allow service principal permissions for REST API, and enabled "XMLA read/write" for my premium capacity assigned to workspace.
> Dataset, Power BI report with paginated visual, paginated report using same dataset as power reprot...all reside in same workspace for which Service principal have "member" role.
> Dataset is in import mode. 
> Paginated report visual is embedded in 2nd page; and 1st page have normal visuals
Power BI report embedded renders 1st page successfully, but when I switch to 2nd page it fails to render Pagianted report visual with message "unexpected error occured, contact support". 

 

Any advise, please

1 ACCEPTED SOLUTION
AmosHersch
Microsoft Employee
Microsoft Employee

Basically most errors in such cases are related for you "Generate token" request. Basically it should include the ID of the Power BI report, the ID of the Paginated report, the ID of the Power BI dataset with "xmlaPermissions" parameter set to "ReadOnly". Other values might depend on your specific configuration (datasources, RLS, etc.).

Did you see this sample of such request: https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-faq#how-can-i-embed-a-power-bi... 

 

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Any help please, I have done all as suggested:
1.) In Embed code used "allowEdit: False", and passed reportIdList 
2.) Changed data-source of Paginated report to be XMLA EndPoint of dataset, and hard-coded User Id/Password for service principal {user id: addid:<applicationid@tenantid>;Password:<application-secret>} .. 
but still no luck. I even just trying to embed "paginated report" alone in application, and that too doesn't work. 

please any advise and help. 
 

1. Did you include the dataset ID in the "generate token" request, and specified "xmlaPermissions" as ReadOnly?

2. Can you please share how your generateToken request looks like (you can use fiddler)?

3. Please share the ID of the failed request (where you get "bad request" from Power BI). The response message should include request ID in the header.

Anonymous
Not applicable

Code sample that are availabel doesn't support dataset construct with "xmlapermissions", so I am trying to figure out to create namedspace and reference in GenrateToken code.
generateToken fiddler capture is so far not getting "DatasetId" passed to it, and IF I use report "GenerateToken" function for RDLReport embed, it always fails with error message in embed app "Unable to contact underlying data source. ata source is available, your credentials are correct and that your gateway settings are valid."... which is strange as I am able to succesfully use Paginated report in service and my data-soruce is working fine.  

@Anonymous  did you see this sample request  to generate the token? I belive yours should be similar.

Anonymous
Not applicable

I am able to successfully embed PowerBI reprots with "paginated Report visual" and direct "Paginated Reports" too in my demo application app. Original problem was that I was referencing older version of NugetPackage, once I updated to latest version.. all started working fine.

Anonymous
Not applicable

Yes i have seen this MSDN document, and even all REST API documents. But I am using "sample Power bI Developer Embedded solution" from this document page (.Net Framework; Apps owns data/Embed for your customer). these solutions doesn't have dataset construct to refer as required for Paginated Report REST API call with permission. That is where I am stuck currently. 😪

AmosHersch
Microsoft Employee
Microsoft Employee

Basically most errors in such cases are related for you "Generate token" request. Basically it should include the ID of the Power BI report, the ID of the Paginated report, the ID of the Power BI dataset with "xmlaPermissions" parameter set to "ReadOnly". Other values might depend on your specific configuration (datasources, RLS, etc.).

Did you see this sample of such request: https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-faq#how-can-i-embed-a-power-bi... 

 

Anonymous
Not applicable

Thank you @AmosHersch 

I have starte with "Sample .Net Framework AppsOwnsData solution", and basically revised little to pass on report Guid List to to "GenerateToken" function ..something like this in sample code
var reportList = new List<Guid>();
reportList.Add(new Guid("<PBI report GUID>"));
reportList.Add(new Guid("<Paginated Report GUID>"));
embedToken = await GetEmbedToken(reportList, datasetIds, workspaceId);

But now i get error message saying "bad reqeust(400); RDL report cannot connect to dataset". 
I have verfied that Service Principal has access to {dataset, Report, Paginated report}. I am able to successfully run the report and view paginated report in service and even in "PBI Playground area" without any issue. It is just in my visual studio .net framework solution when executed in debug mode using Service principal... it fails with error. 

Please advise.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.