---
title: Create a OneDrive connection
description: Learn how to create a Microsoft OneDrive connection in Catalog Explorer that stores authentication details for Lakeflow Connect ingestion.
canonical_url: https://docs.databricks.com/gcp/en/ingestion/lakeflow-connect/onedrive-connection
---

# Create a OneDrive connection

> [!NOTE]
> **Beta**
>
> This feature is in [Beta](https://docs.databricks.com/gcp/en/release-notes/release-types.md). Workspace admins can control access to this feature from the **Previews** page by opting into the **Lakeflow Connect for OneDrive For Business** preview. See [Manage Databricks previews](https://docs.databricks.com/gcp/en/admin/workspace-settings/manage-previews.md).

Create a Microsoft OneDrive connection in Catalog Explorer to store authentication credentials for Lakeflow Connect ingestion. Any user with the `USE CONNECTION` privilege on the connection can then create OneDrive ingestion pipelines without needing direct access to the credentials.

For privilege requirements, see [Connect to managed ingestion sources](https://docs.databricks.com/gcp/en/connect/managed-ingestion.md).

The following authentication methods are supported:

* [OAuth U2M: Databricks-managed (Recommended)](https://docs.databricks.com/gcp/en/ingestion/lakeflow-connect/onedrive-source-setup-u2m-databricks-managed.md)
  * No Microsoft Entra ID app registration required. Databricks manages OAuth and token refresh automatically.
* [OAuth U2M: Custom-managed](https://docs.databricks.com/gcp/en/ingestion/lakeflow-connect/onedrive-source-setup-u2m.md)
  * Bring your own Microsoft Entra ID app registration.

## Prerequisites

Complete the source setup that matches your chosen authentication method. Use the authentication details you obtain to create the connection.

## Create a connection

### Databricks-managed (Recommended)

<a id="u2m-databricks-managed" />

No Microsoft Entra ID app registration or source setup is required. Databricks manages OAuth configuration and token refresh automatically. If **OAuth U2M: Databricks-managed** isn't listed, use [OAuth U2M: Custom-managed](https://docs.databricks.com/gcp/en/ingestion/lakeflow-connect/onedrive-connection.md#u2m-custom-managed).

1. In the Databricks workspace, click **![Data icon.](https://docs.databricks.com/gcp/en/images/product-icons/DataIcon.svg) Catalog > Create > Create a connection**.
2. On the **Connection basics** page of the **Set up connection** wizard, specify a unique **Connection name**.
3. In the **Connection type** drop-down menu, select **Microsoft OneDrive**.
4. In the **Auth type** drop-down menu, select **OAuth U2M: Databricks-managed**.
5. (Optional) Add a comment.
6. Click **Next**.
7. Click **Sign in with Microsoft OneDrive** and complete authentication in the pop-up window, using the Microsoft work or school account whose OneDrive you want to ingest. Grant the requested permissions if prompted.
8. Click **Create connection**.

### Custom-managed

<a id="u2m-custom-managed" />

1. Complete the [Custom-managed U2M source setup](https://docs.databricks.com/gcp/en/ingestion/lakeflow-connect/onedrive-source-setup-u2m.md). Use the authentication details that you obtain to create the connection.

2. In the Databricks workspace, click **![Data icon.](https://docs.databricks.com/gcp/en/images/product-icons/DataIcon.svg) Catalog > Create > Create a connection**.

3. On the **Connection basics** page of the **Set up connection** wizard, specify a unique **Connection name**.

4. In the **Connection type** drop-down menu, select **Microsoft OneDrive**.

5. If the **Auth type** drop-down menu is shown, select **OAuth U2M: Custom-managed**.

6. (Optional) Add a comment.

7. Click **Next**.

8. On the **Authentication** page, enter the following credentials for your Microsoft Entra ID app:
   * **Client ID**: The client ID that you retrieved in the source setup.
   * **Client secret**: The client secret that you retrieved in the source setup.

9. Click **Sign in with Microsoft OneDrive**.

   A new window opens. Sign in with the Microsoft work or school account whose OneDrive you want to ingest, then grant the requested permissions if prompted.

   You're redirected to the Databricks workspace.

10. Click **Create connection**.

> [!WARNING]
>
> Only share this connection with other Databricks users if you authenticated with a service account. If you authenticated with a personal account, do not share the connection. Sharing a personal-account connection grants other users access to your personal account's credentials and data.

## Next steps

[Create an ingestion pipeline](https://docs.databricks.com/gcp/en/ingestion/lakeflow-connect/onedrive-pipeline.md).
