- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
When the process initializes it evaluates all available credentials across the system (environment variables, .databrickscfg file, CLI profiles). If it detects overlapping methods as in this case, traces of an OIDC configuration (DATABRICKS_TOKEN_AUDIENCE) alongside a Personal Access Token (DATABRICKS_TOKEN or pat) -it throws a ValueError to prevent ambiguous or insecure workspace connections. It is likely cached in the active terminal session retained by a background process.
You can follow below
- If the variables are cached in the current terminal session - Identify the variables in the active environment. Open a PowerShell terminal and list the active variables
# List DATABRICKS_* environment variables
Get-ChildItem Env: | Where-Object { $_.Name -like "DATABRICKS_*" } | Format-Table Name, Value- In the same PowerShell window (run as Administrator for system variables) execute
# Remove OIDC-related variables from User scope
[System.Environment]::SetEnvironmentVariable('DATABRICKS_TOKEN_AUDIENCE', $null, 'User')
# Remove from System scope (requires Administrator)
[System.Environment]::SetEnvironmentVariable('DATABRICKS_TOKEN_AUDIENCE', $null, 'Machine')
# If DATABRICKS_TOKEN is set via environment variable, remove it too
[System.Environment]::SetEnvironmentVariable('DATABRICKS_TOKEN', $null, 'User')
[System.Environment]::SetEnvironmentVariable('DATABRICKS_TOKEN', $null, 'Machine')If you want the most stable and direct step - Remove the environment variables for credential management and rely exclusively on a configuration file. This provides a cleaner separation of environments. Create or edit your C:\Users\himan\.databrickscfg file to explicitly define your [DEFAULT] profile
[DEFAULT]
host = https://adb-7405615889085100.0.azuredatabricks.net
token = put the tokenRetry the lakebridge installation after you remove the variables. You must close & reopen all terminals after removing the environment variables. Use the databrickscfg for authentication steps. Ensure the token is copied completely and the user account has necessary permissions. Regenerate the token if necessary.
More details here