ThoughtSpot acquires Mode to define the next generation of collaborative BI >>Learn More

OAuth Support

Mode supports OAuth authentication for select databases. With OAuth, each Mode user signs in to the database with their own credentials, and queries run with that user's database permissions. Mode does not store a shared database username or password for the connection.

Use OAuth when you want:

  • Row and object level access in your database to apply to every query a user runs in Mode
  • Query activity in your database to be attributed to the individual Mode user
  • To avoid managing a shared service account password or key

NOTE: OAuth is enforced at query execution time only. Sharing reports and results in Mode is still controlled by Mode permissions, so a user who can view a report can see its results even if they could not run the query in the database themselves.

The following databases support OAuth in Mode:

DatabaseSupported OAuth Methods
SnowflakeOAuth, OAuth with PKCE

Snowflake

Mode supports two OAuth methods for Snowflake:

  • OAuth: uses an OAuth client ID and client secret
  • OAuth with PKCE: uses an OAuth client ID only. No client secret is required

Prerequisites

Before you connect Snowflake to Mode with OAuth, make sure you have:

  • Workspace admin access in Mode
  • An OAuth client ID from your Snowflake admin, plus a client secret if you are using OAuth without PKCE
  • A Snowflake JDBC driver version supported by Mode. We recommend 3.26.0.

Connect Snowflake to Mode using OAuth

  1. Click your name in the upper left corner of Mode and select Workspace Settings.
  2. Under Data, click Connections, then click Connect a database.
  3. Select Snowflake from the list of databases.
  4. For Authentication method, select OAuth or OAuth with PKCE.
  5. Enter the connection details:
FieldDescription
Display nameThe name users see for this connection in Mode
DescriptionOptional. A short description of the connection
Account URL / HostYour Snowflake account URL, for example abc12345.us-east-1.snowflakecomputing.com
Account identifierYour Snowflake account identifier, for example abc12345
WarehouseThe default warehouse for queries on this connection
DatabaseThe default database for this connection
RoleOptional. The default role. If left blank, each user's default Snowflake role is used
OAuth client IDThe OAuth client ID provided by your Snowflake admin
OAuth client secretOAuth only. The OAuth client secret provided by your Snowflake admin. Not shown for OAuth with PKCE
JDBC driverThe Snowflake JDBC driver version. We recommend 3.26.0.
  1. Click Connect. Mode redirects you to Snowflake.
  2. Sign in to Snowflake and click Allow to grant Mode access.

Once authorized, you return to Mode and the connection is ready to use.

Authenticating as a user

Every Mode user must authorize the connection with their own Snowflake account before they can run queries against it.

  1. Open a report or create a new query, then click the name of the Snowflake OAuth connection in the data source selector.
  2. When prompted, click Continue to Snowflake.
  3. Enter your Snowflake username and password, or click Sign in using SSO.
  4. Once you return to Mode, you can run queries as usual.

After the token expires, or if it is revoked in Snowflake, Mode prompts the user to re-authenticate the next time they run a query.

Scheduled runs

Scheduled report runs use the OAuth token of the report owner. If the owner's token expires or is revoked, scheduled runs fail until the owner re-authenticates. Ask report owners to re-authenticate before their token expires to avoid missed runs.

Snowflake OAuth FAQs

Should I use OAuth or OAuth with PKCE?

Use the method that matches the OAuth client your Snowflake admin set up. If your admin gave you a client ID and a client secret, use OAuth. If they gave you a client ID only, use OAuth with PKCE.

Can I switch an existing Snowflake connection from password or key pair to OAuth?

We recommend creating a new connection with OAuth and moving reports to it. Each user then authorizes the new connection with their own Snowflake account.

Does schema refresh work with OAuth?

Yes. Schema refresh retrieves all databases the authenticated user has access to in Snowflake, and is not limited to the default database and warehouse on the connection.

Was this article helpful?

Get more from your data

Your team can be up and running in 30 minutes or less.