How to Apply a Default Retention Label to a Library
🔍 WiseChecker

How to Apply a Default Retention Label to a Library

When you manage documents in SharePoint, you may need a specific retention policy to apply automatically to every file added to a library. Without a default retention label, each document requires manual labeling or a separate workflow, which increases the risk of non-compliance. SharePoint allows you to set a default retention label at the library level so that new files inherit the label immediately. This article explains how to configure that default label using the library settings in SharePoint Online.

Key Takeaways: Default Retention Label for SharePoint Libraries

  • Library Settings > Default retention label: The exact menu path to assign a retention label to all new files in a library.
  • Retention labels from Microsoft Purview: Labels must be created and published in Microsoft Purview before they appear in the library settings.
  • Existing files are not retroactively labeled: The default label applies only to new files added after the setting is applied.

ADVERTISEMENT

What a Default Retention Label Does and What You Need First

A default retention label is a tag that SharePoint applies automatically to every new file uploaded to a specific document library. The label tells the system how long to keep the file and what action to take when the retention period ends, such as deleting the file or keeping it permanently. This feature is part of Microsoft Purview compliance controls and helps organizations meet legal or regulatory requirements without manual effort.

Before you can set a default retention label on a library, two things must be in place. First, the retention label must already exist in Microsoft Purview. You create labels in the Microsoft Purview compliance portal under Data Lifecycle Management > Labels. Second, the label must be published to a retention label policy that includes the SharePoint site where your library lives. If the label is not published, it will not appear in the library settings dropdown.

You also need at least Member permissions on the site or Edit permissions on the library to change the library settings. Site owners and site collection administrators can always make this change.

Steps to Apply a Default Retention Label to a Library

  1. Open the library where you want the label
    Navigate to the SharePoint site that contains the document library. Click the library name in the left navigation or go to Site contents and click the library.
  2. Access Library Settings
    Click the gear icon in the top right corner to open the Settings menu. Select Library settings. If you are on a modern library page, you may see a Settings button in the command bar instead. Click it and choose Library settings.
  3. Find the default retention label option
    In the Library Settings page, scroll down to the Permissions and Management section. Click the link labeled Default retention label. This link only appears if your organization has retention labels published to this site.
  4. Choose the retention label
    On the Default Retention Label page, you will see a dropdown list of all retention labels that are published to this site. Select the label you want to apply to new files. If you do not see any labels, confirm that the label is published to this site in Microsoft Purview.
  5. Save the setting
    Click Save at the bottom of the page. The default retention label is now active. Any file uploaded to this library from this point forward will automatically receive the selected label.

After saving, you can verify the setting by uploading a test document. Open the document properties and check the Retention label column. If the column is not visible, add it to the library view by clicking Add column and selecting Retention label.

ADVERTISEMENT

Common Mistakes and Things to Avoid

The retention label does not appear in the dropdown list

This is the most frequent issue. The label must be published to the site through a retention label policy in Microsoft Purview. Go to the Microsoft Purview compliance portal, navigate to Data Lifecycle Management > Labels, select your label, and check the Published labels tab. Ensure the policy includes the SharePoint site that contains your library. If the policy is set to All SharePoint sites, the label will appear on any site. If the policy targets specific sites, your site must be in that list.

Existing files are not getting the label

The default retention label applies only to new files added after you save the setting. Files that were already in the library remain unlabeled. To apply a retention label to existing files, you must use a PowerShell script, a Power Automate flow, or manually apply the label to each file. SharePoint does not provide a built-in option to retroactively apply the default label to existing content.

The label is applied but you cannot see it in the library view

The retention label column is hidden by default in many library views. Click the Add column button in the library toolbar and select Retention label from the list of available columns. The column will then display the label name for each file. If the column still shows blank for new files, wait a few minutes and refresh the page. SharePoint may take a short time to apply the label.

You cannot change the default label after setting it

You can change the default retention label at any time by repeating the steps above and selecting a different label. The new label will apply to files added after the change. Existing files keep the label they received when they were added. There is no conflict because each file stores its own label independently of the library default.

Default Retention Label vs Manual Labeling: Key Differences

Item Default Retention Label Manual Labeling
Application method Automatically applied to new files User selects label from file properties
Scope All new files in the library Individual files or folders
Existing files Not affected Can be labeled at any time
User effort None after setup Requires user action for each file
Compliance risk Lower because labeling is enforced Higher if users forget to label

You now know how to set a default retention label on a SharePoint library. Start by confirming that your label is published to the site in Microsoft Purview. Then follow the steps in Library Settings to select the label. For existing files, consider using a Power Automate flow or PowerShell to apply the label retroactively. A useful next step is to create a retention label policy that automatically deletes files after a set number of years, which reduces storage costs and simplifies compliance reporting.

ADVERTISEMENT