Single sign-on authentication
- Last Updated: July 14, 2023
- 1 minute read
- DataDirect Connectors
- JDBC
- Snowflake 6.0
- TeamCity 6.0
- Documentation
To configure the driver to use single sign-on (SSO) authentication.
- Set the AuthenticationMethod property to
BrowserBasedSSO. - Set the AccountName property to the account and region where it is hosted.
- Set the DatabaseName property to specify the name of the database to which you are connecting.
- Set the Schema property 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 property 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 User property to provide the user ID.
- Set the credentials user name and password in the Active Directory page, if you are not logged in to Snowflake.
The following examples demonstrate how to make a connection using the single sign-on (SSO) authentication.
Connection URL:
Connection conn = DriverManager.getConnection
("jdbc:datadirect:snowflake://snowflakecomputing.com;
AuthenticationMethod=BrowserBasedSSO;AccountName=accountname.us-east-1;
DatabaseName:payroll;Schema=xyz;Warehouse=accounting;User=jSmith@example.com;);
Data Source:
SnowflakeDataSource mds = new SnowflakeDataSource();
mds.setDescription("My Snowflake Data Source");
mds.setAuthenticationMethod("BrowserBasedSSO");
mds.setAccountName("accountname.us-east-1");
mds.setDatabaseName("payroll");
mds.setSchema("xyz");
mds.setWarehouse("accounting");
mds.setUser("jSmith@example.com");