Start here! Get your feet wet with the Microsoft cloud and begin your journey to earning your Microsoft Certified: Azure Fundamentals certification!
Prepare and test your skills

Prepare and test your skills

Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.
Last updated
An administrator needs to decommission and delete an unused Azure storage account. When attempting to delete the resource in the Azure portal, the operation fails because a CanNotDelete resource lock is currently applied to the storage account.
What action must the administrator take to successfully delete the storage account?
Remove the resource lock from the storage account before attempting the deletion.
Apply a resource tag named Decommission to override the lock setting.
Change the existing resource lock level from CanNotDelete to ReadOnly.
Assign the Owner role in Azure RBAC to the administrator account to bypass the lock.
Remove the resource lock from the storage account before attempting the deletion.
Azure Resource Manager locks provide a mechanism to protect critical Azure resources from accidental deletion or unintended configuration changes. When a lock is active on a resource, it restricts specific management plane operations regardless of the user's role-based access control (Azure RBAC) permissions.
To delete a resource that is protected by a lock:
Remove-AzResourceLock), or the Azure CLI (az lock delete), the deletion restriction is lifted.Get-AzResourceLock and removed using Remove-AzResourceLock or the portal Locks pane.Removing the lock is the only supported method to permit deletion of a locked resource. It ensures that safeguards cannot be bypassed accidentally and enforces operational intent.
Apply a resource tag named Decommission to override the lock setting.
Change the existing resource lock level from CanNotDelete to ReadOnly.
Assign the Owner role in Azure RBAC to the administrator account to bypass the lock.