{"record":{"id":"c38ce91294e6b069","repo":"getredash/redash","slug":"failed-describing-objects","errorCode":null,"errorMessage":"Failed describing objects.","messagePattern":"Failed describing objects\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"redash/query_runner/salesforce.py","lineNumber":90,"sourceCode":"            \"properties\": {\n                \"username\": {\"type\": \"string\"},\n                \"password\": {\"type\": \"string\"},\n                \"token\": {\"type\": \"string\", \"title\": \"Security Token\"},\n                \"sandbox\": {\"type\": \"boolean\"},\n                \"api_version\": {\n                    \"type\": \"string\",\n                    \"title\": \"Salesforce API Version\",\n                    \"default\": DEFAULT_API_VERSION,\n                },\n            },\n            \"required\": [\"username\", \"password\"],\n            \"secret\": [\"password\", \"token\"],\n        }\n\n    def test_connection(self):\n        response = self._get_sf().describe()\n        if response is None:\n            raise Exception(\"Failed describing objects.\")\n        pass\n\n    def _get_sf(self):\n        sf = SimpleSalesforce(\n            username=self.configuration[\"username\"],\n            password=self.configuration[\"password\"],\n            security_token=self.configuration[\"token\"],\n            sandbox=self.configuration.get(\"sandbox\", False),\n            version=self.configuration.get(\"api_version\", DEFAULT_API_VERSION),\n            client_id=\"Redash\",\n        )\n        return sf\n\n    def _clean_value(self, value):\n        if isinstance(value, OrderedDict) and \"records\" in value:\n            value = value[\"records\"]\n            for row in value:\n                row.pop(\"attributes\", None)","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/getredash/redash/blob/ca79fe988d81cdac9675b412f3dfcab107bc1fbc/redash/query_runner/salesforce.py#L72-L108","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ds.query_runner.test_connection()\nexcept Exception as e:\n    return ok=False, message='Salesforce connection failed: {}'.format(e)","preventionTips":["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"],"tags":["salesforce","redash","authentication","connection-test"],"backgroundTag":"salesforce-authentication-failed","analyzedSha":"ca79fe988d81cdac9675b412f3dfcab107bc1fbc","analyzedAt":"2026-08-28T18:32:34.637Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}