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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Cannot list Dataflows as Admin via Service Principal

Hi everyone,

 

I encountered a very weird situation today. My goal is to get a list of all dataflows in my tenant via the API (GetDataflowsAsAdmin) using a service principal / azure App.

 

For this I

  1. registered an app in azure
  2. did not give any permissions (especially non that need admin consent)
  3. added said app/service principal to an Entra-ID-Group which is allowed to call the read-only admin API ("Service principals can access read-only admin APIs"). This is set in the PowerBI admin portal

Now, using python, I wanted to get the list of all dataflows but I get an 401 Unauhtorized and I am not sure why, since a lot of other admin APIs do work.

 

E.g. I can query the following and get results back:

But 

does not work (unauhtorized).
 
Does my service principal need additional permission just for dataflows? I could not get any information from the docs...so perhaps someone here knows more.
 
FYI: I first get an access token via msal for
 
Thank you,
Sven
1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Anonymous,

Have you take a look at the official document about how to use service principal with power bi rest api and its usage limitations? If not, I'd like to suggest you check them at first.

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

2 REPLIES 2
Anonymous
Not applicable

Thank you for your answer! Seems like I missed that article as I didn't think my problem had something to do with embedding.

It would be nice if there were some tags or markers that show which API is supported for service principals and which are not.

 

In this case it seems that I will have to use my own account.

 

Best,

Sven

Anonymous
Not applicable

HI @Anonymous,

Have you take a look at the official document about how to use service principal with power bi rest api and its usage limitations? If not, I'd like to suggest you check them at first.

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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

Top Solution Authors