HomeAboutAll Posts

Archive SharePoint Files Using M365 Archive Feature

By Denis Molodtsov
Published in SharePoint
May 26, 2026
3 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 article is about the file-level archive. If you are looking for the site-level archive, check out my article on Archive SharePoint Online Sites 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?

Yes, the same cmdlets and the same in-product Archive button work in OneDrive libraries. The 120-day re-archive lock does not apply to OneDrive.

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

Archive SharePoint Online Sites Using M365 Archive Feature
Archive SharePoint Online Sites Using M365 Archive Feature
May 26, 2026
5 min

Quick Links

AboutAll Posts

Social Media