denisenkom / pytds

Python DBAPI driver for MSSQL using pure Python TDS (Tabular Data Stream) protocol implementation
MIT License
190 stars 52 forks source link

Feature Request: Support for token based Authentication for Azure SQL #135

Open aersam opened 2 years ago

aersam commented 2 years ago

Support supplying a token is needed for Azure Managed Identity and the like

Docu for possibilities with the official .Net Driver: https://docs.microsoft.com/en-us/sql/connect/ado-net/sql/azure-active-directory-authentication?view=sql-server-ver15#setting-azure-active-directory-authentication

Not sure how complicated the implementation is. I hope that it's possible to do this without having to use msal package but Im not sure.

Whould you accept a PR for something like this?

aersam commented 2 years ago

Docu for Pyodbc (slightly outdated as it references the old ADAL Library and not MSAL): https://github.com/AzureAD/azure-activedirectory-library-for-python/wiki/Connect-to-Azure-SQL-Database

aersam commented 1 year ago

Looks like a good implementation supporting it: https://github.com/denisenkom/go-mssqldb ;)