This article requires DbVisualizer 12.0.6 and later versions.
When connecting to Azure SQL Database needing to authenticate with Active Directory, an extra set of jar files are required. Steps needed:
- Download the active directory jar files
- Edit the driver definition in Tools->Driver Manager
- Change the authentication type
1. Download and and setup the driver
You will need to download the maven artifact MSAL4J including all its dependencies.
1.1. DbVisualizer 13.0 and later versions
Activate the download for the msal4j in the Azure SQL Database driver in Tools->Driver Manager. Activate the msal4j and choose to download it.
1.2. DbVisualizer 12
In version 12 of DbVisualizer you need to download masal4j with all dependencies manually from Maven and add it to the existing driver.
The full id of this artifact is specified by the maven dependency specification below. It's recommended to use the most recent version.
<dependency> <groupId>com.microsoft.azure</groupId> <artifactId>msal4j</artifactId> <version>1.10.0</version> </dependency>
Tip: There exists online resources that helps in the process of downloading all dependencies. One example is the Online Maven download tool.
Add jars to the Azure driver definition
Once all jar files are downloaded open DbVisualizer and the Tools->Driver Manager. Select the Azure SQL Database driver entry and add all jar files just downloaded. Close the Driver Manager.
3. Adjust the Azure database connection
Make sure the Driver Type (Driver (JDBC) in version 12) setting in the Connection tab is set to use the driver for Azure SQL Database.
In the Connection tab do the following to connect.
Connect with active directory using password
- Set the Active Directory Authentication to ActiveDirectoryPassword
- Connect
Connect with active directory using multi factor authentication (MFA)
- Set the Active Directory Authentication to ActiveDirectoryInteractive
- Connect
Read more on Azure and Active Directory authentication at Microsoft: https://docs.microsoft.com/en-us/sql/connect/jdbc/connecting-using-azure-active-directory-authentication?view=sql-server-ver15