Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
CIS Microsoft Azure Foundations v6.0.0 · 6.1.2.1

An activity log alert should fire when someone creates an Azure Policy assignment

  • Level 1
  • Management and Governance Services

This check looks for an Azure Monitor activity log alert rule that triggers on the creation of a policy assignment in the subscription. The safe setting is that such an alert exists, is enabled and notifies a person or team.

Why it matters

Azure Policy assignments decide which rules are applied to your subscriptions. Someone creating an assignment changes what is allowed or audited, so an unexpected one is worth a look. An alert turns that event into a message rather than a line in a log that nobody reads.

Azure Monitor activity log alert rules fire on events recorded in the activity log, and Microsoft documents a signal source named Activity log – Policy for policy-related events. See Create an activity log alert rule on Microsoft Learn.

In practice the alert is a cheap safety net: it does not stop anyone from assigning a policy, but it makes sure the right people hear about the change soon after it happens and can ask whether it was planned.

How to check it yourself

In the Azure portal open Monitor, then Alerts, then Alert rules. Filter to your subscription and look for an Activity log rule whose condition covers policy assignment creation (operation Microsoft.Authorization/policyAssignments/write) and is Enabled.

With Azure CLI, which only reads:

az monitor activity-log alert list --subscription "<subscription id>" --query "[].{name:name, enabled:enabled, conditions:condition.allOf}" -o json

Check that one rule contains the operation name above and that its action group reaches someone.

How to fix it

ConfigCobra only reads your Azure environment; the fix is yours to apply. In the portal choose Monitor, Alerts, + Create, Alert rule. Set the scope to the subscription, on the Condition tab pick Activity log, search for the signal Create policy assignment (Policy), attach an action group on the Actions tab, name the rule on Details, keep Enable alert rule upon creation ticked, then Review + create.

Or with the CLI:

az monitor action-group create --name ag-policy-changes --resource-group rg-monitoring --short-name policychg --action email owner owner@example.com
az monitor activity-log alert create --name alert-policy-assignment-created --resource-group rg-monitoring --scope /subscriptions/<subscription id> --condition category=Administrative and operationName=Microsoft.Authorization/policyAssignments/write --action-group ag-policy-changes

What changes when you fix it

Nothing changes for workloads or users: the rule only watches the activity log. The people in the action group will start to receive a message each time a policy assignment is created, including planned ones from your own deployment pipelines, so agree who is expected to act on it.

The alert rule itself is a small Azure resource in the resource group you chose, so whoever creates it needs write permission there.

Included in

BenchmarkCIS IDProfile
CIS Microsoft Azure Foundations v6.0.06.1.2.1Level 1

Check this on your Microsoft Azure

ConfigCobra runs this check with every other control of the CIS Microsoft Azure Benchmarks, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial