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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
nicm-cc
Frequent Visitor

PowerBI Embedded - Capacities Update Rest API

Hi There,

I am trying to programmatically scale up/down my embedded capacity using this rest api (Capacities - Update - REST API (Azure Power BI Embedded) | Microsoft Learn). When I test the API within the documentation, it works as intended but trying to call the API from within my application I cannot get past the permissions error.

My service principle application registration has all the permissions for powerbi granted.

nicmcc_0-1696446548311.png


In my application, I am obtaining an access token using my client credentials but when using that access token to call the update capacities api, I get this error:

b'{"error":{"code":"AuthorizationFailed","message":"The client \'xxxxxx\' with object id \'xxxxxx\' does not have authorization to perform action \'Microsoft.PowerBIDedicated/capacities/write\' over scope \'/subscriptions/xxxxxx/resourceGroups/PowerBI/providers/Microsoft.PowerBIDedicated/capacities/ccpowerbi\' or the scope is invalid. If access was recently granted, please refresh your credentials."}}'

Which specific permissions am I missing? I see in the documentation that this is the required scope but not sure exactly how to auth with this scope:

nicmcc_1-1696446722743.png


Thanks in advance

1 REPLY 1
Anonymous
Not applicable

Hi @nicm-cc ,

According to the error message, it indicates that there is no necessary permissions to call that REST API. Here are a few things you could check:

  • Enable Allow service principals to use Power BI APIsvyiruanmsft_0-1697005603068.png

     

  • Add the service principal to your workspacevyiruanmsft_1-1697005679595.png
  • Authorization Header: Check if the authorization header is listed correctly. Make sure there are no typos.
  • Token Expiry: The Azure AD authorization token might have expired.

Embed Power BI content in an embedded analytics application with service principal and an applicatio...

Troubleshoot Power BI REST APIs - Power BI | Microsoft Learn

Best Regards

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.