HomeAboutAll Posts

Archive SharePoint Files Using M365 Archive Feature

By Denis Molodtsov
Published in SharePoint
May 26, 2026
4 min read
Archive SharePoint Files Using M365 Archive Feature

Table Of Contents

01
About Microsoft 365 File Archive
02
Pricing
03
Prerequisites
04
Enable file archive for the tenant
05
How users archive a file
06
Restoring a file
07
Archive a file using PnP PowerShell
08
Questions and Answers
09
Conclusion
10
Related

About Microsoft 365 File Archive

ℹ️ File-level archive is currently in public preview. General availability is expected around July 2026.

ℹ️ This is the second article in my Microsoft 365 Archive series. See also: Archive SharePoint Online Sites Using M365 Archive Feature and Archive Unlicensed OneDrive Accounts Using M365 Archive Feature.

Microsoft 365 Archive used to be a site-level feature only. Now you can archive individual files (and folders) without taking the whole site offline. The file stays in place, the metadata is still visible, but the contents cannot be opened or downloaded until the file is reactivated.

Pricing

Same model as the site-level archive:

  • Storage is billed at $0.05/GB/month, but only when active SharePoint storage plus archived storage exceeds your licensed tenant capacity.
  • Reactivation is free.
  • Once a file is reactivated, it cannot be archived again for 120 days.
  • Within 7 days of archiving, restore is instant. After 7 days, it can take up to 24 hours.

Prerequisites

You need pay-as-you-go billing enabled and an Azure resource group linked to your tenant. The setup is exactly the same as for the site-level archive, so I won’t repeat it here. See the site archive article for the screenshots and walkthrough.

Short version:

  1. Microsoft 365 Admin center > Setup > Activate pay-as-you-go services > Billing. Link an Azure subscription and resource group.

    Activate pay-as-you-go services
    Activate pay-as-you-go services

    Manage billing
    Manage billing

  2. Same page > Settings > Storage > Archive. Turn the service on.

    Activate Archive
    Activate Archive

Enable file archive for the tenant

Once the Archive service is active, you still need to flip the file-archive switch at the tenant level. Use PowerShell:

powershell
Connect-SPOService -Url https://yourtenant-admin.sharepoint.com
# Check whether file archive is enabled
$tenant = Get-SPOTenant
$tenant.AllowFileArchive
# Enable file archive for the tenant
Set-SPOTenant -AllowFileArchive $True

By default, every site inherits this setting. You can opt a sensitive site out:

powershell
# Disable file archive on a specific site
Set-SPOSite -Identity https://yourtenant.sharepoint.com/sites/FinanceSite -AllowFileArchive $false

And you can change the default for newly created sites:

powershell
# New sites created after this point will have file archive OFF by default
Set-SPOTenant -AllowFileArchiveOnNewSitesByDefault $false

How users archive a file

Once the feature is on, anyone with edit permission on a library can archive files. They just select one or more items and click Archive in the command bar.

Archive button in the document library command bar
Archive button in the document library command bar

The file stays where it is. The name, path, and metadata remain visible. A small archive icon overlay shows that the contents are no longer accessible. Opening the file fails until somebody reactivates it.

⚠️ Archiving folders is not supported.

Restoring a file

Anyone with read permission can reactivate an archived file. No admin ticket required.

  • If the file was archived less than 7 days ago, reactivation is instant.
  • Older files can take up to 24 hours. The user gets an email when it’s done.
  • To reactivate a file, simply click on it and select Reactivate.

Restore archived files
Restore archived files

Restore file
Restore file

Archive a file using PnP PowerShell

The PnP team shipped Set-PnPFileArchiveState for scripted archiving. Two states are supported: Archived and Active.

powershell
Connect-PnPOnline -Url https://yourtenant.sharepoint.com/sites/Marketing -Interactive
# Archive a single file
Set-PnPFileArchiveState `
-Identity "/sites/Marketing/Shared Documents/Old-Report.docx" `
-ArchiveState Archived
# Reactivate it
Set-PnPFileArchiveState `
-Identity "/sites/Marketing/Shared Documents/Old-Report.docx" `
-ArchiveState Active

Bulk archive everything in a folder:

powershell
Get-PnPFileInFolder -FolderSiteRelativeUrl "Shared Documents/Archive-2022" |
Set-PnPFileArchiveState -ArchiveState Archived -Force

The cmdlet uses Microsoft Graph beta under the hood (delegated permissions only at the time of writing), so it runs as the signed-in user, not as an app.

Questions and Answers

Can I auto-archive files older than X years?

Not out of the box. There is no policy-based automatic archiving yet. You have to script it. A typical pattern is a scheduled PnP PowerShell job that walks a library, filters by Modified older than a threshold, and pipes the matching files into Set-PnPFileArchiveState.

Does archiving a file free up active storage immediately?

The file leaves the active storage tier, but the storage report can take up to 72 hours to reflect the change. Same behavior as the site-level archive.

Metadata stays searchable. The file content does not. Clicking a search result for an archived file lands the user on the file with a message that it needs to be reactivated.

Can I move an archived file?

Surprisingly - Yes! You can move or rename an archived file. The archive state is preserved.

Can I copy an archived file?

Yes. And the copy of the file is archived by default.

How can I archive a file via Power Automate?

Here is the sample flow that archives a file. In your case, you will have to get the drive and the item id dynamically:

Power Automate - Archive a file
Power Automate - Archive a file

Can I reactivate multiple files at once?

Sadly, no. You have to click into each file and reactivate it separately. Bulk reactivation is not supported at the moment via the UI. But you can do it with PowerShell:

What happens to the archived file if I delete it and then restore it from the recycle bin?

The file remains archived after it’s restored from the recycle bin.

What happens to version history?

All versions are archived together. When the file is reactivated, the full version history comes back.

Does this work in OneDrive?

On paper - yes, the same cmdlets and the same in-product Archive button should work in OneDrive libraries. However, at the time of writing, file-level archive is not yet available in OneDrive on my tenant. I simply don’t see the Archive button in OneDrive. So if you want to archive files in OneDrive, you might be out of luck for now.

Can I see how much storage is consumed by archived files?

Admins can utilize PowerShell to view usage of file-level archive. SharePoint Administrators or Global Administrators can see how much total storage is consumed by file-level archiving for a given site. The ‘ArchivedFileDiskUsed’ property of the Get-SPOSite cmdlet indicates the storage consumed by all archived files on that site in bytes.

powershell
$site = Get-SPOSite -Identity <site_url>
$site.ArchivedFileDiskUsed

How much storage is consumed by archived files across the whole tenant?

Heads up: the Archive storage used number on the SharePoint Admin Center > Archived sites page only counts site-level archives. File-level archives are not included.

Archived sites page does not include file-level archive storage
Archived sites page does not include file-level archive storage

To get the file-archive total, sum ArchivedFileDiskUsed across every site and convert to GB:

powershell
$totalGB = (Get-SPOSite -Limit All |
Measure-Object -Property ArchivedFileDiskUsed -Sum).Sum / 1GB
"{0:N2} GB" -f $totalGB

Where is the information about archival status stored in SharePoint?

Every document library now carries two hidden, read-only lookup columns that point at the Docs table:

  • _FileArchiveStatus (Display: Archive Status) holds the current state of the file.
  • _FileArchiveTimeLastModified (Display: Archive State Last Modified Time) holds the timestamp of the last archive transition.

Both are inherited from the base list template (FromBaseType="TRUE" in the schema), so you’ll see them on every document library whether or not file archive is enabled on that site.

Hidden _FileArchiveStatus column
Hidden _FileArchiveStatus column

SchemaXml for the _FileArchiveTimeLastModified field
SchemaXml for the _FileArchiveTimeLastModified field

You can’t surface them through the normal “Add column” UI, but they’re queryable. Handy if you want a report of “show me every archived file modified after X”:

powershell
Get-PnPListItem -List "Documents" -Fields "FileLeafRef","_FileArchiveStatus","_FileArchiveTimeLastModified" |
Where-Object { $_["_FileArchiveStatus"] -ne $null }

Conclusion

File-level archive is the missing piece. Site archive was always too coarse for the real-world cleanup story. Now you can leave the site active for the team that still uses it, and cool down the old stuff at $0.05/GB/month.


Tags

ArchiveSharePointMicrosoft 365SAMSharePoint Premium

Share

Previous Article
Archive SharePoint Online Sites Using M365 Archive Feature
Denis Molodtsov

Denis Molodtsov

Microsoft 365 Architect

Related Posts

Vanilla JS and the SharePoint Graph API
Vanilla JS and the SharePoint Graph API
June 01, 2026
3 min

Quick Links

AboutAll Posts

Social Media