At 3:21 AM, Someone Changed the Retention Policy
At 3:21 AM, an administrator changed a Microsoft Purview retention policy.
No file download. No dramatic ransomware screen. Just a configuration update in the middle of the night.
“Three twenty-one?” Agent Foskett said. “That is a remarkably specific time to develop an interest in records management.”
But who made the change — and what did it actually affect?

Case file: An administrative change is not proof of authorisation
A fictional, evidence-led investigation into a Microsoft Purview data lifecycle retention policy, its audit trail, sign-in context, and the risk of assuming policy changes automatically delete data.
The change nobody expected
On the following morning, a compliance administrator noticed that the policy configuration no longer matched the approved baseline. The policy scope had been narrowed overnight. A change record showed 3:21 AM local time.
“Could be planned maintenance,” said the analyst.
“Then we should find the plan,” Agent Foskett replied. “And the person who approved it.”
First, identify exactly which policy changed
They compared the before-and-after configuration and checked change-management records. In this scenario, the policy was still present, but one SharePoint site was no longer in scope. That observation raised a risk; it did not prove that any content had already been deleted.
Find the administrative event in Microsoft Purview Audit
AuditData rather than assuming every change uses the same operation label.For the example below,
OfficeActivity is available only if Microsoft 365 activity has been connected to a Log Analytics workspace through the appropriate integration. It is not automatically present in every Sentinel workspace.- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
// Microsoft Sentinel / Log Analytics — requires OfficeActivity ingestion
let StartUtc = datetime(2026-10-13T15:30:00Z);
let EndUtc = datetime(2026-10-13T17:30:00Z);
OfficeActivity
| where TimeGenerated between (StartUtc .. EndUtc)
| where Operation has_any ("Retention", "CompliancePolicy", "ComplianceRule")
or tostring(Parameters) has_any ("Retention", "CompliancePolicy")
| project TimeGenerated, OfficeWorkload, Operation, UserId,
ClientIP, OfficeObjectId, Parameters
| order by TimeGenerated ascA note about 3:21 AM and time zones
“The logs are very precise,” Agent Foskett said. “It is our clocks that occasionally require an investigation.”
Who was the administrator — and was the sign-in expected?
The sign-in below is a correlation lead; it cannot, by itself, prove that a particular sign-in caused the Purview change. Service principal or non-interactive activity may require additional log sources.
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
// Microsoft Sentinel — requires Entra SigninLogs ingestion
let TargetAdmin = "compliance.admin@contoso.com";
let StartUtc = datetime(2026-10-13T15:30:00Z);
let EndUtc = datetime(2026-10-13T17:30:00Z);
SigninLogs
| where TimeGenerated between (StartUtc .. EndUtc)
| where UserPrincipalName =~ TargetAdmin
| project TimeGenerated, UserPrincipalName, AppDisplayName,
IPAddress, ResultType, ConditionalAccessStatus,
AuthenticationRequirement, DeviceDetail, LocationDetails
| order by TimeGenerated ascThe second audit trail: privilege and account changes
These questions matter because an apparently ordinary configuration change can follow an identity compromise. Equally, the change may be an authorised maintenance task. The team kept both hypotheses open until they had evidence.
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
// Microsoft Sentinel — requires Entra AuditLogs ingestion
let StartUtc = datetime(2026-10-13T14:00:00Z);
let EndUtc = datetime(2026-10-13T18:00:00Z);
AuditLogs
| where TimeGenerated between (StartUtc .. EndUtc)
| where Category in~ ("RoleManagement", "UserManagement", "ApplicationManagement")
| project TimeGenerated, Category, OperationName, Result,
InitiatedBy, TargetResources, CorrelationId
| order by TimeGenerated ascWhat did the policy change actually do?
To establish impact, they reviewed affected locations and item-level retention state using supported administrative and compliance tools. They searched for separate deletion or disposition evidence, and documented what could not be determined from the available logs. They did not claim an information loss event without evidence of one.
Reconstructing the timeline
The investigation outcome
They did not conclude that data had been deleted. The evidence supported an unexpected policy-scope change and the need to investigate identity and content impact. That is a meaningful finding without inventing a larger incident.
Practical defensive lessons
Use Microsoft Purview Audit as the authoritative investigation starting point and Sentinel only where the necessary logs are connected and retained. Always preserve timestamps, raw audit details, actor information, and the before-and-after configuration.
Final thought
“Yes,” Agent Foskett replied.
“Does that mean the records were deleted?”
“No. It means we have a change to investigate. Let us not promote a suspicion into a fact.”
He closed the audit record.
“Besides, anyone voluntarily doing records management at 3:21 in the morning deserves at least one follow-up question.”
The Logs Already Knew! 🔎

