Check ID:
Provider: Azure
Service:
Severity: MEDIUM
Categories:
Resource type:
iam_custom_role_has_permissions_to_administer_resource_locksProvider: Azure
Service:
iamSeverity: MEDIUM
Categories:
identity-accessResource type:
microsoft.authorization/roledefinitionsWhat this check verifies
Azure custom RBAC roles include theMicrosoft.Authorization/locks/* action, indicating permission to administer management locks at subscription, resource group, or resource scope.
Risk
Absent a scoped custom role forMicrosoft.Authorization/locks/*, lock control falls to broad roles (e.g., Owner), weakening least privilege. Locks can be disabled or altered, enabling unauthorized changes or deletion, harming integrity and availability, and reducing separation of duties and accountability.
Recommendation
Define a least-privilege custom role restricted toMicrosoft.Authorization/locks/* and assign it to a tightly controlled group at minimal scope. Apply separation of duties, use just-in-time elevation, audit lock changes, and avoid broad roles or pipeline identities managing locks. Layer with defense-in-depth controls.
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
References
- https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources?tabs=json
- https://www.trendmicro.com/cloudoneconformity-staging/knowledge-base/azure/AccessControl/resource-lock-custom-role.html
Where this check fires
This check runs on every scheduled scan against your Azure account. Findings appear at Cloud Security → Findings filterable byCheck ID = iam_custom_role_has_permissions_to_administer_resource_locks. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to Azure checks