OneDrive for Business Retention: Questions from the Field

Reading Time: 4 minutes

I recently had a 3-part question from a reader on my blog relating to configuring retention on OneDrive for Business (ODfB) sites in their Microsoft 365 environment. Rather than answering directly to that one user, I’ve decided to provide the answers in this post to provide more visibility in case others have similar questions.

The reader’s retention requirement was to have ODfB files deleted when the Last Modified date was older than 90 days. No disposition review was required.


Question 1:

To achieve this would I setup a retention policy for OneDrive only, select “No, just delete content that’s older than”: 90 Days and set Delete the content based on to ‘When it was last modified’?

Answer: you are correct.

I’ve previously blogged about this here: Retention in SharePoint Online: The WHAT. A retention policy can both retain and delete, however sometimes all you need to do is delete!

Note: this will not prevent a user from preemptively permanently deleting content prior to 90 days. If you need to ensure there are retained versions of deleted documents, you would have to configure the retention policy to also retain. This would still allow them to delete their documents from their OneDrive, but would retain them in their (hidden) Preservation Hold library. This library is visible in ‘Site Contents’ by appending this to the end of a OneDrive URL: /_layouts/15/viewlsts.aspx?view=14

To configure the retention policy to delete only, browse to Information Governance in the Compliance Center, select Retention… New retention policy. In my screen shot below, I’ve created a new policy named ‘ODfB Retention Policy’ with the following settings:

Q1 screen shot 1
Then, select the OneDrive accounts this Retention Policy will apply to (default is all):
Q1 screen shot 2

Question 2:

When a file is deleted via the retention policy above does it go into the first or second stage recycle bin, PHL or is it permanently deleted?

Answer: Because this is a Retention Policy that deletes, not retains, the Preservation Hold Library (PHL) will never come into play. The PHL is only used if you are retaining content and allows for copies and deletions to be housed in that library.

In your example, at the end of the 90-day period, the document will move to the first-stage recycle bin. This process is performed by a back-end Timer job which runs every 7 days. This means it may take UP TO 97 days for you to see the ODfB content move to the first-stage recycle bin.

Excerpt from Microsoft docs Content paths for delete-only retention settings:

“If the user deletes the document from there or empties this recycle bin, the document is moved to the second-stage recycle bin. A 93-day retention period spans both the first-stage and second-stage recycle bins. At the end of 93 days, the document is permanently deleted from wherever it resides, in either the first-stage or second-stage recycle bin.”

Important to note: currently, contents of the first or second stage recycle bins are not indexed and therefore not available for searching (including eDiscovery search). This, however, may change in the future. (see below)
Item Id 67092: “The eDiscovery and SharePoint Online teams are making architectural changes that will make the Recycle Bin (both first-stage and second-stage Recycle Bins) in SharePoint Online and OneDrive for Business searchable and exportable by eDiscovery Managers. That means organizations can search and export items in the Recycle Bin regardless of whether a site is on hold or not. Availability date: December CY2020″

Question 3:

If a user copies a file from a network share with a last modified date older than 90 days is that file flagged for deletion (assuming the 90-day retention policy above is in place)?

Example: I copied a file with a “Date Modified” of 12/22/2014 to OneDrive. I did notice a “Date Created” column of the one drive file says the date I copied it to OneDrive. Maybe does it evaluate this date as well? Just trying to avoid users copying older content to work on in OneDrive and the retention policy deleting it immediately. (assuming the 90-day retention policy above is in place)?

Answer: It will use whatever date is in the Last Modified date on your ODfB site after you copy the file(s) in. This usually depends on how the documents are being copied into ODfB. If manually copied, both the Created date and the Last Modified date are usually set to current date/time and the dates that were in the source location are lost. However, if a migration tool is used, the original Created and Last Modified dates are typically retained from the source location.

Since the Retention policy is based on Last Modified date and not Created date (as per the setup in Answer 1 above), it will only look to the value of the Last Modified date when evaluating for deletion – it will never look at the Created date. Anything with a Last Modified date older than 90 days would be deleted once the back-end timer job goes thru its evaluation process.


Hope you found this post helpful if you’re configuring retention in your own OneDrive for Business sites. Happy retaining! 🙂

Thanks for reading.
-JCK

Credit: Photo by bongkarn thanyakij from Pexels

2 comments

  1. This just appeared in the Roadmap items which is relevant to this blog post:

    The eDiscovery and SharePoint Online teams are making architectural changes that will make the Recycle Bin (both first-stage and second-stage Recycle Bins) in SharePoint Online and OneDrive for Business searchable and exportable by eDiscovery Managers. That means organizations can search and export items in the Recycle Bin regardless of whether a site is on hold or not.

    Availability date: December CY2020

    1. Thanks James. This is what i was referring to when i stated “the first and second stage recycle bins are currently not indexed however this may change”. I will include a link to the roadmap item. Thank you!
      -JCK

Leave a Reply

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