🛡️ Azure Subscription Activity Log Alert for Create Policy Assignment does not exist🟢
- Contextual name: 🛡️ Activity Log Alert for Create Policy Assignment does not exist🟢
- ID:
/ce/ca/azure/subscription/activity-log-alert-for-create-policy-assignment - Tags:
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logic
Similar Policies
- Cloud Conformity: Create Alert for 'Create Policy Assignment' Events
- Internal:
dec-x-dc359e59
Similar Internal Rules
| Rule | Policies | Flags |
|---|---|---|
| ✉️ dec-x-dc359e59 | 1 |
Description
Description
Create an activity log alert for the Create Policy Assignment event.
Rationale
Monitoring for create policy assignment events gives insight into changes done in "Azure policy - assignments" and can reduce the time it takes to detect unsolicited changes.
Audit
This policy evaluates Azure Subscriptions for the presence of an Azure Activity Log Alert that captures Create Policy Assignment events. A subscription is marked as
INCOMPLIANTif it does not have an Activity Log Alert whoseCondition JSONfilters on the Microsoft.Authorization/policyAssignments/write operation.Default Value
By default, no monitoring alerts are created.
References
- https://azure.microsoft.com/en-us/updates?id=classic-alerting-monitoring-retirement
- https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-create-activity-log-alert-rule
- https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/create-or-update
- https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/list-by-subscription-id
... see more
Remediation
Remediation
From Azure Portal
- Navigate to the
Monitorblade.- Select
Alerts.- Select
Create.- Select
Alert rule.- Choose a subscription.
- Select
Apply.- Select the
Conditiontab.- Click
See all signals.- Select
Create policy assignment (Policy assignment).- Click
Apply.- Select the
Actionstab.- Click
Select action groupsto select an existing action group, orCreate action groupto create a new action group.- Follow the prompts to choose or create an action group.
- Select the
Detailstab.- Select a
Resource group, provide anAlert rule nameand an optionalAlert rule description.- Click
Review + create.- Click
Create.From Azure CLI
az monitor activity-log alert create /
--resource-group {{resource-group-name}} /
--condition category=Administrative and operationName=Microsoft.Authorization/policyAssignments/write and level={{verbose | information | warning | error | critical}} /
--scope /subscriptions/{{subscription-id}} /
--name {{activity-log-rule-name}} /
... [see more](remediation.md)