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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
MrRichDean
Regular Visitor

Calling Power BI API from Azure Logic App

Good morning / afternoon / evening

 

Would anyone be able to list the precise steps I need to perform in order to fire off a HTTP request to the Power BI api from within an azure logic app?

 

I have been attempting to follow the articles below:

 

https://carldesouza.com/how-to-register-an-azure-app-to-use-with-power-bi/

https://carldesouza.com/how-to-authenticate-and-use-the-power-bi-api-inside-power-automate/ 

 

To date, I haven't even got as far as to getting the access token and I am finding it rather infuriating!

 

Currently, I am stuck with the following error:

 

"error""invalid_grant",
"error_description""AADSTS65001: The user or administrator has not consented to use the application with ID
 
However, rather than looking at this specific error, I am thinking I may have to take a few steps back, hence my original question.
 
If anyone can point me in the right direction or give me some pointers, I'd be most grateful.
 
 
5 REPLIES 5
Anonymous
Not applicable

Hi @MrRichDean,

what kind of Power BI Rest API request are you using? If you want to use Admin API's with application your application has to have API permissions without Admin consent required option.

 

Marky_0-1650893187988.png

Instead of Yes in my picture you should have No.

 
lbendlin
Super User
Super User

the error message is pretty accurate. You first need to register the app, and make sure to specify the correct desired permission scope. Then your admin needs to agree to that app request.  Then you can use the app's authentication method to run your Power BI API calls.

Hello @lbendlin 

 

Could you explain what you mean regarding the correct desired permission scope? How does my admin agree to the app request? Am I even correct in that I need to get an access token before calling the Power BI API ?

 

Currently I am doing the following call to get the access token :

 

MrRichDean_0-1600091132155.png

MY admin believes they have agreed to eveything he can find - what are they missing?!

You went through here, right?

 

https://docs.microsoft.com/en-us/rest/api/power-bi/apps

 

Good morning @lbendlin 

 

I'm not 100% sure if my admin did this part of the process so I shall check with them and let this post know either way.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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