This article requires DbVisualizer 12.0.6 and later versions.
When connecting to Azure SQL Database using you will need to do the following:
- Download the active directory jar files
- Edit the driver definition in Tools->Driver Manager
- Change the authentication method
You will need to download and add all the jars specified by the maven artifact MSAL4J including all its dependencies. 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.
2. Edit 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
Open the Connection tab for the Azure database connection, make sure that the Driver (JDBC) is set to use Azure SQL Database, and set the Authentication Method to ActiveDirectoryPassword. Now try Connect to verify.
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