Skip to main content
All CollectionsCommon Debugging Guides
Debugging Salesforce accounts with invalid_grant errors
Debugging Salesforce accounts with invalid_grant errors

Debugging steps for resolving the "invalid_grant" error for Salesforce linked accounts

Updated over 9 months ago

What is this error?

If you see the following error in your Merge logs, this guide is for you!

Common causes & resolution steps

  1. (Most Common) The "Immediately Expire Refresh Token" setting is enabled in the Connected App.
    ​

    Resolution:

    1. Your Connected App: Please ensure "Refresh token is valid until revoked" is selected in your Connected App configuration:

      1. On the Manage Connected Apps screen, find the App that was created and click Edit

      2. Ensure the Refresh Token Policy is set to: Refresh token is valid until revoked.

    2. Your End-users: End-users can also change this setting after they have connected their account, so we recommend asking them to check that this setting is correct within their Salesforce account for your connected app. They can use the same steps as above!


      After both of the steps are completed, your customers with this error will need to relink their accounts to Merge.
      ​

  2. Exceeding Access Grants Limit: Salesforce limits users to 5 access grants for a single Connected App. Exceeding this limit revokes the oldest approval. You can learn more about this here.
    ​
    ​Resolution: Ensure you have less than 5 access grants for this Connected App. We recommend only using this connected app for connections through Merge and creating new Connected Apps if you need to connect to other tools!

Did this answer your question?