Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mwade_cte1926
Advocate II
Advocate II

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!

2022-04-07_10-05-28.png2022-04-07_11-37-41.png

 

 

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

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.

RicoZhou_0-1649669874102.png

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.

 

Thanks so much @v-rzhou-msft 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 settingsAzure App settingsReplicated in PostmanReplicated in Postman

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.