Developers at Contoso create their own storage accounts in several subscriptions under one management group. The security team requires that any deployment creating or updating a storage account so that it allows anonymous blob access fails with an error the developer sees, while existing compliant accounts are left alone. What should you do?
Choose one.
Azure Policy effects: Deny rejects a non-compliant request, Modify alters it to be compliant, Audit only reports it.
The requirement is preventive and visible: the non-compliant deployment itself must fail. Assigning the built-in public-access policy with Deny at the management group covers every subscription below it and refuses non-compliant creates and updates with a policy error. The same policy with Audit only reports. The separate built-in 'Configure your Storage account public access to be disallowed' policy uses Modify: it alters the request so the account ends up compliant, which is a valid hardening choice but doesn't make the deployment fail. Defender for Storage is a detection plan and blocks nothing.
- Identify the requirement: the deployment must fail with an error.
- Choose Azure Policy for configuration rules across subscriptions.
- Separate the effects: Audit reports, Modify rewrites, Deny rejects.
- Scope it at the management group so every subscription inherits it.
Exam tip: Report it: Audit. Silently fix it: Modify. Make the deployment fail: Deny.
SC-500 Azure Storage Account Security: Firewall, Defender for Storage, Encryption, SAS and Access — the lesson that teaches this.