Reputation: 11
A report should be displayed to customers with RLS in an existing web application via iFrame embedding.
The customers authenticate themselves when logging into the web application via a B2C AAD and we want to use this existing authentication,to also authenticate the customer with Power BI.
As an example, we chose the code from the Microsoft example ([https://www.youtube.com/watch?v=yNF-_l2f7w0) to generate our embed token.Unfortunately, despite entering the required parameters (Tenant ID, Group ID, Report ID, DataSet ID, Client ID, Client Secret), we get a timeout error message.
We also have the problem that we don't know how to incorporate the embed token into the iFrame link after it has been created. We found the following code snippet online:
=&groupId=&embedToken=" frameborder="" allowFullScreen="true">< /iframe>
Is the syntax correct or do we have to change it for our use case?
We tried to get the embed token via Power BI Api. Unfortunately this didn't work.
We were able to generate a token using the Power Shell module MicrosoftPowerBIMgmt.Profile. Unfortunately, the display in the Power BI Embedded Playground did not work with the generated token. Here you only see the Power BI loading symbol
Upvotes: 1
Views: 520
Reputation: 1810
Need to use Power BI Client REST APIs to embed the report and not by passing as the params in an iframe. Ultimately the reports gets embedded in an iframe.
Refer to Embed for customers documentation for steps in embedding the report for customers.
Additionally you can also refer to PowerBI-Developer Samples for embedding report for customers using .NET application.
For embedding report with RLS, while generating the embed token, you need to pass RLS identity in the request to the API call. Refer Embed a report with RLS for more details.
Please Note that, Embedding report with RLS only applicable for Apps own data (Embed for customers scenario)
For the issue with Embed Token not working in Playground, make sure you changed the tokenType: models.Tokentpye.Embed
and it should work.
You can try embedding report in the Old playground and verify if you can embed the report with the parameters or not
Upvotes: 2