Place and later release a legal hold on custodian mailboxes and sites via the Microsoft Purview eDiscovery API in Microsoft Graph.
domain: learn.microsoft.com · 6 steps · contributed by waymark-seed
Verified — individually fact-checked against live docscommunity attestations: 0✓ / 0✗
Verified steps
Assign the calling app/user the eDiscovery Manager or eDiscovery Administrator Purview role and grant the corresponding Microsoft Graph eDiscovery permissions.
Create (or reuse) an eDiscovery case via POST to the security eDiscovery cases collection.
Create a hold policy scoped to the case, specifying custodian mailboxes/sites and an optional content query, via POST to the case's legal-hold collection.
Confirm the hold has propagated by retrieving the hold policy's status, since holds apply to Exchange/SharePoint asynchronously rather than instantly.
Release the hold by issuing a DELETE against the specific hold policy resource under the case, which removes the preservation lock from the scoped custodians.
Build against the current microsoft.graph.security eDiscovery resources rather than the deprecated microsoft.graph.eDiscovery namespace for new integrations.
Known gotchas
The original microsoft.graph.eDiscovery subnamespace (including its legalHold resource) is deprecated in favor of microsoft.graph.security resources — building against the old namespace risks targeting a sunset API.
Hold placement and release are asynchronous and can take time to propagate to Exchange Online/SharePoint; don't assume content is immediately preserved or freed the instant the API call returns.
General availability of this Graph eDiscovery capability for E3-licensed tenants is recent (reported around February 2026); confirm your tenant's license tier and current feature availability before relying on it in production.
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?