Deployment stack deny settings (Azure RBAC deny assignment)
Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.
Deployment stack deny settings (Azure RBAC deny assignment) is an Azure guardrail written in Azure RBAC deny assignments. A deployment stack created with deny settings makes Azure create a deny assignment that blocks delete (denyDelete) or write and delete (denyWriteAndDelete) on the resources the stack manages, even for users whose role assignments would allow it.
More organization integrity guardrails ยท About Azure RBAC deny assignments
Documented deny settings (deployment stacks):
DenySettingsMode : Defines the operations that are prohibited on the managed resources to safeguard against unauthorized security principals attempting to delete or update them. This restriction applies to everyone unless you explicitly grant access. The values include: None , DenyDelete , and DenyWriteAndDelete .
Azure CLI example from the documentation (resource group scope):
az stack group create \
--name '<deployment-stack-name>' \
--resource-group '<resource-group-name>' \
--template-file '<bicep-file-name>' \
--action-on-unmanage 'detachAll' \
--deny-settings-mode 'denyDelete' \
--deny-settings-excluded-actions 'Microsoft.Compute/virtualMachines/write Microsoft.StorageAccounts/delete' \
--deny-settings-excluded-principals '<object-id> <object-id>'
- Blocks
- A deployment stack created with deny settings makes Azure create a deny assignment that blocks delete (denyDelete) or write and delete (denyWriteAndDelete) on the resources the stack manages, even for users whose role assignments would allow it.
- Breaks
- The deny setting applies only to resources the stack defines explicitly, not to resources created implicitly, and you can exclude at most five principals. (source)
- Test before applying
- As for every Azure RBAC deny assignments guardrail: how to test before enforcing
- Mechanism
- Azure RBAC deny assignments (created by deployment stacks): Principals named in the deny assignment (all principals when the zero GUID is used), on the managed resources and optionally their child scopes
- Taken from
- provider documentation, provider documentation
What the source says
"You can specify deny settings when creating a deployment stack, which creates a deny assignment that the deployment stack resources own." (read 10 Nov 2026).
On what it breaks: "The deny setting only applies to explicitly created resources, not implicitly created ones."
Related guardrails
- Deny member accounts leaving the organizationAWS, Service control policies (SCPs), organization integrity
- Deny billing, tax and account contact changesAWS, Service control policies (SCPs), organization integrity
- Restrict access to resources in a suspended OUAWS, Resource control policies (RCPs), organization integrity
- Do not allow deletion of resource typesAzure, Azure Policy (built-in definitions), organization integrity
- Resource locks (CanNotDelete and ReadOnly)Azure, Azure resource locks, organization integrity
Related pages
Sources
- Deployment stack deny settings (Azure RBAC deny assignment), read 10 Nov 2026
- What it breaks, read 10 Nov 2026
Last reviewed 16 Nov 2026.