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

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.

Reply
spoutrain
Regular Visitor

Unable to embed a paginated report

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:

Step 1: Get access token

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

Step 2: Get embed token

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"]
}
]
}

Step 3: Get the embed url

GET https://api.powerbi.com/v1.0/myorg/groups/d77d6ae5-82ff-4c93-xxxx-xxxxxxxxxxxx/reports/c14a6770-88a7-4ece-xxxx-xxxxxxxxxxxx

Step 3: Embed the report

Now we try to embed our report using the Embed token acquired at step 2. But, it does not work:

2020-05-22 08-58-27.jpg

 

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 !

1 ACCEPTED SOLUTION
spoutrain
Regular Visitor

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.

View solution in original post

2 REPLIES 2
spoutrain
Regular Visitor

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.

v-deddai1-msft
Community Support
Community Support

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors