SharePoint, Teams & SOC Playbooks · T1114 / T1530

Investigating Microsoft 365 eDiscovery & ComplianceSearch Abuse in Audit Logs

Direct Answer (Key Forensic Takeaway)

Compromised Compliance Administrators or Global Admins who elevate into eDiscovery Manager can query and export every mailbox, Teams chat, and SharePoint site across an entire tenant silently—emitting New-ComplianceSearch, New-ComplianceSearchAction (Export), and SearchExportDownloaded under Purview RecordType 50. AuditVane rule AV-012 flags ComplianceSearch tampering automatically.

Detection Objective & Threat Scope

Why compromise ten executive accounts one by one when stealing a single eDiscovery Manager or Compliance Administrator credential lets an attacker search *all* company mailboxes, SharePoint sites, and Teams chats in one query and download a unified PST/ZIP archive?

Worse, eDiscovery’s `-Purge` capability (`New-ComplianceSearchAction -Purge -PurgeType HardDelete`) has also been abused by attackers to silently delete security alerts or phishing warnings across hundreds of employee inboxes simultaneously.

Purview RecordType 50 (`ComplianceSearch`) captures the complete lifecycle of administrative content searches: `New-ComplianceSearch` / `Set-ComplianceSearch` (showing `ExchangeLocation`, `SharePointLocation`, and `ContentMatchQuery` keywords), `New-ComplianceSearchAction` (recording `-Export` or `-Purge`), `SearchExportDownloaded` (proving the admin actually pulled the PST/ZIP onto disk), and `Remove-MailboxSearch` (deleting the search afterward to hide traces).

AuditVane rule `AV-012` monitors `New-ComplianceSearchAction` and `Remove-MailboxSearch` so unauthorized bulk compliance exports surface immediately alongside `HardDelete` and `Set-AdminAuditLogConfig` tampering.

1. RAW TELEMETRY SharePoint, Teams & SOC Playbooks T1114 / T1530 2. CLIENT-SIDE PARSE AuditVane Engine New-ComplianceSearchAction audit l 0 Bytes Uploaded 3. SOC OUTCOME Scoped Containment IOCs · CSV · KQL
Local browser DFIR workflow for New-ComplianceSearchAction audit log abuse (T1114 / T1530)
AdSense-Ready In-Article Placement

Forensic Telemetry Fields & High-Signal Indicators

Telemetry Field / Pattern Meaning in M365 / Entra High-Signal Threat Indicator
New-ComplianceSearchCreated tenant-wide content search queryInspect ExchangeLocation & ContentMatchQuery
New-ComplianceSearchActionExecuted Export or HardDelete Purge on resultsFlagged High by AuditVane AV-012
SearchExportDownloadedDownloaded exported PST / ZIP archive locallyCritical proof of mass tenant-wide data theft
Remove-MailboxSearchDeleted compliance search to erase evidenceAnti-forensic defense evasion (AV-012)
Add-RoleGroupMember (eDiscovery)Added attacker into eDiscovery Manager/AdminWatch alongside RecordType 1/18 admin logs
PurgeType = HardDeleteTenant-wide silent mailbox purge executedUsed to destroy phishing evidence across all users

Audit Active Compliance Searches, Exports & eDiscovery Role Holders

Connect-IPPSSession
# 1. List all existing eDiscovery / Content Searches:
Get-ComplianceSearch | Format-Table Name, CreatedBy, LastModifiedTime, ExchangeLocation, SharePointLocation, Status
# 2. List all pending/completed Export or Purge actions:
Get-ComplianceSearchAction | Format-Table Name, SearchName, Action, CreatedBy, Status, JobEndTime
# 3. Audit who currently holds eDiscovery Manager / Administrator permissions:
Get-RoleGroupMember -Identity "eDiscovery Manager" | Select-Object Name, PrimarySmtpAddress, RecipientType

Sample Rogue Compliance Search Discovery

Name                     SearchName         Action CreatedBy                         Status
----                     ----------         ------ ---------                         ------
Board_Emails_Dump_Export Board_Emails_Dump  Export it.contractor@contoso.invalid      Completed

Standard User Mailbox Read vs. Purview eDiscovery Abuse

DimensionSingle Compromised MailboxeDiscovery / ComplianceSearch Abuse
Blast RadiusOne mailbox + delegated foldersALL tenant mailboxes, Teams chats & SharePoint sites
Purview RecordType2 / 15 (`MailItemsAccessed`)50 (`ComplianceSearch`) + 18 (`SecurityComplianceCenter`)
Default Global Admin AccessMust grant self FullAccessGlobal Admin MUST add self to eDiscovery Manager first (leaves trace!)
Silent Bulk Purge CapabilitySingle mailbox only`New-ComplianceSearchAction -Purge` wipes across ALL mailboxes

New-ComplianceSearchAction Export Event in Purview AuditData

{
  "CreationTime": "2026-12-03T19:08:02Z",
  "Operation": "New-ComplianceSearchAction",
  "RecordType": 50,
  "Workload": "SecurityComplianceCenter",
  "UserId": "it.contractor@contoso-demo.invalid",
  "ClientIP": "104.28.221.14",
  "Parameters": [
    { "Name": "SearchName", "Value": "Board_Emails_Dump" },
    { "Name": "Export", "Value": "True" }
  ]
}

Notice `RecordType: 50` (`SecurityComplianceCenter`) and `Parameters.Export: True`—confirming an export job was launched against `Board_Emails_Dump` from `104.28.221.14`.

Real-World Incident Walkthrough

Following a contractor account takeover where the intruder escalated into Exchange/Compliance roles (`AV-011`), Purview RecordType 50 logs `New-ComplianceSearchAction` targeting `SearchName = "Board_Emails_Dump"` with `Export = True` from `104.28.221.14`.

AuditVane immediately triggers `AV-012`, allowing the SOC to cancel the queued export job in Security & Compliance PowerShell and audit `Get-RoleGroupMember -Identity "eDiscovery Manager"` before PST extraction finishes.

Step-by-Step Triage, Containment & Verification

  1. Drop Purview UAL CSV exports (`RecordType 50` and `18`) into AuditVane and inspect all AV-012 findings.
  2. Connect via `Connect-IPPSSession` and run `Get-ComplianceSearch` + `Get-ComplianceSearchAction` to identify any unauthorized queries, exports, or purges.
  3. Immediately remove unauthorized searches (`Remove-ComplianceSearch`) and stop running export jobs.
  4. Audit `Get-RoleGroupMember` on **eDiscovery Manager**, **Compliance Administrator**, and **Organization Management**—stripping permanent members and moving eDiscovery access strictly into Entra PIM.
  5. Check `SearchExportDownloaded` in Purview UAL to verify whether the generated PST/ZIP archive was actually downloaded before cancellation.

How to Verify Containment Completed Cleanly

  • Zero unauthorized Compliance Searches or active Export actions remaining.
  • eDiscovery Manager and Compliance Administrator groups stripped of non-essential accounts.
  • All eDiscovery exports audited against approved Legal/HR discovery tickets.

Analyst Blind Spots, Licensing Quirks & False Positives

Even Global Administrators cannot export eDiscovery Content Search results by default without first adding themselves into **eDiscovery Manager**—which creates a noisy audit footprint (`Add-RoleGroupMember` / `Update role`) right before `New-ComplianceSearch` if you monitor both.

If a legitimate SOC team uses `New-ComplianceSearchAction -Purge` to claw back phishing emails during an incident, document the exact search name and timestamp so future auditors don’t flag SOC remediation as attacker tampering.

Frequently Asked Questions

Can a Global Administrator run eDiscovery exports silently without extra role grants?

No! By default, Global Admins must add themselves to eDiscovery Manager/Administrator in Purview Permissions first, generating an audit trail before exporting.

Which Purview RecordType logs eDiscovery searches and exports?

RecordType 50 (ComplianceSearch) logs New-ComplianceSearch, New-ComplianceSearchAction, SearchExportDownloaded, and Remove-MailboxSearch.

Does AuditVane flag ComplianceSearch abuse?

Yes! AuditVane rule AV-012 alerts on New-ComplianceSearchAction and Remove-MailboxSearch operations.

What is SearchExportDownloaded?

It proves that an admin or attacker actually clicked Download on the eDiscovery export tool and retrieved the PST/ZIP archive.

Related Forensics Guides