Skip to main content
Connect your Snowflake account so the agent can query it from a notebook as you, not as a shared service account. Snowflake enforces your own grants, and every query runs under one role your admin chooses. Sign-in works for accounts with no password to give. If your account signs in through Microsoft Entra, Okta, or another identity provider, Snowflake hands you off to that provider and back. Nobody types a Snowflake password into Qualia.
Qualia has your Snowflake permissions under the chosen role. To prevent writes, make that role read-only and list only it in ALLOWED_ROLES_LIST.

Prerequisites

  • A Snowflake account where someone with ACCOUNTADMIN can create a security integration. On a trial account you have it. In an enterprise account, ask whoever owns it.
  • A role for Qualia sessions. One role covers every sign-in.
  • A warehouse that role can use.
  • No network policy that blocks Qualia. Qualia Cloud can’t reach an account behind an IP allowlist, so connect from the desktop app instead.
Creating the security integration needs ACCOUNTADMIN once. In Qualia Cloud, saving the connection also needs an organization admin in Qualia.

Required privileges

Each person who signs in needs these in Snowflake:

Create the security integration

An ACCOUNTADMIN runs one statement by hand. Qualia Cloud and the desktop app each need their own integration.
1

Copy the redirect URL

Open Settings > Integrations > Snowflake and click the copy button next to Redirect URL. Snowflake matches it character for character, so paste it rather than retyping it.
2

Create the integration

Run this in Snowflake, replacing the bracketed values:
3

Get the client ID and secret

Run SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('QUALIA_OAUTH'); and keep the client ID and secret for the next section.

What the parameters do

  • ALLOWED_ROLES_LIST is the access bound. Snowflake blocks every role not on the list for this integration.
  • PRE_AUTHORIZED_ROLES_LIST skips the consent screen for the listed roles. Snowflake supports it for confidential clients only, so the desktop integration leaves it out.
  • OAUTH_ISSUE_REFRESH_TOKENS keeps you signed in. After OAUTH_REFRESH_TOKEN_VALIDITY lapses, at most 90 days, everyone signs in again.
  • IS_AGENTIC marks these sessions as agent access in your audit history.
Don’t set OAUTH_USE_SECONDARY_ROLES to IMPLICIT, because that activates each user’s default secondary roles and bypasses ALLOWED_ROLES_LIST. Leave it unset so it keeps its default, NONE.

Connect Qualia

Snowflake settings have two steps. Step 1, Account points Qualia at your account and its security integration. Step 2, Your access is your personal sign-in, available once step 1 is saved.
1

Open Snowflake settings

Go to Settings > Integrations > Snowflake.
2

Enter the account identifier

Enter the part of your Snowsight URL before .snowflakecomputing.com in Account identifier. Both the [ORG]-[ACCOUNT] form and the legacy [LOCATOR].[REGION] form work.
3

Paste the client credentials

Paste OAuth client ID. If you use Qualia Cloud, also paste OAuth client secret. The desktop app has no secret field.
4

Set the role and warehouse

Enter the Role you listed in ALLOWED_ROLES_LIST, and optionally a Warehouse, Default database, and Default schema. The warehouse applies to queries that don’t name one.
5

Save

Click Save connection.
Then sign in:
  • If you use Qualia Cloud, click Sign in with Snowflake under Your access and authorize. Each other member of your organization signs in the same way. The account configuration is shared, but each authorization is personal.
  • If you use the desktop app, there is no sign-in button. Your first query opens the browser to sign in, and later queries and new kernels don’t ask again.
If your account uses single sign-on, Snowflake sends you to your identity provider during sign-in.
Changing the role, the account, or the OAuth client signs everyone out, so everyone must authorize again.

Query from a notebook

Ask the agent, or write the query yourself:
The result is a pandas DataFrame in the notebook kernel, the process that runs your code. Qualia can then trace a claim, a finding recorded in your project, back to the data behind it. On desktop, the agent installs the Snowflake connector before your first query.

Disconnect or remove the connection

  • Disconnect under Your access (Qualia Cloud) revokes your own saved authorization. Other members stay connected.
  • Remove under Remove connection deletes the account configuration. In Qualia Cloud it also removes every member’s authorization.
On desktop, Remove clears the settings but not the Snowflake connector’s cached sign-in. To revoke that immediately, revoke the grant in Snowflake.

Troubleshooting