Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
edmo
Contributor
Contributor

Connecting to SQL Server using Azure Active Directory - Failed to Load MSAL4J

Hi,

I am trying to connect to a SQL Server database using Azure Active directory authentication but I am getting an error stating "

Failed to load MSAL4J Java library for performing ActiveDirectoryPassword authentication." I have downloaded the

msal4j-1.12.0.jar file and installed it but I'm still getting the error.

Connection failure. You must change the Database Settings.

 java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: Failed to load MSAL4J Java library for performing ActiveDirectoryPassword authentication.

This is the JDBC connection string I'm using: jdbc:sqlserver://<sqlservername>:1433;DatabaseName=<databasename>;authentication=ActiveDirectoryPassword

I'm also using 10.2 version of the JDBC Driver for SQL Server.

Labels (5)
5 Replies
gjeremy1617088143

Hi @Not defined Not defined​ , maybe you can try : authentication=ActiveDirectoryIntegrated in the additionnal param of the ssms db connection. you also surely have to add the  mssql-jdbc_auth dll in win32 folder or java folder you can find it in the jdbc driver zip

Anonymous
Not applicable

Hello,

 

We've recently upgraded the MsSQL drivers. If you're not running the latest Talend 8 patch you'll likely need a version 7 of the driver. That version will use the ADAL4j libraries. And make sure the AD auth checkbox is enabled in the Advanced settings.

https://help.talend.com/r/en-US/Cloud/release-notes/r2022-04-studio-new-features

Naim1
Contributor
Contributor

Hi @Balazs Gunics​ , I'm using Talend Studio version as follow :

 

Version: 7.3.1

Build id: R2022-03

 

I'm facing this issue as well. Should it use ADAL4j or MSAL4j ?

And the weird thing is, I have other job running in the same project workspace, able to connect to Azure AD successfully. But some other job failed on this error mentioned by edmo.

Anonymous
Not applicable

Hello,

 

Did you enable the checkbox in the Advanced settings?

 

Talend 7.x references ADAL4J, which means you need to specify a JDBC driver (v7) that is capable to work with ADAL4J.

 

On Talend 8, since April we support MSAL4J which requires not just the JDBC + MSAL but another half a dozen dependencies to be present and with the right version.

Naim1
Contributor
Contributor

yes.. already tick the Authenticate using Azure Active Directory, and also add the additional parameter :

 

authentication=ActiveDirectoryPassword

 

How to configure the component used the correct driver, since the error mentioned MSAL4j, like its pointing to different driver.