Skip to content
Cloud Governance Tools

Configure storage accounts to disallow public blob access

Configure storage accounts to disallow public blob access is an Azure guardrail written in Azure Policy. Sets the storage account public access property to disallowed on create or update, so containers and blobs cannot be opened to anonymous reads. Copied from a licensed open source set and read on 10 Nov 2026.

More public exposure guardrails ยท About Azure Policy

Built-in policy definition: Configure your Storage account public access to be disallowed
Definition ID: 13502221-8df0-4414-9937-de9c5c4e396b
Category: Storage
Supported effects: Modify, Disabled
policyRule (copied from the repository file):
{
    "if": {
      "allOf": [
        {
          "field": "type",
          "equals": "Microsoft.Storage/storageAccounts"
        },
        {
          "anyOf": [
            {
              "allOf": [
                {
                  "value": "[requestContext().apiVersion]",
                  "less": "2019-04-01"
                },
                {
                  "field": "Microsoft.Storage/storageAccounts/allowBlobPublicAccess",
                  "exists": "true"
                }
              ]
            },
            {
              "field": "Microsoft.Storage/storageAccounts/allowBlobPublicAccess",
              "equals": "true"
            }
          ]
        }
      ]
    },
    "then": {
      "effect": "[parameters('effect')]",
      "details": {
        "conflictEffect": "audit",
        "roleDefinitionIds": [
          "/providers/Microsoft.Authorization/roleDefinitions/17d1049b-9a84-46fb-8f53-869881c3d3ab"
        ],
        "operations": [
          {
            "condition": "[greaterOrEquals(requestContext().apiVersion, '2019-04-01')]",
            "operation": "addOrReplace",
            "field": "Microsoft.Storage/storageAccounts/allowBlobPublicAccess",
            "value": false
          }
        ]
      }
    }
  }
Blocks
Sets the storage account public access property to disallowed on create or update, so containers and blobs cannot be opened to anonymous reads.
Breaks
Modify rewrites the property during create or update instead of rejecting the request, and existing storage accounts change only through a remediation task. (source)
Test before applying
As for every Azure Policy guardrail: how to test before enforcing
Mechanism
Azure Policy (built-in definitions): Resources at the scope of the assignment (management group, subscription, resource group) and their children, except notScopes and exemptions
Taken from
open source set, MIT License, Azure/azure-policy repository, https://raw.githubusercontent.com/Azure/azure-policy/master/LICENSE

What the source says

"Anonymous public read access to containers and blobs in Azure Storage is a convenient way to share data but might present security risks." (read 10 Nov 2026).

What it breaks is documented for every guardrail of this mechanism: see Azure Policy.

Sources

  1. Configure storage accounts to disallow public blob access, read 10 Nov 2026
  2. What it breaks, read 10 Nov 2026
  3. How to test it first, read 10 Nov 2026

Last reviewed 16 Nov 2026.