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
schandr
Frequent Visitor

Embedded Report - EmbedUrl format confirmation

Hi,

 

We are currently working on developing an reporting application in react. For that we have added service layer to get accesstoken and embed token. 

My Question is do we need to trigger "Get Reports In Group" api endpoint to get the embed url or the format will always be the same and only the report and group id can be changed. 

 

I see embed url format is https://app.powerbi.com/reportEmbed?reportId=<<REPORTID>>&groupId=<<GROUPID>>.

 

Need an confirmation, so that additional api call be avoided and as part of the token api we will get the reportid, embedtoken and internally formed embedUrl.

 

Thanks in advance

Srinivasan

4 REPLIES 4
nandukrishnavs
Super User
Super User

@schandr  You have to call the API for getting the embed URL.

 

Please refer to this link.https://docs.microsoft.com/en-us/rest/api/power-bi/reports/getreportingroup

Capture.JPG

Then click Try it and test this API call.

It will return something similar to below. The embed URL contains an extra config parameter.

 

{
   "@odata.context":"http://wabi-europe-north-b-redirect.analysis.windows.net/v1.0/myorg/groups/63ef8228-4301-45f1-b2d4-20d9675d9dde/$metadata#reports/$entity",
   "id":"8eba6559-566f-4ca5-bec2-9c01e9c8a749",
   "reportType":"PowerBIReport",
   "name":"Global Superstore",
   "webUrl":"https://app.powerbi.com/groups/63ef8228-4301-45f1-b2d4-20d9675d9dde/reports/8eba6559-566f-4ca5-bec2-9c01e9c8a749",
   "embedUrl":"https://app.powerbi.com/reportEmbed?reportId=8eba6559-566f-4ca5-bec2-9c01e9c8a749&groupId=63ef8228-4301-45f1-b2d4-20d9675d9dde&config=eyJjbHVzdGVyVXJsIjoiaHR0cHM6Ly9XQUJJLUVVUk9QRS5OT1JUSC1CLXJlZGlyZWN0LmFuYWx5c2lzLndpbmRvd9MubmV9IiwiZW1iZWRGZWF0dXJlcyI7eyJtb2Rlcm5FbWJlZCI6dHJ1ZX19",
   "isOwnedByMe":true,
   "datasetId":"21bf3a7f-57bd-9aa1-b1fc-16c74d56d0f1"
}

 

  

Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

Thanks @nandukrishnavs .

 

Do you have details on what is the purpose of config parameter in the embedUrl?  I dont see any difference in report rendering  with and without the additional parameter as part of embedded url.

 

Inorder to get embed token we are already accessing 2 APIs. One to get accesstoken and other one is generatetoken api of the group and report it. If it is mandatory to have the report API, then we have to make 3 api calls. Instead the embedUrl should be part of generate token api end point.

 

@schandr - Are you able to embed the report without a config parameter? 


Regards,
Nandu Krishna

Yes @nandukrishnavs . i didn't get any error and it renders properly.

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.