---
title: Create a Databricks connection on Microsoft Power Platform
description: Learn how to connect Databricks to Microsoft Power Platform by creating a connection on Power Apps or Power Automate.
canonical_url: https://docs.databricks.com/aws/en/integrations/msft-power-platform/setup
---

# Create a Databricks connection on Microsoft Power Platform

This page explains how to connect to Databricks from Microsoft Power Platform by creating a Databricks connection. You can use your Databricks data to create Power canvas apps, Power Automate flows, and Copilot Studio agents.

## Requirements

Before you connect to Databricks from Power Platform, you must meet the following requirements:

* If you are authenticating with personal access tokens (PAT), you have generated one for your Databricks workspace. To generate a PAT, see [Authenticate with Databricks personal access tokens (legacy)](https://docs.databricks.com/aws/en/dev-tools/auth/pat.md).
* If you are authenticating using OAuth, you have unified login or SSO enabled. See [Configure SSO in Databricks](https://docs.databricks.com/aws/en/security/auth/single-sign-on/index.md).

- You have a premium Power Apps license.
- You have a Databricks account.
- You have [Databricks SQL access](https://docs.databricks.com/aws/en/security/auth/entitlements.md) and at least CAN USE permission on a [SQL warehouse](https://docs.databricks.com/aws/en/compute/sql-warehouse/index.md).

## <a id="add-connection" />Add a Databricks connection

> [!NOTE]
>
> If you're using Copilot Studio, the Databricks connector must be defined using Power Apps or Power Automate. Then it can be used in Copilot Studio.

To add a Databricks connection, do the following:

1. In Power Apps or Power Automate, from the sidebar, click **Connections**.

   If you don't see **Connections** on the sidebar, click **More** > **Connections**.

2. In the upper-left corner, click **+ New connection**.

3. Using the search bar in the upper-right, search for "Databricks".

4. Click the **Databricks** tile.

   Do not click the "Azure Databricks" tile.

5. Enter your authentication information.

   * Select your authentication method:
     * If you are using OAuth, select **AWS OAuth Connection**.
     * If you are using PAT, for **API Key**, enter your PAT in the format of `Bearer <personal-access-token>`.
   * For **Server Hostname**, enter the Databricks SQL warehouse server hostname.
   * For **HTTP Path**, enter the SQL warehouse HTTP path.
   * (Optional) Enter your **Workspace ID** only if you use a custom URL.

   To find your Databricks SQL warehouse and HTTP path connection details, see [Get connection details for a Databricks compute resource](https://docs.databricks.com/aws/en/integrations/compute-details.md).

6. Click **Create**.

   If prompted, sign-in to your Databricks account associated with the workspace you are connecting to. *Selecting the incorrect account leads the login to fail.*

## <a id="data-policy" />Add Databricks to a data policy

By adding Databricks to a Business data policy, Databricks can't share data with connectors in other groups. This protects your data and prevents it from being shared with those who should not have access to it. For more information, see [Manage data policies](https://learn.microsoft.com/power-platform/admin/prevent-data-loss).

To add the Databricks connector to a Power Platform data policy:

1. From any Power Platform application, click the settings gear in the upper-right side, and click **Admin Center**.
2. From the sidebar, click **Policies** > **Data Policies**.
   * If you are using the new admin center, click **Security** > **Data and Privacy** > **Data Policy**.
3. Click **+ New Policy** or an existing policy.
4. If creating a new policy, enter a name.
5. Select an environment to add to your policy to and click **+ Add to policy** above.
6. Click **Next**.
7. Search for and click the Databricks connector.
8. Click **Move to Business** and click **Next**.
9. Review your policy and click **Create policy**.

## Troubleshoot

### Authentication failed

If you see the following error message when authenticating using OAuth, unified login is not enabled on your Databricks account:

```text
{
  "error": {
    "code": 401,
    "source": "msmanaged-na.azure-apim.net",
    "message": "The response is not in a JSON format.",
    "innerError": "Authentication failed"
  }
}
```

To resolve this error, enable unified login or SSO. See [Configure SSO in Databricks](https://docs.databricks.com/aws/en/security/auth/single-sign-on/index.md).

## Limitations

* The Power Platform connector does not support government clouds.

## Next steps

* [Use Databricks data on Microsoft Power Platform](https://docs.databricks.com/aws/en/integrations/msft-power-platform/usage.md)
