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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.