# Create Snowflake data sources with Okta SSO and Duo MFA

Procedure: Enable the Database Tools and SQL plugin

This functionality relies on the  Database Tools and SQL plugin, which  is bundled and enabled in IntelliJ IDEA   by default. If the relevant features are not available, make sure that you did not disable the plugin.

> **Note:**
> Database Tools and SQL functionality support is limited in IntelliJ IDEA without the Ultimate subscription.

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) to open settings and then select `Plugins`.

2. Open the Installed tab, find the Database Tools and SQL plugin, and select the checkbox next to the plugin name.

Procedure: Official documentation

* For full information about Snowflake, refer to [the official documentation](https://docs.snowflake.net/manuals/user-guide.html).

* [Guide to Two-Factor Authentication at duo.com](https://guide.duo.com/)

* [Okta Documentation at okta.com](https://help.okta.com/en-us/content/index.htm?cshid=csh-index)

For more information about the integration and connection settings, refer to  the following pages:

* [Managing/Using federated authentication](https://docs.snowflake.com/en/user-guide/admin-security-fed-auth-use)

* [Configuring an identity provider (IdP) for Snowflake](https://docs.snowflake.com/en/user-guide/admin-security-fed-auth-configure-idp)

* [Multi-factor authentication (MFA)](https://docs.snowflake.com/en/user-guide/security-mfa)

* [JDBC Driver connection parameter reference](https://docs.snowflake.com/en/developer-guide/jdbc/jdbc-parameters)

* [Key-pair authentication and key-pair rotation](https://docs.snowflake.com/en/user-guide/key-pair-auth)

* [Authentication at Okta Docs](https://help.okta.com/oie/en-us/content/topics/security/security_at_okta.htm)

## SSO using Okta

Before connecting to a Snowflake database with Okta SSO authentication   ,

make sure to install and set up

the [Okta Verify](https://help.okta.com/en-us/content/topics/mobile/okta-verify-overview.htm) application   first.

Once the required software is set up and ready ,

you need to create a Snowflake data source in IntelliJ IDEA and configure it to use it with Okta SSO authentication.

Procedure: Create a Snowflake data source to use with Okta

1. In the    Database   tool window   ,  click ![the New icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) New on the toolbar and navigate to  `Data Source | Snowflake`.

![Select the Snowflake data source](https://resources.jetbrains.com.cn/help/img/idea/2026.2/create_new_data_source_snowflake.png)

2. Check if there is a Download missing driver files link at the bottom of the connection settings area. Click this link to download drivers that are required to interact with a database.

![The Download missing driver files link](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_connection_download_missing_drivers_link.png)

3. Specify the database connection details.

1.

In the Name field, enter your new data source name.

For example, `Snowflake [Okta]`.

2.

In the Host field, type the URL to connect to your Snowflake account with. For example, `myorg-myconnection.snowflakecomputing.com`.

3. From the Authentication dropdown, select Authenticator.

4.

In the Authenticator field, type `externalbrowser` .

5.

In the User field, type the email address you use to log in to your Okta account.

6.

In the Password field, type your Okta account password.

7.   In the Database field, type the database name to which you want to connect.

8.  In the Schema field, type the schema name to which you want to connect.

9.  In the Warehouse field, type the name of a compute resources cluster in Snowflake that you want to use.

Alternatively, type your JDBC URL in the URL field. The general URL to use is as follows:

* Format: `jdbc:snowflake://<organization_name>-<connection_name>.snowflakecomputing.com/?warehouse=<warehouse_name>&db=<database_name>&schema=<schema_name>&user=<okta_username>&password=<okta_password>&authenticator=externalbrowser`

* Example: `jdbc:snowflake://myorg-myconnection.snowflakecomputing.com/?warehouse=AUTH_WH&db=TESTDB&schema=MYSCHEMA&user=MYUSERNAME@DOMAIN.COM&password=DUMMY-PASSWORD&authenticator=externalbrowser`

4. Click the Test Connection link at the bottom of the connection details area to initiate a test connection to your database.

![Test Connection link](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_test_connection_link.png)

5. On the Okta   website that opens in the browser, enter your user credentials and log in to your Okta   account.

![Log in to your Okta account on the Okta website](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_snowflake_okta_log_in_to_okta.png)

6. Verify your identity using one of the available security methods.

![Verify your identity on the Okta website](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_snowflake_okta_verify_identity.png)

7. Once Okta   confirms your identity, return to IntelliJ IDEA.

![Identity confirmation message from Okta](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_snowflake_okta_verified.png)

8. In the IDE, click   OK to save your new data source.

![Database connection details](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_connection_details_snowflake_okta_connection.png)

## MFA using Duo

Before connecting to a Snowflake database with  Duo MFA  ,

make sure to install and set up

the [Duo Mobile](https://guide.duo.com/) application  first.

Once the required software is set up and ready ,

you need to create a Snowflake data source  in IntelliJ IDEA, run a test connection and authenticate using the Duo Mobile application.

Procedure: Create a Snowflake data source to use with Duo

Depending on which Duo authentication mechanism is used, use the corresponding instructions.  For more information about Duo authentication mechanisms, refer to  [the official documentation](https://docs.snowflake.com/en/user-guide/security-mfa#using-mfa-with-jdbc).

In this tutorial, we will take a look at the Duo Push request and Duo-generated passcode methods.

> **Note:**
> To use the passcode method, enable the [Single shared session](managing-connection-sessions.html#single_shared_session) for your data source.

Duo Push request:

1.     In the    Database   tool window   ,  click ![the New icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) New on the toolbar and navigate to  `Data Source | Snowflake`.

![Select the Snowflake data source](https://resources.jetbrains.com.cn/help/img/idea/2026.2/create_new_data_source_snowflake.png)

2.

Check if there is a Download missing driver files link at the bottom of the connection settings area. Click this link to download drivers that are required to interact with a database.

![The Download missing driver files link](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_connection_download_missing_drivers_link.png)

3.  Specify the database connection details.

1.

In the Host field, type the URL to connect to your Snowflake account with. For example, `myorg-myconnection.snowflakecomputing.com`.

2.

In the User and Password fields, type your Snowflake account user credentials.

3.   In the Database field, type the database name to which you want to connect.

4.  In the Schema field, type the schema name to which you want to connect.

5.  In the Warehouse field, type the name of a compute resources cluster in Snowflake that you want to use.

Alternatively, type your JDBC URL in the URL field. The general URL to use is as follows:

* Format: `jdbc:snowflake://<organization_name>-<connection_name>.snowflakecomputing.com/?warehouse=<warehouse_name>&db=<database_name>&schema=<schema_name>&user=<snowflake_username>&password=<snowflake_password>`

* Example: `jdbc:snowflake://myorg-myconnection.snowflakecomputing.com/?warehouse=AUTH_WH&db=TESTDB&schema=MYSCHEMA&user=MYUSERNAME&password=DUMMY-PASSWORD`

4.

Click the Test Connection link at the bottom of the connection details area to initiate a test connection to your database.

![Test Connection link](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_test_connection_link.png)

5.

In the Duo Mobile application, you will receive a push with login approval request. Click Approve to approve it.

![Login approval request in Duo Mobile application](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_snowflake_auth_duo_app_request.png)

6.

In the IDE, click   OK to save your new data source.

![Database connection details](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_connection_details_snowflake_duo_connection.png)

Duo-generated passcode:

1.     In the    Database   tool window   ,  click ![the New icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) New on the toolbar and navigate to  `Data Source | Snowflake`.

![Select the Snowflake data source](https://resources.jetbrains.com.cn/help/img/idea/2026.2/create_new_data_source_snowflake.png)

2.

Check if there is a Download missing driver files link at the bottom of the connection settings area. Click this link to download drivers that are required to interact with a database.

![The Download missing driver files link](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_connection_download_missing_drivers_link.png)

3.

In the URL field, type your JDBC URL. Depending on which parameter you use, the general URL to use is as follows:

1.

Using `passcode=<passcode_from_app>`:

* Format: `jdbc:snowflake://<organization_name>-<connection_name>.snowflakecomputing.com/?warehouse=<warehouse_name>&db=<database_name>&schema=<schema_name>&user=<snowflake_username>&password=<snowflake_password>&passcode=<passcode_from_app>`

* Example: `jdbc:snowflake://myorg-myconnection.snowflakecomputing.com/?warehouse=AUTH_WH&db=TESTDB&schema=MYSCHEMA&user=MYUSERNAME&password=DUMMY-PASSWORD&passcode=123456`

2.

Using `passcodeInPassword=on`:

* Format: `jdbc:snowflake://<organization_name>-<connection_name>.snowflakecomputing.com/?warehouse=<warehouse_name>&db=<database_name>&schema=<schema_name>&user=<snowflake_username>&password=<snowflake_password><passcode_from_app>&passcodeInPassword=on`

* Example: `jdbc:snowflake://myorg-myconnection.snowflakecomputing.com/?warehouse=AUTH_WH&db=TESTDB&schema=MYSCHEMA&user=MYUSERNAME&password=DUMMY-PASSWORD123456&passcodeInPassword=on`

> **Tip:**
> The passcode is only valid for a short period of time. Make sure to enter your JDBC URL in the URL field before requesting the passcode.

![Prepared JDBC URL in URL field](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_snowflake_duo_connection_url_passcode_empty.png)

4.

In the Duo Mobile application, obtain the passcode.

![Passcode in the Duo Mobile application](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_snowflake_auth_duo_app_passcode.png)

5.

In IntelliJ IDEA, type the passcode into the prepared JDBC URL in URL field.

![JDBC URL with the passcode from Duo application](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_snowflake_duo_connection_url_passcode.png)

6.

Click the Test Connection link at the bottom of the connection details area to initiate a test connection to your database.

![Test Connection link](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_test_connection_link.png)

7.

Click  OK to save your new data source.

## Okta SSO and Duo MFA

Before connecting to a Snowflake database with   Okta SSO and Duo MFA ,

make sure to install and set up

the [Okta Verify](https://help.okta.com/en-us/content/topics/mobile/okta-verify-overview.htm) and [Duo Mobile](https://guide.duo.com/) applications  first.

Once the required software is set up and ready ,

you need to create a Snowflake data source    in IntelliJ IDEA and configure it to use it with Okta SSO authentication. Then, run a test connection and log in to your Okta account using Duo MFA in the Duo Mobile application.

Procedure: Create a data source using Duo MFA

1. In the    Database   tool window   ,  click ![the New icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) New on the toolbar and navigate to  `Data Source | Snowflake`.

![Select the Snowflake data source](https://resources.jetbrains.com.cn/help/img/idea/2026.2/create_new_data_source_snowflake.png)

2. Check if there is a Download missing driver files link at the bottom of the connection settings area. Click this link to download drivers that are required to interact with a database.

![The Download missing driver files link](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_connection_download_missing_drivers_link.png)

3. Specify the database connection details.

1.

In the Name field, enter your new data source name.

For example, `Snowflake [Okta, Duo]`.

2.

In the Host field, type the URL to connect to your Snowflake account with. For example, `myorg-myconnection.snowflakecomputing.com`.

3. From the Authentication dropdown, select Authenticator.

4.

In the Authenticator field, type `externalbrowser` .

5.  In the Warehouse field, type the name of a compute resources cluster in Snowflake that you want to use.

Alternatively, type your JDBC URL in the URL field. The general URL to use is as follows:

* Format: `jdbc:snowflake://<organization_name>-<connection_name>.snowflakecomputing.com/?warehouse=<warehouse_name>&db=<database_name>&schema=<schema_name>&user=<okta_username>&password=<okta_password>&authenticator=externalbrowser`

* Example: `jdbc:snowflake://myorg-myconnection.snowflakecomputing.com/?warehouse=AUTH_WH&db=TESTDB&schema=MYSCHEMA&user=MYUSERNAME@DOMAIN.COM&password=DUMMY-PASSWORD&authenticator=externalbrowser`

4. Click the Test Connection link at the bottom of the connection details area to initiate a test connection to your database.

![Test Connection link](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_test_connection_link.png)

5. Okta redirects you to the Duo Security website to verify your identity.

![Okta website redirects to the Duo Security website](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_snowflake_okta_duo_redirect_to_duo.png)

6. On the Duo Security website, select an option to log in. In this tutorial, we will use the Duo Push one.

![Selecting the Duo Push option to log in](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_snowflake_okta_duo_login_options.png)

7. Duo Security provides you with a 3-digit verification code that you have to enter in the Duo Mobile application.

![Verification code on the Duo Security website](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_snowflake_auth_okta_duo_code_web.png)

8. In the Duo Mobile application, enter your verification code and click Verify.

![Entering the verification code in the Duo Mobile application](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_snowflake_auth_okta_duo_code_app.png)

9. Duo Security logs you in to the account and redirects to the Okta website.

![Duo Security website logs you in to the account](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_snowflake_okta_duo_login_success.png)

10. Once Okta   confirms your identity, return to IntelliJ IDEA.

![Identity confirmation message from Okta](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_snowflake_okta_verified.png)

11. In the IDE, click   OK to save your new data source.

![Database connection details](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_connection_details_snowflake_okta_duo_connection.png)

