Issue with ValueError: unknown: unknown when using Databricks SDK for Python (AccountClient)

Seunghyun
Contributor

Hello, I am currently developing a Python script using the Databricks SDK to manage Service Principal secrets within a Databricks Notebook environment.

I am using M2M (Machine-to-Machine) authentication, and the Service Principal in use has been granted the Account Admin role.

```

from databricks.sdk import AccountClient

 

a = AccountClient(

host="https://accounts.cloud.databricks.com",

account_id="{MY_ACCOUNT_ID}",

client_id="{MY_CLIENT_ID}",

client_secret="{MY_CLINET_SECRET}"

)

 

sp_list = a.service_principals.list()

for sp in sp_list:

print(sp) # for test

```

Here is the code snippet I am using:



When I execute this code, I encounter the following error: ValueError: unknown: unknown

Are there any similar known cases or any guidance on how to resolve this issue?