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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
xhan
Helper I
Helper I

Service Principal accessing power BI Rest APIs

I followed https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal, to set up a service principal for using power bi rest APIs.

I am able to access admin APIs like scanResult, getInfo etc.

But when I tried to use it access `datasets` or `reports` apis, I got 

 

{'Message': 'API is not accessible for application'}

 

Could anyone suggest how could I enable the scopes for the reports and datasets apis?

 

Thank you!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @xhan ,

 

According to your statement, I think the API is not accessible for your application.

 

For an Azure AD app to be able to access the Power BI content and APIs, a Power BI admin needs to enable the following setting:

  • Embed content in apps
  • Allow service principals to use Power BI APIs.

You need to apply this setting to your Security Group in which your Service Principal is a member.

For reference:

 Step 3 - Enable the Power BI service admin settings

 

Please make sure you have add your Service Principal as a member or admin into your Workspace which contains your datasets.

For reference:

 Step 4 - Add the service principal to your workspace

 

Best Regards,
Rico Zhou

 

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

1 REPLY 1
Anonymous
Not applicable

Hi @xhan ,

 

According to your statement, I think the API is not accessible for your application.

 

For an Azure AD app to be able to access the Power BI content and APIs, a Power BI admin needs to enable the following setting:

  • Embed content in apps
  • Allow service principals to use Power BI APIs.

You need to apply this setting to your Security Group in which your Service Principal is a member.

For reference:

 Step 3 - Enable the Power BI service admin settings

 

Please make sure you have add your Service Principal as a member or admin into your Workspace which contains your datasets.

For reference:

 Step 4 - Add the service principal to your workspace

 

Best Regards,
Rico Zhou

 

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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