azure-mg-eff-policy-write
match (effective permission)
{
"action": "Microsoft.Authorization/policyAssignments/write",
"resource_type": "Microsoft.Management/managementGroups"
}
where
principal effectively holds Owner or Resource Policy Contributor at the MG scope
emit
| source type | Identity |
|---|---|
| target type | * |
| source | <principal> |
| target | <management group node> |
| permissions | Microsoft.Authorization/policyAssignments/write Microsoft.Authorization/policyDefinitions/write |
Narrative
{principal.name} can write Azure Policy assignments at management group {mg.name}.
Raw rule rules/explicit/azure-mgmtgroups.yaml
id: azure-mg-eff-policy-write
emits: HasPermission
applies_to:
- azure
match_effective_permission:
action: Microsoft.Authorization/policyAssignments/write
resource_type: Microsoft.Management/managementGroups
where:
- principal effectively holds Owner or Resource Policy Contributor at the MG scope
emit:
source_type: Identity
target_type: '*'
source: <principal>
target: <management group node>
api_source: roleAssignments evaluation at MG scope
permissions:
- Microsoft.Authorization/policyAssignments/write
- Microsoft.Authorization/policyDefinitions/write
note: Write/remove Azure Policy guardrails at MG. Owner / Resource Policy Contributor. Feeds derived
azure-mg-modify-policy-guardrail.
narrative: '{principal.name} can write Azure Policy assignments at management group {mg.name}.'