Tracking File-Level Archiving Activity in SharePoint Online with PowerShell

Track file-level archiving for SharePoint sites.

File-level archiving is now generally available and can be applied to files automatically, by users through the SharePoint browser UX, or via a Graph API. The big problem with Purview retention processing is its black box nature, so to discover how effective retention labels with an archiving step are, we use the Microsoft Graph PowerShell SDK to check the archiving status of files and report the results via email. All in a nice script, of course.

How to Archive Old Teams Channel Email Files with Microsoft 365 Archive

File-level archiving for email sent to Teams.

The File-level archiving API supports any file stored in a SharePoint Online document library, including the emails sent to Teams channels and stored in folders where the email files often disappear from view, occupying valuable storage quietly and without fuss. Finding and moving the email files to Microsoft 365 Archive makes sense because it saves on storage and stops AI tools using old email to generate responses. Here’s how to archive old email files with PowerShell.

Using the Microsoft Graph to Archive SharePoint Online Files

File-level archiving with the Graph APIs.

This article discusses how to list files archived using the SharePoint Online file-level archiving feature. We also discuss how to archive and unarchive files using the Microsoft Graph PowerShell SDK and Graph API requests. As it turns out, the drives API is the best way to find (list) archived or unarchived files, while archiving files that haven’t been modified in a while is easy with a few lines of PowerShell.

How File-Level Archiving Works for SharePoint Online

SharePoint Online File-Level Archiving.

SharePoint Online supports file-level archiving, meaning that you can send individual files (most types) to Microsoft 365 Archive to be held in cold storage. Individual users can make the decision about what files need to be online instead of forcing administrators to decide whether to archive complete sites. If needed, archived files can be retrieved, but it might take 24 hours for this to happen.