IBM Support

How to connect to Azure SQL Server using Active Directory Managed Identity

How To


Summary

How to connect to Azure SQL Server using Active Directory Managed Identity

Objective

Only valid for Data Collector 5.7 and later.

This article covers how to connect to Azure SQL Server using Active Directory Managed Identity (Microsoft Entra ID). We will use the JDBC stages (Query Consumer or Multitable Consumer) to do it since there is no specific Azure SQL Server stage at the moment.

Steps

  1. Download and install the proper drivers and dependencies in SDC from Microsoft Documentation: https://learn.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server?view=azuresqldb-current

  2. Follow these steps from Microsoft documentation to create a user and grant access to the Azure SQL Server: https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/tutorial-windows-vm-access-sql

  3. Obtain the connection string from your Azure SQL Server. In the Azure SQL UI, Go to SettingConnection Strings.

  4. Copy the connection string called “JDBC (Microsoft Entra integrated authentication)”. It looks like this one:

jdbc:sqlserver://ranjithtest.database.windows.net:1433;database=ranjith;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;Authentication=ActiveDirectoryIntegrated

5. Change the last part of the string. From Authentication=ActiveDirectoryIntegratedAuthentication=ActiveDirectoryManagedIdentity

  1. Use this connection string when configuring the JDBC stage. It will look like this:

jdbc:sqlserver://ranjithtest.database.windows.net:1433;database=ranjith;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;Authentication=ActiveDirectoryManagedIdentity

Be sure to deactivate the Java Security Manager when using a Java version earlier than Java 17. Otherwise, the connection will be blocked.

Results

After following the above steps, you will be able to connect to Azure SQL Server using Azure Active Directory Managed Identity.

Document Location

Worldwide


[{"Line of Business":{"code":"LOB76","label":"Data Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSM7CU","label":"IBM StreamSets Data Collector"},"ARM Category":[{"code":"","label":""}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"}]

Document Information

More support for:
IBM StreamSets Data Collector

Software version:
All Version(s)

Document number:
7186360

Modified date:
16 March 2025

UID

ibm17186360