How to Add a Delete Lock on Azure Resources

In this guide, we shall discuss “how to Add a Delete Lock on Azure Resources”. Protecting resources in an Azure environment is a critical aspect of ensuring operational continuity and minimizing the risk of accidental modifications or deletions. Among the available strategies, the Delete Lock is a simple yet effective tool to prevent the unintentional removal of critical resources. Please, see How to disable Lock Screen on Windows 10, and how to Fix MDT accidental OS deletion.
This guide focuses on implementing a Delete Lock on an Application Gateway resource. This provides step-by-step instructions on how to configure protection and manage its operational implications.
While the focus is on this specific resource, the guidance provided is applicable to a wide range of Azure resources. This enables administrators to adopt a consistent and secure approach to cloud infrastructure management.
Readers will find detailed explanations of lock functionalities, practical implementation examples, and best practices for correct usage in real-world scenarios, aiming to ensure protection without compromising operational flexibility.
Also, see How to Lock the Find My Device Option in Windows 11, and how to Delete or Rename and Create a Protected Organisation Unit in AD. Here is how to disable automatic screen lock in Ubuntu Linux.
Azure Lock Types
Below are two type of lock
- CanNotDelete means authorized users can read and modify a resource, but they can’t delete it.
- ReadOnly means authorized users can read a resource, but they can’t delete or update it. Applying this lock is similar to restricting all authorized users to the permissions that the Reader role provides.
Select the resource to protect against accidental deletion. In this example, we will apply a Delete Lock to an Azure Application Gateway.

Navigate to the “Lock” menu and click on Add.

Since we are creating a Delete Lock, fill in the fields highlighted in yellow

Click OK to create the lock rule.

In this way, accidental deletion is prevented, protecting against human errors or automation mistakes.
I hope you found this guide on “how to Add a Delete Lock on Azure Resources” very useful. Feel free to leave a comment below.