cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Champion
Community Champion

Re: Embedded Report - EmbedUrl format confirmation

@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
🙂

Highlighted
Frequent Visitor

Re: Embedded Report - EmbedUrl format confirmation

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.

 

Highlighted
Community Champion
Community Champion

Re: Embedded Report - EmbedUrl format confirmation

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

Highlighted
Frequent Visitor

Re: Embedded Report - EmbedUrl format confirmation

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

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!