Apply different sensitivity labels on existing files

Chira Diana 0 Reputation points
2023-12-19T13:51:03.91+00:00

I have sites with 2 different document libraries. I want to add different sensitivity labels on these. One has IRM enabled - this needs to have a more restricted label. Can I label existing files with 2 different labels? I was searching for Pnp Powershell to label the most restricted ones and them use the auto labeling in Purview to label the rest.

Microsoft Purview
Microsoft Purview
A Microsoft data governance service that helps manage and govern on-premises, multicloud, and software-as-a-service data. Previously known as Azure Purview.
1,634 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,974 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 34,551 Reputation points Microsoft Employee Moderator
    2023-12-20T06:55:51.9866667+00:00

    Hi Chira Diana ,

    Welcome to Microsoft Q&A platform and thanks for posting your query here.

    Yes, you can label existing files with two different labels. However, you need to make sure that the labels are compatible with each other. For example, if you have a more restricted label that prevents sharing outside the organization, you cannot apply another label that allows sharing outside the organization.

    To label the most restricted files with PnP PowerShell, you can use the Set-PnPSensitivityLabel command. Here is an example:

    Set-PnPSensitivityLabel -List "Restricted Documents" -Identity "Document1.docx" -Label "Confidential"
    

    This command sets the "Confidential" label on the "Document1.docx" file in the "Restricted Documents" library.

    To label the rest of the files using auto labeling in Purview, you can create a sensitivity label policy in the Microsoft 365 compliance center. Here are the high-level steps:

    1. Create a sensitivity label that meets your requirements.
    2. Create a label policy that applies the sensitivity label to the files in the document libraries. (You need multiple label policies only if users need different labels or different policy settings. Aim to have as few label policies as possible—it's not uncommon to have just one label policy for the organization.)
    3. Enable auto labeling for the label policy.

    For more information on creating a sensitivity label policy, you can refer to these documents:

    Create and configure sensitivity labels and their policies

    Apply a sensitivity label to content automatically

    Hope it helps. Thankyou


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.