Forum Discussion
Anonymous
3 years agoNot applicable
Error while creating Access token for Power BI REST API
I was trying to generate an access token for Power BI REST API. I was following the way that is described in this answer. https://community.powerbi.com/t5/Developer/Power-BI-REST-API-using-postm...
Anonymous
3 years agoNot applicable
Hey Anonymous, from the error descriptions looks like you are using an invalid username or password. Can you please provide the complete description of the request you are using (endpoint, etc)?
I recall you that if you are authorizing with username/password (instead of service principal), you have to set "grant_type" to value "password" (instead of "client_credentials).
Wait for you reply,
Luigi
- Anonymous3 years agoNot applicable
I did put the grant_type as password. My request is as following.
POST https://login.windows.net/common/oauth2/token
Request body
grant_type : password
username : **********
password : ***********
client_id : ********* (client id in the app I created for using REST API)
resource : https://analysis.windows.net/powerbi/api