Skip to content

Instantly share code, notes, and snippets.

@f-bader
Last active August 7, 2023 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save f-bader/3830e02326d1929e7936f5b74e48467e to your computer and use it in GitHub Desktop.
Save f-bader/3830e02326d1929e7936f5b74e48467e to your computer and use it in GitHub Desktop.
OfficeActivity
| where TimeGenerated > ago(90d)
| where UserId has_any ("msftprotection","identityVerification","accountsVerification","azuresecuritycenter","teamsprotection") and UserId has "onmicrosoft"
| summarize by UserId
OfficeActivity
| where TimeGenerated > ago(90d)
| where UserId has_any ("msftprotection","identityVerification","accountsVerification","azuresecuritycenter","teamsprotection") and UserId has "onmicrosoft"
| where RecordType == "MicrosoftTeams"
| where Operation == "MessageSent"
| summarize by ChatThreadId
| join kind=inner OfficeActivity on ChatThreadId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment