I am working on .NET6 WebApi project on Ubuntu/Windows and the connection to the SQL Server DB is configured to use windows authentication. On windows I can use this connection string Data Source=DB-Name;Initial Catalog=Cat1;Integrated Security=SSPI
. On Linux, we have ruled out using Kerboros
for authentication and instead, we want to find a connection string similar to jdbc:jtds:sqlserver://DBName:Port;domain=ABC_XYZ;useNTLMv2=true
for java apps. Is this possible using SQL client, ODBC, OLEDB or any other supported clients for .net6? Using the JDBC connection string, I can connect to the desired databases in the Jetbrains Rider.
Asked
Active
Viewed 185 times
0

Rohit Singh
- 401
- 2
- 6
1 Answers
0
The .Net SqlClient does not support NTLM with provided credentials, there's a tracking issue here. Only Kerberos, SQL Auth, and (for Azure SQL) AAD auth.
JDBC is the only Microsoft driver that supports NTLM on Linux.

David Browne - Microsoft
- 80,331
- 6
- 39
- 67
-
I updated the question. Is this possible using any other .net6 supported clients like Oledb, ODBC ? – Rohit Singh Dec 09 '21 at 01:14
-
The jTDS driver is not a Microsoft driver. – Mark Rotteveel Dec 09 '21 at 12:15
-
The Microsoft JDBC Driver for SQL Server supports NTLM in the same way. – David Browne - Microsoft Dec 09 '21 at 13:55