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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Rookie_2022
Frequent Visitor

Connecting OAUTH2 Authorization API

Dear,

 

I am having difficulty in using desktop power query to connect to OAUTH2 API. I am asked to request the access token to below server:

 

curl --request POST \
--url https://api.maersk.com/customer-identity/oauth/v2/access_token \
--header 'Cache-Control: no-cache' \
--header 'Consumer-Key: {appConsumerKey}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=client_credentials \
--data client_id={appConsumerKey} \
--data client_secret={appClientSecret}

 

Then using the "Access Token" to Request API.

 

Anyone knows how to make the connection?

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Please follow the documentation. Use Header and Content parameters. https://learn.microsoft.com/en-us/powerquery-m/web-contents#example-2

 

Note that most likely you will need to create a custom connector if you want to refresh in the service.

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

Please follow the documentation. Use Header and Content parameters. https://learn.microsoft.com/en-us/powerquery-m/web-contents#example-2

 

Note that most likely you will need to create a custom connector if you want to refresh in the service.

Hi @lbendlin 

 

Is there any customs connector example for reference? I need to refresh the data everyday. 

 

Thanks.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.