CertSafari
    DBT Architect· Lessons

    Domain 1 · Lesson 5/39

    Adding the OAuth client ID and secret to a dbt connection

    Adding Client ID and Secret for OAuth

    12 min read
    2.56% of exam
    6 sources
    Published 13 Oct 2026
    Docs as of 12 Oct 2026

    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?

    Sources123

    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 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?

    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?

    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?

    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. 1.In the BigQuery console, open APIs & Services and select Credentials
    2. 2.Add the dbt redirect URI under Authorized redirect URIs
    3. 3.In the dbt connection, add the client ID and secret under OAuth 2.0 Settings
    4. 4.Enter the BigQuery token URI
    5. 5.Click + Create Credentials and select OAuth client ID
    6. 6.Click Create to see the client ID and secret

    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.

    Where each platform's OAuth client ID and secret come from, and where they go in dbt
    PlatformSource of the client ID and secretWhere you enter them in dbtCan you see the secret again?
    Snowflake OAuthQuery system$show_oauth_client_secrets on the security integrationAccount Settings → Connections → edit the connectionRe-run the query against the integration
    Databricks OAuthApp connections → Generate a client secretConnection → Optional settings (OAuth Client ID, OAuth Client Secret)No: not available later
    BigQuery OAuthAPIs & Services → Credentials → OAuth client IDConnection → OAuth 2.0 Settings, plus token URIYes: available after closing the app screen
    External OAuth (Entra ID)Client app → Certificates and secretsAccount settings → Integrations, then select it on the connectionNo: 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.

    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)

    Sources56

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 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. 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. 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. 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. 1.
      “Admins configure the OAuth integration; developers complete a one-time authorization in their profile.”
      ↩︎ What the client ID and secret are for
    2. 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. 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. 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. 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

    Ready to test yourself?

    Practise the 9 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.