getredash/redash · error · Exception
Failed describing objects.
Error message
Failed describing objects.
What it means
Raised by Salesforce.test_connection (redash/query_runner/salesforce.py:90) when a SimpleSalesforce describe() call returns None. test_connection is invoked from Redash's 'Test Connection' button on the Salesforce data source settings page, so this indicates the Salesforce API did not return a usable global describe response — almost always an authentication or connectivity problem.
Source
Thrown at redash/query_runner/salesforce.py:90
"properties": {
"username": {"type": "string"},
"password": {"type": "string"},
"token": {"type": "string", "title": "Security Token"},
"sandbox": {"type": "boolean"},
"api_version": {
"type": "string",
"title": "Salesforce API Version",
"default": DEFAULT_API_VERSION,
},
},
"required": ["username", "password"],
"secret": ["password", "token"],
}
def test_connection(self):
response = self._get_sf().describe()
if response is None:
raise Exception("Failed describing objects.")
pass
def _get_sf(self):
sf = SimpleSalesforce(
username=self.configuration["username"],
password=self.configuration["password"],
security_token=self.configuration["token"],
sandbox=self.configuration.get("sandbox", False),
version=self.configuration.get("api_version", DEFAULT_API_VERSION),
client_id="Redash",
)
return sf
def _clean_value(self, value):
if isinstance(value, OrderedDict) and "records" in value:
value = value["records"]
for row in value:
row.pop("attributes", None)View on GitHub (pinned to ca79fe988d)
Solutions
- Verify username/password and append the current security token to the password (password + token) or install a security token
- Confirm the correct login domain (production vs test.salesforce.com sandbox) matches the credential origin
- Add the Redash server IP to the Salesforce org's login IP ranges or remove IP restrictions
- If SSO-only login is enforced, create a dedicated API user with password auth for Redash
Defensive patterns
Strategy: retry
Try / catch
try:
ds.query_runner.test_connection()
except Exception as e:
return ok=False, message='Salesforce connection failed: {}'.format(e) Prevention
- Store the Salesforce security token with the password (password+token) in a vault
- Create a dedicated API user exempt from IP range restrictions for the Redash host
- Rotate/refresh credentials on a schedule and re-test the connection afterwards
When it happens
Trigger: Clicking Test Connection on a Salesforce data source with wrong username/password/security token, an expired or reset security token, a sandbox vs production login URL mismatch, IP blocked by Salesforce login ranges, or network/DNS failure to login.salesforce.com.
Common situations: User reset their Salesforce password which invalidates the security token; forgot to append the security token to the password; org restricts logins by IP allowlist and the Redash server IP is not listed; sandbox credentials used against production URL.
Related errors
- Invalid JWT token
- Username and Password required
- Azure AD Client ID, Client Secret, and Tenant ID are require
- Got invalid response from Graphite (http status code: {0}).
- MongoDB connection error
AI-assisted analysis of getredash/redash@ca79fe988d (2026-08-28).
Data as JSON: /api/errors/c38ce91294e6b069.
Report an issue: GitHub.