Skip to content
Cloud Governance Tools

Resource lock

An Azure management lock on a subscription, resource group or resource that blocks deletion or modification regardless of the user's permissions. The two levels are CanNotDelete and ReadOnly. Locks protect management-plane operations only. Locks are applied separately from policy and role assignments.

All terms ยท See the ranking

An example, sourced

Microsoft documents that you can lock a subscription, resource group or resource "to protect them from accidental user deletions and modifications," and that the lock overrides any user permissions. CanNotDelete lets authorized users read and modify but not delete. ReadOnly means read only, similar to the Reader role. A ReadOnly lock on an SQL logical server still allows data operations.

Why it matters here

Locks are a coarse backstop for resources that must not be deleted. They can block operations that do not look like changes, so test one on a non-production copy. Locks sit outside policy, so a deny assignment or policy review will not show them. Keep an inventory of locks on production resources, and note who may create or remove them.

Sources

  1. https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources, read 10 Nov 2026

Last reviewed 16 Nov 2026.