Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
This feature is in Beta.
This page explains how to connect to OneLake using an external location. With the connection, you can create Unity Catalog objects (tables, volumes, views, Materialized views, and Streaming tables) and govern your data through Unity Catalog. If you want to read existing OneLake data from Azure Databricks without writing, see Enable OneLake catalog federation.
To connect to a OneLake path, you must have two Unity Catalog securable objects:
- A storage credential, which specifies a managed identity or service principal that grants access to your OneLake storage.
- An external location, which defines the ID-based ABFSS path to your OneLake storage and references the storage credential.
Requirements
- Databricks Runtime 18.1 or above, or serverless compute
- Active Microsoft Fabric workspace with capacity assigned
CREATE STORAGE CREDENTIALprivilege on the Unity Catalog metastore, andCREATE EXTERNAL LOCATIONprivilege on both the metastore and the storage credential- Your Azure Databricks workspace must be enabled for Unity Catalog
- A Fabric administrator must enable Users can create Azure Databricks Storage items in Administrator Portal > Tenant Settings
- The target Fabric workspace must have Authenticate with OneLake user-delegated SAS tokens enabled in Workspace settings > Delegated settings > OneLake Settings
Security model
Access to the Azure Databricks Storage item in a Fabric workspace is restricted to the assigned managed identity. OneLake security, which is enabled by default, allows explicit permissions at the workspace and item level to grant open, discover, read, and write access to OneLake from Azure Databricks.
Configure Fabric-side item permissions and OneLake Security roles explicitly for the users, groups, and service principals that need access.
Step 1: Configure identity and access in Azure and Fabric
- In the Azure portal, create or identify an Access Connector for Azure Databricks with a managed identity, or a service principal.
- In Microsoft Fabric, go to your target workspace.
- Click the Workspace settings gear button, then click Manage access.
- Click Add people or groups and search for your managed identity or service principal.
- For Fabric workspace or item permission, assign the managed identity or service principal a Viewer role.
- For data access, create a OneLake Security role and grant read and write permissions to the managed identity or service principal.
Step 2: Provision storage in Fabric and get the path
In your Fabric workspace, create a Azure Databricks Storage item.
Open Manage OneLake security for the Azure Databricks Storage item and create a OneLake Security role.
Add the Azure Databricks managed identity or service principal as a member of the role. Grant the minimum required data permission: Read for read-only access, or ReadWrite when Azure Databricks must create or modify data.
After the item is created, construct the ID-based ABFSS path:
abfss://<WorkspaceID>@onelake.dfs.fabric.microsoft.com/<DatabricksStorageID>/Files/The workspace ID and Azure Databricks Storage item ID are available in the browser URL when the item is open in Fabric.
Note
The external location requires the ID-based path format (GUIDs), not display names. Name-based paths are rejected at creation time.
Save this path. You use it in Step 4.
Step 3: Create a Unity Catalog storage credential
Sign in to your Unity Catalog-enabled Azure Databricks workspace.
In the sidebar, click
Catalog.
Click
, then click Create a credential.Select a Credential Type of Azure Managed Identity.
Enter a Storage credential name and an optional comment.
Enter the Access Connector ID (the resource ID of the access connector associated with your managed identity).
The resource ID is in the format:
/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Databricks/accessConnectors/<connector-name>(Optional) If you created the access connector using a user-assigned managed identity, enter the Managed Identity ID.
Click Create.
Step 4: Create the OneLake external location
In the sidebar, click
Catalog.
Click
, then click Create an external location.Enter an External location name.
Under Storage type, select OneLake.
Under Storage credential, select the credential you created in Step 3.
Under URL, enter the ID-based ABFSS path from Step 2. For example:
abfss://<WorkspaceID>@onelake.dfs.fabric.microsoft.com/<DatabricksStorageID>/Files/Click Create.
Click Test connection to verify the external location.
Note
A skipped file events read warning during the connection test is expected behavior. File event notifications are not yet supported on OneLake paths. The external location is functioning correctly.
Step 5: Create Unity Catalog objects on the OneLake external location
After you create the external location, you can create a catalog that uses it as managed storage. OneLake stores all the managed tables that you create in that catalog.
-- Create a catalog with the OneLake external location as managed storage
CREATE CATALOG my_onelake_catalog
MANAGED LOCATION '<onelake_external_location_path>';
-- Create a managed table
CREATE TABLE my_onelake_catalog.default.my_table (
id INT,
name STRING,
created_at TIMESTAMP
);
-- Insert data
INSERT INTO my_onelake_catalog.default.my_table
VALUES (1, 'example', current_timestamp());
Replace <onelake_external_location_path> with the external location URL or a sub-path within it.
A OneLake external location supports the following Unity Catalog object types: managed tables (Delta and Iceberg), volumes, views, Materialized views, and Streaming tables.
Troubleshoot
| Error | Resolution |
|---|---|
403 Forbidden when accessing OneLake path |
Verify that (1) the managed identity or service principal has the required Fabric workspace or item permission, (2) the principal is included in the applicable OneLake Security role with the required data permission, and (3) the Fabric workspace has an active capacity assignment. |
| Skipped file events read warning during connection test | This warning is normal. OneLake paths don't yet enable file event notifications. The external location is functioning correctly. |
| Storage credential creation or test fails | Verify that: (1) the managed identity resource ID is correct; (2) the principal has the minimum required Fabric workspace or item permission and OneLake Security data permission; (3) the path uses the correct ID-based format (abfss://<WorkspaceID>@onelake.dfs.fabric.microsoft.com/<DatabricksStorageID>/Files/); (4) the path specifies the /Files folder. |
Next steps
- Grant other users permission to use the external location. See Manage external locations.
- Define managed storage locations at the catalog or schema level. See Specify a managed storage location in Unity Catalog.
- Read existing OneLake data from Azure Databricks without writing. See Enable OneLake catalog federation.