6

I've installed and configured the Databricks CLI but get the error below when running

databricks workspace ls

Error Returned:

Error: Your authentication information may be incorrect. Please reconfigure with dbfs configure

Steps Used to Install CLI

1) Installed using pip install databricks-cli
2) Configure with CLI databricks configure --token. My ~/.databrickscfg file looks like:

[DEFAULT]
host = https://<account>.cloud.databricks.com
token = <password_generated_from_access_token

Has anyone come across this error and have a solution?

Alex Ott
  • 80,552
  • 8
  • 87
  • 132
ChaseHardin
  • 2,189
  • 7
  • 29
  • 50

2 Answers2

8

I was also getting the same error. What worked for me is something like this.

  1. Generate a new PAT from databricks workspace user settings. Don't use the older one.
  2. Use databricks configure --token command in your local system to be able to access the databricks-cli.
  3. Make sure your token should be something like dapi123....
Sarvesh Pandey
  • 322
  • 7
  • 17
0

Your access credentials are stored in the file ~/.databrickscfg on Unix, Linux, or macOS or %USERPROFILE%\.databrickscfg on Windows. The file contains a default profile entry:

[DEFAULT]
host = <workspace-URL>
token = <Azure-AD-token>

Make sure the .databrickscfg file is updated.

Troll
  • 1,895
  • 3
  • 15
  • 34
ko24
  • 1
  • 3