Azure Monitor alert

Shubham Prajapati 40 Reputation points
2025-10-16T14:24:48.7966667+00:00

Hi, can we create a monitor alert for any new resource creation in a subscription. but i want some users to be excluded.

In monitor we have the signal, but filtering option is not their it triggers for all user's operation but i want to exclude some user's operation.

KQL option is there, but it involves a cost.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
{count} votes

Answer recommended by moderator
  1. Stanislav Zhelyazkov 29,281 Reputation points MVP Volunteer Moderator
    2025-10-17T05:58:35.13+00:00

    Hi,

    Azure Activity log alerts only support inclusion and not exclusions. You can do filtering with Log Analytics alerts. Example query would look like:

    AzureActivity
    | where OperationNameValue endswith "/WRITE" and ActivitySubstatusValue =~ 'Created' and OperationNameValue !~ 'MICROSOFT.RESOURCES/DEPLOYMENTS/WRITE'
    | where Caller  !in ("******@contoso.com","******@contoso.com")
    

    Note that only write operations that are with status Created are included to avoid getting notified on write operations on resources that already exists. The deployments resource is excluded as those are creation of deployments which are resource on its own but my understanding is that is not what you are looking for. You are looking for resources like VMs, SQL, etc. Deployments are resources that are created/written when there is ARM or Bicep deployment happening which does not necessary means new resources are created with that deployment and resources can also be created without actual deployment happening.

    Alternatively you could use Alert processing rules. Keep in mind that in that case the alert instance will still be generated but you can suppress any actions/notifications done via action groups. You can use Alert Context filter. That will filter based on any payload value matched. Sample payload for Azure activity log alert. Note that you also need to filter on the Monitor service. Other filters can be add by you if you need ti.

    Filter on Azure Activity log users

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.