Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Access token lacks authorisation

Hello troops, I am trying to develop an Azure application with PowerBI embedded.   I am currently stuck at the point of making an API call to get an access_token that will allow me to push a datase...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous 

    There may be something wrong to your access token.

    Could your tell me which kind of your Azure App is, app owns data or user owns data?

    There are two kind of authentication method for app owns data, service principle or master user?

    I see in your Body you have password and username, if you use user owns data or master user, please use Password in grant_type, if you use service principle , use client_credentials in grant_type.

    From your screenshot of API Permission, I find that your didn't grant admin consent for you permissions.(App owns data —— Master user or user owns data need this.)

    API Permission configured correctly looks like as below.

    Then please check your api resouce, the resource url should be  https://analysis.windows.net/powerbi/api .

     

    Best Regards,

    Rico Zhou

     

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