Prerequisites:

  • A client application registered as a Salesforce Connected App.
  • A JWT certificate containing the private key for the registered application.

After you have registered your client application as a Salesforce Connected App and obtained the required OAuth information, you may configure the driver to access Salesforce resources using OAuth 2.0. with JWT grant.

To configure the driver, set the following connection options:

  • Set the Authentication Method option to oauth2.0.
  • Set the JWT Cert Store option to specify the file path to the certificate store containing the private key for your application.
  • Set the Claims Issuer option to specify the client ID or consumer key of the Salesforce Connected App.
  • Set the Claims Subject option to specify the username of the user.
  • Set the Schema Map option to specify either the name or the absolute path and name of the configuration file where the map of the Salesforce data model is written. Note that a value for the Schema Map option must be specified every time you authenticate to a Salesforce instance using OAuth 2.0.
  • Set the JWT Cert Password option to specify the password for the JWT certficate, if any. This is optional.
  • Set the JWT Cert Alias option to specify an alias for the JWT certficate, if any. This is optional.

Using a connection string:

DRIVER=DataDirect 8.0 Salesforce;AuthenticationMethod=oauth2.0;
SchemaMap=schema-map-name;JWTCertStore=file-path;
ClaimsIssuer=client-ID;ClaimsSubject=user-name;
JWTCertPassword=certificate-password;JWTCertAlias=certificate-alias;

Using the odbc.ini file:

Driver=ODBCHOME/lib/xxsfrc28.yy
AuthenticationMethod=oauth2.0
SchemaMap=ABC
JWTCertStore=C:\myfolder\sforce\jwtcert.jks
ClaimsIssuer=3MVG9W4cDaFe_AaloAxst7QT05kgaM41H6o3cbkPjvcCnasdasdXhHHDLGZubJdcabk
ClaimsSubject=jwtauth@abc.com
JWTCertPassword=mypassword@123x
JWTCertAlias=xyz456