Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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!
Solved! Go to Solution.
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
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
7 | |
3 | |
2 | |
2 |
User | Count |
---|---|
4 | |
3 | |
3 | |
3 | |
2 |