The authentication flow for the client credentials grant exchanges client credentials for the access token at the location specified by the Toke URI (TokenURI) option. Web-based login and consent are not required.

To configure the driver to use a client credentials grant:

  • Set the Authentication Method (AuthenticationMethod) option to 24.
  • Set the Account Name (AccountName) option to specify the name of your account and the region where it is hosted. For example, account_name.us-east-1.
  • Set the Database Name (DatabaseName) option to specify the name of database to which you want to connect.
  • Set the Schema (Schema) option to specify the default schema to use for the specified database once connected. The specified schema should be an existing schema for which the specified default role has privileges.
  • Set the Warehouse (Warehouse) option to specify the virtual warehouse to use once connected. The specified warehouse should be an existing warehouse for which the specified default role has privileges.
  • Set the Client ID (ClientID) option to specify the client ID for your application.
  • Set the Client Secret (ClientSecret) option to specify client secret for your application.
    Important: The client secret is a confidential value used to authenticate the application to the server. To prevent unauthorized access, this value must be securely maintained.
  • Set the Token URI (TokenURI) option to specify the endpoint from which the driver fetches access tokens.

The following examples show the connection information required to establish a session using the client credentials grant.

Connection string

DRIVER=DataDirect 8.0 Snowflake;AuthenticationMethod=24;
  AccountName=account_name.us-east-1;DatabaseName=MyDB;Schema=MySchema;Warehouse=MyWH;
  ClientId=cd34efg5678h9ij87klm6543no32pqr10st987;ClientSecret=098zyx765wvu432tsr123qpo456;
  TokenURI=https://account_name.us-east-1.snowflakecomputing.com/oauth/token-request;

odbc.ini file (32-bit)

Driver=ODBCHOME/lib/ivsnowflake28.yy
...
AuthenticationMethod=24
...
AccountName=account_name.us-east-1
...
DatabaseName=MyDB
...
Schema=MySchema
...
Warehouse=MyWH
...
ClientId=cd34efg5678h9ij87klm6543no32pqr10st987
...
ClientSecret=098zyx765wvu432tsr123qpo456
...
TokenURI=https://account_name.us-east-1.snowflakecomputing.com/oauth/token-request
...