Connection Refused: [Databricks][JDBC](11640) Required Connection Key(s): PWD;

wendyl
New Contributor II

Hey I'm trying to connect to Databricks using client id and secrets. I'm using JDBC 2.6.38.
I'm using the following connection url: jdbc:databricks://<server-hostname>:443;httpPath=<http-path>;AuthMech=11;Auth_Flow=1;OAuth2ClientId=<service-principal-application-id>;OAuth2Secret=<service-principal-oauth-secret>

But I'm getting the following error message:

Error encountered while running an operation in the data warehouse: [Databricks][JDBC](10100) Connection Refused: [Databricks][JDBC](11640) Required Connection Key(s): PWD; [Databricks][JDBC](11480) Optional Connection Key(s): AllowSelfSignedCerts, AsyncExecPollInterval, AutomaticColumnRename, CAIssuedCertNamesMismatch, CatalogSchemaSwitch, DecimalColumnScale, DefaultStringColumnLength, DelegationToken, DelegationUID, DnsResolver, DnsResolverArg, FastConnection, krbJAASFile, NonSSPs, PreparedMetaLimitZero, RowsFetchedPerBlock, ServerVersion, ServiceDiscoveryMode, SocketFactory, SocketFactoryArg, SocketTimeOut, SSLKeyStore, SSLKeyStorePwd, SSLTrustStore, SSLTrustStorePwd, StripCatalogName, UseCustomTypeCoercionMap, UseNativeQuery

Is there a way I can connect to Databricks without using PWD?

szymon_dybczak
Esteemed Contributor III

Hi @wendyl ,

Could you give as an answer for the following questions?

 

- does your workspace have private link ?

- do you use  Microsoft Entra ID managed service principal ?

- if you used Entra ID managed SP, did you use secret from Entra ID, or Azure Databricks OAuth secret?

 

- does your workspace have private link ? No

- do you use  Microsoft Entra ID managed service principal ? No

szymon_dybczak
Esteemed Contributor III

It's not working because client credential flow is only supported in case of Microsoft Entra managed service principal.

szymon_dybczak_0-1726861090327.png