Repository navigation
DOMAIN\user SQL Server login works with pyodbc/FreeTDS but fails with mssql_python #625
Description
Activity
Hi Tage-Politi, thank you for opening this issue!
Our team will review it shortly. We aim to triage all new issues within 24-48 hours and get back to you.
If you have additional information to share, please feel free to update the issue.
Thank you for your patience!
- addedtriage neededFor new issues, not triaged yet.For new issues, not triaged yet.
on Jun 4, 2026 Database confirmeed to be:
Microsoft SQL Server 2022 (RTM-CU24-GDR) (KB5089900) - 16.0.4252.3 (X64) Apr 26 2026 07:08:29 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2022 Datacenter 10.0 <X64> (Build 20348: ) (Hypervisor)- addedtriage doneIssues that are triaged by dev team and are in investigation.Issues that are triaged by dev team and are in investigation.area: connectivity-authConnection lifecycle, Entra/SP/NTLM auth, tokens, TLS, conn-string parsing, Fabric endpoints.Connection lifecycle, Entra/SP/NTLM auth, tokens, TLS, conn-string parsing, Fabric endpoints.and removedtriage neededFor new issues, not triaged yet.For new issues, not triaged yet.
on Jun 5, 2026 - addedquestionFurther information is requestedFurther information is requested
on Jun 5, 2026 - assigned and unassigned
on Jun 5, 2026 Hi Tage-Politi Thanks for the report. Since you’re running on Ubuntu 22.04, we want to clarify the authentication mode here.
Since your working comparison uses pyodbc with FreeTDS, this may reflect a driver-specific behavior difference rather than a bug in mssql_python.
Can you confirm whether DOMAIN\username is a SQL login whose literal name includes a backslash?
If it’s the latter, we can investigate further as a compatibility issue.
For mundane reasons and this particular use-case, the username unfortunately is indeed the name of a domain, a
\, and then a "classic" username.
Thepyodbc-driver seems to pass the username through.
I am using
mssql_pythonagainst an on-prem SQL Server using a domain-style usernameDOMAIN\usernamebut with a password.The same server, database, username and password work when using
pyodbcwith the FreeTDS ODBC driver, but fail withmssql_python. The error message isTo reproduce
This code below works:
This code below fails with the message reported above:
Further technical details
Python version: 3.10.12
mssql_python: 1.8.0
SQL Server version: SQL Server 2022 (Must be verified, but this is what my documentation says)
Operating system: Ubuntu 22.04.5 LTS