Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

oAuth and Power Query

I need to connect to external web API. This API uses a custom oAuth 2.0 verification process.

Now I would need to do the exact same steps using power query (M)/ Power BI.


I have managed successfully connect to web API using Postman so I can so you example what that looks like.

curl -X POST \ '' \
-H 'Content-Type: application/x-www-form-urlencoded' \

In Power Query I used following code

    Source = Value.Metadata(Web.Contents("", [Headers=[#"Content-Type"="application/x-www-form-urlencoded"]]))

This gives me Response.Status 405 error.


In order to get this to work in Postman I had to disable "Automatically follow redirects". Is there a similiar problem with Power Query?


Super User IV
Super User IV

Re: oAuth and Power Query

I don't know if that option exists in M. You could always also try R.


@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Helpful resources

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors