Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi community,
We face an issue with embedding a Paginated Report in an app-owns-data scenario, using a service principal. Here are the preparation steps we have made:
- Create a service principal
- Added the service principal to the workspace it needs access to
- Create a small PBI Dataset that connects to Azure Synapse
- Create and publish a Paginated Report connected on this PBI Dataset
Report can be consumed in PBI Service. Now, we try to embed it. We use Power BI Embedded Playground for now to execute our test. Here is how we proceed step-by-step:
POST https://login.microsoftonline.com/8d5455c7-b671-44f3-xxxx-xxxxxxxxxxxx/oauth2/token
with following x-www-form-urlencoded parameters:
resource: https://analysis.windows.net/powerbi/api
grant_type: client_credentials
client_id: client id of the service principal
client_secret: client_secret of the service principal
POST https://api.powerbi.com/v1.0/myorg/groups/d77d6ae5-82ff-4c93-xxxx-xxxxxxxxxxxx/reports/c14a6770-88a7-xxxx-xxxxxxxxxxxx/GenerateToken
{
"accessLevel": "View",
"identities": [
{
"username": "John Doe",
"reports": ["c14a6770-88a7-4ece-xxxx-xxxxxxxxxxxx"]
}
]
}
GET https://api.powerbi.com/v1.0/myorg/groups/d77d6ae5-82ff-4c93-xxxx-xxxxxxxxxxxx/reports/c14a6770-88a7-4ece-xxxx-xxxxxxxxxxxx
Now we try to embed our report using the Embed token acquired at step 2. But, it does not work:
Note: Interestingly, this whole process will work if I don't add any data to the Power BI Report Builder. It fails as soon as a connection to a data source is needed, which is obviously 100% of our cases 😉
Thanks a lot for your help !
Solved! Go to Solution.
Quick update on this in case anyone faces the same issue.
Once the Paginated Report is published in Power BI Service, you must go in the report settings and adjust your credentials there. Whatever credentials you used in the Power BI Report Builder application, thoses credentials won't be published in the service, so you need to set them up, and everything will work fine afterward.
Quick update on this in case anyone faces the same issue.
Once the Paginated Report is published in Power BI Service, you must go in the report settings and adjust your credentials there. Whatever credentials you used in the Power BI Report Builder application, thoses credentials won't be published in the service, so you need to set them up, and everything will work fine afterward.
Hi @spoutrain,
Sorry for can't reproduce your issue .If you have Pro account I suggest you try to open a support ticket. If you have a Pro account it is free. Go to https://support.powerbi.com. Scroll down and click "CREATE SUPPORT TICKET".
Best Regards,
Dedmon Dai
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.