How to configure pyodbc connection string to authenticate Azure SQL database server in Azure Functions?


We have a connection to an Azure SQL database in a Python function that runs locally using pyodbc. We are now migrating this function to Azure Functions using a connection string like this:

'Driver={ODBC Driver 17 for SQL Server};Server=<Azure-SQL-db-server-name>;Database=<database-name>;'

Can we use SQL authentication for Azure SQL databases? If so how do we configure the connection string?
If, on the other hand, we want to use Microsoft Entra ID for authentication, how do we configure the connection string?
Thank you.



Source link

Leave a Comment