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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
udione
Helper I
Helper I

Create Cloud Connection via Rest Api

I'd like to create Cloud Connection to my lakehouse via REST api. The feature I'm referring to is described here https://learn.microsoft.com/en-us/power-bi/connect-data/service-create-share-cloud-data-sources#crea... 

I want to use this in automated multiple workspace createon as when recreating Semantic model from deployment pipeline, default connection is linked which does not have service principal details and semantic model cannot refresh itself. 

I've checked number of methods on the api that create datasources but they all require passing gatewayId, which I don't have as this is not a gateway connection. (I've tried to use guid from sniffed gatewayCluster that is used by web ui - but no luck).

Is my scenario supported by rest api or this has to be done manually?

4 REPLIES 4
sdemei
Advocate I
Advocate I

I am having the same issue, did someone manage to get a solution for this? 

Post json in this format:

 

{
"connectionDetails": {
"type": "SQL",
"creationMethod": "SQL",
"parameters": [
{
"dataType": "Text",
"name": "server",
"value": "Lakehouse CONNECTIONSTRING"
},
{
"dataType": "Text",
"name": "database",
"value": "LAKEHOUSENAME"
}
]
},
"connectivityType": "ShareableCloud",
"credentialDetails": {
"singleSignOnType": "None",
"connectionEncryption": "NotEncrypted",
"skipTestConnection": false,
"credentials": {
"credentialType": "ServicePrincipal",
"servicePrincipalClientId": "CLIENTID",
"tenantId": "TENANTID",
"servicePrincipalSecret": "SECRET"
}
},
"displayName": "CONNECTIONNAME",
"privacyLevel": "Organizational"
}

 

to https://api.fabric.microsoft.com/v1/connections

lbendlin
Super User
Super User

Why do you need to "create"  that cloud connection?  It is automatically "created"  in the service, if you want it or not.

The connection that is created, does not have credentials in it so Semantic Model cannot refresh itself. This is the message you get on the Semantic Model. 

udione_0-1728935872820.png

You need to create anoother connection manually and set for example service principal credentials to make the Semantic Model refresh data automatically. 

Connection I'm using here is to of type Lakehouse Sql Endpoint.

Helpful resources

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

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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