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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.