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
eyem4usf
New Member

How connect Power BI Desktop to Azure REST API

I'm trying to pull down a list of instances from Azure using 

https://management.core.windows.net//rolesizes

 

From article:  https://docs.microsoft.com/en-us/previous-versions/azure/reference/dn469422(v=azure.100)

 

I am having a hard time figuring out how to have Power BI connect to this API.  When I try to use the Web connector it just complains about "Access to the resource is forbidden".  I can only retry or cancel.  If I choose Edit, I'm clueless as to what I need to add and to where for any Keys or response headers.  

 

Any help would be very appreciated by someone who doesn't have a lot of experience connecting Power BI to APIs.

 

Thanks, Pete

2 REPLIES 2
SteveCampbell
Memorable Member
Memorable Member

You can only connect to web resources in Power BI through anonymous. Azure requires Ouath2 verification. You would need to send a post request to the auth servers and return a token, then use that in a authentication header.

See:

https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow

 

As you cannot use your office 365, I think the only way would be to register an app principal in azure and authenticate through a secret from this. I'm not 100% sure that would work.

This will require a lot of detailed M code

 

My recommendation would to use a different service (such as adf or another language) to process the data first.



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



Having said that, if you run this from an azure VM they have a seperate auth protocol and endpoint which can use the VM's ip and is quite possible. But would only be usable from that VM



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



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.