Unable to Connect to SQL Server Using ActiveDirectoryPassword Authentication

Akash Narvaria 0 Reputation points
2024-11-05T10:49:37.1+00:00

Encountering an issue while trying to connect to SQL Server using ActiveDirectoryPassword authentication. The error message states: "Failed to load MSAL4J Java library for performing ActiveDirectoryPassword authentication."
For Info -> I am giving the sql server driver at runtime to the application and it works fine for sql server authentication but not for Active Directory Password.

The following steps have been taken:

  1. Added the MSAL4J dependency in pom.xml, but it did not resolve the issue.
  2. Attempted to load the MSAL4J dependency at runtime before establishing the JDBC connection, but this approach also failed.

Any insights or solutions to address this error would be appreciated.

Azure SQL Database
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.