<?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 &amp;quot;User not authorized&amp;quot; error when trying to deploy access connector on Azure in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/quot-user-not-authorized-quot-error-when-trying-to-deploy-access/m-p/14402#M8896</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to deploy Access Connector resource on Azure using Azure Pipelines (YAML) and a Bicep template but I cannot find a solution to this error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ERROR: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see &lt;A href="https://aka.ms/DeployOperations" target="test_blank"&gt;https://aka.ms/DeployOperations&lt;/A&gt; for usage details.","details":[{"code":"PreconditionFailed","message":"{\r\n  \"error\": {\r\n    \"code\": \"403\",\r\n    \"message\": \"User not authorized.\"\r\n  }\r\n}"}]}}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have slimmed down the YAML pipeline I am using to deploy the access connector to the minimum:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;trigger: none
&amp;nbsp;
pool:
  vmImage: windows-latest
&amp;nbsp;
stages:
  - stage: Deploy
    jobs:
    - job:
      displayName: Deploy Access Connector
      steps:
      - task: AzureCLI@2
        displayName: Azure CLI
        inputs:
          azureSubscription: 'tv-service-connection'
          scriptType: pscore
          scriptLocation: inlineScript
          inlineScript: |
            az deployment group create --resource-group devops-development-rg --template-file create-access-connector-2.bicep&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;where `tv-service-connection` is the name of the service connection, `devops-development-rg` is the name of the resource group and `create-access-connector-2.bicep` is the bicep template. The bicep template I am using is taken from the &lt;A href="https://learn.microsoft.com/en-us/azure/templates/microsoft.databricks/accessconnectors?pivots=deployment-language-bicep" alt="https://learn.microsoft.com/en-us/azure/templates/microsoft.databricks/accessconnectors?pivots=deployment-language-bicep" target="_blank"&gt;official documentation&lt;/A&gt; with minor modifications:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;param location string = resourceGroup().location
&amp;nbsp;
resource accessConnector 'Microsoft.Databricks/accessConnectors@2022-04-01-preview' = {
  name: 'accessConnectordbtv'
  location: location
  identity: {
    type: 'None'
  }
  properties: {}
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The things I have tried without any success:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;assigning Owner or/and Contributor rights to the service connection on both subscription/resource group level&lt;/LI&gt;&lt;LI&gt;az login with the details of service connection to run az group deployment with the bicep template (still get the same error)&lt;/LI&gt;&lt;LI&gt;using Terraform for deployment as per &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/automate" alt="https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/automate" target="_blank"&gt;official tutorial &lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;assigning Microsoft Graph API IdentityProvider.ReadWrite.All permission to the service connection as suggested in &lt;A href="https://stackoverflow.com/questions/73772350/error-cannot-create-metastore-only-account-admin-can-create-metastores?rq=1" alt="https://stackoverflow.com/questions/73772350/error-cannot-create-metastore-only-account-admin-can-create-metastores?rq=1" target="_blank"&gt;this post&lt;/A&gt; which seems to be the closest to the problem I'm facing. &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions would be extremely appreciated as I am getting pretty desperate at this point.&lt;/P&gt;</description>
    <pubDate>Tue, 27 Dec 2022 13:42:55 GMT</pubDate>
    <dc:creator>virbickt</dc:creator>
    <dc:date>2022-12-27T13:42:55Z</dc:date>
    <item>
      <title>"User not authorized" error when trying to deploy access connector on Azure</title>
      <link>https://community.databricks.com/t5/data-engineering/quot-user-not-authorized-quot-error-when-trying-to-deploy-access/m-p/14402#M8896</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to deploy Access Connector resource on Azure using Azure Pipelines (YAML) and a Bicep template but I cannot find a solution to this error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ERROR: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see &lt;A href="https://aka.ms/DeployOperations" target="test_blank"&gt;https://aka.ms/DeployOperations&lt;/A&gt; for usage details.","details":[{"code":"PreconditionFailed","message":"{\r\n  \"error\": {\r\n    \"code\": \"403\",\r\n    \"message\": \"User not authorized.\"\r\n  }\r\n}"}]}}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have slimmed down the YAML pipeline I am using to deploy the access connector to the minimum:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;trigger: none
&amp;nbsp;
pool:
  vmImage: windows-latest
&amp;nbsp;
stages:
  - stage: Deploy
    jobs:
    - job:
      displayName: Deploy Access Connector
      steps:
      - task: AzureCLI@2
        displayName: Azure CLI
        inputs:
          azureSubscription: 'tv-service-connection'
          scriptType: pscore
          scriptLocation: inlineScript
          inlineScript: |
            az deployment group create --resource-group devops-development-rg --template-file create-access-connector-2.bicep&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;where `tv-service-connection` is the name of the service connection, `devops-development-rg` is the name of the resource group and `create-access-connector-2.bicep` is the bicep template. The bicep template I am using is taken from the &lt;A href="https://learn.microsoft.com/en-us/azure/templates/microsoft.databricks/accessconnectors?pivots=deployment-language-bicep" alt="https://learn.microsoft.com/en-us/azure/templates/microsoft.databricks/accessconnectors?pivots=deployment-language-bicep" target="_blank"&gt;official documentation&lt;/A&gt; with minor modifications:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;param location string = resourceGroup().location
&amp;nbsp;
resource accessConnector 'Microsoft.Databricks/accessConnectors@2022-04-01-preview' = {
  name: 'accessConnectordbtv'
  location: location
  identity: {
    type: 'None'
  }
  properties: {}
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The things I have tried without any success:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;assigning Owner or/and Contributor rights to the service connection on both subscription/resource group level&lt;/LI&gt;&lt;LI&gt;az login with the details of service connection to run az group deployment with the bicep template (still get the same error)&lt;/LI&gt;&lt;LI&gt;using Terraform for deployment as per &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/automate" alt="https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/automate" target="_blank"&gt;official tutorial &lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;assigning Microsoft Graph API IdentityProvider.ReadWrite.All permission to the service connection as suggested in &lt;A href="https://stackoverflow.com/questions/73772350/error-cannot-create-metastore-only-account-admin-can-create-metastores?rq=1" alt="https://stackoverflow.com/questions/73772350/error-cannot-create-metastore-only-account-admin-can-create-metastores?rq=1" target="_blank"&gt;this post&lt;/A&gt; which seems to be the closest to the problem I'm facing. &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions would be extremely appreciated as I am getting pretty desperate at this point.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2022 13:42:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/quot-user-not-authorized-quot-error-when-trying-to-deploy-access/m-p/14402#M8896</guid>
      <dc:creator>virbickt</dc:creator>
      <dc:date>2022-12-27T13:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: "User not authorized" error when trying to deploy access connector on Azure</title>
      <link>https://community.databricks.com/t5/data-engineering/quot-user-not-authorized-quot-error-when-trying-to-deploy-access/m-p/14403#M8897</link>
      <description>&lt;P&gt;The job you are running try to give that user privilege &lt;/P&gt;</description>
      <pubDate>Wed, 28 Dec 2022 04:34:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/quot-user-not-authorized-quot-error-when-trying-to-deploy-access/m-p/14403#M8897</guid>
      <dc:creator>Aviral-Bhardwaj</dc:creator>
      <dc:date>2022-12-28T04:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: "User not authorized" error when trying to deploy access connector on Azure</title>
      <link>https://community.databricks.com/t5/data-engineering/quot-user-not-authorized-quot-error-when-trying-to-deploy-access/m-p/14404#M8898</link>
      <description>&lt;P&gt;Thanks for the suggestion, but I already have Owner privileges on a subscription level assigned to both myself and the service connection used for that job. Any other suggestions?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Dec 2022 07:39:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/quot-user-not-authorized-quot-error-when-trying-to-deploy-access/m-p/14404#M8898</guid>
      <dc:creator>virbickt</dc:creator>
      <dc:date>2022-12-28T07:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: "User not authorized" error when trying to deploy access connector on Azure</title>
      <link>https://community.databricks.com/t5/data-engineering/quot-user-not-authorized-quot-error-when-trying-to-deploy-access/m-p/14405#M8899</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I fixed this issue by adding the service principal to the list of service principals in the Account Console. My guess is that after the access connector is created an API call is made to the Databricks account and the service principal making that call needs to be known in the Databricks account. In your case, my guess is that the service principal is not yet registered there. &lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 07:44:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/quot-user-not-authorized-quot-error-when-trying-to-deploy-access/m-p/14405#M8899</guid>
      <dc:creator>ThomasVanBilsen</dc:creator>
      <dc:date>2023-01-05T07:44:21Z</dc:date>
    </item>
  </channel>
</rss>

