mkleehammer / pyodbc

Python ODBC bridge
https://github.com/mkleehammer/pyodbc/wiki
MIT No Attribution
2.92k stars 563 forks source link

Current procedure(s) for connecting to Azure SQL #949

Closed gordthompson closed 2 years ago

gordthompson commented 3 years ago

A PR was recently submitted to SQLAlchemy …

https://github.com/sqlalchemy/sqlalchemy/pull/6968

… proposing an update to the documentation on how to connect to Azure SQL via mssql+pyodbc:// by using MSAL. However, the documentation it is amending was submitted less than a year ago and there is some confusion as to what the current procedure should be.

The pyodbc wiki already has a description titled "Authenticate using an Access Token from Azure Active Directory"

https://github.com/mkleehammer/pyodbc/wiki/Tips-and-Tricks-by-Database-Platform#authenticate-using-an-access-token-from-azure-active-directory

and I'm wondering if it may need to be expanded (and possibly promoted to be its own article under "Connecting to databases") to clarify the relationship(s) between azure, azure-identity, and MSAL.

v-chojas commented 3 years ago

Azure SQL has not changed - you can still authenticate using regular SQL Server auth or any valid AAD access token.