Can't Connect Salesforce OAuth2 in n8n – Redirect URI Not Accepted

Great — here’s your final n8n community post with all details filled in:


Describe the problem/error/question

I’m trying to connect to Salesforce (OAuth2) from n8n (latest version, running on AKS). I have a Connected App in Salesforce with only client_id and client_secret, and we use a custom domain:
https://xyz.my.salesforce.com.

n8n generates a redirect URI, which I copied exactly into the Salesforce Connected App’s OAuth callback URL field.

However, when attempting to authorize, I get a redirect URI mismatch error.

What is the error message (if any)?

error=redirect_uri_mismatch
error_description=redirect_uri must match configuration

Please share your workflow

(Not applicable – issue occurs during credential setup.)

Share the output returned by the last node

N/A – OAuth flow fails before any node is executed.

Information on your n8n setup

  • n8n version: 1.94.1
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker on Azure Kubernetes Service (AKS)
  • Operating system: Ubuntu (in container)

Hey @kishore_kunal !! Hope you are doing great!
I was able to execute that connection by following this doc: Salesforce credentials | n8n Docs Basically the OAuth Redirect URL should be the same as you provided in your API(Enable OAuth Settings) in Callback URL app setting. Happy to know if that works for you!

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