Forum Discussion
Power Bi API: How to get all the users from a report's direct access list
I would like to get all the users from a report's "Direct Access" list with Power Bi API. I tried to use GET https://api.powerbi.com/v1.0/myorg/admin/datasets/{datasetId}/users (documentation), but the response is just a Response Code: 401. I checked on JWT.io and I have all the Required Scopes: Tenant.Read.All or Tenant.ReadWrite.All.
Where is the problem here?
Thanks!
- Anonymous3 years ago
HI Anonymous,
AFAIK, 401 error means the client request has not been completed because it lacks valid authentication credentials for the requested resource.
401 Unauthorized - HTTP | MDN (mozilla.org)
Which account did you use to test with rest API? Have you double check to confirm this account has enough permission to use admin API? Please share some more detail to help us clarify your scenario:
How to Get Your Question Answered Quickly
In addition, what type of credentials you used to authorize the API? Did you mean the service principal? AFAIK, this type of credential existed limitations when working with admin API, you can take a look at the following document to know about these:
Enable service principal authentication for read-only admin APIs - Power BI | Microsoft Learn
Regards,
Xiaoxin Sheng
1 Reply
- AnonymousNot applicable
HI Anonymous,
AFAIK, 401 error means the client request has not been completed because it lacks valid authentication credentials for the requested resource.
401 Unauthorized - HTTP | MDN (mozilla.org)
Which account did you use to test with rest API? Have you double check to confirm this account has enough permission to use admin API? Please share some more detail to help us clarify your scenario:
How to Get Your Question Answered Quickly
In addition, what type of credentials you used to authorize the API? Did you mean the service principal? AFAIK, this type of credential existed limitations when working with admin API, you can take a look at the following document to know about these:
Enable service principal authentication for read-only admin APIs - Power BI | Microsoft Learn
Regards,
Xiaoxin Sheng