# Configuring OAuth U2M connections to Databricks

As an Admin, you can enable Databricks OAuth U2M connections in your organization, which is one of the preferred methods for connecting to Databricks. Once the integration setup is completed, all users in your organization will be able to create Databricks OAuth U2M connections.

{% hint style="success" %}
**Databricks strongly recommends using OAuth over Personal Access Tokens**. OAuth tokens are automatically refreshed by default and do not require the direct management of the access token, improving your security against token hijacking and unwanted access.
{% endhint %}

To get started, login to CARTO as an Admin and navigate to ***Settings*****&#x20;>&#x20;*****Advanced*****&#x20;>&#x20;*****Integrations***, where you'll find a list of available integrations. Click on the *Add* button next to *OAuth U2M connections to Databricks* to start the setup process. This will open the new integration form.

<figure><img src="/files/T7SLnmRfGHCi88ApmzKl" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/Jb7P7mtmtlUlr5csczq8" alt=""><figcaption></figcaption></figure>

## Step 1. Register a new OAuth Application from the Databricks Account Console

1. Login to your [Databricks Account Console](https://docs.databricks.com/aws/en/admin/#access-the-account-console)
2. Navigate to ***Settings > App connections***
3. Click on *Add connection.* The new connection form will appear:
   1. For the **Redirect URL** use your CARTO tenant domain followed by <kbd>/connections/oauth/databricks/callback</kbd> (i.e. <https://clausa.app.carto.com/connections/oauth/databricks/callback>).
   2. For Access scopes, select **All APIs.**

<figure><img src="/files/DdEXWrtI7YuHAfiUuqNm" alt=""><figcaption><p>Registering a new OAuth application in Databricks Account Console</p></figcaption></figure>

## Step 2. Complete the integration form in CARTO

Now that you have registered the OAuth application, copy the newly generated **Client ID** and **Client Secret** from Databricks and paste it in the integration form.

For **Host**, use your Databricks instance name host, for example `dbc-xxxxx113-0000.cloud.databricks.com` or `carto-data-science.cloud.databricks.com` (without https\://). Learn more about this on the official [Databricks documentation](https://docs.databricks.com/en/workspace/workspace-details.html#workspace-instance-names-urls-and-ids).

Once you've filled all this information, click on *Save*. The integration will be saved and you will be back in the Integrations list. To validate your setup, try to create a Databricks OAuth U2M connection as described in our [Databricks OAuth U2M connection guide](/carto-user-manual/connections/databricks.md#connecting-to-databricks-using-oauth-u2m).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.carto.com/carto-user-manual/settings/advanced-settings/configuring-oauth-connections-to-databricks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
