title: Using DefaultAzureCredential() in Azure Function with Python
body: <p>I am trying to use DefaultAzureCredential() with python in my Azure Function to connect to Azure SQL.</p>
  <p>What I have found so far is this: <a href="https://github.com/felipefandrade/azuresqlspn" rel="nofollow noreferrer">https://github.com/felipefandrade/azuresqlspn</a>. I am trying to use managed identity to authenticate.</p>
  <p>Is there a way to use DefaultAzureCredential() with SQLAlchemy in python code and also have it work in visual studio code for local development? Instead of using CLIENT_ID, TENANT_ID &amp; CLIENT_SECRET?</p>