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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.