Forum Discussion
Embed for your Organization (User Owns Data) - C#, Forbidden, Invalid Token
- 10 months ago
I discussed with MS Support. If your org uses AzureAD such as https://login.microsoftonline.com and https://portal.azure.com/ but uses Power BI Gov GCC (API endoint https://api.powerbigov.us) then the scopes must be in https://analysis.usgovcloudapi.net. The primary problem was registring that API Permission within the Entra app registration. The trick to doing this is when adding the Request API Permission you must select "APIs my organization uses". Then realize that search is not a wild card search so you can't just search for Gov or Power. You have to locate the "Microsoft Power BI Government Community Cloud". That's it. Within app I only switched scopes such as https://analysis.usgovcloudapi.net/powerbi/api/Workspace.Read.All and it works. AzureAD is https://login.microsoftonline.com and Power BI endpoint is https://analysis.usgovcloudapi.net.
I discussed with MS Support. If your org uses AzureAD such as https://login.microsoftonline.com and https://portal.azure.com/ but uses Power BI Gov GCC (API endoint https://api.powerbigov.us) then the scopes must be in https://analysis.usgovcloudapi.net. The primary problem was registring that API Permission within the Entra app registration. The trick to doing this is when adding the Request API Permission you must select "APIs my organization uses". Then realize that search is not a wild card search so you can't just search for Gov or Power. You have to locate the "Microsoft Power BI Government Community Cloud". That's it. Within app I only switched scopes such as https://analysis.usgovcloudapi.net/powerbi/api/Workspace.Read.All and it works. AzureAD is https://login.microsoftonline.com and Power BI endpoint is https://analysis.usgovcloudapi.net.