Forum Discussion
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
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-report-that-contains-a-paginated-report-visual-
8 Replies
- AmosHerschMicrosoft 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-report-that-contains-a-paginated-report-visual-
- AnonymousNot 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.
- AnonymousNot 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.
- AmosHerschMicrosoft Employee
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.
- AnonymousNot 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.