Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
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:
Thanks in advance
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:
Troubleshoot Power BI REST APIs - Power BI | Microsoft Learn
Best Regards
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 7 | |
| 4 | |
| 4 | |
| 3 |