Using Console
Using CLI
az role assignment create --role "Resource Locking Administrator" --assignee <object ID or email address> --scope <resource group or resource ID>
Replace <object ID or email address>
with the email address or object ID of the user or group you want to assign the role to, and replace <resource group or resource ID>
with the ID of the resource group or resource you want to lock.
az role assignment list --role "Resource Locking Administrator" --all
This command will list all role assignments that have the Resource Locking Administrator role assigned to them.
Using Python