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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
SvenApl
New Member

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
v-shex-msft
Community Support
Community Support

HI @SvenApl,

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

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
SvenApl
New Member

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

v-shex-msft
Community Support
Community Support

HI @SvenApl,

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

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.