web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to use custom auth...
Power Apps
Unanswered

How to use custom authentication request in next request

(0) ShareShare
ReportReport
Posted on by 601

Dear,

 

I am trying to create a custom connector for a third party API that uses a custom authentication method.

It basically needs two calls, one for getting an accesstoken, and one for getting the data (using the accesstoken). I don't know how I can implement this two-step flow in a custom connector.

 

The first call is: 

curl --location --request POST 'https://thirdpartyurl.com/api/v2/users/me/login' \
--header 'Accept: application/json' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'email=myemail@mydomain.com' \
--data-urlencode 'password=xxxxxxxxxxxxxxxxxxxxxxxxxxxx'

which returns a JSON:

{
 "data": {
 "serverTime": "xxxxx",
 "accessToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
 "accessTokenExpiration": "xxxxxx",
 "refreshToken": "xxxxxxxxxxxxxxxxxx",
 "refreshTokenExpiration": "xxxxxxxxxxxxxxxxxxxxx",
 "authType": "user"
 }
}

 

the second call is:

curl --location --request GET 'https://thirdpartyurl.com/api/v2/data' \
--header 'Authorization: Bearer myaccesstokenfrompreviousrequest'

 

I have no idea how to setup this "custom" authentication model in the custom connector so I can call the "data" request so that it uses the other "authentication" request...

Are there any samples or specific tutorials available somewhere that explain this?

 

Thanks,

Koen

Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 226 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard