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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Power BI REST API in GovCloud - Generate Access Token

I'm trying to generate an access token for the PowerBI REST API in Gov Cloud.

 

I was able to successfully procure a token for the resource https://analysis.windows.net/powerbi/api using the grant type Password, but when following the same steps in GovCloud (https://analysis.usgovcloudapi.net/powerbi/api) I get an error: "AADSTS50126: Error validating credentials due to invalid username or password."

 

@insoldev has a post with an example of how I'm interacting with the auth API: https://community.powerbi.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/...

 

Are there limitations I'm not aware of in the National Clouds?

Or is there a configuration I should double-check?


Any guidance will be appreciated.

 

Regards,

Vango

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Answering my own questions. Using Grant Type: Password seems to be disabled in GovCloud, so I reverted to using Grant Type: Client Credentials. After some more reading, I realized I missed the last step in configuring a service principal. Adding the App Registration to the list of Admins for the Power BI Workspace.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Answering my own questions. Using Grant Type: Password seems to be disabled in GovCloud, so I reverted to using Grant Type: Client Credentials. After some more reading, I realized I missed the last step in configuring a service principal. Adding the App Registration to the list of Admins for the Power BI Workspace.

@Anonymous do you maybe have resources on how to work with the API's and a government tenant?

 

I'm building some automation that I also want to connect to government tenants but do not have one to test with.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.