Remediation
From Azure Portal
- From Azure Home select the Portal Menu.
- Select
Subscriptions. - Select a subscription.
- Select
Access control (IAM). - Select
Roles. - Click
Typeand selectCustom rolefrom the drop-down menu. - Check the box next to each role which grants subscription administrator privileges.
- Select
Delete. - Select
Yes.
From Azure CLI
List custom roles:
az role definition list --custom-role-only True
Check for entries with assignableScope of the subscription, and an action of *.
To remove a violating role:
az role definition delete --name <role name>
Note that any role assignments must be removed before a custom role can be deleted. Ensure impact is assessed before deleting a custom role granting subscription administrator privileges.