Starting Retention based on a Date Column in SharePoint Online

Reading Time: 3 minutes

This post is answering a blog post question from my Retention in SharePoint Online: The WHEN post. Since #sharingiscaring, I thought I’d answer it in the form of another post instead of just replying to one person in the comments.

Reader question: I have a question about “Retain for / Delete after ‘x’ based on labeled date”. I have a document where the close date (a custom date column for the document) is the date which will determine the start of the retention. In this case, what would be the best way to trigger the retention? Do I have to use event or there is a better way available?

My answer…

There are 4 ways of accomplishing this, depending on the license available to you, the number of documents associated to the custom date, how automated you want/need it to be, and, beyond that, your preference.

Option 1: Use Event-based retention triggered on a Custom event Date

I wouldn’t use event-based retention for the single-document scenario described in the question. Event-based retention is a good option if you have a lot of documents all relating to the same event date and with the retention label already set.

Good examples where I’ve seen this option used are:

  • all documents for a project start retention on the project completion date
  • all documents for a legal matter start retention on the matter resolved date

For event-based retention, in addition to the retention label, you’d also need to assign a unique identifier to all documents relating to the event (referring back to the previous examples that unique identifier would be project # or legal matter #).

An event is created on the event date and then retention will start on all documents with the retention label and the same unique identifier.

Refer to a post by Martin Lingstuyl here: Blimped | Working with Purview event-based retention using code where he explains how to work with an event-based retention label and the ComplianceAssetId all thru code!

Option 2: Use Auto-apply on a Retention Label based on a Custom Date

This would be a good way of applying the retention based on a custom date. Set up your retention label to start retention based on labeled date. To filter on a date column, you must map it’s crawled property to a RefinableDate column (it’s queryable). In this example, I mapped it to RefinableDate01 and this would be the auto-apply condition below:


The result? Within a week, any SharePoint site the retention label is published to will have the retention label applied to all documents when a date either equal to today or in the past has been entered into the custom date column.

Note: if a date isn’t entered in the column OR a future date is entered in the column, a retention label is not applied.

I’ve blogged about this here: Retention in SharePoint Online: the HOW in “#7 – Auto-apply based on a metadata value”.

Option 3: Use a Power Automate Flow

This would be a very flexible way of applying your retention label if you need retention to start when a label is applied.

Build a Power Automate Flow to periodically (daily, weekly?) retrieve the items in your library with an ODATA filter to only bring back those items when the custom date is <= today

You can then programmatically apply the retention label using the ‘Send an HTTP Request to SharePoint’ action. I’ve blogged about this here: Retention in SharePoint Online: the HOW in “#9 – Automatically set using Power Automate”.

Option 4: Remind someone to do it! 🙂

Get the administrator of your library to set up a “Remind me” workflow for them to be reminded when a custom date on the library has been reached.

When the reminder is received, the retention label (configured to start retention when its applied) can be manually applied! This would only be a feasible option if the volume of documents was not large.

Hope this answer helped and gave you some ideas!




  1. This is a great and very timely article for me! I have a question on Option #2.

    For retention based on labeled date (“when it was labeled”), when does the retention clock start ticking? Is it (a) the date in the custom column, or is it (b) the date that the label policy applied the label based on the custom column?

    What I need is scenario (a) where the retention start date can be back-dated. If I want to retain documents 3 years after the project close date, for instance, but let’s say the project close date column isn’t set until a year after the project actually closed, in scenario (b) it will retain documents for 4 years, but in scenario (a) it will retain documents for 3 years.

    It seems like event-based retention is what I need, but that seems more complex to setup.


    1. Hi Pete,
      The clock starts “ticking” based on the date you labeled it so in your top question… it’s b.
      If you want scenario ‘a’, you likely need event-based retention to cover all of the documents in your project. It is definitely more complex to set up.

  2. Hi Joanne, i wanted to see if i can incorporate multi-step review for disposition, i know its not possible using out of the box , what would you recommend to have your own disposition workflow that goes for 2 level of approvals and then decides and either dispose content or extend the disposition.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.