<?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 Unable to authenticate against https://accounts.cloud.databricks.com as an account admin. in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/unable-to-authenticate-against-https-accounts-cloud-databricks/m-p/9768#M5077</link>
    <description>&lt;P&gt;Problem&lt;/P&gt;&lt;P&gt;I'm unable to authenticate against the &lt;A href="https://accounts.cloud.databricks.com" target="test_blank"&gt;https://accounts.cloud.databricks.com&lt;/A&gt; endpoint even though I'm an account admin. I need it to assign account level groups to workspaces via the workspace assignment api (&lt;A href="https://api-docs.databricks.com/rest/latest/permission-assignment-account-api.html" alt="https://api-docs.databricks.com/rest/latest/permission-assignment-account-api.html" target="_blank"&gt;https://api-docs.databricks.com/rest/latest/permission-assignment-account-api.html&lt;/A&gt;) which is recommended by Databricks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our Databricks instance is deployed to AWS.&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;What's been tried&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;​Create PAT token&lt;/LI&gt;&lt;LI&gt;Test that I can authenticate against workspace endpoints&lt;/LI&gt;&lt;LI&gt;Test workspace assignment endpoint with unauthorised error &lt;/LI&gt;&lt;LI&gt;Calling Groups account endpoint with unauthorised error&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;Code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;def list_account_groups():
    """Note: Requires Account admin PAT token to list all account groups"""
    api_version = '/api/2.0'
    api_command = "/scim/v2/Groups"
    url = f"https://accounts.cloud.databricks.com{api_version}/accounts/{ACCOUNT_ID}{api_command}"
&amp;nbsp;
    header = {
        "accept": "application/scim+json",
        "Authorization": f"Bearer {DATABRICKS_TOKEN}"
    }
    
    response = requests.get(url, headers=header)
    print(response.status_code)
    print(json.dumps(json.loads(response.text), indent = 2))&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Response:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;401
{
  "message": "Cannot complete request; user is unauthenticated"
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2023 09:14:43 GMT</pubDate>
    <dc:creator>bricksdata</dc:creator>
    <dc:date>2023-02-08T09:14:43Z</dc:date>
    <item>
      <title>Unable to authenticate against https://accounts.cloud.databricks.com as an account admin.</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-authenticate-against-https-accounts-cloud-databricks/m-p/9768#M5077</link>
      <description>&lt;P&gt;Problem&lt;/P&gt;&lt;P&gt;I'm unable to authenticate against the &lt;A href="https://accounts.cloud.databricks.com" target="test_blank"&gt;https://accounts.cloud.databricks.com&lt;/A&gt; endpoint even though I'm an account admin. I need it to assign account level groups to workspaces via the workspace assignment api (&lt;A href="https://api-docs.databricks.com/rest/latest/permission-assignment-account-api.html" alt="https://api-docs.databricks.com/rest/latest/permission-assignment-account-api.html" target="_blank"&gt;https://api-docs.databricks.com/rest/latest/permission-assignment-account-api.html&lt;/A&gt;) which is recommended by Databricks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our Databricks instance is deployed to AWS.&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;What's been tried&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;​Create PAT token&lt;/LI&gt;&lt;LI&gt;Test that I can authenticate against workspace endpoints&lt;/LI&gt;&lt;LI&gt;Test workspace assignment endpoint with unauthorised error &lt;/LI&gt;&lt;LI&gt;Calling Groups account endpoint with unauthorised error&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;Code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;def list_account_groups():
    """Note: Requires Account admin PAT token to list all account groups"""
    api_version = '/api/2.0'
    api_command = "/scim/v2/Groups"
    url = f"https://accounts.cloud.databricks.com{api_version}/accounts/{ACCOUNT_ID}{api_command}"
&amp;nbsp;
    header = {
        "accept": "application/scim+json",
        "Authorization": f"Bearer {DATABRICKS_TOKEN}"
    }
    
    response = requests.get(url, headers=header)
    print(response.status_code)
    print(json.dumps(json.loads(response.text), indent = 2))&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Response:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;401
{
  "message": "Cannot complete request; user is unauthenticated"
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 09:14:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-authenticate-against-https-accounts-cloud-databricks/m-p/9768#M5077</guid>
      <dc:creator>bricksdata</dc:creator>
      <dc:date>2023-02-08T09:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to authenticate against https://accounts.cloud.databricks.com as an account admin.</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-authenticate-against-https-accounts-cloud-databricks/m-p/9769#M5078</link>
      <description>&lt;P&gt;@lasse l​&amp;nbsp;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems like the authentication token you are using is not authorized to access the Account API endpoint. The fact that you are able to authenticate against workspace endpoints using the same token suggests that the issue is specific to the Account API.&lt;/P&gt;&lt;P&gt;Here are a few steps you can try to troubleshoot the issue:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Make sure that your PAT token has the appropriate permissions to access the Account API. You can check this by going to the Databricks web interface and navigating to the "User Settings" &amp;gt; "Tokens" page. Check that the token has the "Manage" permission for the "Account Management API".&lt;/LI&gt;&lt;LI&gt;Check that the ACCOUNT_ID variable is set to the correct account ID. You can find this ID in the Databricks web interface by going to the "Admin Console" &amp;gt; "Account Settings" page.&lt;/LI&gt;&lt;LI&gt;Check that you are using the correct endpoint URL. The URL you are using in your code is correct for the public cloud instance of Databricks, but if you are using a Databricks deployment on a different cloud provider, the URL may be different. You can find the correct endpoint URL in the Databricks documentation for your cloud provider.&lt;/LI&gt;&lt;LI&gt;Check that the account admin role is correctly assigned to your user account. You can check this by going to the Databricks web interface and navigating to the "Admin Console" &amp;gt; "User Management" page. Check that your user account has the "Account Admin" role assigned to it.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2023 14:49:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-authenticate-against-https-accounts-cloud-databricks/m-p/9769#M5078</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-09T14:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to authenticate against https://accounts.cloud.databricks.com as an account admin.</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-authenticate-against-https-accounts-cloud-databricks/m-p/9770#M5079</link>
      <description>&lt;P&gt;Hi @lasse l​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for posting your question in our community! We are happy to assist you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers your question?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will also help other community members who may have similar questions in the future. Thank you for your participation and let us know if you need any further assistance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 10:14:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-authenticate-against-https-accounts-cloud-databricks/m-p/9770#M5079</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-10T10:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to authenticate against https://accounts.cloud.databricks.com as an account admin.</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-authenticate-against-https-accounts-cloud-databricks/m-p/43511#M27516</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;Check that the token has the "Manage" permission for the "Account Management API"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you elaborate how to do the above from the workspace UI?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 15:56:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-authenticate-against-https-accounts-cloud-databricks/m-p/43511#M27516</guid>
      <dc:creator>surojit88</dc:creator>
      <dc:date>2023-09-04T15:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to authenticate against https://accounts.cloud.databricks.com as an account admin.</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-authenticate-against-https-accounts-cloud-databricks/m-p/78619#M35571</link>
      <description>&lt;P&gt;From this &lt;A href="https://docs.databricks.com/en/dev-tools/auth/pat.html#databricks-personal-access-token-authentication" target="_self"&gt;doc&lt;/A&gt;: To automate Databricks&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://docs.databricks.com/api/account" target="_blank" rel="noopener"&gt;account-level&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;functionality, you cannot use Databricks personal access tokens. Instead, you must use either OAuth tokens for Databricks account admin users or service principals. For more information, see:&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;P&gt;&lt;A class="" href="https://docs.databricks.com/en/dev-tools/auth/oauth-m2m.html" target="_blank" rel="noopener"&gt;&lt;SPAN class=""&gt;Use a service principal to authenticate with Databricks&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;A class="" href="https://docs.databricks.com/en/dev-tools/auth/oauth-u2m.html" target="_blank" rel="noopener"&gt;&lt;SPAN class=""&gt;OAuth user-to-machine (U2M) authentication&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 12 Jul 2024 22:03:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-authenticate-against-https-accounts-cloud-databricks/m-p/78619#M35571</guid>
      <dc:creator>137292</dc:creator>
      <dc:date>2024-07-12T22:03:22Z</dc:date>
    </item>
  </channel>
</rss>

