Microsoft Purview eDiscovery and Content Search are the built-in legal and compliance tools that let authorized staff run keyword and condition searches across every mailbox, SharePoint site, OneDrive account, and Teams / Viva chat in the tenant, preview the hits, and export them as PST files or native documents. The entire operation runs server-side inside Microsoft 365 — it never touches an endpoint, so it is completely invisible to EDR and generates zero device telemetry.
An adversary who seizes a Global Administrator, Compliance Administrator, Compliance Data Administrator, or eDiscovery Manager role can therefore skip malware, phishing, and lateral movement entirely and simply ask the platform to collect the crown jewels. The export download is the exfiltration (T1213 / T1114.002); a New-ComplianceSearchAction -Purge gives the same actor a tenant-wide destruction and anti-forensics capability; and adding themselves to an eDiscovery role group is quiet, durable persistence (T1098).
Primary data source: the Unified Audit Log, surfaced in Microsoft Sentinel as OfficeActivity (and in Defender XDR as CloudAppEvents). This SOP treats a confirmed broad-scope export or purge by an unticketed actor as a SEV1 data-breach event.
☰ Table of Contents
01 — BACKGROUND
TECHNIQUE OVERVIEWMicrosoft Purview exposes three search surfaces, all driven either from the portal at purview.microsoft.com (formerly the Microsoft 365 compliance / Security & Compliance Center) or from Security & Compliance PowerShell:
| Surface | Capability | Key cmdlets / operations |
|---|---|---|
| Content Search | Ad-hoc keyword search across all workloads, preview + export. No case required. | New-ComplianceSearch, Start-ComplianceSearch, New-ComplianceSearchAction |
| eDiscovery (Standard) | Case-based search, legal hold, export of results to PST / native. | SearchCreated, SearchExported, CaseAdded, CaseMemberAdded |
| eDiscovery (Premium) | Review sets, bulk collection, advanced analytics, download. | SearchExportDownloaded, ViewedSearchExported |
| Legacy In-Place | Deprecated mailbox search + delete content (still present in some tenants). | New-MailboxSearch, Search-Mailbox -DeleteContent |
Because the service runs under Microsoft's own identity on the back end, there is no process, no file write, and no network connection on any user device — the only evidence is in the Unified Audit Log. An attacker simply searches for password, VPN, wire transfer, board, or targets named executive mailboxes, runs the search, and downloads the export.
- AAdmin takeover → mass collection. A phished Global Admin or Compliance Admin creates a tenant-wide Content Search for high-value keywords, exports the results, and downloads the PST off-tenant. (T1213 / T1114.002)
- BSelf-granted eDiscovery role. The actor adds their own account (or a burner) to the
eDiscovery Manager/Compliance Administratorrole group so the capability survives a password reset of the original victim. (T1098) - CTargeted mailbox espionage. A narrow search scoped only to executive or legal mailboxes, repeated over days, to continuously siphon sensitive correspondence. (T1114.002)
- DPurge for anti-forensics / destruction.
New-ComplianceSearchAction -Purge -PurgeType HardDeleteto remove incriminating mail (e.g. their own phishing lure) from every mailbox, or legacySearch-Mailbox -DeleteContent. (T1070 / T1485) - EInsider pre-departure sweep. A privileged leaver uses legitimate eDiscovery access to collect and export IP before offboarding — overlaps with SOP-63.
Log sources: OfficeActivity (Unified Audit Log in Sentinel — workloads SecurityComplianceCenter and Exchange admin cmdlets), CloudAppEvents (Defender XDR), AuditLogs (Entra directory-role adds for Compliance Administrator), and SigninLogs to risk-score the actor.
| Signal | Severity |
|---|---|
| Export action created / downloaded on a broad-scope search, no ticket | SEV1 — data breach |
| Purge / HardDelete action executed across mailboxes | SEV1 — destruction |
| Search scoped to All Mailboxes / All Sites / executive targets, not yet exported | SEV2 — staging |
| Actor added themselves to an eDiscovery / Compliance role group | SEV2 — persistence |
| Narrow search by a known compliance officer with a matching case / ticket | LOW / FP |
Scope is not severity by itself. A legal team legitimately runs tenant-wide searches every day. The deciding factors are the actor (is this a known compliance role holder?), the authorization (is there an eDiscovery case number or change ticket?), and whether an export or purge followed. Treat export/purge as the point of no return.
02 — IDENTIFICATION
6 INDICATORS- 1Did an Export or Purge action occur (I3 / I4)? If yes → assume breach/destruction, go straight to Containment.
- 2Is the actor a member of your known compliance / legal team, or an unexpected admin account?
- 3Is there an eDiscovery case number or change ticket that references this search? (Call the compliance owner directly — do not assume.)
- 4What is the search scope — a single mailbox, or
ExchangeLocation "All"/SharePointLocation "All"? - 5Did the actor add themselves to an eDiscovery role group shortly before (I5)?
The fastest disambiguation is a phone call: your organisation has a small, known set of people who legitimately run eDiscovery. If the actor is not one of them, treat it as confirmed abuse until proven otherwise — do not wait for the export to complete.
Every abuse chain starts with the creation of a search object. Catching the New-ComplianceSearch / SearchCreated event tells you who started it, from where, and — crucially — lets you intervene before an export is ever run. Legacy New-MailboxSearch is a strong signal because In-Place eDiscovery is deprecated and rarely used legitimately.
- 1Open Audit and set Activities to the eDiscovery group (Created a search, Created mailbox search).
- 2In Sentinel, run the KQL below against
OfficeActivity. Note the UserId, ClientIP, and the raw Parameters blob (holds theContentMatchQuerykeywords and location scope). - 3Pivot: cross-reference the
UserIdagainst your compliance-staff allow-list and against I5 (did they just grant themselves the role?).
Running the search (Start-ComplianceSearch / SearchStarted) populates statistics and is the staging point before export. The parameters reveal the blast radius: ExchangeLocation "All" or SharePointLocation "All" means the search covers every mailbox / site in the tenant — far beyond any normal targeted investigation.
- 1Open the named search and inspect Locations — confirm whether it targets all mailboxes/sites or a specific set.
- 2Read the query / conditions: high-risk keywords (password, secret, VPN, confidential, wire, SSN) or named executive mailboxes indicate collection-for-value, not compliance.
- 3Run the KQL to pull every
Start-ComplianceSearchin the window and parse scope from the Parameters blob.
| Parameter / value | Meaning | Severity |
|---|---|---|
| ExchangeLocation "All" | Search covers every mailbox in the tenant | CRITICAL |
| SharePointLocation "All" | Covers every SharePoint site + OneDrive | CRITICAL |
| ContentMatchQuery "password..." | Credential / secret-hunting keyword scope | HIGH |
| AllowNotFoundExchangeLocationsEnabled $true | Includes locations that may not resolve — sweeping intent | MEDIUM |
This is the highest-fidelity indicator and the point of no return. New-ComplianceSearchAction -Export / SearchExported packages the results; SearchExportDownloaded (the eDiscovery Export Tool pull) is the moment data physically leaves Microsoft 365 onto the actor's machine. A download by an unexpected actor is a confirmed data breach.
- 1Review the Exports tab for the case/search — note the export name, size, and item count (how much data is at risk).
- 2Run the KQL to find both the export creation and the export download. The download row's
ClientIPis the actor's egress IP — capture it as an IOC. - 3If the download succeeded, measure the gap between it and now — this sizes the exposure window for breach notification.
| Operation | Meaning | Severity |
|---|---|---|
| New-ComplianceSearchAction (Export) | Export package being generated from search results | CRITICAL |
| SearchExported | eDiscovery export prepared for download | CRITICAL |
| SearchExportDownloaded | Data physically pulled off-tenant — breach | CRITICAL |
| ViewedSearchExported | Export results viewed / previewed in portal | HIGH |
A SearchExportDownloaded event is proof data left the tenant. Do not downgrade this because "the search looked routine" — the download, the actor, and the absence of a case are what matter. Preserve the audit rows immediately; the Unified Audit Log retention clock is ticking.
The same tooling can delete, not just collect. New-ComplianceSearchAction -Purge -PurgeType HardDelete removes up to 10 items per mailbox tenant-wide, and legacy Search-Mailbox -DeleteContent hard-deletes without limit. Attackers use this to erase their phishing lures from every inbox (anti-forensics) or as outright destruction.
- 1Run the KQL for any search action whose parameters contain
Purge,HardDelete,SoftDelete, orDeleteContent. - 2For each hit, open the associated search (I1) to see which keywords / senders were targeted — this tells you what the actor was trying to erase.
- 3Check whether the affected mailboxes are on Litigation Hold or Retention — held items are recoverable from the Recoverable Items folder even after HardDelete.
To use eDiscovery an account must hold the right role. An attacker who adds their own (or a burner) account to eDiscovery Manager, eDiscovery Administrator, or the Entra Compliance Administrator role is establishing durable persistence (T1098): the capability survives the victim's password reset. A role grant immediately followed by a search (I1) is a confirmed attack chain.
- 1Review membership of eDiscovery Manager and eDiscovery Administrator against your approved list.
- 2Run the OfficeActivity KQL for role-group adds and eDiscovery case-admin adds; run the AuditLogs KQL for the Entra Compliance Administrator directory role.
- 3Correlate the
Actor(who granted) and theTarget(who was granted) — a self-grant (Actor == Target) or a grant to a newly created account is a strong TP signal.
Before escalating, pull everything that identifies the operation and make an explicit call. The burden of proof for a false positive is a documented eDiscovery case or change ticket plus a known compliance actor — not "it looked like a normal search".
Extract and record:
- 1Actor UPN + object ID; whether the account is new or recently role-elevated (I5).
- 2Search name / case ID, scope (all vs. targeted), and the keyword/condition query.
- 3Every export/download row with its ClientIP, size, and item count.
- 4Sign-in context for the actor around the activity (SigninLogs: risk, location, new device) — pivot to SOP-04 if the session looks compromised.
| True Positive signals | False Positive signals |
|---|---|
| Actor not on the compliance/legal allow-list | Actor is a known eDiscovery Manager / legal team member |
| No eDiscovery case number or change ticket | Open eDiscovery case / ticket references this exact search |
| Role grant to self or burner, then immediate search | Role membership is long-standing and approved |
| Export downloaded from an anomalous / new IP | Export downloaded from a managed, expected workstation |
| Keyword scope targets credentials / execs; or a Purge | Scope matches a documented investigation / legal matter |
03 — CONTAINMENT
IMMEDIATE ACTIONDo not accept "it's the compliance team" without a case number. Compromised admin credentials are the most common path into eDiscovery abuse. Verify the case/ticket references this specific search, this actor, in this window — by phone, not by email the attacker could answer.
- 1Set Block sign-in = Yes on the actor account, then Revoke sessions to kill existing tokens.
- 2Reset the password and re-register MFA; audit the account's authentication methods for an attacker-added method (pivot SOP-80).
- 3If the session shows as token-theft / AiTM, follow SOP-18 / SOP-96 — blocking sign-in alone does not kill a replayed stolen token until sessions are revoked.
Revoking sessions does not recall an export that has already been downloaded — that data is gone. Containment here is about stopping the next search/export, not undoing the last one. Size and document the already-exported data for breach handling.
- 1Remove the actor (and any burner) from eDiscovery Manager / Administrator and from the Entra Compliance Administrator role — via PowerShell:
Remove-RoleGroupMember "eDiscovery Manager" -Member <UPN>. - 2Stop / remove any in-progress export action so no further data is packaged:
Remove-ComplianceSearchAction <name>; remove the search itself withRemove-ComplianceSearch <name>after evidence is captured (C4 / E1). - 3If any export packages are still available server-side in the portal, note them for evidence then clean them up during Eradication — they contain the collected data.
Do not delete the search or export before you have exported the audit evidence and recorded scope/keywords/item-counts. The search object is the best record of exactly what the attacker was after and how much was at risk.
- 1Export the relevant
OfficeActivity/ Unified Audit Log rows (I1–I5) to immutable storage — audit retention is finite and this is the only record of the operation. - 2Add the export download ClientIP (I3) to your watchlist and block it at the identity edge via a Conditional Access named location + sign-in block if it is attacker infrastructure.
- 3If a Purge (I4) was run, place affected mailboxes on Litigation Hold immediately to stop further deletion and preserve the Recoverable Items folder for recovery.
- 4Snapshot the current eDiscovery role-group membership and open cases for the IR record.
04 — ERADICATION
CLEANUP- 1After evidence capture, delete the malicious search and all export packages:
Remove-ComplianceSearchActionthenRemove-ComplianceSearch. Confirm no residual export remains downloadable in the portal. - 2Enumerate all eDiscovery / compliance role-group members and remove every unauthorized account — attackers often seed more than one. Re-baseline the approved list.
- 3Trace the initial access: how did the actor obtain the privileged session? Phished admin (SOP-01), token theft (SOP-18/96), or OAuth consent (SOP-21). Remediate that root cause or the capability returns.
- 4If a Purge ran, recover deleted items from the Recoverable Items folder (available because C4 placed the hold) and reconstruct what was destroyed.
- 5Reconstruct the full timeline from I1–I5: search created → started → exported/downloaded/purged → role grants — this quantifies data-at-risk for breach notification.
- 6Harden: enforce PIM / just-in-time activation on eDiscovery and Compliance Administrator roles, phishing-resistant MFA on all privileged accounts, and a Sentinel analytics rule on export/purge + role-group adds (see E2).
- Malicious search and all export packages are deleted and non-downloadable
- Every unauthorized eDiscovery / compliance role-group member is removed and the list re-baselined
- Actor account is remediated and the initial-access root cause is closed
- Any purged items recovered (or loss documented) and affected mailboxes on hold
- Verification queries return 0 rows for the actor
- PIM/JIT, phishing-resistant MFA, and an export/purge + role-add analytics rule are in place
Stand up a scheduled analytics rule that fires on export/download, purge, and eDiscovery role-group adds by any actor outside the approved compliance allow-list. Map the incident to ATT&CK for reporting:
| Tactic | Technique | In this SOP |
|---|---|---|
| Collection | T1213 — Data from Information Repositories | I1 / I2 tenant-wide search |
| Collection | T1114.002 — Remote Email Collection | I2 / I3 mailbox search + export |
| Exfiltration | T1567 — Exfiltration Over Web Service | I3 export download off-tenant |
| Persistence / Priv-Esc | T1098 — Account Manipulation | I5 eDiscovery role-group add |
| Defense Evasion / Impact | T1070 / T1485 — Indicator Removal / Data Destruction | I4 Purge / HardDelete |
05 — ESCALATION
ESCALATION PATHS| Tier | Trigger condition | Who to notify | Action |
|---|---|---|---|
| L1 → L2 | Cannot confirm TP/FP in 30 min; privileged / admin actor; broad-scope search | SOC L2 | Hand over with full I1–I6 evidence pack |
| L2 → IR | Export downloaded or Purge executed; self-granted eDiscovery role | IR Team + Security Manager | Declare incident, contain actor, size data-at-risk |
| IR → CISO | Confirmed exfiltration of regulated / customer data, exec mailboxes, or mass destruction | CISO + Legal + Privacy/DPO | Breach assessment; GDPR 72h clock starts |
| External | Regulatory breach (GDPR / HIPAA / PCI); insider / legal action; data of third parties | Regulator, affected parties, law enforcement, cyber-insurer | Statutory notification per legal counsel |
Bring to every escalation:
- ▸Incident ID; actor UPN and whether/when they gained the eDiscovery role.
- ▸Search scope + keywords; export item count / size; download ClientIP and timestamp.
- ▸Containment actions taken (sign-in block, session revoke, role removal, holds placed).
- ▸Current confidence: TP confirmed / suspected / unverified, and estimated data-at-risk.
If exported content includes personal data of EU residents, PHI, or cardholder data, the GDPR / HIPAA / PCI notification clock starts at the point of awareness — loop in Legal and the DPO the moment an export download is confirmed, in parallel with technical containment, not after.
- 1MITRE ATT&CK: T1213 (Data from Information Repositories), T1114.002 (Remote Email Collection), T1098 (Account Manipulation), T1070 / T1485.
- 2Microsoft Learn: Content Search and eDiscovery (Standard / Premium);
New-ComplianceSearch,New-ComplianceSearchAction,Add-RoleGroupMemberSecurity & Compliance PowerShell reference. - 3Microsoft Learn: Search the Unified Audit Log; eDiscovery and Content Search audited activities.
- 4Related CyberHawk SOPs: SOP-19 (Privileged Role Assignment), SOP-04 (Account Compromise), SOP-18 / SOP-96 (token theft), SOP-63 (departing employee), SOP-111 (mailbox delegation abuse).
Stay Threat-Ready
Follow CyberHawk Threat Intel for daily SOC analyst playbooks, detection engineering guides, and threat intelligence.