Skip to content

Instantly share code, notes, and snippets.

@alexmags
Last active February 26, 2022 09:07
Show Gist options
  • Save alexmags/0d80efa5509aebad29c5c56dea819249 to your computer and use it in GitHub Desktop.
Save alexmags/0d80efa5509aebad29c5c56dea819249 to your computer and use it in GitHub Desktop.
KQL to find interactions with an email message. Note: some interactions will be Microsoft background processing, your CRM software or your backup software. https://blog.alexmags.com/posts/exchange-online-email-investigation/
CloudAppEvents
| where Timestamp > ago(3d)
| where ActionType =~ "MailItemsAccessed"
| where Application has "Exchange"
| evaluate bag_unpack(RawEventData,'Event_') // JSON in RawEventData becomes columns prefixed by Event_
// filter on Event_ mailbox owner upn if only one mailbox is of interest
| where Event_Folders has 'Internet message ID here' // get message ID from eDiscovery
// https://blog.alexmags.com/tags/kql/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment