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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
icassiem
Helper V
Helper V

PowerBI API Rest Service Principal Authentication

Good day,

 

I have downloaded the below template from the forum: Connect with Power BI to the Power BI REST API with a Service Principal – PBI Guy (pbi-guy.com)

 

I can manually conmnnect to the PBI Api inserted a Bearer Token, however inserting my registered app, secret, tenent id with Anonymous selected i keep getting access denied. My DevOps are managing the Azure configurations and myself the powerbi but unfortuntely we not winning. I get as far as setting privacy levels to none, enabled the API configuration on PBI and app has admin consent but now running out of ideas

 

Untitled2.jpg

 

when i try to navigate to the login with tenantid

Untitled3.jpg

 

Please Help

Regards

 

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @icassiem ,

 

1.Ensure that your Service Principal has been granted the necessary permissions within the Azure portal and that it has been added as a workspace Member or Admin in Power BI.

Refer: Automate Power BI Premium workspace and semantic model tasks with service principals - Power BI | Mi...

2. Double-check that the Service Principal has been granted the correct API permissions in Azure. Specifically, look for Power BI Service permissions like Dataset.Read.All, Dashboard.Read.All, etc., depending on your use case.

3. When connecting to the Power BI REST API, ensure that you're using the correct authentication details. This includes the Application (client) ID, Directory (tenant) ID, and the client secret.

 

Best Regards,

Neeko Tang

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

View solution in original post

4 REPLIES 4
v-tangjie-msft
Community Support
Community Support

Hi @icassiem ,

 

1.Ensure that your Service Principal has been granted the necessary permissions within the Azure portal and that it has been added as a workspace Member or Admin in Power BI.

Refer: Automate Power BI Premium workspace and semantic model tasks with service principals - Power BI | Mi...

2. Double-check that the Service Principal has been granted the correct API permissions in Azure. Specifically, look for Power BI Service permissions like Dataset.Read.All, Dashboard.Read.All, etc., depending on your use case.

3. When connecting to the Power BI REST API, ensure that you're using the correct authentication details. This includes the Application (client) ID, Directory (tenant) ID, and the client secret.

 

Best Regards,

Neeko Tang

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

Thank You very much, i dont have Azure Admin access and only PBI Admin Access, i have forwarded the above to my Azure Admin

Hi @icassiem ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please feel free to let me know.

 

Best Regards,

Neeko Tang

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

Hi @v-tangjie-msft 

Thank You for Helping, my azure admin responded it was too complicated and not possible to achieve. Without Azure Admin, there's nothing i can do.

Regards

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors