How to use ActiveDirectoryInteractive (MFA) in spring boot application for authenticating SQL server

Savio Vegnesa 56 Reputation points
2022-09-09T10:01:10.64+00:00

We are trying to connect azure sql server using ActiveDirectoryInteractive method from spring boot application

We have addes following in application.property

spring.datasource.url=jdbc:sqlserver://servername:portNo;database=databaseName;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;
spring.datasource.hikari.data-source-properties.authentication=ActiveDirectoryInteractive

But we are getting error as
com.microsoft.aad.msal4j.MsalClientException: Unable to open default system browser

Azure SQL Database
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.