SharePoint Retention Period is a policy-driven feature, part of Microsoft Purview, that controls how long content is kept before it’s deleted or archived. It’s how you actually enforce a retention rule instead of relying on someone remembering to clean up old files.
In this post: The three pieces · Why it matters · Retention labels vs. legal hold · When would you actually use this? · Best practices · Applying a retention label via PowerShell
The three pieces
- Retention labels: applied to individual files, manually or by policy, defining how long that specific content is retained and what happens when the period ends.
- Retention policies: applied at a higher level — entire SharePoint sites, OneDrive accounts, Exchange mailboxes, Teams — for large-scale governance rather than file-by-file.
- Disposition reviews: a final human check before content is permanently deleted, so legal/compliance can confirm records were reviewed before removal.
Why it matters
- Compliance: GDPR, HIPAA, and various ISO standards specify how long certain data must be kept — non-compliance has real penalties.
- Security: keeping data indefinitely is its own risk; retention policies dispose of outdated content in a controlled way instead of it sitting around as a liability.
- Storage: without a policy, SharePoint storage grows unchecked — this automates the cleanup instead of a manual purge project.
- Litigation protection: ensures required records are actually retained through the period needed for eDiscovery and legal hold obligations, covered in more depth in SharePoint Compliance Policy and Governance.
Retention labels vs. legal hold
These get conflated because both prevent content from disappearing, but they’re triggered and scoped very differently. A retention label/policy is a planned, ongoing schedule — “keep invoices for 7 years” — that applies broadly and predictably, decided in advance regardless of whether litigation is happening. A legal hold (technically an eDiscovery hold) is reactive and situational — applied to a specific set of content tied to a specific matter, the moment litigation or an investigation becomes reasonably anticipated, and it overrides normal retention/deletion schedules entirely for as long as it’s active. A file that’s due for automatic deletion under its retention label will still be preserved if it’s also under an active legal hold — hold always wins over a scheduled disposition. If your org is handling both, know which one governs a given piece of content before assuming a retention period is the full picture.
Disposition review is a final human check before content is permanently deleted, so there’s a review before anything’s gone for good.
When would you actually use this?
- Finance/legal needs customer records kept for a specific period (7 years is common) and disposed of afterward — not kept forever, not deleted early.
- Storage costs are climbing and nobody’s been cleaning up old document libraries — automated expiration handles this without a dedicated cleanup project.
- Legal asks whether a specific class of documents has actually been retained per policy — disposition review logs give you the answer instead of guessing.
Best practices
- Understand the regulatory requirement before configuring anything — what applies to your industry determines the actual retention period, not a guess.
- Use different labels for different content types — financial records and temporary project files don’t belong on the same retention schedule.
- Automate application via Purview rather than relying on users to apply labels manually.
- Enable disposition review before permanent deletion, so there’s a human check before anything’s gone for good.
- Test in a controlled scope first before rolling a policy out organization-wide.
Applying a retention label via PowerShell
# Connect to SharePoint Online
Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/YourSite" -UseWebLogin
# Apply Retention Label to a Document Library
$LibraryName = "Documents"
$RetentionLabel = "RetentionLabelName"
$Documents = Get-PnPListItem -List $LibraryName
foreach ($Document in $Documents) {
Set-PnPListItem -List $LibraryName -Identity $Document.Id -Values @{ "ComplianceTag" = $RetentionLabel }
}
Write-Host "Retention Label applied successfully!"
This retrieves every document in a library and applies the label to each item, so the whole library follows the same retention rule going forward.
Useful References
One more tip in the bag. Questions or corrections? Comment below.
App Catalog Authentication Automation Backup Compliance Content Type CSS Flows Google Javascript Limitations List Metadata MFA Microsoft Node NodeJs O365 OneDrive Permissions PnP PnPJS Policy PowerApps Power Automate PowerAutomate PowerPlatform PowerShell React ReactJs Rest API Rest Endpoint Security Send an HTTP Request to SharePoint SharePoint SharePoint List SharePoint Modern SharePoint Online SPFX SPO Sync Tags Teams Termstore Versioning


