What you will be able to do
- Explain what the OAuth client ID and client secret do in a dbt platform warehouse connection, and who enters them
- Retrieve a Snowflake client ID and secret from a security integration and enter them on the account-level connection
- Generate a Databricks or BigQuery OAuth client secret and place it in the correct section of the dbt connection
- Tell apart the connection fields used for native OAuth from the Integrations page used for external OAuth
Key concept
Connection-level OAuth client credentials — The client ID and client secret identify dbt to the warehouse as a registered OAuth application. An admin creates them once on the warehouse side and stores them on the dbt connection. Every developer's later OAuth sign-in then runs through that one registered client.
1.What the client ID and secret are for
With warehouse OAuth, dbt never stores a developer's warehouse password. Each developer signs in through the warehouse's own login or SSO. To make that work, the warehouse first has to recognise dbt as a trusted application. The client ID is the public name of that application. The client secret proves that a request really comes from dbt. Both are set once per connection, and every developer on the project uses them.
The work is split between two groups of people. An admin creates the OAuth application on the warehouse side, copies its client ID and secret, and pastes them into the dbt connection. Only after that can each developer complete their own authorization from their profile credentials. That second step is covered under [developer OAuth authorization](lesson:1.4). If the client credentials are missing from the connection, there is nothing for developers to authorize against.
Native OAuth is available on Enterprise and Enterprise+ plans. The setup docs cover Snowflake, Databricks and BigQuery. Snowflake and Redshift can also use an external identity provider. Each platform generates its client credentials differently and puts them in a different part of the dbt connection, and that difference is what the rest of this page is about.
Checkpoint 1 of 8· Check yourself
A new developer joins a project that already uses Snowflake OAuth. What do they have to do with the Snowflake client ID and secret?
The client credentials belong to the connection and are configured once by an admin. Each developer only authorizes their own user credentials in their profile.
“Admins configure the OAuth integration; developers complete a one-time authorization in their profile.”Source: docs.getdbt.com
2.Snowflake: read the secret from the security integration
For Snowflake, the client ID and secret come from a Snowflake security integration. They are not created in a console screen. A Snowflake admin first creates an integration of TYPE = OAUTH, with dbt's redirect URI in it. The example integration is named DBT_CLOUD. Creating it takes privilege: only users with the ACCOUNTADMIN role, or a role with the global CREATE INTEGRATION privilege, can run that statement. The full statement and its fields are part of [developer OAuth authorization](lesson:1.4). For this lesson, what matters is that the integration now holds a client ID and secret.
To read them, run system$show_oauth_client_secrets against the integration name. The query below parses the JSON it returns into two columns, client_id and client_secret. The name you pass in must exactly match the name you gave the integration. If you pass a different name, you are querying the wrong integration, or one that doesn't exist.
Checkpoint 2 of 8· Fill the gap
Which argument completes this query so that it returns dbt's Snowflake client ID and secret?
with
integration_secrets as (
select parse_json(system$show_oauth_client_secrets( ? )) as secrets
)
select
secrets:"OAUTH_CLIENT_ID"::string as client_id,
secrets:"OAUTH_CLIENT_SECRET"::string as client_secret
from
integration_secrets;The function takes the name of the security integration. In the example, the integration was created as DBT_CLOUD, so that is the name the query passes in.
Source: docs.getdbt.comThe Database Admin then enters the two values on the dbt side. Snowflake connections are an account-level resource, so the path starts in Account Settings → Connections:
1. Navigate to Account Settings, click Connections, and select the Snowflake connection. 2. Edit the connection and enter the Client ID and Client Secret. 3. Click Save.
After you save, developers on the project see a Connect to Snowflake Account button in their profile credentials. Clicking it sends them to Snowflake to authorize. If someone reports that the button is missing, check first whether the connection's client credentials were ever saved.
Checkpoint 3 of 8· Exam question
A dbt Cloud administrator has created a Snowflake security integration and retrieved the OAUTH_CLIENT_ID and OAUTH_CLIENT_SECRET values from Snowflake using the `system$show_oauth_client_secrets` function. Where should the administrator paste these two values to complete the connection setup in dbt Cloud?
Correct answer: A — Open the account-level Snowflake connection under Account Settings, then Connections, click Edit, and paste the values into the Client ID and Client Secret fields.
- A. The warehouse connection is an account-level resource, and the Snowflake connection's Edit screen under Connections is exactly where the retrieved OAuth Client ID and Client Secret fields live, so this completes the setup correctly.
- B. The project's Development connection page is used to find the redirect URI needed before creating the security integration, not to store the Client ID and Client Secret once Snowflake has issued them.
- C. A developer's Profile Credentials page is where an individual authorizes their own OAuth session after the admin has finished configuring the connection; it does not hold the shared Client ID and Client Secret.
- D. Environment variables on a job control runtime configuration for that job's runs, not the account-level OAuth credentials that Snowflake issues for the shared warehouse connection.
Sources2
3.Databricks: generate once, store under Optional settings
In Databricks, dbt is registered as a custom OAuth application. In the account console, open Settings → App connections → Add connection. Give the connection a name, the two redirect URLs for your dbt region, the access scopes, and token lifetimes. Then select Generate a client secret. That moment is the only chance to copy the secret, so put it straight into a secure store. Choose the scopes carefully too. SQL models need the SQL scope. Python models need the ALL APIs scope.
The values go in a different place than Snowflake's, and it's easy to miss. Open Account settings, select Projects, choose the project, click Connections, select the Databricks connection, and click Edit. The client ID and secret are not among the main connection fields. They go under the Optional settings section, as OAuth Client ID and OAuth Client Secret.
Checkpoint 4 of 8· Check yourself
An admin edits the project's Databricks connection to add the OAuth app's credentials. Where do the values go?
Databricks client credentials are stored on the connection, in its Optional settings section. Integrations is used for external IdP OAuth, and profiles hold only each developer's own authorization.
“Under the Optional settings section, add the OAuth Client ID and OAuth Client Secret from the Databricks OAuth app.”Source: docs.getdbt.com
Checkpoint 5 of 8· Exam question
A dbt Cloud project admin is setting up Databricks OAuth so developers can authenticate to a Databricks workspace from the Studio IDE. After generating a client secret in the Databricks account console, where in dbt Cloud does the admin enter the OAuth Client ID and Client Secret for this connection?
Correct answer: A — In the Databricks connection's Optional settings section, reached through the project's Connections tab and the Edit action.
- A. Databricks OAuth credentials are entered on the connection itself, and the Optional settings section of that connection's Edit screen is specifically where the Client ID and Client Secret fields appear.
- B. Service tokens authenticate API callers to dbt Cloud itself and have no field for a Databricks-issued OAuth Client ID or Secret, so this page cannot hold those values.
- C. The Credentials page under a developer's own Profile is where that individual later authorizes their personal OAuth session, not where the shared connection-level Client ID and Secret are stored.
- D. The App connections page in Databricks is where the secret is generated and copied from, but that page lives in Databricks, not in dbt Cloud, so it is not where the admin pastes the values into dbt.
Sources4
4.BigQuery: an OAuth client plus a token URI
BigQuery's client credentials come from Google Cloud's APIs & Services → Credentials page. If an OAuth consent screen doesn't exist yet, set one up first. Then click + Create Credentials, choose OAuth client ID, and select the Web application application type. Under Authorized redirect URIs, add the redirect URI copied from the dbt connection. Authorized JavaScript origins aren't used.
Unlike Databricks and Entra ID, Google doesn't hide the secret after creation. If you close the app screen, the values are still there to copy later. Back in dbt, open the BigQuery connection's details and add the client ID and secret under the OAuth 2.0 Settings section. BigQuery also asks for one more field than the other platforms: the token URI, which defaults to https://oauth2.googleapis.com/token. You don't need to configure scopes on the consent screen. dbt requests the scopes it needs while each user authenticates.
Checkpoint 6 of 8· Put it in order
Put the BigQuery client-credential setup in order.
- 1.In the BigQuery console, open APIs & Services and select Credentials
- 2.Add the dbt redirect URI under Authorized redirect URIs
- 3.In the dbt connection, add the client ID and secret under OAuth 2.0 Settings
- 4.Enter the BigQuery token URI
- 5.Click + Create Credentials and select OAuth client ID
- 6.Click Create to see the client ID and secret
The OAuth client has to exist in Google Cloud before it has an ID and secret. The dbt connection is completed last, with the credentials and then the token URI.
“Add the client ID and secret from the BigQuery OAuth app under the OAuth 2.0 Settings section.”Source: docs.getdbt.com
Sources3
5.External OAuth: credentials live in an integration, not the connection
With external OAuth, the client ID and secret come from an outside identity provider rather than from the warehouse. Snowflake and Redshift support this with Entra ID or Okta. The setup changes where dbt keeps the credentials. Don't type them into the connection. Create a custom integration under Account settings → Integrations and fill in the integration name, client secret, client ID, authorization URL and token URL there. Then create or edit the connection, choose that external OAuth as its OAuth method, and pick the config from the External OAuth configurations box.
Entra ID adds two rules for the client secret. First, you see the secret only once. Microsoft hides it if you leave the page and come back, so a lost secret has to be recreated. Second, every secret expires, after at most two years. Write the expiry date down. When the secret expires, authorization fails for everyone, so you want to replace it before that day. For Okta, the client ID and secret are on the Okta application page.
| Platform | Source of the client ID and secret | Where you enter them in dbt | Can you see the secret again? |
|---|---|---|---|
| Snowflake OAuth | Query system$show_oauth_client_secrets on the security integration | Account Settings → Connections → edit the connection | Re-run the query against the integration |
| Databricks OAuth | App connections → Generate a client secret | Connection → Optional settings (OAuth Client ID, OAuth Client Secret) | No: not available later |
| BigQuery OAuth | APIs & Services → Credentials → OAuth client ID | Connection → OAuth 2.0 Settings, plus token URI | Yes: available after closing the app screen |
| External OAuth (Entra ID) | Client app → Certificates and secrets | Account settings → Integrations, then select it on the connection | No: recreate it if lost |
Checkpoint 7 of 8· Match them up
Match each OAuth setup to where its client ID and secret are entered in dbt.
Tap a term, then the definition that fits it.
The three native setups store the credentials on the connection, each in a different section. External OAuth stores them in an integration, and the connection then selects that integration.
“for the OAuth method, select the external OAuth you just created.”Source: docs.getdbt.com
Checkpoint 8 of 8· Exam question
Which of the following statements about generating the Client ID and Client Secret needed for Snowflake OAuth in dbt Cloud are accurate? (Select all that apply)(Select 2)
Correct answers: A, B — The values are produced by Snowflake, not by dbt, once a security integration of type OAUTH has been created for dbt Cloud.; The values can be retrieved by querying the `system$show_oauth_client_secrets` function against the named security integration.
- A. Snowflake, as the OAuth authorization server, is what issues the client identifier and secret once the security integration exists; dbt only receives and stores the values that Snowflake generates.
- B. Running this table function against the named integration is the documented way to surface the client identifier and secret so they can be copied into the connection's Edit screen.
- C. Clicking Connect to Snowflake Account only starts the developer-level SSO authorization flow; it does not create or reveal the connection-level Client ID and Secret, which must already be configured beforehand.
- D. The role used for authorization is supplied per developer in their own profile credentials at authentication time, so a role change does not require regenerating the connection-level secret.
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.A Databricks OAuth client secret can be copied from the app connection later if you forget to save it.Why is that wrong?
Databricks shows the secret only when it is generated. Copy and store it at that moment.
Covered in Databricks: generate once, store under Optional settings
2.Adding Databricks OAuth client credentials to the connection also switches deployment jobs to OAuth.Why is that wrong?
Developer OAuth covers development credentials only. Deployment environments keep their own token-based credentials.
Covered in Databricks: generate once, store under Optional settings
3.Any Snowflake user with access to the database can create the security integration that produces dbt's client ID and secret.Why is that wrong?
Creating the integration needs the ACCOUNTADMIN role or the global CREATE INTEGRATION privilege. A dbt admin usually has to work with a Snowflake admin to do it.
Covered in Snowflake: read the secret from the security integration
4.An Entra ID client secret for external OAuth is set once and never needs attention again.Why is that wrong?
Entra secrets expire after at most two years. Record the expiry date and replace the secret before user authorization fails.
Covered in External OAuth: credentials live in an integration, not the connection
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Admins configure the OAuth integration; developers complete a one-time authorization in their profile.”
↩︎ What the client ID and secret are for - 2.
“dbt Enterprise and Enterprise+ supports OAuth authentication with Snowflake.”
↩︎ What the client ID and secret are for“This Connection is configured using a Snowflake Client ID and Client Secret.”
↩︎ Snowflake: read the secret from the security integration“Navigate to your Account Settings, click Connections, and select a connection.”
↩︎ Snowflake: read the secret from the security integration“Edit the connection and enter the Client ID and Client Secret.”
↩︎ Snowflake: read the secret from the security integration“The Database Admin is responsible for creating a Snowflake Connection in dbt.”
↩︎ Snowflake: read the secret from the security integration“Only Snowflake account administrators (users with the ACCOUNTADMIN role) or a role with the global CREATE INTEGRATION privilege can execute this SQL command.”
↩︎ Exam trap 3 - 3.
“This client ID and secret will be stored in the dbt platform to manage the OAuth connection between the dbt platform users and BigQuery.”
↩︎ What the client ID and secret are for“These values are available even if you close the app screen”
↩︎ BigQuery: an OAuth client plus a token URI“Enter the BigQuery token URI. The default value is https://oauth2.googleapis.com/token.”
↩︎ BigQuery: an OAuth client plus a token URI“Configuring scopes in the BigQuery OAuth consent screen is optional and not required for dbt platform to connect to BigQuery.”
↩︎ BigQuery: an OAuth client plus a token URI“This client ID and secret will be stored in the dbt platform to manage the OAuth connection between the dbt platform users and BigQuery.”
↩︎ Key concept“Add the client ID and secret from the BigQuery OAuth app under the OAuth 2.0 Settings section.”
↩︎ Checkpoint - 4.
“Under the Optional settings section, add the OAuth Client ID and OAuth Client Secret from the Databricks OAuth app.”
↩︎ Databricks: generate once, store under Optional settings“It applies to development credentials only.”
↩︎ Databricks: generate once, store under Optional settings“A service principal token is recommended for production and non-production jobs.”
↩︎ Databricks: generate once, store under Optional settings“Copy and securely store the client secret. The client secret will not be available later.”
↩︎ Exam trap 1“Deployment environments use separate credentials configured at the environment level. They do not use developer OAuth.”
↩︎ Exam trap 2“Select Generate a client secret. Copy and securely store the client secret. The client secret will not be available later.”
↩︎ Prediction - 5.
“Note that it only appears when created; Microsoft hides the secret if you return later, and you must recreate it.”
↩︎ External OAuth: credentials live in an integration, not the connection“Scroll down to the External OAuth configurations box and select the config from the list.”
↩︎ External OAuth: credentials live in an integration, not the connection“Documenting the expiration date so you can refresh the secret before the expiration or user authorization fails is essential.”
↩︎ Exam trap 4“for the OAuth method, select the external OAuth you just created.”
↩︎ Checkpoint - 6.
“Client ID and Client secrets: Retrieve these from the Okta application page.”
↩︎ External OAuth: credentials live in an integration, not the connection