1.24 Ensure a Custom Role is Assigned Permissions for Administering Resource Locks


Resource locking is a powerful protection mechanism that can prevent inadvertent modification/deletion of resources within Azure subscriptions/Resource Groups and is a recommended NIST configuration.


Given the resource lock functionality is outside of standard Role Based Access Control(RBAC), it would be prudent to create a resource lock administrator role to prevent inadvertent unlocking of resources.


By adding this role, specific permissions may be granted for managing just resource locks rather than needing to provide the wide Owner or User Access Administrator role, reducing the risk of the user being able to do unintentional damage.

NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance.


From Azure Portal

In the Azure portal, open a subscription or resource group where you want the custom role to be assigned.

Select Access control (IAM).

Click Add.

Select Add custom role.

In the Custom Role Name field enter Resource Lock Administrator.

In the Description field enter Can Administer Resource Locks.

For Baseline permissions select Start from scratch

Select next.

In the Permissions tab select Add permissions.

In the Search for a permission box, type in Microsoft.Authorization/locks to search for permissions.

Select the check box next to the permission Microsoft.Authorization/locks.

Select Add.

Select Review + create.

Select Create.

Assign the newly created role to the appropriate user.

From PowerShell:
Below is a power shell definition for a resource lock administrator role created at an Azure Management group level

Import-Module Az.Accounts

$role = Get-AzRoleDefinition 'User Access Administrator'
$role.Id = $null
$role.Name = 'Resource Lock Administrator'
$role.Description = 'Can Administer Resource Locks'

* Scope at the Management group level Management group


New-AzRoleDefinition -Role $role
Get-AzureRmRoleDefinition 'Resource Lock Administrator'

See Also


Item Details


References: 800-53|AC-2, 800-53|AC-3, 800-53|AC-5, 800-53|AC-6, 800-53|AC-6(1), 800-53|AC-6(7), 800-53|AU-9(4), 800-53|MP-2, CSCv7|14.6

Plugin: microsoft_azure

Control ID: ba0ea3a9d0e183463f5e24fe55f4a4162063f506b295097879e69bc2353fdcbe