Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How to get API Bearer Token for Power BI Admin apis

I am trying to use https://login.microsoft.com/ <tenet id>/oauth2/token to get access token for Power BI Admin apis.   

I have set up a application and security group in AD and granted all the read access required.    I can paste in a token into api call and it works.  I can use the above api and return an access token in Postman.   How can do it in Power BI using an Service Principal as  documented in https://docs.microsoft.com/en-us/power-bi/admin/read-only-apis-service-principal-authentication    I get error message "We couldn't authenicate with credentials provided. Please try again. "    I am using Anonymous  Access , it only offers 2 options 

https://login.microsoft.com/ <tenet id>/oauth2 

https://login.microsoft.com/ <tenet id>/oauth2/token

 

Any suggestions would be helpful.     

 

5 Replies