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 Admin API issue

Greeting lovely member,

 

Well im trying to run some Power BI REST API on python.

 

i would like to run the Admin API ones . so i created an application i gave it tenant access (Tenant.Read.All)

but im still having an 403 error . 

 

so my main question here is , can we run the AsAdmin APIs via service account, without granting it Power BI tenant admin.

 

Thanks in advance.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello Ibarrau , 

 

i found the issue to my problem : 

Actually thanks to your Link  , i notice that when you create an application  you need to make sure the app you use doesn't have any Power BI admin roles set on it in Azure portal. (Such as Tenant.Read.All) 

 

Best regards

Rami Frikha 

 

 

 

 

 

 

 

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

First Thanks for your Reply , 

 

i already set up the power BI admin portal thing. im using Azure.identity to connect.

but im keeping getting the 401 error.

Do you think i need to grant it the power BI tenant admin ?

 

Thanks 

 

 

 

 

 

 

 

ibarrau
Super User
Super User

Hi there. Let me ask you something. After setting the application permission for All Tenant, has the Global Admin granted those permissions for the app? Once that's done a Power Bi Admin can use the API.

On the other hand if you wnat to use the app with Service Principal, you need to configure additional things on the Power Bi Admin Portal like this: https://docs.microsoft.com/en-us/power-bi/admin/read-only-apis-service-principal-authentication

After the configuration wait for a few minutes while microsoft apply the change.

Just for the heads up there is a python library in development that has the admin requests. Check it out if you are able to login https://blog.ladataweb.com.ar/post/669293533988012032/librería-de-python-para-power-bi-rest-api

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Anonymous
Not applicable

Hello Ibarrau , 

 

i found the issue to my problem : 

Actually thanks to your Link  , i notice that when you create an application  you need to make sure the app you use doesn't have any Power BI admin roles set on it in Azure portal. (Such as Tenant.Read.All) 

 

Best regards

Rami Frikha 

 

 

 

 

 

 

 

 

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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