Connect to Azure Database

I am using Knime and I would like to connect to the Azure Database.
I tried the Microsoft SQL Server Connector node and encountered an error.
ERROR Microsoft SQL Server Connector 0:1 Execute failed: Failed to load ADAL4J Java library for performing ActiveDirectoryPassword authentication.

I have downloaded the ADAL4J from Microsoft including the dependencies and also the JDBC driver from Knime installation marketplace.

I have tried the following:

  1. Create a plugin and include the ADAL4J downloaded in lib folder and then place it in the knime plugins directory - not working
  2. I have included the ADAL4J library in knime jre PATH_TO_KNIME\plugins\org.knime.binary.jre.win32.x86_64_1.8.0.202-b08\jre\lib\ext - not working
  3. I have included ADAL4J library in the lib folder and made changes to the MANIFEST.MF PATH_TO_KNIME\plugins\org.knime.database.connectors.sqlserver.driver_6.2.2.v201908130931 - not working

Hence I would like to ask how do I connect to the Azure SQL database? Attached is the screenshot of the setting.

Hello ktlim1986,
I would suggest to setup a new driver for this as described in this section.
The important things to do are:

  • Use mssqlserver as Database type
  • Specify the URL template according to your needs and the description in the URL template syntax information section. The template is used in the Microsoft SQL Server Connector node to create the connection URL by replacing the placeholders (e.g. ) with the entered values in the dialog
  • Either add the driver jar and all ADAL4J jars via the Add file button or but all jars in a directory and then register it via the Add directory button

KNIME creates an URLClassLoader for the driver using the Classpath information. If you want to use any native libraries (e.g. DLLs) you need to put them into a directory and then register it via the Add directory button. They can not be added via the Add file button.


Hi @tobias.koetter, thanks! I managed to solve the issue using the instruction provided. In addition, the JAR version for mssql-jdbc is important. Previously, I used version 7.4.1 and there is a problem with the Jar file. I use 8.1.1 preview and it works. I think this is only when if the parameter Authentication is set to ActiveDirectoryPassword.

Below is the error caused by version 7.4.1.

Caused by: java.util.concurrent.ExecutionException: java.lang.String cannot be cast to java.util.List
… 26 more
Caused by: java.lang.String cannot be cast to java.util.List
… 26 more


Great that it works now and thanks for the hint which might help others.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.