title: Terraform backend cannot connect to storage account
body: <p>This my from terraform.tf</p>
  <pre><code>terraform {
      backend &quot;azurerm&quot; {
          resource_group_name = &quot;tstate&quot;
          storage_account_name = &quot;strorageaccount1&quot;
          container_name = &quot;terraform.tfstate&quot;
          access_key = &quot;asdfg45454...&quot;
      }
  }
  </code></pre>
  <p>This fails when my storage account is <strong>not in</strong> &quot;all networks&quot;. My settings of storage account network is given below. Blob storage private or public it works so no problem there. But &quot;all networks&quot; must be enabled for it to work. How can I make it work with &quot;all networks&quot; disabled? The error I get is as follows:</p>
  <blockquote>
  <p>Error: Failed to get existing workspaces: storage: service returned
  error: StatusCode=403, ErrorCode=AuthorizationFailure,
  ErrorMessage=This request is not authorized to perform this operation.</p>
  </blockquote>
  <p>There is no IP or Vnet needed as Azure default agent is running the devops pipeline. And the SPN has owner access on subscription. What am I missing?</p>
  <p><a href="https://i.stack.imgur.com/DSt80.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DSt80.png" alt="enter image description here" /></a></p>