OAuth 2.0 authentication string
- Last Updated: July 30, 2025
- 2 minute read
- DataDirect Connectors
- ODBC
- Salesforce 8.0
- Documentation
This string includes the options used to connect using OAuth 2.0
authentication.
Note: The
strings demonstrated in this section use the DSN-less format. For additional formats, see
Using a connection string.
DRIVER=DataDirect 8.0 Salesforce;AuthenticationMethod=oauth2.0;SchemaMap=schema_map;
ClientId=client_id;AccessToken=access_token;RefreshToken=refresh_token;
ClientSectret=client_secret;[attribute=value[;...]];
where:
- schema_map
-
specifies either the name or the absolute path and name of the configuration file where the map of the Salesforce data model is written.Note: The value for the SchemaMap option must be specified every time you authenticate to a Salesforce instance using OAuth 2.0.
- hostname
- the base URL or IP address of the Salesforce instance to which you want to connect. If you are logging into a Salesforce instance other than the default, you must provide the root of the Salesforce URL or IP address. The default is login.salesforce.com.
- client_id
-
specifies the consumer key for your application.
- access_token
-
(optionally) specifies the access token you have obtained from Salesforce.
- refresh_token
-
(optionally) specifies the refresh token you have obtained from Salesforce.
Important: If a value for the AccessToken option is not specified, the driver
uses the value of the RefreshToken option to make a connection. If both values are not
specified, the driver cannot make a successful connection. If both are specified, the
driver ignores the AccessToken value and uses the RefreshToken value to generate a new
AccessToken value.
- client_secret
-
(optionally) specifies the consumer secret for your application.
- attribute=value
- specifies connection option settings. Multiple option attributes are separated by a semi-colon.
The following example connection string includes the options used for connecting with OAuth 2.0 authentication:
DRIVER=DataDirect 8.0 Salesforce;AuthenticationMethod=oauth2.0;SchemaMap=MyMap;
ClientId=RaARBTsXZTeN4Qx67qPLOS;RefreshToken=YaTARBsRZLeM4Px47qSOLP;
AccessToken=ZbTARBsRZLeM4Px56qOLPS