Error accessing Azure sql from Azure databricks using jdbc authentication=ActiveDirectoryInteractive

PankajMendi
New Contributor

Getting below error while accessing Azure sql using jdbc from Azure databricks notebook,

com.microsoft.sqlserver.jdbc.SQLServerException: Failed to authenticate the user p***** in Active Directory (Authentication=ActiveDirectoryInteractive). Unable to open default system browser

Here is the url of jdbc,

url = f"jdbc:sqlserver://{database_host}:{database_port};database={database_name};user={user};password={password};encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryInteractive;"

-werners-
Esteemed Contributor III

it seems you are trying to do MFA authentication using jdbc.
The used driver might not support that. It could also be a OS issue (if you are not using Windows f.e.) or a browser issue (the browser will have to open a window/tab).
Can you try to authenticate using a service principal, or bypass the MFA?