<?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 Re: Unity catalog - Service Principal SCIM API account unauthorized in Data Governance</title>
    <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32119#M935</link>
    <description>&lt;P&gt;Hi! the issue is that you cannot create groups at the account level, right? You tried creating with Terraform but had an auth error. You tried with the API and still got an error code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the document I shared is for you is to authorize the service principal through the permissions API. I did find out however that it is not possible to do headless auth to the accounts console. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if this makes sense!&lt;/P&gt;</description>
    <pubDate>Tue, 27 Sep 2022 17:48:56 GMT</pubDate>
    <dc:creator>User16741082858</dc:creator>
    <dc:date>2022-09-27T17:48:56Z</dc:date>
    <item>
      <title>Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32108#M924</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to create groups at the account level in Unity Catalog as a Service Principal ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can manage to create groups when authenticated as a user, but not as a Service Principal. I then get an error "user not authorized". &lt;/P&gt;&lt;P&gt;The service principal has the role Account admin visible in the account console and can create other workspace's resources related, as well as metastore using the terraform provider with the host provided as the url of a workspace (but can't manage to use the provider with host &lt;A href="https://accounts.azuredatabricks.net" target="test_blank"&gt;https://accounts.azuredatabricks.net&lt;/A&gt;, kind of similar issue as &lt;A href="https://community.databricks.com/s/question/0D58Y000098lPUkSAM/uc-service-principalterraform)" target="test_blank"&gt;https://community.databricks.com/s/question/0D58Y000098lPUkSAM/uc-service-principalterraform)&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with terraform as well as Postman via SCIM API 2.0 (Accounts) ({{baseUrl}}/accounts/:account_id/scim/v2/Groups) using the token generated with "az account get-access-token"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error with terraform:&lt;/P&gt;&lt;P&gt;"Error: cannot create group: User not authorized. Using azure-client-secret auth: host=https://accounts.azuredatabricks.net, account_id=..."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've read the documentation here: &lt;A href="https://docs.microsoft.com/en-us/azure/databricks/administration-guide/users-groups/groups" target="test_blank"&gt;https://docs.microsoft.com/en-us/azure/databricks/administration-guide/users-groups/groups&lt;/A&gt;, but haven't found anything related to a service principal restriction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 15:29:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32108#M924</guid>
      <dc:creator>yvuignie</dc:creator>
      <dc:date>2022-09-09T15:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32109#M925</link>
      <description>&lt;P&gt;Hi @Yannick Vuignier​!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the user attribute/role stored in AAD? Make sure that the service principal is assigned the Contributor or Owner role in your Azure portal&lt;/P&gt;</description>
      <pubDate>Sun, 11 Sep 2022 05:18:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32109#M925</guid>
      <dc:creator>User16741082858</dc:creator>
      <dc:date>2022-09-11T05:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32110#M926</link>
      <description>&lt;P&gt;Hi @Pearl Ubaru​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answer. &lt;/P&gt;&lt;P&gt;The service principal has the role Owner of the subscription.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 08:51:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32110#M926</guid>
      <dc:creator>yvuignie</dc:creator>
      <dc:date>2022-09-13T08:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32111#M927</link>
      <description>&lt;P&gt;Okay, no problem. So you cannot authenticate into the accounts console yet. We will soon preview Oauth tokens but not sure when. You can add service principals and give them account admin rights by using SCIM tokens. You can also add groups as well via SCIM, as long as you are the account owner or account admin. Here is a document that might be helpful - &lt;A href="https://docs.databricks.com/administration-guide/users-groups/service-principals.html#assign-account-admin-rights-to-a-service-principal" target="test_blank"&gt;https://docs.databricks.com/administration-guide/users-groups/service-principals.html#assign-account-admin-rights-to-a-service-principal&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 15:16:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32111#M927</guid>
      <dc:creator>User16741082858</dc:creator>
      <dc:date>2022-09-13T15:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32112#M928</link>
      <description>&lt;P&gt;Thank you for your help. But the service principal is indeed "Account admin", the tag appears in the account console, the tab is on. Actually we want to use terraform to create groups using this service principal, but as it doesn't work, we tried directly with the API and we get the same result, "User&amp;nbsp;not&amp;nbsp;authorized".&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 15:31:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32112#M928</guid>
      <dc:creator>yvuignie</dc:creator>
      <dc:date>2022-09-13T15:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32113#M929</link>
      <description>&lt;P&gt;Of course! Are you using identity federation?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 16:10:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32113#M929</guid>
      <dc:creator>User16741082858</dc:creator>
      <dc:date>2022-09-13T16:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32114#M930</link>
      <description>&lt;P&gt;Yes, we have identity federation between the account and the workspaces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We also have user provisioning enabled. We can manage to create groups with the SCIM token generated from the account console. If user provisioning is enabled, does this means that it is then required to use the SCIM token generated from the account console and that we can't use a service principal to manage groups?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: Actually, it shouldn't be the case since I can create groups with my user using the SCIM API.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 08:21:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32114#M930</guid>
      <dc:creator>yvuignie</dc:creator>
      <dc:date>2022-09-14T08:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32115#M931</link>
      <description>&lt;P&gt;Hey @Yannick Vuignier​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'd love to hear from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Sep 2022 08:18:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32115#M931</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-24T08:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32116#M932</link>
      <description>&lt;P&gt;Hi @Vidula Khanna​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for your message, but no I am still not able to create groups using a service principal, same as before.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 07:13:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32116#M932</guid>
      <dc:creator>yvuignie</dc:creator>
      <dc:date>2022-09-27T07:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32117#M933</link>
      <description>&lt;P&gt;Hi @Yannick Vuignier​,&lt;/P&gt;&lt;P&gt;You can use the permission assignment APIs - use PATs backed by SPs (https://api-docs.databricks.com/rest/latest/permission-assignment-account-api.html)&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 13:28:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32117#M933</guid>
      <dc:creator>User16741082858</dc:creator>
      <dc:date>2022-09-27T13:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32118#M934</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;Thank you but I'm sorry I don't see how this API can help adding groups at the account level. Could you maybe please explain a bit ?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 15:07:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32118#M934</guid>
      <dc:creator>yvuignie</dc:creator>
      <dc:date>2022-09-27T15:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32119#M935</link>
      <description>&lt;P&gt;Hi! the issue is that you cannot create groups at the account level, right? You tried creating with Terraform but had an auth error. You tried with the API and still got an error code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the document I shared is for you is to authorize the service principal through the permissions API. I did find out however that it is not possible to do headless auth to the accounts console. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if this makes sense!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 17:48:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32119#M935</guid>
      <dc:creator>User16741082858</dc:creator>
      <dc:date>2022-09-27T17:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32120#M936</link>
      <description>&lt;P&gt;Thank you again for your answer! Yes you understand the issue well, terraform and the api is working with a user but not with a service principal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the permission assignment account API is unfortunately workspace related, all endpoints ask for a workspace_id, for instance this description says "Create or update workspace permissions for a principal". What is strange is that the service principal has the role "Account admin".&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 12:34:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32120#M936</guid>
      <dc:creator>yvuignie</dc:creator>
      <dc:date>2022-09-28T12:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32121#M937</link>
      <description>&lt;P&gt;Hi @Yannick Vuignier​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the inconvenience. I will forward your query to the respective person. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your patience.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 06:58:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32121#M937</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-29T06:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32122#M938</link>
      <description>&lt;P&gt;We do see the same problem. Any chance that headless authentication into the account will be made possible soon? Otherwise, it does not make sense to have "Account Admin" service principals. &lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 11:54:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32122#M938</guid>
      <dc:creator>Thilo</dc:creator>
      <dc:date>2022-09-30T11:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32123#M939</link>
      <description>&lt;P&gt;Hello, any progress? Dealing with the same problem right now. Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 06:44:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32123#M939</guid>
      <dc:creator>Dusko</dc:creator>
      <dc:date>2022-10-20T06:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32124#M940</link>
      <description>&lt;P&gt;I don't know what has been fixed in Databricks, but today it's finally working without any changes on our side.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 15:01:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32124#M940</guid>
      <dc:creator>yvuignie</dc:creator>
      <dc:date>2022-10-21T15:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32125#M941</link>
      <description>&lt;P&gt;Hi @Yannick Vuignier​&amp;nbsp;! remember I let you know that the OAuth tokens were to preview soon? Well today, we enabled &lt;B&gt;Azure AD token support for Service principals with Azure Databricks.&lt;/B&gt; So this means that you no longer need to use user principal tokens for API Automation with Azure DB.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 15:27:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32125#M941</guid>
      <dc:creator>User16741082858</dc:creator>
      <dc:date>2022-10-21T15:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Unity catalog - Service Principal SCIM API account unauthorized</title>
      <link>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32126#M942</link>
      <description>&lt;P&gt;@Pearl Ubaru​&amp;nbsp;Thank you for your help&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 12:17:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/unity-catalog-service-principal-scim-api-account-unauthorized/m-p/32126#M942</guid>
      <dc:creator>yvuignie</dc:creator>
      <dc:date>2022-10-25T12:17:31Z</dc:date>
    </item>
  </channel>
</rss>

