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

# Databricks connection

> Learn how to configure a Databricks Connection for Infisical.

A Databricks connection authenticates Infisical to your Databricks workspace using a [service principal](https://docs.databricks.com/en/admin/users-groups/service-principals.html) that you create for it.

> [!NOTE]
>
> This guide doesn’t configure any behavior—it just authenticates Infisical with Databricks. Once the app connection is ready, you can [use it to set up integrations](#step-3-configure-integrations).

## Step 1: Configure a service principal in Databricks

### 1. Open workspace settings

In Databricks, open the dropdown in the top right and select **Settings**.

![Workspace Settings Page](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/databricks/workspace-settings.png)

### 2. Open service principals

Under **Identity & Access**, select **Manage** in the **Service Principals** section.

![Manage Service Principals](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/databricks/manage-service-principals.png)

### 3. Add a service principal

Select **Add Service Principal**, then **Add New**, and create a service principal for Infisical.

![Add Service Principal](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/databricks/add-service-principal.png)

![Create Service Principal](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/databricks/create-service-principal.png)

### 4. Generate a secret

Open the new service principal, select the **Secrets** tab, and select **Generate secret**. In the dialog:

1. Set **Lifetime (days)** to how long Infisical can use the secret (up to 730 days)
2. Under **Scope**, select **Other APIs**, then use **Add scope** to add the scopes for the features you plan to use:
   * `secrets` for secret syncs
   * `authentication` and `scim` for secret rotations
3. Select **Generate**, then save the **Client ID** and **Secret** for the Infisical form

![Generate Secret](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/databricks/service-principal-secrets.png)

![Copy IDs](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/databricks/service-principal-ids.png)

> [!NOTE]
>
> You can't change a secret's scopes after you generate it. To use other scopes, or before the secret expires, generate a new secret and update the connection's **Client Secret** and **Scopes**.

## Step 2: Create the app connection

Next, create the app connection in Infisical.

> [!TIP]
>
> To create the connection using the API, use the [Create Databricks Connection](https://infisical.com/docs/api-reference/endpoints/app-connections/databricks/create.md) endpoint. If the workspace isn't reachable from the internet, include the ID of a [Gateway](https://infisical.com/docs/documentation/platform/gateways/overview.md) that can reach it as `gatewayId`, or the ID of a [Gateway pool](https://infisical.com/docs/documentation/platform/gateways/gateway-pools.md) as `gatewayPoolId`.

**Organization-level**

**Step 1**

In the sidebar, select **Organization Settings**, then open the **App Connections** tab.

![App Connections Tab](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/general/add-connection.png)

**Step 2**

Select **+ Add Connection** and choose **Databricks Connection**.

![Select Databricks Connection](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/databricks/select-databricks-connection.png)

**Step 3**

Select the **Service Principal** method, then fill out the form's fields:

* **Name**: A descriptive name for the connection
* **Description** (optional): A note for future reference
* **Gateway**: The Gateway or Gateway pool to route requests through if your Databricks workspace isn't reachable from the internet; otherwise leave it as **Internet Gateway**
* **Workspace URL**: The URL of your Databricks workspace
* **Client ID**: The Client ID of the Databricks service principal created for Infisical
* **Client Secret**: The [secret generated](#generate-a-secret) for that service principal
* **Scopes** (optional): The scopes you [selected for that secret](#generate-a-secret) (leave empty if the secret has the `all-apis` scope or no scopes)

Then, select **Connect to Databricks**.

![Connect via Databricks service principal](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/databricks/create-databricks-service-principal-method.png)

**Project-level**

**Step 1**

In your Secrets Management project, select **Integrations** from the sidebar, then open the **App Connections** tab.

**Step 2**

Select **Add Connection** and choose **Databricks Connection**.

![Select Databricks Connection](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/databricks/select-databricks-connection-project.png)

**Step 3**

Select the **Service Principal** method, then fill out the form's fields:

* **Name**: A descriptive name for the connection
* **Description** (optional): A note for future reference
* **Gateway**: The Gateway or Gateway pool to route requests through if your Databricks workspace isn't reachable from the internet; otherwise leave it as **Internet Gateway**
* **Workspace URL**: The URL of your Databricks workspace
* **Client ID**: The Client ID of the Databricks service principal created for Infisical
* **Client Secret**: The [secret generated](#generate-a-secret) for that service principal
* **Scopes** (optional): The scopes you [selected for that secret](#generate-a-secret) (leave empty if the secret has the `all-apis` scope or no scopes)

Then, select **Connect to Databricks**.

![Connect via Databricks service principal](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/databricks/create-databricks-service-principal-method-project.png)

> [!TIP]
>
> Your Databricks app connection is ready to use.

## Step 3: Configure integrations

Now that your Databricks app connection is configured, you can use it to set up the following integrations:

> [card] [Databricks secret sync](https://infisical.com/docs/integrations/secret-syncs/databricks.md)
>
> Sync secrets from Infisical to a Databricks secret scope.

> [card] [Databricks service principal secret rotation](https://infisical.com/docs/documentation/platform/secret-rotation/databricks-service-principal-secret.md)
>
> Rotate the OAuth client secret of a Databricks service principal.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.