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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

REST API {id} does not generate valid appURL. Bug?

Hi!

 

At the moment we have a PowerShell script that uses a username and password to authenticate to Power BI REST API and then calls "Get Groups" to get all workspaces the user has access to and then "Get Reports in Group" for each workspace, to generate a list of reports with ID, Name, WorkspaceID, WorkspaceName and URL.

The URLs link to the reports just fine and look like this:

https://app.powerbi.com/groups/{workspaceID}/reports/{reportID}/

 

Now we want to update the script to link to our Apps rather than our workspaces. App URLs look like this:
https://app.powerbi.com/groups/me/apps/{appID}/reports/{newID}/

 

What is this {newID} and why can't I get it from the REST API? The embedUrl returned from "Apps - Get Reports" returns an error, probably because it uses {reportID} rather than {newID}

 

How can I get {newID} another way than manually copying from the URLs in Power BI Service?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

{newID} was never different from {id} - Error 40

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

If anyone from Microsoft reads this, please forward to your developers that there needs to be an easier way to join GetApps and GetGroups from the REST API.

 

The only way to join these is by the "name" key, rather than a unique identifier.

 

I propose you include workspace_id in the GetApps call, seeing as an App always has a workspace and a workspace does not necessarily have an App.

Jayendran
Solution Sage
Solution Sage

Hi @Anonymous ,

 

You can ignore that {newID} . Even without the NewID like https://app.powerbi.com/groups/me/apps/{appID} It will automatically redirect to the app correctly.

 

Anonymous
Not applicable

Hi @Jayendran ,

 

I can see how I could have phrased it better - we don't want to link to the Apps, but rather the "pages" of the Apps directly. I put the word in quotation marks because the pages are reports.

To give a bit of background, we are a company with many sub-brands, each of which get their own App. In that App, there are reports on different things, let's say Revenue could be one. I want to be able to programmatically get a list of all "reports" in all Apps that a user has access to, hopefully through the REST API as other solutions are likely to break in the future. So by passing arguments username and password I would hopefully get a list such as this:

 

 appName   appID   reportName   reportID   directURL 
Apples12-345Revenue91-234https://app.powerbi.com/groups/me/apps/12-345/reports/91-234/ReportSection
Apples12-345Customers92-345https://app.powerbi.com/groups/me/apps/12-345/reports/92-345/ReportSection
Oranges23-456Revenue93-456https://app.powerbi.com/groups/me/apps/23-456/reports/93-456/ReportSection
Oranges23-456Customers94-567https://app.powerbi.com/groups/me/apps/23-456/reports/94-567/ReportSection
Oranges23-456Risks95-678https://app.powerbi.com/groups/me/apps/23-456/reports/95-678/ReportSection

 

The problem is that reportID is the exact same as the actual ReportID under Workspaces, but in reality it is different on Power BI Service. If I try to open one of these links I get the error message on this screenshot and am redirected to https://app.powerbi.com/groups/me/list.

 

appIDproblem.png

 

Anonymous
Not applicable

{newID} was never different from {id} - Error 40

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.