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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

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
November Carousel

Fabric Community Update - November 2024

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

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.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.