Forum Discussion
Fabric API: Unable to create Azure Databricks connection using Service Principal
- 4 months ago
Hi ogureisuo,
There's another endpoint that will list the supported connection types in your environment:
Connections - List Supported Connection Types - REST API (Core) | Microsoft LearnI can see DatabricksMultiCloud, Databricks, ans AzureDatabricksWorkspace.
The API will also tell you what parameters are required.
Hi ogureisuo,
Thanks for reaching community, will happy to assist.
The error "Kind: AzureDatabricks is not supported" is the key clue here, and it points to a real current limitation of the Fabric Connections API rather than a request body formatting issue.
Root Cause The Actual Problem
The Fabric Core Connections API (/core/connections/create-connection) does not currently support creating Azure Databricks connections programmatically via the gateway path regardless of whether you use "Databricks" or "AzureDatabricks" as the kind. The DMTS_UnsupportedConnectionStringError with Kind: AzureDatabricks is not supported confirms the gateway engine simply doesn't accept this connection type via the API in the way you're attempting.
What Actually Works The Correct Approach
For the Fabric Azure Databricks connector in pipelines and copy activities, Personal Access Token (PAT) is the supported authentication kind not Service Principal directly. Microsoft Learn
The recommended automation path is:
Step 1 Generate a PAT on behalf of your Service Principal
Your Service Principal can generate its own Databricks PAT programmatically:
# Step 1: Get an Entra ID token for your SP
POST https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token
Body: client_id, client_secret, scope=2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/.default
# Step 2: Use that token to generate a Databricks PAT
POST https://<databricks-workspace-url>/api/2.0/token/create
Authorization: Bearer <entra_id_token_from_step1>
Body: { "comment": "Fabric automation token", "lifetime_seconds": 7776000 }
Step 2 Create the Fabric connection using PAT
Use the correct request body with PAT auth:
{
"connectivityType": "ShareableCloud",
"displayName": "AzureDatabricks_Connection",
"connectionDetails": {
"type": "AzureDatabricks",
"parameters": [
{ "name": "server", "value": "https://<workspace>.azuredatabricks.net" },
{ "name": "httpPath", "value": "/sql/1.0/warehouses/<warehouse_id>" }
]
},
"credentialDetails": {
"credentialType": "Key",
"credentials": {
"key": "<databricks_PAT_from_step1>"
},
"encryptedConnection": "Encrypted",
"encryptionAlgorithm": "None",
"privacyLevel": "Organizational",
"skipTestConnection": false
}
}Important Caveats
- For copy activity specifically, Personal Access Token is the only available authentication kind Service Principal is not directly supported as an auth type in the Fabric connector for Databricks. Microsoft Learn
- It is not currently possible to use Microsoft Fabric Workspace Identities to access the Databricks SQL API a service principal granted access to Unity Catalog with a PAT generated on its behalf is the current recommended pattern. Medium
- If you need Service Principal OAuth (not PAT), that path currently only works for Dataflow Gen2 connections, not pipeline copy activities
Summary
What you tried | Why it fails |
SP directly via gateway connection API | Not supported — AzureDatabricks kind unsupported via this path |
Solution | Generate a PAT for your SP, then create a Key-based connection |
Hope this unblocks you! Mark as Accepted Solution if it helps
Hi Anonymous,
Just wanted to add a transparency note to my earlier response. I used AI assistance to help research and draft this reply. I reviewed the technical content before posting to ensure accuracy, but wanted to be upfront about that as per the community guidelines.
Apologies for not disclosing this initially.
- tayloramy3 months agoSuper User
Hi Lodha_Jaydeep,
Where did you find documentation about the AzureDatabricks connection type?
When I run the API that lists all connection types available, I only see DatabricksMultiCloud, Databricks, ans AzureDatabricksWorkspace.
- Lodha_Jaydeep3 months agoSolution Sage
Hi tayloramy,
I got the link from the browser itself while doing some research. I have added the same in the post also.
That same thing you are asking right?
- tayloramy3 months agoSuper User
Hi Lodha_Jaydeep
I am asking for your source because"type": "AzureDatabricks",is invalid and incorrect.
Please do not post incorrect AI generated information.