I want to connect the Azure SQL Database using Azure service principal through Python.
Please help me
I am able to connect it through ADF using service principal
There is a library Microsoft Azure Active Directory Authentication Library (ADAL) for Python to connect sql server.You could get it from here.
And in the wiki doc, you could find a tutorial about connecting to Azure SQL Database.
Also you could refer to this article, it has detailed steps to connect server.
Look at this tutorial:Lesson Learned #49: Does Azure SQL Database support Azure Active Directory connections using Service Principals?
This tutorial teaches us connect the Azure SQL Database through AAD using Azure service principle, and it provides example code in Powershell and C#.
I didn't find the example code in Python. I think this tutorial may be helpful for you, so I want to share with you.
Hope this helps.