azure-mg-eff-policy-write

explicit azure emits HasPermission

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 typeIdentity
target type*
source<principal>
target<management group node>
permissionsMicrosoft.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}.'
move · open · esc close