Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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?
Solved! Go to Solution.
{newID} was never different from {id} - Error 40
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.
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.
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 |
| Apples | 12-345 | Revenue | 91-234 | https://app.powerbi.com/groups/me/apps/12-345/reports/91-234/ReportSection |
| Apples | 12-345 | Customers | 92-345 | https://app.powerbi.com/groups/me/apps/12-345/reports/92-345/ReportSection |
| Oranges | 23-456 | Revenue | 93-456 | https://app.powerbi.com/groups/me/apps/23-456/reports/93-456/ReportSection |
| Oranges | 23-456 | Customers | 94-567 | https://app.powerbi.com/groups/me/apps/23-456/reports/94-567/ReportSection |
| Oranges | 23-456 | Risks | 95-678 | https://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.
{newID} was never different from {id} - Error 40
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 |