Forum Discussion

mwade_cte1926's avatar
mwade_cte1926
Advocate II
4 years ago

Successful access_token not working when authorizing for REST API's

Good day all.  Any insight on this issue would be greatly appreciated.

 

I have setup an app in Azure for the ability to consume Power BI data using REST API's.  Using Postman and am able to get access_token using grant_type=client_credentials, clientID, clientSecret and resource.  But when I attempt to use the access_token in my API calls with Authorization Bearer I am getting a 03 Forbidden error. 

 

Is this because of Federated Authentication?  If so, then it's weird that I can actually get the access_token.

 

Please see the photos below illustrating the issue.  Your help is greatly appreciated!

 

 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi mwade_cte1926 ,

     

    According to your statement, I know that you are now using Service Principal as authentication method to get access token.

    1. Please check whether you have created a security group and enable the Power BI service admin settings for this security.

    2. Please check whether your service principal are the Member or Admin of the workspace.

    For more details, you may refer to this offical blog.

     

    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.

     

    • mwade_cte1926's avatar
      mwade_cte1926
      Advocate II

      Thanks so much Anonymous for responding.  I followed your suggestions with the security group and assigning the service principal.  However, I am still getting the same issue with the access token.  Here are my settings from my Azure App Reg and in Postman.

       

      Azure App settingsReplicated in Postman