cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

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;"
1 REPLY 1

-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?

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!