'com.microsoft.sqlserver.jdbc.SQLServerException: Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication

Facing issue with connecting to a SQL Server using AD authentication through a spark program.

The JDBC URL being passed is in below format:

"jdbc:sqlserver://<hostname>;database=<dbname>;ApplicationIntent=ReadOnly;port=<port>;integratedSecurity=true;authenticationScheme=ntlm"

Can someone please help with the issue.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source