← Back to SOC feed Coverage →

User clicks on malicious inbound emails

kql MEDIUM Azure-Sentinel
T1566
EmailEventsUrlClickEvents
huntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-05-19T23:00:00Z · Confidence: medium

Hunt Hypothesis

Users clicking on malicious inbound emails may indicate successful phishing attempts leading to potential credential compromise or lateral movement. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate early-stage phishing attacks before they escalate.

KQL Query

let UrlClicked = (UrlClickEvents
| where ActionType == "ClickAllowed" or IsClickedThrough !="0"
| extend Device_IPv4 = IPAddress
| project ActionType, Device_IPv4, Url, UrlChain, IPAddress, NetworkMessageId);
EmailEvents
| where Timestamp > ago(30d)
| where isnotempty(ThreatTypes) and EmailDirection == "Inbound"
| where ThreatTypes has_any ("Malware", "Phish")
| extend SenderFromAddress_IPv4 = strcat(SenderFromAddress, ", ", SenderIPv4)
| join kind = inner UrlClicked on NetworkMessageId
| project Timestamp,NetworkMessageId, Subject, SenderFromAddress_IPv4, RecipientEmailAddress, ThreatTypes, ActionType, Url, UrlChain, Device_IPv4, LatestDeliveryLocation, LatestDeliveryAction, EmailAction, EmailActionPolicy

Analytic Rule Definition

id: 891f4865-75e5-4d40-bc24-ebf97da3ca9a
name: User clicks on malicious inbound emails
description: |
  This query provides insights on users who clicked on a suspicious URL
description-detailed: |
  This query provides insights on users who clicked on a suspicious URL from phishing/malware-categorized inbound emails over the past 30 days using Defender for Office 365 Data.
requiredDataConnectors:
  - connectorId: MicrosoftThreatProtection
    dataTypes:
      - EmailEvents
      - UrlClickEvents
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  let UrlClicked = (UrlClickEvents
  | where ActionType == "ClickAllowed" or IsClickedThrough !="0"
  | extend Device_IPv4 = IPAddress
  | project ActionType, Device_IPv4, Url, UrlChain, IPAddress, NetworkMessageId);
  EmailEvents
  | where Timestamp > ago(30d)
  | where isnotempty(ThreatTypes) and EmailDirection == "Inbound"
  | where ThreatTypes has_any ("Malware", "Phish")
  | extend SenderFromAddress_IPv4 = strcat(SenderFromAddress, ", ", SenderIPv4)
  | join kind = inner UrlClicked on NetworkMessageId
  | project Timestamp,NetworkMessageId, Subject, SenderFromAddress_IPv4, RecipientEmailAddress, ThreatTypes, ActionType, Url, UrlChain, Device_IPv4, LatestDeliveryLocation, LatestDeliveryAction, EmailAction, EmailActionPolicy
version: 1.0.0

Required Data Sources

Sentinel TableNotes
EmailEventsEnsure this data connector is enabled
UrlClickEventsEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Email and Collaboration Queries/URL Click/User clicks on malicious inbound emails.yaml