JDBC Driver for Snowflake

Build 25.0.9434

Creating a Custom OAuth App

If you do not have access to the user name and password or do not wish to require them, you can use OAuth authentication. Snowflake uses the OAuth, which requires the authenticating user to interact with Snowflake via the browser. The driver facilitates the OAuth exchange in various ways, as described in this section.

Create an OAuth Integration

To register your client, create an integration. An integration is a Snowflake object that provides an interface between Snowflake and third-party services, such as a client that supports OAuth.

Note: Only account administrators (users with the ACCOUNTADMIN role) or a role with the global CREATE INTEGRATION privilege can execute this SQL command.

Create an integration using the CREATE SECURITY INTEGRATION command. For example:

create security integration MYINT
  type = oauth
  enabled = true
  oauth_client = custom
  oauth_client_type = 'CONFIDENTIAL'
  oauth_redirect_uri = 'http://localhost:33333'
  oauth_issue_refresh_tokens = true
  oauth_refresh_token_validity = 86400
  oauth_allow_non_tls_redirect_uri = true
  oauth_client_rsa_public_key ='
  MIIBI
  ..
  ';

After successfully creating the integration object, you can retrieve the Client_ID and Client_Secret using the following command:

select system$show_oauth_client_secrets('MYINT');

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434