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
robinjohansson
New Member

Report id in app workspace differs from same report in published app when fetching REST API reports

So i have a case in my organisation where I want to let users embed reports on our intranet. The solution works as follows:

When the user wants to embed a report, they go to the report they want to embed, and copy paste the url into a field, which i parse in my code. so for example for the url https://app.powerbi.com/apps/xxxxx/reports/1-2-3-4-a-b-c my code would perform a get request to https://api.powerbi.com/v1.0/myorg/reports and look for this report id... but the id i get from the REST API is not the same as in the report in my published app.. the only way i can get the correct id that is shown in the url is by getting the report from https://api.powerbi.com/v1.0/myorg/groups/groupid/reports. The ids for those reports match the report shown in the url at app.powerbi.com.. So my question is, is it possible to find the report ids returned from https://api.powerbi.com/v1.0/myorg/reports somewhere else, for example at app.powerbi.com? These ids are needed for those who want to create an embedded reports for the organisation's users.

 

When I use GetReports I get this JSON back with another id than i see in the url at app.powerbi.com when viewing it:
getreports.PNG

And this is the id i can see in the url:

url.PNG

 

 

Thanks in advance for any advice..

/Robin

2 REPLIES 2
v-caliao-msft
Employee
Employee

@robinjohansson,

 

Did you get the report ID bu using the method describes on the document below? 
https://powerbi.microsoft.com/en-us/guided-learning/powerbi-developer-integrate-report/

 

Step 3
To get a Power BI report, you use the Get Reports operation which gets a list of Power BI reports. From the list of reports, you can get a report id.

Regards,

Charlie Liao

 

Hello!

 

Yes, I used the GetReports operation, but that operation gives me a different report id than the one you can see in the url when you view the report in https://app.powerbi.com. But if i use the GetReports operation with a group id I get the same id that you can see in the url... 😕 

 

/Robin

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