Check provider logo

Custom role is not a subscription owner role

iam_subscription_roles_owner_custom_not_created

Severityhigh
Serviceiam
by Prowler

Azure custom roles are analyzed for wildcard permissions. Roles that allow * in actions within their assignable scopes are treated as owner-equivalent, granting unrestricted control over subscription resources.

Risk

Wildcard access grants full administrative control at subscription scope. If abused or compromised, an actor can exfiltrate data, alter configurations, deploy malware, delete resources, and disable logging, impacting confidentiality, integrity, and availability across the subscription.

Run this check with Prowler CLI

prowler azure --checks iam_subscription_roles_owner_custom_not_created

Recommendation

Avoid owner-equivalent custom roles. Apply least privilege: prefer built-in roles, define explicit allowed actions (avoid *), and limit assignment scope to the minimum needed. Enforce separation of duties, require just-in-time elevation, and perform periodic access reviews to prevent privilege creep.

Remediation

CLI

az role definition update --role-definition '{"Name":"<example_role_name>","Description":"Restricted custom role","Actions":["Microsoft.Resources/subscriptions/resourceGroups/read"],"NotActions":[],"DataActions":[],"NotDataActions":[],"AssignableScopes":["/subscriptions/<example_subscription_id>"]}'

Native IaC
Terraform
Other
  1. In the Azure portal, go to Subscriptions > <your subscription> > Access control (IAM)
  2. Select the Roles tab, then open the Custom roles tab
  3. Click the custom role that is failing, then click Edit
  4. In Permissions, remove the action "*" (All permissions)
  5. Add only the specific actions required (avoid using "*")
  6. Click Save

Source Code

Resource Type

microsoft.authorization/roledefinitions

References