From cf34b77fbc3b334d12409ed902ddf469e1fe6216 Mon Sep 17 00:00:00 2001 From: Alexander Kammerer Date: Tue, 31 Mar 2020 16:46:34 +0200 Subject: [PATCH] UID needs to be set in connection string, so set default --- sql_server/pyodbc/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sql_server/pyodbc/base.py b/sql_server/pyodbc/base.py index a2cdc205..0b38fa92 100644 --- a/sql_server/pyodbc/base.py +++ b/sql_server/pyodbc/base.py @@ -298,6 +298,7 @@ def get_new_connection(self, conn_params): if auth: cstr_parts['Authentication'] = auth if auth == 'ActiveDirectoryInteractive': + cstr_parts.setdefault('UID', '') cstr_parts.pop('PWD', '') cstr_parts['Trusted_Connection'] = 'no'