Splunk Enterprise

DB Connect [DBX] with Azure AD Auth for Azure MS SQL Connections

luhadia_aditya
Path Finder

I am trying to solve a problem where Splunk DB Connect [DBX] can leverage Azure AD authentication through JDBC driver for Azure MS SQL Server access.

Currently, upon trying to achieve similar, DBX Server ends up into a java exception -

 

2021-05-15 12:44:31.032 +0800 [dw-56 - POST /api/connections/status] ERROR io.dropwizard.jersey.errors.LoggingExceptionMapper - Error handling a request: be206a071cdf0267
java.lang.NoClassDefFoundError: com/microsoft/aad/msal4j/IClientCredential
...
...
Caused by: java.lang.ClassNotFoundException: com.microsoft.aad.msal4j.IClientCredential
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 92 common frames omitted

 


Microsoft has already enhanced its JDBC Driver to work with Azure AD Auth instead of native MS SQL user based - 

https://docs.microsoft.com/ja-jp/sql/connect/jdbc/connecting-using-azure-active-directory-authentica... 

Point #1 & #2 are about the use-cases one of which I would want make use of, #3 is something that is currently documented and works just fine.

1 - ActiveDirectoryPassword
Supported in driver version v6.0 and later, you authentication=ActiveDirectoryPassword can use your Azure AD username and password to connect to Azure SQL Database and Synapse Analytics.
Illustration of the JDBC String Usage –

 

jdbc:sqlserver://<instance_url>:<instance_port>;database=<db>;encrypt=true;trustServerCertificate=false;hostNameInCertificate=<instance_domain>;loginTimeout=30;authentication=ActiveDirectoryPassword

 

2 - ActiveDirectoryServicePrincipal
Supported in driver version v9.2 and later, you authentication=ActiveDirectoryServicePrincipal can use the client ID and secret of the service principal ID to connect to Azure SQL Database and Synapse Analytics.
Illustration of the JDBC String Usage –

 

jdbc:sqlserver://<instance_url>:<instance_port>;database=<db>;encrypt=true;trustServerCertificate=false;hostNameInCertificate=<instance_domain>;loginTimeout=30;authentication=ActiveDirectoryServicePrincipal;aadSecurePrincipalId=<secure_principal_id>;aadSecurePrincipalSecret=<secure_principal_secret>

 

 

3 - SqlPassword - works just fine

authentication=SqlPassword Use to connect to SQL Server using the userName or user and password properties.

 

Spoiler

- I have approached Splunk Support - They say its beyond break fix
- Then, Professional Services - They say its more of OnDemand
- Then, OnDemand - Says it needs to be an enhancement, so should be an Idea
- Now, Idea - is where I am at this moment

So, I am approaching to the community if someone has solved this problem then please share the solution / workaround, else please upvote the idea, so that it gets the due attention.

Idea - https://ideas.splunk.com/ideas/EID-I-987 

 

Splunk Premium Customers and Partners would like to see Splunk DB Connect [DBX] Server enhanced to leverage Azure AD authentication through JDBC driver for Azure MS SQL Server access.

Currently, upon trying to achieve similar, DBX Server ends up into a java exception, detailed into the Support case attached with this idea request.

Microsoft has already enhanced its JDBC Driver to work with Azure AD Auth instead of native MS SQL user based.

Idea is simple - DBX [Req Initiation] ->> JDBC [Request Handover] ->> Azure AD [Request Auth] ->> Azure MS SQL [Request Fulfillment]

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...