Skapa kvarhållningsetiketter och använda dem i appar

Vägledning för säkerhet och efterlevnad med licensiering i Microsoft 365.

Anteckning

Scenariot stöds för alla konfigurationer av kvarhållningsetiketter, bland annat regelbaserade poster.

Använd följande information som hjälp när du skapar och publicerar kvarhållningsetiketter och använd dem sedan i dokument och e-postmeddelanden.

Med kvarhållningsetiketter kan du behålla det du behöver och ta bort det som du inte behöver på objektnivå (dokument eller e-post). De används också för att deklarera ett objekt som en post i en del av en lösning för hantering av arkivhandlingar för Microsoft 365-data.

Att göra kvarhållningsetiketter tillgängliga för personer i organisationen så att de kan klassificera innehåll är en process i två steg:

  1. Skapa kvarhållningsetiketterna.

  2. Publicera kvarhållningsetiketterna med hjälp av en kvarhållningsetikettprincip.

Diagram över roller och uppgifter för etiketter.

Följ anvisningarna för de två administratörsstegen.

Innan du börjar

Den globala administratören för organisationen har fullständig behörighet för att skapa och redigera kvarhållningsetiketter och deras principer. Om du inte loggar in som global administratör kan du läsa mer i Behörigheter som krävs för att skapa och hantera kvarhållningsprinciper och kvarhållningsetiketter.

Bestäm innan du skapar bevarandeprincipen om den ska vara anpassningsbar eller statisk. Mer information finns i Anpassningsbara eller statiska policyomfattningar för kvarhållning. Om du bestämmer dig för att använda en anpassningsbar princip måste du skapa ett eller flera anpassningsbara omfattningsområden innan du skapar principen för kvarhållningsetikett och sedan välja dem under processen för att skapa en princip för kvarhållningsetiketter. Instruktioner finns i Konfigurationsinformation för anpassningsbara omfattningsområden.

Skapa och publicera kvarhållningsetiketter

Skapa först dina kvarhållningsetiketter. Skapa sedan en etikettprincip som gör att du kan använda etiketterna i appar.

Var du skapar och konfigurerar kvarhållningsetiketterna beror på om du använder hantering av arkivhandlingar eller inte. Instruktioner finns för båda scenarierna.

Steg 1: Skapa kvarhållningsetiketter

  1. Gå till någon av följande platser i Microsoft 365 Efterlevnadscenter:

    • Om du använder hantering av arkivhandlingar:

      • Lösningar > Hantering av arkivhandlingar > fliken Filplan > + Skapa en etikett > Kvarhållningsetikett
    • Om du inte använder hantering av arkivhandlingar:

      • Lösningar > Informationsstyrning > fliken Etiketter > + Skapa en etikett

    Ser du inte din lösning direkt i navigeringsfönstret? Välj först Visa alla.

  2. Följ anvisningarna i guiden.

    Mer information om kvarhållningsinställningarna finns i Inställningar för att behålla och ta bort innehåll.

    Om du använder hantering av arkivhandlingar:

  3. När du har skapat etiketten och du ser alternativ för att publicera den, tillämpar du etiketten automatiskt eller så sparar du etiketten: Välj Spara bara etiketten för tillfället och välj sedan Klar.

  4. Upprepa de här stegen om du vill skapa fler etiketter.

Om du vill redigera en befintlig etikett markerar du den och väljer sedan alternativet Redigera etikett för att starta guiden Redigera kvarhållning där du kan ändra etikettbeskrivningarna och eventuella inställningar från steg 2.

Steg 2: Publicera kvarhållningsetiketter

Publicera kvarhållningsetiketter så att de kan användas av användarna i appar som SharePoint och Outlook.

  1. Gå till någon av följande platser i Microsoft 365 Efterlevnadscenter:

    • Om du använder hantering av arkivhandlingar:

      • Lösningar > Hantering av arkivhandlingar > > fliken Etikettprinciper > Publicera etiketter
    • Om du inte använder hantering av arkivhandlingar:

      • Lösningar > Informationsstyrning > fliken Etikettprinciper > Publicera etiketter

    Ser du inte din lösning direkt i navigeringsfönstret? Välj först Visa alla.

  2. Använd länken för att välja de kvarhållningsetiketter som ska publiceras och välj sedan Nästa.

  3. För Välj typ av kvarhållningsprincip för att skapa-sidan väljer du Anpassningsbar eller Statisk, beroende på vilket val du har gjort i instruktionerna Innan du börjar. Om du inte redan har skapat anpassningsbara omfångsområden kan du välja Anpassningsbar men eftersom det inte finns några anpassningsbara omfångsområden att välja kan du inte slutföra guiden med det här alternativet.

  4. Beroende på ditt valda omfång:

    • Om du väljer Anpassningsbar: På sidan Välj anpassningsbara policyområden och platser väljer du Lägg till omfång och väljer ett eller flera anpassningsbara omfångsområden som har skapats. Välj sedan en eller flera platser. Vilka platser du kan välja beror på vilka omfångstyper som har lagts till. Om du till exempel bara har lagt till en omfångstyp för Användare kan du välja Exchange-e-post men inte SharePoint-webbplatser.

    • Om du väljer Statisk: Aktivera eller inaktivera någon av platserna på sidan Välj platser. Du kan för varje plats lämna den på standardvärdet för att tillämpa principen på hela platsen, eller så kan du ange vilka som ska inkluderas eller exkluderas.

    Mer information om platsalternativen finns i Platser.

  5. Följ anvisningarna i guiden för att namnge din princip, granska och skicka dina konfigurationsalternativ.

    Mer information om platsalternativen finns i Platser.

Om du vill redigera en befintlig princip för kvarhållningsetiketter (principtypen är Publicera) markerar du den och väljer sedan alternativet Redigera för att starta kvarhållningsprincipen Redigera. Med den här guiden kan du ändra principbeskrivningen och eventuella berättigade inställningar.

När kvarhållningsetiketter blir tillgängliga att användas

För OneDrive och SharePoint visas publicerade etiketter vanligtvis så att användarna kan välja inom en eller två dagar. Det kan dock ta upp till sju dagar.

Det kan ta upp till sju dagar innan publicerade kvarhållningsetiketter visas för användare i Outlook för Exchange och Microsoft 365-grupper, och postlådan måste innehålla minst 10 MB data.

Diagram över när publicerade etiketter verkställs.

Om etiketterna inte visas efter sju dagar kontrollerar du Status för etikettprincipen genom att välja den på sidan Etikettprinciper i efterlevnadscentret. Om statusen Av (fel) visas och platsinformationen har ett meddelande om att det tar längre tid än förväntat att distribuera principen (för SharePoint) eller att du ska försöka distribuera principen igen (för OneDrive), kan du prova att köra PowerShell-kommandot Set-RetentionCompliancePolicy för att försöka med principdistributionen igen:

  1. Anslut till Säkerhets- och efterlevnadscenter i PowerShell.

  2. Kör följande kommando:

    Set-RetentionCompliancePolicy -Identity <policy name> -RetryDistribution
    

Kontrollera statusen för de kvarhållningsetiketter som publicerats i Exchange

I Exchange Online görs kvarhållningsetiketterna tillgängliga för slutanvändare med en process som körs var sjunde dag. Med hjälp av PowerShell kan du se när processen kördes senast och därmed när den ska köras igen.

  1. Ansluta till Exchange Online PowerShell.

  2. Kör följande kommandon.

    $logProps = Export-MailboxDiagnosticLogs <user> -ExtendedProperties
    
    $xmlprops = [xml]($logProps.MailboxLog)
    
    $xmlprops.Properties.MailboxTable.Property | ? {$_.Name -like "ELC*"}
    
    

In the results, the ELCLastSuccessTimeStamp (UTC) property shows when the system last processed your mailbox. If it has not happened since the time you created the policy, the labels are not going to appear. To force processing, run Start-ManagedFolderAssistant -Identity <user>.

If labels aren't appearing in Outlook on the web and you think they should be, make sure to clear the cache in your browser (CTRL+F5).

How to apply published retention labels

Use the following sections to learn how published retention labels can be applied in apps:

In addition, when you use SharePoint Syntex and publish retention labels to SharePoint locations, you can apply a retention label to a document understanding model so that identified documents are automatically labeled.

After content is labeled, see the following information to understand when the applied label can be removed or changed: Only one retention label at a time.

Manually apply retention labels

End users, as well as administrators, can manually apply retention labels from the following locations:

  • Outlook and Outlook on the web

  • OneDrive

  • SharePoint

  • Microsoft 365 groups (both the group site and group mailbox in Outlook on the web)

Use the following sections to understand how to apply retention labels.

Applying retention labels in Outlook

To label an item in the Outlook desktop client, select the item. On the Home tab on the ribbon, click Assign Policy, and then choose the retention label.

Assign Policy button.

You can also right-click an item, click Assign Policy in the context menu, and then choose the retention label. When you select multiple items, you can use this method to assign the same retention label to multiple items at once.

After the retention label is applied, you can view that retention label and what action it takes at the top of the item. If an email has a retention label applied that has an associated retention period, you can see at a glance when the email expires.

Applying a default retention label to an Outlook folder

You can apply retention labels to Outlook folders as a default label that can be inherited by messages in that folder. Right-click the folder, select Properties, the Policy tab, and select the retention label you want to use as that folder's default retention label.

When you use a standard retention label as your default label for an Outlook folder:

  • All unlabeled items in the folder have this retention label applied.

  • The inheritance flows to any child folders and items inherit the label from their nearest folder.

  • Items that are already labeled retain their retention label, unless it was applied by a different default label.

  • If you change or remove the default retention label for the folder: Existing retention labels applied to items in that folder are also changed or removed only if those labels were applied by a default label.

  • If you move an item with a default retention label from one folder to another folder with a different default retention label: The item gets the new default retention label.

  • If you move an item with a default retention label from one folder to another folder with no default retention label: The old default retention label is removed.

When labels are applied that aren't standard retention labels but mark items as records (or regulatory records), these labels can only be manually changed or removed.

Applying retention labels in Outlook on the web

To label an item in Outlook on the web, right-click the item > Assign policy > choose the retention label. Unlike Outlook desktop, you can't use this method if you multi-select items.

Assign policy menu in Outlook on the web.

After the retention label is applied, you can view that retention label and what action it takes at the top of the item. If an email is classified and has an associated retention period, you can know at a glance when the email will expire.

Label assigned to email in Outlook on the web.

As with the desktop version of Outlook on the web, you can also apply retention labels to folders. Right-click the folder, select Assign policy, and change Use parent folder policy to the retention label you want to use as that folder's default retention label.

Applying retention labels in OneDrive and SharePoint

To label a document (including OneNote files) in OneDrive or SharePoint, select the item > in the upper-right corner, choose Open the details paneInformation pane icon. > Apply retention label > choose the retention label.

You can also apply a retention label to a folder or document set, and you can set a default retention label for a document library.

Apply label list for an item in SharePoint.

After a retention label is applied to an item, you can view it in the details pane when that item's selected.

Applied label shown in Details pane.

For SharePoint, but not OneDrive, you can create a view of the library that contains the Labels column or Item is a Record column. This view lets you see at a glance the retention labels assigned to all items and which items are records. Note, however, that you can't filter the view by the Item is a Record column. For instructions how to add columns, see Show or hide columns in a list or library.

Applying retention labels using Microsoft 365 groups

When you publish retention labels to the Microsoft 365 Groups location, the retention labels appear in the SharePoint teams site but aren't supported by any email client for group mailboxes. The experience of applying a retention label in the site is identical to that for documents in SharePoint.

Applying a default retention label to all content in a SharePoint library, folder, or document set

This method requires retention labels to be published to a retention label policy.

In addition to letting people apply a retention label to individual documents, you can also apply a default retention label to a SharePoint library, folder, or document set. In this scenario, documents in that location can inherit your selected default retention label. Although the same label is applied, each document will be retained and deleted separately, according to the start of the retention period setting in the label.

For a document library, the default label configuration is done on the Library settings page for a document library. When you choose the default retention label, you can also choose to apply it to existing items in the library.

For example, if you have a retention label for marketing materials, and you know a specific document library contains only that type of content, you can make the Marketing Materials retention label the default label for all documents in that library.

Apply label option on library Settings page.

Label behavior when you use a default label for SharePoint

For standard retention labels that you apply as a default retention label to a library, folder, or document set:

  • All new, unlabeled items in the container will have this retention label applied.

  • For folders, the inheritance flows to any child folders and items inherit the label from their nearest folder.

  • If you selected the option to apply the default label to existing items: Items that are already labeled retain their retention label, unless it was applied by a different default label.

  • If you change the default retention label for the container: Existing retention labels applied to items in that container are changed only if you selected the option to apply the default label to existing items and those labels were applied by a default label.

  • If you remove the default retention label for the container: Items retain their labels.

  • If you move an item with a default retention label applied from one container to another container: The item keeps its existing default retention label, even if the new location has a different default retention label. Only if you then change the default label for this new location can the moved item inherit the default label from its current location.

When labels are applied that aren't standard retention labels but mark items as records (or regulatory records), these labels can only be manually changed or removed.

Automatically applying a retention label to email by using rules

In Outlook, you can create rules to apply a retention label.

For example, you can create a rule that applies a specific retention label to all messages sent to or from a specific distribution group.

To create a rule, right-click an item > Rules > Create Rule > Advanced Options > Rules Wizard > apply retention policy.

Rules wizard with option to apply retention policies.

Although the UI refers to retention policies, it's your retention labels that display here and can be selected, not your retention policies.

Updating retention labels and their policies

When you edit a retention label or retention label policy, and the retention label or policy is already applied to content, your updated settings will automatically be applied to this content in addition to content that's newly identified.

Some settings can't be changed after the label or policy is created and saved, which include:

  • Names for retention labels and their policies, the scope type (adaptive or static), and the retention settings except the retention period. However, you can't change the retention period when the retention period is based on when items were labeled.
  • The option to mark items as a record.

Deleting retention labels

You can delete retention labels that aren't currently included in any retention label policies, that aren't configured for event-based retention, or mark items as regulatory records.

For retention labels that you can delete, if they have been applied to items, the deletion fails and you see a link to content explorer to identify the labeled items.

However, it can take up to two days for content explorer to show the items that are labeled. In this scenario, the retention label might be deleted without showing you the link to content explorer.

Locking the policy to prevent changes

If you need to ensure that no one can turn off the policy, delete the policy, or make it less restrictive, see Use Preservation Lock to restrict changes to retention policies and retention label policies.

Next steps

Event-based retention is another supported scenario for retention labels. For more information, see the following articles: