
Explanation:

In advanced hunting, EmailPostDeliveryEvents records post-delivery actions taken on messages (e.g., Zero- hour Auto Purge - ZAP , Automated Investigation and Response). To find emails tha t were detected but not removed , filter for the post-delivery action with ActionType has " ZAP " and ActionResult == " Error " , which indicates ZAP attempted to remove the item but failed.
To correlate these mailbox events with recipient sign-ins, join to Sign inLogs . The mailbox recipient field is RecipientEmailAddress ; the corresponding identity field in sign-in data is the user principal name, exposed in normalized hunting schemas as AccountUpn . Therefore, use:
join kind=inner (...) on $left.RecipientEmailAdd ress == $right.AccountUpn A complete pattern looks like:
EmailPostDeliveryEvents
| where Timestamp > = ago(7d)
| where ActionType has " ZAP " and ActionResult == " Error "
| project ErrorTime=Timestamp, ActionType, NetworkMessageId, RecipientEmailAddress
| join kind=inner (
SigninLogs
| project AccountUpn=UserPrincipalName, AppDisplayName, Protocol, DeviceDetail ) on $left.RecipientEmailAddress == $right.AccountUpn
| project ErrorTime, ActionType, NetworkMessageId, RecipientEmailAddress, AppDisplayName, Protocol, DeviceDetail This returns failed ZAP removals and the associated recipient sign-in context.