# 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="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2Fgit-blob-b95b09b704e1e0faa1ea218b364a3c4ac121f6aa%2FScreenshot%202025-03-13%20at%2014.32.24.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2Fgit-blob-2795d843bbbd7712c8b01dd541eb69d85d0fae8a%2FScreenshot%202025-03-13%20at%2014.40.57.png?alt=media" 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="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2Fgit-blob-8297fc12c8ead13db811179815d0b0497961b302%2FScreenshot%202025-03-13%20at%2015.22.01.png?alt=media" 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](https://docs.carto.com/connections/databricks#connecting-to-databricks-using-oauth-u2m).
