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 / Custom Connector Gener...
Power Apps
Answered

Custom Connector Generic OAuth2 Refresh URL vs Redirect URL

(0) ShareShare
ReportReport
Posted on by 7

Hey All, 

 

I'm trying to build a custom connector to the ShareFile API, but I wanted to know if the "refresh Url" in the security settings of custom connector is same as "redirect url" that needs to be specified beforehand for ShareFile's api keys and if so I will need to create a new api that has a redirect url. For postman it the redirect url looks like https://www.getpostman.com/oauth2/callback, but what would be the power automate custom connector equivalent.

 

jwright2Strada_0-1719248498948.png

jwright2Strada_1-1719248554625.png

 

https://api.sharefile.com/gettingstarted/oauth2

Categories:
I have the same question (0)
  • Verified answer
    TomMoody Profile Picture
    115 on at

    Hello!


    The two terms are similar but have different meanings and purposes in the OAuth2.0 authorization process. Let me briefly explain.

     

    Step 1

    The Custom Connector sends an HTTP request to the Authorization URL you provide in the UI. This request carries your provided ‘Client ID’ and ‘Client Secret’ and uses these to authenticate with ShareFile.

     

    Step 2

    ShareFile accepts the credentials and issues your Custom Connector with an authorization code as proof of the authentication, but it needs to know where to send this information…

     

    Step 3

    ShareFile redirects to the ‘Redirect URL’ which is usually something like ‘global.azure-apim.net’ and carries the authorization code a query parameter (usually called ‘code’).

     

    Step 4

    Custom Connector exchanges this authorization code with the ‘Token URL’ and swaps the code for a token. This is the token the Custom Connector will include in every HTTP request you send to the ShareFile API in order to fully authenticate itself.


    Step 5

    The token does not last forever (usually 30 mins but it varies). When the token expires you will need to get a new one. This is where the Custom Connector uses the ‘Refresh URL’ you provide. Instead of starting all over again from step 1 it skips to step 4 and exchanges your previous authorization code for a new token.

     

    Answer

    In summary, no you do not want to use the same value for both fields. If the ShareFile API does not provide a ‘Refresh URL’ just reuse the ‘Token URL’ for both fields.

     

     

    An API might have a single ‘Token URL’ endpoint but routing and logic within that to process refresh requests and initial token requests separately, or they may have no separate refresh logic at all.

     

    ’Redirect URI’ is a value the Power Apps will autogenerate once you complete all other fields and save your custom connector for the first time.

     

    Useful source: https://www.oauth.com/oauth2-servers/server-side-apps/example-flow/

     

    Please accept this solution if it helped

  • jwright2Strada Profile Picture
    7 on at

    Thanks @TomMoody for clarifying that!

     

    Just for reference the Redirect URL to copy was at the bottom of the security panel for OAuth2, also in the Description tab for the custom connector. 

     

    Screenshot 2024-07-01 at 10.04.03 AM.png

    Screenshot 2024-07-01 at 10.03.27 AM.png

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard