<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Issue with ValueError: unknown: unknown when using Databricks SDK for Python (AccountClient) in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/issue-with-valueerror-unknown-unknown-when-using-databricks-sdk/m-p/150423#M53419</link>
    <description>&lt;P&gt;Hello, I am currently developing a Python script using the Databricks SDK to manage Service Principal secrets within a Databricks Notebook environment.&lt;/P&gt;&lt;P&gt;I am using &lt;STRONG&gt;M2M (Machine-to-Machine) authentication&lt;/STRONG&gt;, and the Service Principal in use has been granted the &lt;STRONG&gt;Account Admin&lt;/STRONG&gt; role.&lt;/P&gt;&lt;P class=""&gt;```&lt;/P&gt;&lt;P class=""&gt;from databricks.sdk import AccountClient&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;a = AccountClient(&lt;/P&gt;&lt;P class=""&gt;host="&lt;A href="https://accounts.cloud.databricks.com" target="_blank" rel="noopener"&gt;https://accounts.cloud.databricks.com&lt;/A&gt;",&lt;/P&gt;&lt;P class=""&gt;account_id="{MY_ACCOUNT_ID}",&lt;/P&gt;&lt;P class=""&gt;client_id="{MY_CLIENT_ID}",&lt;/P&gt;&lt;P class=""&gt;client_secret="{MY_CLINET_SECRET}"&lt;/P&gt;&lt;P class=""&gt;)&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;sp_list = a.service_principals.list()&lt;/P&gt;&lt;P class=""&gt;for sp in sp_list:&lt;/P&gt;&lt;P class=""&gt;print(sp) # for test&lt;/P&gt;&lt;P class=""&gt;```&lt;/P&gt;&lt;P&gt;Here is the code snippet I am using:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;When I execute this code, I encounter the following error: ValueError: unknown: unknown&lt;/P&gt;&lt;P&gt;Are there any similar known cases or any guidance on how to resolve this issue?&lt;/P&gt;</description>
    <pubDate>Tue, 10 Mar 2026 01:33:53 GMT</pubDate>
    <dc:creator>Seunghyun</dc:creator>
    <dc:date>2026-03-10T01:33:53Z</dc:date>
    <item>
      <title>Issue with ValueError: unknown: unknown when using Databricks SDK for Python (AccountClient)</title>
      <link>https://community.databricks.com/t5/data-engineering/issue-with-valueerror-unknown-unknown-when-using-databricks-sdk/m-p/150423#M53419</link>
      <description>&lt;P&gt;Hello, I am currently developing a Python script using the Databricks SDK to manage Service Principal secrets within a Databricks Notebook environment.&lt;/P&gt;&lt;P&gt;I am using &lt;STRONG&gt;M2M (Machine-to-Machine) authentication&lt;/STRONG&gt;, and the Service Principal in use has been granted the &lt;STRONG&gt;Account Admin&lt;/STRONG&gt; role.&lt;/P&gt;&lt;P class=""&gt;```&lt;/P&gt;&lt;P class=""&gt;from databricks.sdk import AccountClient&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;a = AccountClient(&lt;/P&gt;&lt;P class=""&gt;host="&lt;A href="https://accounts.cloud.databricks.com" target="_blank" rel="noopener"&gt;https://accounts.cloud.databricks.com&lt;/A&gt;",&lt;/P&gt;&lt;P class=""&gt;account_id="{MY_ACCOUNT_ID}",&lt;/P&gt;&lt;P class=""&gt;client_id="{MY_CLIENT_ID}",&lt;/P&gt;&lt;P class=""&gt;client_secret="{MY_CLINET_SECRET}"&lt;/P&gt;&lt;P class=""&gt;)&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;sp_list = a.service_principals.list()&lt;/P&gt;&lt;P class=""&gt;for sp in sp_list:&lt;/P&gt;&lt;P class=""&gt;print(sp) # for test&lt;/P&gt;&lt;P class=""&gt;```&lt;/P&gt;&lt;P&gt;Here is the code snippet I am using:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;When I execute this code, I encounter the following error: ValueError: unknown: unknown&lt;/P&gt;&lt;P&gt;Are there any similar known cases or any guidance on how to resolve this issue?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2026 01:33:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/issue-with-valueerror-unknown-unknown-when-using-databricks-sdk/m-p/150423#M53419</guid>
      <dc:creator>Seunghyun</dc:creator>
      <dc:date>2026-03-10T01:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ValueError: unknown: unknown when using Databricks SDK for Python (AccountClient)</title>
      <link>https://community.databricks.com/t5/data-engineering/issue-with-valueerror-unknown-unknown-when-using-databricks-sdk/m-p/150471#M53427</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/212394"&gt;@Seunghyun&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;This error is likely caused by the Databricks SDK’s authentication step, not by&amp;nbsp;the Service Principals API itself. The SDK is trying to obtain an OAuth token for your AccountClient, the token request is failing, and the error payload coming back from the server doesn’t include the usual error/error_description fields, and so the SDK can only surface it as ValueError: unknown: unknown.&lt;/P&gt;
&lt;P&gt;From what I can see, common causes are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Using the wrong accounts host URL for your cloud/region (for example, &lt;A href="https://accounts.cloud.databricks.com" target="_blank"&gt;https://accounts.cloud.databricks.com&lt;/A&gt; is specific to certain deployments).&lt;/LI&gt;
&lt;LI&gt;A misconfigured client (service principal)... e.g., not truly account-level, not enabled for M2M, or not allowed on that account.&lt;/LI&gt;
&lt;LI&gt;General OAuth misconfiguration between the host, account_id, client_id, and client_secret.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Can you check whether...&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The host value matches your Databricks account console for your cloud/region.&lt;/LI&gt;
&lt;LI&gt;The client_id / client_secret belong to an account-level application that’s configured for client‑credentials on that same account.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2026 10:25:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/issue-with-valueerror-unknown-unknown-when-using-databricks-sdk/m-p/150471#M53427</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-03-10T10:25:52Z</dc:date>
    </item>
  </channel>
</rss>

