## TL;DR

Delete or fix that env file and the host from your config is honored again. What was reported: Issue databricks/databricks-sdk-py#348 (closed, 5 comments): Description When you create a WorkspaceClient, you can set the host in your config file, which will be read successfully.

## Steps

1. What was reported:
Issue databricks/databricks-sdk-py#348 (closed, 5 comments): **Description** When you create a WorkspaceClient, you can set the host in your config file, which will be read successfully. If you define a host for an AccountClient, the host setting is ignored, and a workspace host is selected instead. Since a host gets set, the library code refuses to overwrite an existing value for the host. **Reproduction** Create a config file with at least two profiles. One to be used for a WorkspaceClient, and one for an AccountClient. ``` [account] host=https://accounts.azuredatabricks.net/ account_id=... azure_tenant_id=... azure_client_id=... azure_client_secret [your value]

2. What works:
AccountClient ignoring the host in .databrickscfg is usually not an SDK bug: the VS Code Databricks extension writes a `.databricks/.databricks.env` file that overrides the host. Delete or fix that env file and the host from your config is honored again.

## When to use

You are seeing this: Since a host gets set, the library code refuses to overwrite an existing value for the host. Use this skill when you run into "[ISSUE] AccountClient doesn't use host in .databrickscfg".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

## Sources

- https://accounts.azuredatabricks.net/
