Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join 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.

Reply
Anonymous
Not applicable

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!

1 ACCEPTED SOLUTION
Anonymous
Not 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

Embed Power BI content in an embedded analytics application with service principal and an application secret - Power BI | Microsoft Learn

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not 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

Embed Power BI content in an embedded analytics application with service principal and an application secret - Power BI | Microsoft Learn

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.