How to Create Site Retention Policies in SharePoint

Retention policies in SharePoint help your organisation manage how long files and documents are kept and when they should be deleted.

Think of it like this: some documents are important and need to be kept for a specific period (for example, financial reports or employee records), while others may only be useful for a short time (like draft files or old notes).

In this SharePoint tutorial, I will explain the need to set up a retention policy in SharePoint Online and how to create Site Retention Policies in SharePoint step by step.

Why We Create SharePoint Site Retention Policies

By setting up a SharePoint retention policy, we can:

  • Keep important documents safe for as long as you need them.
  • Automatically delete old or unnecessary files after a specific time to save space and stay organised.

Example:

  • For HR documents, a retention policy can keep employee records for 5 years after an employee leaves, and then automatically delete them.
  • For Project sites, you can set a policy to keep all project documents for 2 years after the project is finished. After 2 years, SharePoint will automatically delete those old files to free up storage space and keep things organised.

Create Site Retention Policies in SharePoint

To create SharePoint site retention policies, follow the instructions below:

  1. Open Microsoft Purview -> Go to Solutions -> Select Data Lifecycle Management.
Site Retention Policies in SharePoint
  1. Expand Policies -> Retention policies.
  2. Click on + New retention policy.
Site Retention Policies SharePoint
  1. On the next page, provide the fields below:
    • Name: Provide retention policy name. (Mandatory)
    • Description: Provide some description about it. (Optional)

Click Next.

SharePoint Site Retention Policies
  1. The next screen is optional and lets you assign Admin Units to your policy. Admin Units are especially useful in large organisations where different departments manage different regions or sites. If your organisation already uses Admin Units, this is where you can apply them. Click Next.
SharePoint Site Retention Policy
  1. On the next screen, you’ll need to choose the type of policy you want to create — Adaptive or Static. An Adaptive policy scope, on the other hand, allows you to dynamically assign the policy based on specific site attributes, such as the Site Title or Site URL.
SharePoint Retention Policy
  • A Static policy scope requires you to select specific sites where the policy will be applied manually. For this article, I selected Static. Click Next.
How to Create Site Retention Policies in SharePoint Online
  1. On the next screen, select the option where you want to apply this policy. In addition to SharePoint sites, we can also apply the policy to Exchange mailboxes.

In our case, we are applying the policy to a SharePoint site. The available options may vary depending on whether the site is connected to a Microsoft 365 Group or not.

How to Create Site Retention Policies in SharePoint
  1. In this case, I’m using a Team Site that’s connected to a Microsoft 365 Group, so I’ll select the option shown below. By default, it applies to all group sites, but I only want to target a specific site. To do that, click Edit.
How to Create Site Retention Policies SharePoint
  1. On the next page, select the specific SharePoint site(s) that you want to apply the retention policy to. Click Done.
Create Site Retention Policies SharePoint

As I have selected only one SharePoint site, that’s why it’s showing only one Microsoft 365 group, as highlighted below.

Create Site Retention Policy SharePoint
  1. On the next screen, you’ll set how long you want to keep your files. You can choose to keep them forever, keep them for a specific amount of time, or even set a policy to delete them after a certain period automatically.
    • Here, in my case, I have set the retention period to only 10 days.
    • Select Custom from the dropdown menu.
    • Specify the custom start retention period based on (e.g. when items were created).
    • Specify the end of the retention period, whether to delete the items automatically or do nothing.
    • Click Next.
how to set retention policy in sharepoint online
  1. On the next screen, you’ll get a chance to review your policy settings. If everything looks good, click Submit to publish it.
  2. At this stage, the policy is being published to the selected SharePoint sites. Please note that, as mentioned in the message below, it may take up to a week for the changes to take effect. Click Done.
how to check sharepoint retention policy

You can see the retention policy has been added, as shown below.

check sharepoint retention policy

What Changes Occur Once a Retention Policy is Published On a SharePoint Site

Once we publish the retention policy to a specific SharePoint site, the following things will happen:

  1. Cannot Delete a SharePoint Site: If you attempt to delete the site, either from the SharePoint Admin Centre or directly from the site itself, the action will not be allowed. Instead, you’ll see an error message stating: “A compliance policy is currently blocking this site deletion,” as shown below.
Create Site Retention Policies in SharePoint
  1. Cannot Delete Non-empty Folders: If you attempt to delete a folder that isn’t empty, you’ll see the following error message: “If attempting to delete a non-empty folder, it is possible that it is on hold.” To delete the folder, you must first remove all the items and subfolders within it.
Create Site Retention Policy in SharePoint

Delete/Disable SharePoint Retention Policies

We can remove any unnecessary or unwanted SharePoint retention policies to keep things clean and organised. However, if you prefer not to permanently delete a policy, you also have the option to disable it.

When a policy is disabled, it will no longer be applied to any content. However, you can easily turn it back on later if you need to use it again.

  • Delete Retention Policy: To delete a retention policy, select it and click the Delete option. It will be deleted permanently.
  • Disable Retention Policy: To disable a policy, select the specific policy and click the “Disable Policy” option.
How to delete sharepoint retention policy

I hope you found this article. If we implement this retention policy, we will keep important business documents for the appropriate amount of time and automatically remove outdated files. This helps us maintain compliance and security while keeping our SharePoint site clean, organised, and easy to use.

Also, you may like some more SharePoint tutorials:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Live Webinar

Quiz App Using SharePoint Framework (SPFx)

Learn to built a complete Quiz Management solution that enables admins to create and manage quizzes, categories, questions, and settings with an easy automated setup process in SharePoint. It also includes an interactive quiz experience for users and a powerful dashboard to track participation, analyze results, and view detailed performance reports with charts and answer insights.

📅 2nd June 2026 – 10:00 AM EST | 7:30 PM IST

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App