If your workspace storage account is firewalled to block public access, see Securing Connections → Azure. Query results over 1 MB are downloaded directly from workspace storage via Cloud Fetch, which typically requires its own private endpoint in addition to the SQL warehouse connection.
- Create a service principal and configure authentication
- Retrieve SQL warehouse connection details
- Grant permissions
- Configure your data connection in Datafold
Create a service principal and configure authentication
Create a dedicated service principal for the Datafold integration. This is the identity Datafold will use to connect to your workspace.- Go to Settings → Identity and access → Service principals
- Click Add service principal and give it a name (e.g.,
datafold) - Select the service principal, go to the Secrets tab, and click Generate secret
- Save the Client ID and Secret — the secret is only shown once
OAuth secrets are valid for up to 730 days. You can have a maximum of 5 active secrets per service principal. Rotate secrets before expiry to avoid connection interruptions.
Datafold also supports Personal Access Tokens as an alternative authentication method. PATs are considered legacy by Databricks — see the Databricks authentication documentation for details.
Retrieve SQL warehouse connection details
Navigate to SQL Warehouses under the SQL section in the left sidebar. Choose the preferred warehouse and copy the following fields from its Connection Details tab:- Server hostname
- HTTP path
- On the warehouse page, click the Permissions tab
- Add the service principal and grant Can Use permission
Grant permissions
Run the following SQL statements to grant Datafold the permissions it needs. Replace<catalog_name> and <service_principal_id> with your values. Replace <schema_name> with the schema where you want to store the DMA bundle volume (e.g., default).
The
<service_principal_id> is the application ID (also called Client ID) of your service principal. In Databricks SQL, service principal identifiers must be enclosed in backticks.(Optional) Additional grant for migrations
If you use Datafold to run migrations (its agents deploy and run Databricks Asset Bundles on this connection), also grant permission to create schemas. Each migration run materializes into a fresh schema created at deploy time. This is not needed for data diffing, monitoring, or lineage.Authentication for migrations depends on the method. A service principal using M2M OAuth needs no additional token scope. If you use a Personal Access Token (legacy) instead, it must have the
all-apis scope, because bundle deployment uploads files via the Databricks workspace-files API, which Databricks gates on all-apis even when narrower scopes are present.Databricks AI for migrations
This section applies only if the Datafold Migration Agent will run inference on your Databricks model serving endpoints. Skip it for data diffing, monitoring, lineage, and CI, and for migrations that use Datafold-managed inference or a different LLM provider.
Grant Can Query on the serving endpoints
Serving endpoint access is a separate ACL from SQL warehouse and Unity Catalog access, so the grants above do not cover it. For each endpoint you approve for inference:- Navigate to Serving under the Machine Learning section in the left sidebar
- Open the endpoint and click its Permissions tab
- Add the Datafold service principal and grant Can Query
Inference requires the connection to authenticate as a service principal — M2M OAuth, a Personal Access Token, or Azure Entra ID. Per-user OAuth connections cannot be used, because the agent runs without a user context.
system.ai.*), Datafold lists them from the Unity Catalog model services API. When the service principal cannot read that API, those models are missing from the model picker; endpoints already configured keep serving inference.
Raise the AI Gateway throughput limit
The default AI Gateway limit is roughly 200,000 input tokens per minute, which throttles a real migration heavily. Ask your Databricks account team to raise it for the models you approve — request at least 2–3M input tokens per minute. Tier 2 allows up to 10M.Raising the limit is free: the default is a guardrail, not a paid tier. Databricks typically takes a few days to apply the change, so request it early.
Configure in Datafold
Select M2M OAuth / Service Principal (Recommended) as the authentication method and fill in the following fields:
Click Create. Your data connection is ready!
