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:


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)
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)?
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! 🙂
Credit: Photo by bongkarn thanyakij from Pexels
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
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
Hi Joanne, thanks for all your posts on here. They’re a great help!
Quick query on ODFB retention, that I can’t seem to get a straight answer to.
When a user is deleted from M365, and his data is retained after the 30 days as per a retention policy or ODFB admin center settings, what is this storage counted against?
Thanks
Brendan