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.
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.
How can I fix this issue?
Solved! Go to 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...
Best Regards
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
2. Get the codes circled in red circle after the link dashboards/ in below screenshot
3. Copy and paste it in the parameters dashboardId* textbox just as the one in below screenshot
Finally, it will return the user list who can access that dashboard...
Best Regards
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:
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...
Best Regards
Thanks again for this. You are correct, I was using the Report ID not the dashbaord ID as shown below:
.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
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
2 | |
1 | |
1 |