Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
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
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.