diff --git a/databricks/sdk/credentials_provider.py b/databricks/sdk/credentials_provider.py index 232465dab..37246265a 100644 --- a/databricks/sdk/credentials_provider.py +++ b/databricks/sdk/credentials_provider.py @@ -201,7 +201,8 @@ def external_browser(cfg: 'Config') -> Optional[CredentialsProvider]: oauth_client = OAuthClient(host=cfg.host, client_id=client_id, redirect_url='http://localhost:8020', - client_secret=cfg.client_secret) + client_secret=cfg.client_secret, + account_id=cfg.account_id) # Load cached credentials from disk if they exist. # Note that these are local to the Python SDK and not reused by other SDKs. diff --git a/databricks/sdk/oauth.py b/databricks/sdk/oauth.py index e9a3afb90..5ce17ae72 100644 --- a/databricks/sdk/oauth.py +++ b/databricks/sdk/oauth.py @@ -359,7 +359,8 @@ def __init__(self, redirect_url: str, *, scopes: List[str] = None, - client_secret: str = None): + client_secret: str = None, + account_id: str = None): # TODO: is it a circular dependency?.. from .core import Config from .credentials_provider import credentials_strategy @@ -368,7 +369,7 @@ def __init__(self, def noop_credentials(_: any): return lambda: {} - config = Config(host=host, credentials_strategy=noop_credentials) + config = Config(host=host, credentials_strategy=noop_credentials, account_id=account_id) if not scopes: scopes = ['all-apis'] oidc = config.oidc_endpoints