> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omni.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuring native OAuth for Databricks databases

> Configure native Databricks OAuth, allowing each Omni user to authenticate with their Databricks credentials when running queries.

## Requirements

To follow the steps in this guide, you'll need:

* **In Omni**:
  * To have the [**OAuth database connection**](/connect-data/oauth) feature enabled
  * **Organization Admin** permissions
  * **An existing Databricks connection.** Refer to [Connecting a Databricks database](/connect-data/setup/databricks) before continuing.
* **A Databricks service account with access to all schemas and tables you want to use in Omni**. This is required even when OAuth is enabled, because Omni uses the service account to build the model.

<Warning>
  Before continuing, review the [OAuth limitations](/connect-data/oauth#limitations).
</Warning>

## Setup

<Steps>
  <Step title="Create a Databricks OAuth integration" titleSize="h3">
    Create an OAuth integration in Databricks using `https://callbacks.omniapp.co/callback/oauth` as the **Redirect URI**, then retrieve the **Client ID** and **Client Secret**.

    Refer to [Databricks's OAuth documentation](https://docs.databricks.com/aws/en/integrations/enable-disable-oauth#enable-custom-oauth-applications-using-the-databricks-ui) for instructions.

    <Note>
      **For vanity-domain embeds**: If you're using OAuth with [vanity-domain embeds](/embed/customization/vanity-domains), also add `https://<your-vanity-domain>/oauth/callback` as a **Redirect URI**. Replace `<your-vanity-domain>` with your vanity domain (e.g., `omni.myapp.com`).
    </Note>
  </Step>

  <Step title="Configure the connection in Omni" titleSize="h3">
    <Note>
      You must still configure a service account on this connection. Omni uses the service account to build the model, which provides the foundation for all user queries.
    </Note>

    This guide assumes you have an existing Databricks connection in Omni. If you don't, refer to [Connecting a Databricks database](/connect-data/setup/databricks) for more information.

    1. In Omni, navigate to **Settings > Connections** and click on the Databricks connection you want to use.
    2. In the **Authentication Type** dropdown, select **OAuth User Authentication**.
    3. Enter the **OAuth Client ID** and **OAuth Client Secret** from the previous step into the respective fields.
    4. Save the connection settings.
  </Step>

  <Step title="Verify the user experience" titleSize="h3">
    After saving, each Omni user will be prompted to authenticate with Databricks the first time they run a query in a workbook or dashboard. This prompt reappears when their OAuth token expires.

    Once authenticated, Omni uses the user's database permissions in place of the service account for all queries that user runs.
  </Step>
</Steps>

## Next steps

To ensure database permissions align with what users see in Omni, we recommend implementing:

* [**Access grants**](/modeling/models/access-grants) to control which fields and tables are visible to each user in the model and field browser
* [**Content permissions**](/administration/users/permissions) to control which dashboards and documents users can access
