Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

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