This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi everyone,
I’m trying to automate the creation of a connection to Azure Databricks using the Fabric API, and I want to use a Service Principal for authentication. I’m having trouble understanding the correct create connection request body. I’m testing the request body using this documentation:
https://learn.microsoft.com/en-us/rest/api/fabric/core/connections/create-connection?tabs=HTTP&tryIt...
I keep getting the following error when trying to create the gateway connection:
{
"requestId": "fe6fee53-7b7c-4206-88ce-d6b287668535",
"errorCode": "CreateGatewayConnectionFailed",
"moreDetails": [
{
"errorCode": "",
"message": "{\"XXXGateway_XX\":{\"error\":{\"code\":\"DMTS_UnsupportedConnectionStringError\",\"pbi.error\":{\"code\":\"DMTS_UnsupportedConnectionStringError\",\"details\":[{\"code\":\"DM_ErrorDetailNameCode_UnderlyingErrorMessage\",\"detail\":{\"type\":1,\"value\":\"Kind: AzureDatabricks is not supported.\"}}],\"exceptionCulprit\":1}}}}"
}
],
"message": "Failed to create gateway connection",
"isRetriable": false
}I already tried using both Databricks and Azure Databricks, but I’m still getting the same error:
“Kind: AzureDatabricks is not supported.”
Has anyone successfully created this type of connection through the Fabric API using a Service Principal?
A working example of the request body would really help. Thanks in advance.
Solved! Go to Solution.
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 Learn
I can see DatabricksMultiCloud, Databricks, ans AzureDatabricksWorkspace.
The API will also tell you what parameters are required.
Proud to be a Super User! | |
Hello @ogureisuo,
Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.
Thank you for being part of the Microsoft Fabric Community.
Hello @ogureisuo,
Hope everything’s going great with you. Just checking, the issue been resolved or are you still running into problems? Sharing an update can really help others facing the same thing.
Thank you.
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 Learn
I can see DatabricksMultiCloud, Databricks, ans AzureDatabricksWorkspace.
The API will also tell you what parameters are required.
Proud to be a Super User! | |
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
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 @Everyone,
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.
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.
Proud to be a Super User! | |
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?
Hi @Lodha_Jaydeep
I am asking for your source because "type": "AzureDatabricks",
is invalid and incorrect.
Please do not post incorrect AI generated information.
Proud to be a Super User! | |
Hi, thank you for your reply. We prefer to use a service principal instead of PAT authentication. Creating the connection via the gateway UI works as expected using the service principal, but when we attempt the same via this endpoint, it fails. Could you help me understand what might be missing or misconfigured?
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 7 | |
| 7 |
| User | Count |
|---|---|
| 48 | |
| 27 | |
| 24 | |
| 24 | |
| 22 |