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
Anonymous
Not applicable

API for getting users of a dashboard without being admin, i.e. owner of the dashboard

Hi, 

 

I have created a report in my account of my organisation, and I have used RLS, I need to use an API to get 

1- List of users who have access to the dashboard

2-List of users within RLS

 

How I can achieve these?

 

I have found this link:

https://docs.microsoft.com/en-us/rest/api/power-bi/admin/dashboards-get-dashboard-users-as-admin

 

but I am not sure what myorg is?

 

I am the owner/developer of this dashboard and our BI platform is managed by another team, so do not have access to the backend.

 

The link to my dashboard is 

https://app.powerbi.com/groups/me/reports/someID/ReportSection

 

When I click on Try me, MS website asks for the credentials, and when I enter someID in the parameters I get the 404 error.

 

 
 

BI Error.png

 

How can I fix this issue?

 

 

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

The URI Parameters dashboardId of this Rest API request is a specific dashboard id of a workspace you are looking for, not a report id just as shown in below screenshot. And what you are getting is actually the report id ("ReportSection" after the ID)... You can follow the steps in my previous post to get the dashboard id...

yingyinr_1-1632823049853.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

If you want to use the Rest API: Admin - Dashboards GetDashboardUsersAsAdmin, the prerequisite is that you must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API or authenticate via service principal. The 404 error (xx not found) is probably because you did not enter the correct dashboard id information. Please follow the steps below to get the correct dashboard id.
1. Sign in Power BI Service, click the dashboard you want to get the user list

yingyinr_0-1632467916918.png

2. Get the codes circled in red circle after the link dashboards/ in below screenshot

yingyinr_1-1632468084365.png

3.  Copy and paste it in the parameters dashboardId* textbox just as the one in below screenshot

yingyinr_2-1632468233606.png

Finally, it will return the user list who can access that dashboard...

yingyinr_3-1632468320032.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-yiruan-msft , 

 

Thanks for the time and your answer. I think I am using an exact approach to get the dashboard ID as shown below:

Sichanm_1-1632532030748.png

 

mine has a "ReportSection" after the ID, while your does not.

 

So, I guess that error (404) is indirectly related to the permission (I do not think I have been granted permission to use this API) rather than being related to the content. This 404 error is commonly known for 

"A 404 error message is a Hypertext Transfer Protocol (HTTP) status code indicating the server could not find the requested websit".

 

So my only explanation for "not receiving an error about the permission but instead receiving an error about the contnent " is that the Power BI server uses this 404 for the lack of permission as well.

 

Does this make sense to you or do you still think I am doing something wrong?

 

Thanks

 

 

Hi @Anonymous ,

The URI Parameters dashboardId of this Rest API request is a specific dashboard id of a workspace you are looking for, not a report id just as shown in below screenshot. And what you are getting is actually the report id ("ReportSection" after the ID)... You can follow the steps in my previous post to get the dashboard id...

yingyinr_1-1632823049853.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-yiruan-msft 

 

Thanks again for this. You are correct, I was using the Report ID not the dashbaord ID as shown below:

 

Sichanm_0-1632851310159.png

.Based on my org's security settings I cannot publish a report as the dashboard. So, I was using the wrong API. I should have used this one

https://docs.microsoft.com/en-us/rest/api/power-bi/admin/reports-get-report-users-as-admin#code-try-...

 

However, after using this one that asks for the report ID, I am still getting a 404 error, so I guess I do not have admin rights.

 

 

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.