Salesforce Sandbox OAuth2 connection

Cannot connect to salesforce sandbox via OAuth Connection

No error message, but when I select sandbox and try and connect it takes me to production URL login ( and not the URL as such I am unable to connect to the sandbox.

Trying to add credential and am unable to be directed to correct login for OAuth connection

Hi @Duncan_Brown :wave: Welcome to the community!

Just to be sure, do you have the sandbox environment set here, like this, in your credentials?

And to be doubly sure, is your sandbox created and/or activated? You can find that here instructions here: Help And Training Community

Finally, could you let us know the following:

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

The sandboxes definitely exist and I have setup the connected apps.and i have selected sandbox.

Version - Standard - cloud
Database: SFDC
n8n process:??
Running via: Cloud - browser
Operation System MacOS

Hi @Duncan_Brown - looks like I can’t create a developer account that uses sandbox, so I can’t test this directly. Can you try completing the authentication and doing something relatively harmless to your Salesforce data like creating a dummy lead, and seeing if this new lead ends up in production or in sandbox? It might be that Salesforce handles authentication through your production URL instead, even if you’ll be using sandbox afterwards - and that’s a way to test :bowing_man:

I can not connect to the sandbox, even when I select the sandbox — it redirects me to login.salesforce to do OAuth Login whereas it should send me to test.salesforce

Can you try making the actual test lead or otherwise another, actual request? This may be how Salesforce handles OAuth, but without proof that this isn’t connecting as it should, I wouldn’t unfortunately know. If the test lead (or whatever you decided to create) is made in production rather than in sandbox, I can let our developers know to look into this further.

1 Like

Hi, have logged in with our org account and am having the same issue. The OAuth Connection of the credential does not send me to an appopriate login page.

It sends me to “Login.salesforce…” where it should send to “test.salesforce…” so that I can login to the sandbox environment. I am not willing to connect it to production environment as we are conduting a POC and I have setup the appropriate connected apps in the 2 sandboxes I intend on using.

We are running: version [email protected]

Hi, is there any way to get a sandbox connection working

Hi @Duncan_Brown :wave: I was out the past few days, so I wasn’t able to reply.

I’m alone on support today and don’t really have any other way to know besides what I suggested, and that suggestion also came from @MutedJam . Maybe when @Jon is back in he might have an idea?

in the auth window can you just change the URL from login.salesforce to test.salesforce press enter? Will it let you authenticate to the sandbox then?

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.