cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Custom Connector Token Refresh?

I've created a cusom connector to Salesforce (the 'Premium' Flow connector doesn't support a couple API features I need). It works fine, but stops working after 4 hours, which is the session timeout setting for our Salesforce org. I need my connector to get a refresh token but I'm not sure how to do it. Has anyone gotten a Flow custom connector access token refresh from Salesforce working?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver I
Resolver I

Re: Custom Connector Token Refresh?

Hi @manuelstgomes,

 

I'll post this in case it helps anyone else. I finally gave up with my custom connector and just make direct HTTP requests. I post my client_id, client_secret, username, and password (for Salesforce, that's password+token) to their token endpoint. The return contains an access_token that I store in a variable and use in the header of my subsequent API requests. This avoids the token refresh issue I was having and is more flexible (I can make any number of different API calls via HTTP, whereas if I used a custom connector I would have had to define them each as unique actions).

 

 

SalesforceHTTP.png

View solution in original post

3 REPLIES 3
Super User II
Super User II

Re: Custom Connector Token Refresh?

Hi @Bjorn 


I just stumbled on your request. You've been waiting a while for a reply.

Were you able to solve it? Can you post the solution so that we can all learn from it?

If you still need help, please let me know what changed.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

Highlighted
Resolver I
Resolver I

Re: Custom Connector Token Refresh?

Hi @manuelstgomes,

 

I'll post this in case it helps anyone else. I finally gave up with my custom connector and just make direct HTTP requests. I post my client_id, client_secret, username, and password (for Salesforce, that's password+token) to their token endpoint. The return contains an access_token that I store in a variable and use in the header of my subsequent API requests. This avoids the token refresh issue I was having and is more flexible (I can make any number of different API calls via HTTP, whereas if I used a custom connector I would have had to define them each as unique actions).

 

 

SalesforceHTTP.png

View solution in original post

Highlighted
Super User II
Super User II

Re: Custom Connector Token Refresh?

Hi @Bjorn 

 

Thanks for posting the solution. Well done!

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (3,490)