airbytehq / airbytehq/airbyte

“Salesforce source: OAuth refresh token rejected on Airbyte Cloud but works locally on OSS (manual client_id/client_secret/refresh_token auth)”

Open
#68,656 7 comments 0 reactions 0 assignees View on GitHub
area/connectors autoteam community connectors/source/salesforce needs-triage team/extensibility team/use type/bug
Dominant language
Python
Stars
22.1k
Forks
5.3k
PR merge metrics
PR metrics pending

Description

### Connector Name

source-salesforce

### Connector Version

2.7.15 + 2.7.16

### What step the error happened?

Configuring a new connector

### Relevant information

Using manual authentication (client id/client secret/ refresh_token) via oauth via the salesforce connector via airbyte cloud doesn't work and throws "expired access/refresh token" error when indeed the refresh token does work. (I've verified using curl)

However, authenticating via OSS locally via salesforce connector works. I am trying to setup the salesforce connector via terraform and this is blocking me.

### Test connection via OSS locally (works! ✅ )
I pulled down repo and chucked credentials in `airbyte-integrations/connectors/source-salesforce/secrets/config.json`
```
(base) williamjiang@Williams-MacBook-Pro source-salesforce % poetry run source-salesforce check --config secrets/config.json
{"type":"LOG","log":{"level":"INFO","message":"Using concurrent cdk with concurrency level 10"}}
{"type":"LOG","log":{"level":"INFO","message":"Ignoring response for 'POST' request to 'https://login.salesforce.com/services/oauth2/token' with response code '200'"}}
{"type":"LOG","log":{"level":"INFO","message":"Ignoring response for 'GET' request to 'https://.salesforce.com/services/data/v62.0/sobjects' with response code '200'"}}
{"type":"LOG","log":{"level":"INFO","message":"Check succeeded"}}
{"type":"CONNECTION_STATUS","connectionStatus":{"status":"SUCCEEDED"}}
```

### Test connection via Airbyte Cloud UI (Doesn't work ❌ )
Using same credentials as above

Image

Logs from testing

```shell
2025-10-27 10:47:49 info
2025-10-27 10:47:49 info Transitioning workload to running state
2025-10-27 10:47:49 info Connector exited, processing output
2025-10-27 10:47:49 info Output file jobOutput.json found
2025-10-27 10:47:49 info ----- START CHECK -----
2025-10-27 10:47:49 info
2025-10-27 10:47:49 info Connector exited with exit code 0
2025-10-27 10:47:49 info Reading messages from protocol version 0.2.0
2025-10-27 10:47:49 info Using concurrent cdk with concurrency level 10
2025-10-27 10:47:49 warn The response for `https://login.salesforce.com/services/oauth2/token` was expected to be a list with at least one element but was `b'{"error":"invalid_grant","error_description":"expired access/refresh token"}'`
2025-10-27 10:47:49 error 'POST' request to 'https://login.salesforce.com/services/oauth2/token' failed with status code '400' and error message: 'invalid_grant'. Request (body): 'grant_type=refresh_token&client_id=*******&client_secret=****&refresh_token=****'. Response (body): '{'error': 'invalid_grant', 'error_description': 'expired access/refresh token'}'. Response (headers): '{'Date': 'Sun, 26 Oct 2025 23:47:47 GMT', 'Vary': 'Accept-Encoding', 'Set-Cookie': 'CookieConsentPolicy=0:0; path=/; expires=Mon, 26-Oct-2026 23:47:47 GMT; Max-Age=31536000; secure, LSKey-c$CookieConsentPolicy=0:0; path=/; expires=Mon, 26-Oct-2026 23:47:47 GMT; Max-Age=31536000; secure, BrowserId=LOtrsLLGEfCU-xOGOBUAdw; domain=.salesforce.com; path=/; expires=Mon, 26-Oct-2026 23:47:47 GMT; Max-Age=31536000; secure; SameSite=None, CookieConsentPolicy=0:0; path=/; expires=Mon, 26-Oct-2026 23:47:47 GMT; Max-Age=31536000; secure, LSKey-c$CookieConsentPolicy=0:0; path=/; expires=Mon, 26-Oct-2026 23:47:47 GMT; Max-Age=31536000; secure, BrowserId=LO87xrLGEfC3KceFMRgI5g; domain=.salesforce.com; path=/; expires=Mon, 26-Oct-2026 23:47:47 GMT; Max-Age=31536000; secure; SameSite=None', 'X-Content-Type-Options': 'nosniff', 'Strict-Transport-Security': 'max-age=63072000; includeSubDomains', 'Cache-Control': 'no-cache,must-revalidate,max-age=0,no-store,private', 'Expires': 'Thu, 01 Jan 1970 00:00:00 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Transfer-Encoding': 'chunked'}'.
2025-10-27 10:47:49 info Checking for optional control message...
2025-10-27 10:47:49 info Optional control message not found. Skipping...
2025-10-27 10:47:49 info Writing output of b117307c-14b6-41aa-9422-947e34awdc2-0b75-4b40-a2dc-87db76273eb6_0_check to the doc store
2025-10-27 10:47:50 info Workload successfully transitioned to running state
2025-10-27 10:47:50 info Marking workload b117307c-14b6-41aa-9422-9awdawd0b75-4b40-a2dc-87db76273eb6_0_check as successful
2025-10-27 10:47:50 info Deliberately exiting process with code 0.
2025-10-27 10:47:50 info
2025-10-27 10:47:50 info ----- END CHECK -----
2025-10-27 10:47:50 info
```

### Contribute

- [ ] Yes, I want to contribute

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.