Forum Discussion
Government API 403 error: powerbi gcc endpoint api.powerbigov.us always return 403 error
- 2 years ago
To address my own inquiry, when dealing with GCC cloud customers, it's essential to engage in an interactive OAuth process to acquire the token; conventional username and password authentication is not supported. Furthermore, to obtain the correct access token, we must supply the Power BI resource ID, which differs from that of regular commercial users. In our specific situation, we must request permission from the resource located at "https://analysis.usgovcloudapi.net/powerbi/api". To ascertain the GCC endpoint and resource ID, Power BI offers a REST API. You can initiate a POST request to "https://api.powerbi.com/powerbi/globalservice/v201606/environments/[email protected]" to retrieve endpoint information for GCC cloud users.
Hi hellodtonomy ,
Based on your error message mentioned, I think you need to first double-check these 2 points:
1. The API method to get the AAD token for the rest API using, you should define scope of the API body parameter like this to make sure all the delegated permissions has been assigned:
2. Since you are in the GCC environment for the rest API using, you need to double-check if you have opened/whitelist all the Power BI URLs now following this official document:
Power BI for US government customers - Overview - Power BI | Microsoft Learn
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
We've made some progress by realizing that we need to specify the government resource as "https://analysis.usgovcloudapi.net/powerbi/api" instead of "analysis.windows.net." However, we encountered an "invalid grant" error. Does anyone know if the "password" grant type is supported in Azure Government Cloud?