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

get access token for powerbi embedded from azure throws invalid credential error

I am trying to get access token from azure using rest api.

I have registered the APP in azure, also the user  exists in Azure active directory with User role. (user account is organization account)

Getting the below error when I  use the rest api. Can someone help me with this. Thanks

"statusCode":400,"body":"{\"error\":\"unauthorized_client\",\"error_description\":\"AADSTS70002: Error validating credentials. 

 

POST: https://login.microsoftonline.com/common/oauth2/token
data: {
    grant_type: password
    scope: openid
    resource: https://analysis.windows.net/powerbi/api
    client_id: {Client ID}
    username: {PBI Account Username}
    password: {PBI Account Username}
}

  

1 REPLY 1
v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

Please refer to Developer/Get-token-of-report. It has almost the same issue. You can find a solution there. The POST URL seems wrong at the first glance. 

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.