Hi, I'm getting the below error when trying to connect to Azure Databricks via a Service Principal:
"Failed to refresh the authentication token. You can try to run the connection test to get a new token in the Data Connection Manager.Bad response."
I'm using the Generic OAuth2 Authentication Method
I have followed the below knowledge article, only difference is that I'm using Azure Databricks instead of AWS:
Access Databricks data with service accounts leveraging OAuth
Also, we're using Unity Catalog in Azure Databricks but there's only option to pass the schema but no catalog in Alteryx.
My Altery Version is 2025.1.2.142 Patch: 2
I would really appreciate if someone can help to resolve this error.
Thanks & Regards,
Sourav
Does your Azure allow Alteryx to access? Sometimes the policy may block access
Where are you putting your oauth? is your connection in your odbc 64 working? I did this via:
1) set up your Databricks oauth in odbc.
2) In Alteryx link your odbc 64 set up. do not use a password.
I'm putting my credentials while setting up connection to Databricks via Quick Connect in Connection Manger.
Do I need to setup ODBC separately? As of now I've only installed the Simba ODBC 64bit Driver
YES. you will should use the odbc driver to config your databricks. YES. you should set it up and test it there. Connecting a Databricks can be fairly complicated. You should talk to your Databricks team.
Oh ok, thank you! Can you refer any guide/documentation to do so?
@renat_isch ----> what's your take here on why the generic oauth in Alteryx would be preferable over an odbc 64? My general take is that Databricks connections are a lot of moving parts and being able to test in the odbc 64 config is usually faster/better than testing in Alteryx.
@souravgouri Renat's guide that you linked contains most of the core details you need to set up your Databricks. Take a stab at it and let me know where you hit an error?
@apathetichell Yes we've already created a service principal in Databricks, setup the permissions and got the credentials.
But getting the error when trying to connect in Alteryx using the same credentials
Earlier I was trying with OAuth URL as https://{databricks_workspace_id}.cloud.databricks.com/oidc/
Now I tried with https://{databricks_workspace_id}.cloud.databricks.com/oidc/v1/token.and got the below error:
Hey ---> so I don't think the directions provided by Alteryx are sufficient. They do not contain a method to map an httpPath which is critical for connecting to Databricks. See:
https://docs.databricks.com/aws/en/integrations/odbc/authentication#authentication-u2m
I would go back to an odbc 64 connection --> in my experience you can connect via odbc 64 and then use that connection as a passwordless connection in Alteryx (ie connection is established by your driver).