dbt-msft / dbt-sqlserver

dbt adapter for SQL Server and Azure SQL
MIT License
205 stars 96 forks source link

sql_server_connection_manager - Managed identity not supported in 1.7.2 #482

Closed duszekmestre closed 6 months ago

duszekmestre commented 6 months ago

We use managed identity authentication to connect to Azure SQL database. After update to 1.7.2 we encountered error:

('28000', "[28000] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Login failed for user ''. (18456) (SQLDriverConnect)")

As I see in source there is condition to not support other methods than sql: https://github.com/dbt-msft/dbt-sqlserver/blob/master/dbt/adapters/sqlserver/sql_server_connection_manager.py#L83

Please add managed identity (and other Azure SQL credentials methods) support to adapter.

duszekmestre commented 6 months ago

I found the solution: I have to change authentication type from MSI to auto in the profile file.