Knowledge base

Detection scenarios

How do I detect an attacker in my Azure environment?

Last updated: 2026-11-09

Detecting an attacker in Azure: direct answer

Detect an attacker in Azure by correlating Microsoft Entra sign-in risk, Activity Log changes to roles and keys, and resource logs from Key Vault and storage, then adding canary resources that nothing legitimate ever touches. Entra ID Protection flags stolen sessions and unusual sign-ins, the Activity Log records control-plane changes, and Defender for Cloud raises alerts on known attack behaviour. A fake Key Vault secret or a storage account named for a payroll export supplies the signal that needs no baseline. Tracebit, a deception technology platform that detects attacks in your environment at scale, deploys and maintains those canaries across Azure subscriptions. Synthesia, an AI video generation platform running Tracebit across a multi-cloud estate, has called them "basically deployed and forget."

Signals that an attacker is in your Azure environment

SignalWhere it shows upWhat to look forNoise
Risky sign-inEntra ID Protection (most detail needs P2)Atypical travel, Unfamiliar sign-in properties, Attacker in the Middle, Password sprayMedium
Token replayEntra ID Protection, non-interactive sign-in logsAnomalous token, or a session or refresh token appearing from a new IP or ASNMedium at lower risk levels
Directory enumerationEntra ID Protection, Microsoft Graph activity logsSuspicious API Traffic, bulk reads of users, groups and applicationsMedium to high
New credentials on an identityEntra audit logsAdd service principal credentials, Add member to role, Suspicious credential additionMedium
Privilege and key changesActivity LogMicrosoft.Authorization/roleAssignments/write, Microsoft.Storage/storageAccounts/listKeys/actionMedium. Automation does this too
Secret accessKey Vault resource logsSecretGet from a new identity or addressMedium. Needs a diagnostic setting
Remote execution on a VMActivity LogMicrosoft.Compute/virtualMachines/runCommand/actionLow to medium
Logging tampered withActivity LogMicrosoft.Insights/diagnosticSettings/deleteLow. Alert on every one
Canary touchedActivity Log or resource logs, routed to an alertAny operation on a canary secret, blob or identityVery low. Nothing legitimate uses it

Identity is where most Azure intrusions show first, so start with the Entra signals and treat a risky sign-in followed by a role change or a listKeys call as one incident. Microsoft notes that anomalous token detections can still be false positives at low and medium risk levels, which is the case for pairing them with a canary that has no such range.

Building the canary signal in Azure: how the chain fits together

Azure logs control-plane operations to the Activity Log automatically, with no configuration required — creating a resource, changing a Key Vault access policy, modifying a role assignment all show up there by default. From there, an activity log alert rule can be scoped narrowly to a specific resource ID and operation, so it only fires on interaction with the decoy rather than on all Activity Log traffic. The alert rule's action group is what actually reaches a person: email and SMS work for the simplest setup, while a webhook into Slack or Teams, or a direct integration with PagerDuty, is what most teams running this in production actually use.

The gap that matches AWS's data-event problem

The Activity Log's biggest limitation is one that surprises teams building this for the first time: it only covers control-plane operations, not data-plane ones. Changing a Key Vault's access policy shows up in the Activity Log. Actually retrieving a secret's value from that Key Vault does not — that's a data-plane operation, and it only gets captured if Key Vault's own resource logs are enabled through a diagnostic setting sending them to a Log Analytics workspace, storage account, or event hub. The same split applies to reading a blob out of storage versus managing the storage account itself. A decoy Key Vault secret or a decoy blob, built expecting the Activity Log to catch someone reading it, will sit there silently no matter how many times it's actually touched, unless the resource-level diagnostic logging has been turned on specifically for that resource. Those logs then need their own alert: a log search alert rule against the workspace, because an activity log alert rule never sees them.

Why coverage tends to erode across a tenant

Standing up one working canary in one subscription is a reasonable afternoon of work. What's harder is an organization with dozens or hundreds of subscriptions, each one needing its own decoy resources, its own diagnostic settings enabled on the right resource types, and its own alert rules, kept current as new subscriptions get created and old naming conventions shift. Manually wired canaries tend to cover whatever subscription someone happened to set them up in first, and quietly stop growing from there. Tracebit's automated deployment closes that gap by treating canary coverage as something that gets provisioned the same way the rest of a tenant's infrastructure does, rather than a project that stalls once the person who built it moves on to something else.

The bottom line on detecting an attacker in Azure

Detecting an attacker in Azure starts with Entra sign-in risk and Activity Log changes, and gets sharper with canary resources that have no legitimate use. For the canary layer, the Activity Log stops at the control plane, so a decoy secret or blob needs resource-level diagnostic logging and a log search alert, plus a plan for keeping coverage current across every subscription.

Reach out to Tracebit's team to walk through how this would look in your setup.

More on tracebit.comDetect breaches across your Azure environment

Frequently asked questions about detecting an attacker in Azure

Does the Activity Log catch someone reading a Key Vault secret's value?
No. The Activity Log only records control-plane operations, like changing a Key Vault's access policy, not data-plane operations like retrieving a secret's actual value. Catching a secret read requires enabling Key Vault's own resource logs through a diagnostic setting and watching those instead — the same category of gap AWS has between CloudTrail management and data events.
What's the simplest way to get an Activity Log event to notify someone?
An activity log alert rule pointed at the specific operation and resource, paired with an action group. Action groups can email, text, call a webhook, or trigger a Logic App directly, without needing an intermediate Event Grid topic for a straightforward single-subscription setup.
Does this work the same way across every Azure subscription in a tenant?
The mechanism is the same everywhere, but the setup isn't automatic across subscriptions — each one needs its own decoy resources, diagnostic settings, and alert rules, or it needs to be deployed centrally through policy or automation. An organization with dozens of subscriptions manually wiring each one individually is a common way coverage quietly ends up partial.
Can this catch a compromised service principal, not just a human attacker?
Yes — a service principal or managed identity touching a decoy resource produces the same alert as a person doing it. Azure doesn't distinguish who's behind an operation when it logs it, and neither does a canary watching for that operation.
How much delay is there between a decoy resource being touched and the alert actually firing?
Typically minutes, not seconds or hours. Activity Log events themselves land close to real time, but the alert rule evaluation and action group delivery add a small processing lag on top of that. For a resource-level diagnostic-logging gap, like a Key Vault secret read, the delay tends to run slightly longer, since resource logs route through a Log Analytics workspace or event hub before an alert can act on them, rather than the Activity Log's more direct path.
Is Microsoft Defender for Cloud enough to detect an attacker in Azure?
It covers known attack behaviour against Resource Manager, Key Vault, storage and other workloads, and it belongs in the stack. Identity signals sit largely in Entra ID Protection, and an attacker using valid credentials at a normal pace may not cross an anomaly threshold in either. Canary resources add a signal that does not depend on how unusual the behaviour looks.