Public Blob URLs Break After Allow Blob Anonymous Access Is Disabled on an Azure Storage Account
Overview
Public blob URLs that fail with 401, 403 or 409 right after Allow Blob anonymous access is disabled are rejected because AllowBlobPublicAccess false overrides every container's access level. Confirm it with read-only checks, then move each caller to Entra authorisation, a user delegation SAS or a separate anonymous-access account; reopen the account only as an approved, time-boxed rollback.
Diagnose
Symptom
What responders observe.
The change usually arrives as part of security work: a remediation sprint, Microsoft's bulk remediation script, or a template that sets allowBlobPublicAccess to false. Because the change is meant to happen, the alert that follows tends to come from users rather than monitoring.
Typical signs include: Web pages show broken images or downloads, and the failing URLs all point at https://<storage-account>.blob.core.windows.net/. Requests without credentials fail with 401 (Unauthorized) when the client uses service version 2019-12-12 or later, or 409 (Conflict) with an older service version.
Some clients that use the anonymous bearer challenge get 403 (Forbidden) instead of 401 after the change.
Detection
Metrics, logs and confirmation commands.
Root cause
Why the incident occurred.
Contain and prevent
Blast radius
What else this can affect.
Prevention
Controls and guardrails that stop it recurring.
-
The lasting fix is to make anonymous access visible before the next account is closed.
-
Run this Resource Graph query on a schedule to list every account's setting, where a blank value means the property was never set: resources | where type =~ 'Microsoft.Storage/storageAccounts' | extend allowBlobPublicAccess = parse_json(properties).allowBlobPublicAccess | project subscriptionId, resourceGroup, name, allowBlobPublicAccess Then add an alert on the anonymous transactions metric, assign an Azure Policy with the Audit effect, and move to Deny once every account is clean.
-
Before closing the next account, run the log query for at least a week, so its callers are known in advance.
-
Keep genuinely public content in accounts that exist only for it.
-
Pipelines that fetched build files anonymously need the same treatment as other internal clients.
-
Those running in GitHub Actions can sign in with federated credentials instead.
-
An environment on a GitHub Actions job changes the OIDC subject, so test that change before relying on it.
Fix
Pre-flight checks
Check these before you change anything.
Read access to the storage account, and a role that can read its keys for the container listing.
A Log Analytics workspace receiving StorageBlobLogs, or access to Metrics Explorer for the account.
Azure CLI 2.9.0 or later and the Az PowerShell module.
The security owner's agreement before any change to the account setting.
Commands
az storage account show --name <storage-account> --resource-group <resource-group> --query allowBlobPublicAccess --output tsv
Get-AzStorageContainer -Context (Get-AzStorageAccount -ResourceGroupName <resource-group> -Name <storage-account>).Context | Select Name, PublicAccess
StorageBlobLogs | where TimeGenerated > ago(7d) and AuthenticationType == "Anonymous" | project TimeGenerated, AccountName, AuthenticationType, Uri
az role assignment create --assignee <principal-id> --role "Storage Blob Data Reader" --scope "/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<storage-account>"
az storage blob generate-sas --account-name <storage-account> --container-name <container> --name <blob> --permissions r --expiry <date-time> --auth-mode login --as-user --full-uri
az storage account update --name <storage-account> --resource-group <resource-group> --allow-blob-public-access true
Verify and recover
Verification
Evidence required before you close the incident.
Load each migrated client's content and rerun the StorageBlobLogs anonymous query. — Content loads and the client's requests no longer appear as Anonymous. — No anonymous requests from migrated clients. View Blob Transactions in Metrics Explorer filtered on Authentication = Anonymous. — Anonymous transactions falling towards zero. — Only callers still on the migration list remain.
Run az storage account show --query allowBlobPublicAccess --output tsv. — false — The account stays closed after the fix or after a reopen is ended.
Rollback
The safe way back.
Remove a role assignment with az role assignment delete using the same assignee, role and scope.
Invalidate user delegation SAS tokens with az storage account revoke-delegation-keys, knowing it revokes all of them on the account and takes effect after caching delays.
End an emergency reopen with az storage account update --allow-blob-public-access false and confirm it reads false after 30 seconds.
Escalate when
Conditions that need another owner.
-
A Deny policy blocks the account update, or the reopen is requested: escalate to the security and policy owners, who decide.
-
Any container on the list holds data that should never have been public: treat it as a possible exposure and escalate to security now.
-
The setting and the observed behaviour disagree, or anonymous requests outside $web still succeed: open a Microsoft support case with the account name and request times.
-
A public dependency cannot move within the agreed outage window: escalate to the service owner for a decision on a dedicated anonymous-access account.
-
Security and policy owners.
Fixed? Get the next one before it hits you: The KBY Brief
Practical fixes for the systems you run, by email about twice a week. Unsubscribe at any time.
About this page
Credited to
Dates
Published
Corrections
No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.
Was this useful?
Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.
Sources
Based on the vendor sources listed below. Check each step against your environment before acting.
First published 27 November 2026
Remediate anonymous read access to blob data (Azure Resource Manager deployments)
Cited for: Supports the documented platform behaviour, diagnosis or recovery controls used by this Runbook.
Configure anonymous read access for containers and blobs
Cited for: Supports the documented platform behaviour, diagnosis or recovery controls used by this Runbook.
Overview: Remediating anonymous read access for blob data
Cited for: Supports the documented platform behaviour, diagnosis or recovery controls used by this Runbook.
Create a user delegation SAS for a container or blob with the Azure CLI
Cited for: Supports the documented platform behaviour, diagnosis or recovery controls used by this Runbook.
az storage account
Cited for: Supports the documented platform behaviour, diagnosis or recovery controls used by this Runbook.
az role assignment
Cited for: Supports the documented platform behaviour, diagnosis or recovery controls used by this Runbook.
Azure built-in roles for Storage
Cited for: Supports the documented platform behaviour, diagnosis or recovery controls used by this Runbook.
Incident Response Recommendations and Considerations for Cybersecurity Risk Management
Cited for: Supports the documented platform behaviour, diagnosis or recovery controls used by this Runbook.
Recommended reading
More from KBY that goes with this runbook.
