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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

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
Frequent Visitor

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.