Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
ogureisuo
Helper I
Helper I

Fabric API: Unable to create Azure Databricks connection using Service Principal

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.

1 ACCEPTED SOLUTION
tayloramy
Super User
Super User

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. 





If you found this helpful, consider giving some Kudos.
If I answered your question or solved your problem, mark this post as the solution!

Join the Fabric Discord!

Proud to be a Super User!





View solution in original post

10 REPLIES 10
v-ssriganesh
Community Support
Community Support

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.

v-ssriganesh
Community Support
Community Support

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.

tayloramy
Super User
Super User

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. 





If you found this helpful, consider giving some Kudos.
If I answered your question or solved your problem, mark this post as the solution!

Join the Fabric Discord!

Proud to be a Super User!





Lodha_Jaydeep
Responsive Resident
Responsive Resident

 

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 @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. 





If you found this helpful, consider giving some Kudos.
If I answered your question or solved your problem, mark this post as the solution!

Join the Fabric Discord!

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. 





If you found this helpful, consider giving some Kudos.
If I answered your question or solved your problem, mark this post as the solution!

Join the Fabric Discord!

Proud to be a Super User!





Hi @tayloramy,


It has been taken care off. Thanks for your heads up!

Thanks,

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?

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.