cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bjorn
Level 8

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
Bjorn
Level 8

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
Super User

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
Bjorn
Level 8

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

Super User
Super User

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

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,327)