> ## 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.

# OAuth for database connections

> Authenticate individual users against your database with OAuth, enforcing database-level permissions in Omni.

By default, Omni queries your database using a shared service account. With OAuth, each user authenticates with their own credentials, and Omni enforces that user's database-level permissions when they run queries. This lets you manage data access in your database and have it filter down to Omni automatically.

## How it works

When OAuth is enabled on a connection, Omni prompts each user to authenticate with the database the first time they run a query. After authenticating, the user's own database permissions apply to every query they run — rather than the permissions of the shared service account.

A service account is still required on the connection for most databases. Omni uses it to build the model, which provides the foundation for all user queries. BigQuery is the exception: if you don't upload a service account key, an admin's credentials are used to build the schema. Refer to [Configuring OAuth for BigQuery](https://docs.omni.co/connect-data/oauth/bigquery.md#do-i-need-a-service-account) for details.

## Getting started

Select your database to get started:

> [card] [BigQuery](https://docs.omni.co/connect-data/oauth/bigquery.md)
>
> Configure OAuth for BigQuery connections, using Omni's OAuth client or your own.

> [card] [Databricks](https://docs.omni.co/connect-data/oauth/databricks.md)
>
> Configure OAuth for Databricks connections.

> [card] [Snowflake](https://docs.omni.co/connect-data/oauth/snowflake)
>
> Configure OAuth for Snowflake connections, including native and External OAuth options.

## Limitations

Before enabling OAuth, review the following limitations.

| Area | Details |
| - | - |
| **Model and IDE** | Omni models are built using the service account. All users will see the same tables and fields in the model unless you restrict visibility with [access grants](https://docs.omni.co/modeling/models/access-grants.md). |
| **Field picker** | All fields and tables will be visible in the workbook's field browser unless explicitly restricted with access grants. |
| **Scheduling** | Schedules run as the schedule creator and cannot be personalized with user attributes. If a delivery is personalized anyway, it fails to run and emails the owner. Schedules may also fail when the creator's OAuth token expires — the creator must re-authenticate to resolve this. |
| **Caching** | Caches are not shared across users, which results in a lower cache hit rate and higher data warehouse costs. The same applies to cubes and extracts. |
| **Content visibility** | Users may be able to open dashboards that reference data they don't have database permissions to query, which can result in permission errors. |
| **Embedding** | Per-user OAuth is only supported with [vanity domain embeds](https://docs.omni.co/embed/customization/vanity-domains.md). Default embed domains (`embed-*`) cannot support per-user OAuth due to cookie partitioning restrictions. |

> [!NOTE]
>
> Some databases may have additional limitations. Check the setup guide for your database for details.

## Related

* [**Access grants**](https://docs.omni.co/modeling/models/access-grants.md) — Control which fields and tables are visible to each user in the model and field browser
* [**Content permissions**](https://docs.omni.co/administration/users/permissions.md) — Control which dashboards and documents users can access
