# Salesforce Sandbox OAuth2 connection failed 22/10/2025 (n8n cloud)

**URL:** <https://community.n8n.io/t/salesforce-sandbox-oauth2-connection-failed-22-10-2025-n8n-cloud/209817>\
**Category:** Questions\
**Created:** [22. Oktober 2025 um 10:40 UTC](https://community.n8n.io/t/salesforce-sandbox-oauth2-connection-failed-22-10-2025-n8n-cloud/209817 "2025-10-22T10:40:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arnaud\_Desile](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/arnaud_desile/32/61180_2.png) [@Arnaud\_Desile](https://community.n8n.io/u/Arnaud_Desile)\
**Post date:** [22. Oktober 2025 um 10:40 UTC](https://community.n8n.io/t/salesforce-sandbox-oauth2-connection-failed-22-10-2025-n8n-cloud/209817/1 "2025-10-22T10:40:47Z")

</div>

Hi ! I just copy/past a previous issue because i face the exact same

I am trying to connect to salesforce sandbox via OAuth Connection

## I’m trying to connect my **Salesforce Sandbox** to n8n Cloud using the built-in Salesforce OAuth2 credential.

- n8n version: 1.117.0 (Cloud)

- Auth type: OAuth2

**What I tried:**

1. Created a Connected App in Salesforce with OAuth enabled.

2. In n8n, set up a new Salesforce credential → selected **Environment Type = Sandbox**.

3. When I click **Connect my account** , it always redirects me to `login.salesforce.com` (production login), not `test.salesforce.com` or my sandbox domain.

Since the redirect always goes to `login.salesforce.com`, my sandbox user credentials are rejected with _incorrect email/password_, they only work on the sandbox domain.

What am I missing ? Need urgent help with this.

---

<div class="post-metadata">

**Author:** ![Arnaud\_Desile](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/arnaud_desile/32/61180_2.png) [@Arnaud\_Desile](https://community.n8n.io/u/Arnaud_Desile)\
**Post date:** [22. Oktober 2025 um 13:19 UTC](https://community.n8n.io/t/salesforce-sandbox-oauth2-connection-failed-22-10-2025-n8n-cloud/209817/2 "2025-10-22T13:19:22Z")

</div>

![image](https://europe1.discourse-cdn.com/n8n/original/3X/8/a/8a0709e910bb69c1f283ca64cac23407e31fcb72.png)

---

<div class="post-metadata">

**Author:** ![Jacob\_Speedy](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jacob_speedy/32/142117_2.png) [@Jacob\_Speedy](https://community.n8n.io/u/Jacob_Speedy)\
**Post date:** [3. Dezember 2025 um 14:37 UTC](https://community.n8n.io/t/salesforce-sandbox-oauth2-connection-failed-22-10-2025-n8n-cloud/209817/3 "2025-12-03T14:37:11Z")

</div>

I found that selecting “Use Custom Domain” and entering the sandbox name was a successful workaround when prompted with the [login.salesforce.com](http://login.salesforce.com/) authentication screen

---

<div class="post-metadata">

**Author:** ![Dnyaneshwar\_Rokade\_C](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/dnyaneshwar_rokade_c/32/156770_2.png) [@Dnyaneshwar\_Rokade\_C](https://community.n8n.io/u/Dnyaneshwar_Rokade_C)\
**Post date:** [3. Februar 2026 um 11:17 UTC](https://community.n8n.io/t/salesforce-sandbox-oauth2-connection-failed-22-10-2025-n8n-cloud/209817/4 "2026-02-03T11:17:43Z")

</div>

@Arnaud_Desile Did the “Use Custom Domain” solution work?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [4. Mai 2026 um 11:18 UTC](https://community.n8n.io/t/salesforce-sandbox-oauth2-connection-failed-22-10-2025-n8n-cloud/209817/5 "2026-05-04T11:18:16Z")

</div>

Geschlossen, am 4. Mai 2026 um 11:18 UTC

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