-
Notifications
You must be signed in to change notification settings - Fork 42
Description
Is your feature request related to a problem? Please describe.
In Azure Databricks, I can create service Credentials that are kind of User-assigned Managed identities. To use those, one gets a TokenCredential from a special Databricks-method: https://learn.microsoft.com/en-us/azure/databricks/connect/unity-catalog/cloud-services/use-service-credentials#python-example
Describe the solution you'd like
To use that with mssql_python, there is need to be able to specify a Token directly when connecting, or even to pass a TokenCredential instance somehow (which would be how many azure python sdk libraries work). Best would be to use a credential as all other Azure Python Libraries do
Describe alternatives you've considered
ServicePrincipal's would work too, but I don't like managing secrets this much
Additional Context
In .Net there is a callback for this: https://learn.microsoft.com/en-us/sql/connect/ado-net/sql/azure-active-directory-authentication?view=sql-server-ver17#using-accesstokencallback