Auto Archive Documents

New Contributor

Hi All,


We have a large Document Library with ~200k items.

We are looking to have a solution which automatically archives any files older than 3 years and moves them into a new archive document library.

Ideally, when moved into the archive library, the file would keep the same folder structure.


We have looked into Power Automate however we are having issues with delegation limits.

Any suggestions for this?


4 Replies

@Clong97 Hello,

What do you mean with delegation limits? You should have a service account that makes the work. So that it can be easily tracked by audit log and also ensure that not the wrong person gets access to the sensitive information.

@Clong97 You could create a site policy and get notifications when files have become older than three years. Not sure if the policy can trigger a power automate.

Hi ArefHalmstrand,

We do have a service account which would run the Power Automate.
The issue with delegation limits is with Power Automate as it is only able to run roughly the first 5k items meaning that not all documents would be processed.

@Clong97 Ah, it makes kinda sence. I would suggest to build the automated solution in PowerShell.
have a script that runs once a week (during weekend), to analyze your files and based on metadata fields, be able to move them directly or notify a content responsible. There are many cool ways to solve this. But it is absolute a challenge to go through so many items. Even PowerShell can fail with loss of connection or runtime error. My recommendation is to use PowerShell, either locally or in Azure functions.