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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Custom Connector to Sa...
Power Automate
Unanswered

Custom Connector to Salesforce and Refresh Token Issue

(0) ShareShare
ReportReport
Posted on by 92

I'm hoping someone has had luck building a custom connector to Salesforce and can help me out with the OAuth part. I've got my custom connector working just fine, but my connection expires after 4 hours (our Salesforce org session setting) forcing me to manually reconnect. I've given the connected app full permissions that are reflected in the Flow scope, but it's not requesting a refresh token. I can't figure out how to do this in Flow, or if it's even possible? Thanks!

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    on at
    Re: Custom Connector to Salesforce and Refresh Token Issue

    Hi @Bjorn,

     

    As far as I understand it, there seems to be no way to achieve this.

    Since your organization's settings are that the connection expires every four hours, the credentials are expired, so the connection needs to be manually updated.

    There is no way for Flow to automatically update the connection. I am afraid there is no suitable way to solve your problem.

     

    Best Regards,

    Barry

  • Verified answer
    Bjorn Profile Picture
    92 on at
    Re: Custom Connector to Salesforce and Refresh Token Issue

    Actually there is a way. I opened a support ticket and they helped me figure it out, I had the wrong token url (props to Rajat at Mindtree in Hyderabad!). I'll give details here in case it helps others.

     

    You can indeed create a custom connector to Salesforce, but do not use Salesforce as the Oauth provider as one would assume, use 'Generic Oauth 2'. With that option selected, you can enter the unique urls you need for auth and token/refresh. 

     

    2018-12-26_14-21-01.png

     

     

    Here's where things get buggy. When you click 'Update connector', it changes the Identity Provider to Salesforce and the unique urls you entered are no longer there. They actually are there and are used in your connection, but are hidden from view making debugging difficult. I opened a bug fix for this UI issue.

     

    2018-12-26_14-21-26.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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard