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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
vasotsich
Frequent Visitor

Is it possible to create a connection to an SQL endpoint via Service Principal?

Hello all, 

 

We would like to change our connections from OAuth2.0 to Service Principal. Although the connection to a lakehouse via SQL end point seems to be recognised as "SQL Server". I was not able to connect with the option of Service Principal. I know that the default connector for a lakehouse does not support a service principal, that's why I tried the SQL Server connector. Does anybody know if this is possible?

 

PS. I have added the service principal as a contributor to the workspace and I also shared the lakehouse. 

1 ACCEPTED SOLUTION
tackytechtom
Super User
Super User

Hi @vasotsich ,

 

I actually tried this myself just now and for me it worked. I realised that I was only able to add the service principal as a contributor to the workspace after I had enabled the setting "Service Principals can use Fabric APIs" in the admin portal. 

 

After that I could create a connection in Fabric with Service Principal as the Authentication method and SQL Server as the connection type. Lastly, I assigned this cloud connection to my semantic model under the setting Gateway and cloud connection. The refresh afterwards worked out, too.

 

I might set up a quick blog article walkthrough in the upcoming days with a few screenshots. 

 

But until then, please let me know if the way I described it worked out for you as well 🙂

 

[Edit, 2024-10-13]: Here the article:

https://www.tackytech.blog/how-to-set-a-service-principal-as-the-authentication-method-in-a-fabric-c...

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

2 REPLIES 2
v-jingzhan-msft
Community Support
Community Support

Hi @vasotsich 

 

I just tested it in SQL Server Management Studio by using Microsoft Entra Service Principal authentication and it worked for me too. I use Application ID (Client ID) for username and Client secret for password. Hope this would be helpful.  

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

tackytechtom
Super User
Super User

Hi @vasotsich ,

 

I actually tried this myself just now and for me it worked. I realised that I was only able to add the service principal as a contributor to the workspace after I had enabled the setting "Service Principals can use Fabric APIs" in the admin portal. 

 

After that I could create a connection in Fabric with Service Principal as the Authentication method and SQL Server as the connection type. Lastly, I assigned this cloud connection to my semantic model under the setting Gateway and cloud connection. The refresh afterwards worked out, too.

 

I might set up a quick blog article walkthrough in the upcoming days with a few screenshots. 

 

But until then, please let me know if the way I described it worked out for you as well 🙂

 

[Edit, 2024-10-13]: Here the article:

https://www.tackytech.blog/how-to-set-a-service-principal-as-the-authentication-method-in-a-fabric-c...

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Helpful resources

Announcements
Oct Fabric Update Carousel

Fabric Monthly Update - October 2024

Check out the October 2024 Fabric update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.