Investigating UrlClickEvents in Microsoft Defender XDR
A phishing email was delivered.
The user clicked the link.
Then clicked it again.
EmailEvents showed the message arrived.
UrlClickEvents showed what happened next.
In this Agent Foskett Academy lesson, you will learn how defenders use UrlClickEvents to investigate Safe Links clicks, suspicious URLs, user activity, devices, timestamps and phishing activity inside Microsoft Defender XDR.
Lesson overview
Learn how to investigate user clicks, suspicious URLs, Safe Links telemetry and phishing activity using UrlClickEvents inside Microsoft Defender XDR.
Why UrlClickEvents matters
But knowing an email was delivered is only part of the story.
The next question is simple:
Did the user click the link?
UrlClickEvents records Safe Links activity and helps defenders understand which URLs were clicked, who clicked them, when they clicked them and whether Microsoft identified a threat.
Investigation scenario
One employee reports the message.
The security analyst now needs to determine who clicked the link, how many times it was clicked, which URL was accessed and whether Microsoft classified the URL as malicious.
The investigation begins with UrlClickEvents.
Step 1 — Review recent URL clicks
- 1
- 2
- 3
- 4
- 5
- 6
UrlClickEvents | where Timestamp > ago(7d) | project Timestamp, AccountUpn, Url, ActionType | order by Timestamp desc
Show recent Safe Links click activity from the last seven days.
Step 2 — Investigate a suspicious domain
- 1
- 2
- 3
- 4
- 5
- 6
- 7
UrlClickEvents | where Timestamp > ago(7d) | where Url contains "contoso-login" | project Timestamp, AccountUpn, Url | order by Timestamp desc
Find users who clicked URLs containing a suspicious domain or keyword.
Step 3 — Count clicks by user
- 1
- 2
- 3
- 4
- 5
- 6
UrlClickEvents | where Timestamp > ago(7d) | summarize ClickCount=count() by AccountUpn | top 10 by ClickCount
Step 4 — Identify click spikes
- 1
- 2
- 3
- 4
- 5
- 6
UrlClickEvents | where Timestamp > ago(7d) | summarize ClickCount=count() by bin(Timestamp, 1h) | order by Timestamp asc
Group URL click activity into hourly windows to identify unusual spikes.
Step 5 — Find unique URLs
- 1
- 2
- 3
- 4
- 5
UrlClickEvents | where Timestamp > ago(7d) | distinct Url
Show every unique URL clicked during the investigation period.
Step 6 — Identify threat types
- 1
- 2
- 3
- 4
- 5
- 6
- 7
UrlClickEvents | where Timestamp > ago(7d) | where ThreatTypes != "" | project Timestamp, AccountUpn, Url, ThreatTypes | order by Timestamp desc
Putting it together
- 1
- 2
- 3
- 4
- 5
- 6
- 7
UrlClickEvents | where Timestamp > ago(7d) | project Timestamp, AccountUpn, Url, ActionType, ThreatTypes | summarize ClickCount=count() by AccountUpn, ThreatTypes | top 10 by ClickCount
Investigator mindset
UrlClickEvents tells you what happened next.
Many phishing investigations begin with a suspicious message, but the strongest evidence often appears when defenders follow the click.
The logs already knew.
The defender simply followed the trail.
What you learned
Continue your investigation
Continue learning with EmailEvents KQL Guide, Email Spoofing KQL, KQL Threat Hunting Guide, Microsoft Security and the GEMXIT Security Review.
Develop IT. Protect IT. GEMXIT PTY LTD | GEMXIT UK LTD