How to remove sensitivity labeled into all labeled files in SharePoint and OneDrive?

Paing Hein Kyaw 65 Reputation points
2025-05-26T14:40:08.9933333+00:00

Dear,

I want to ask one question. I have several labeled document files in my SharePoint and OneDrive from Microsoft 365 purview. I want to migrate all these labeled files to another tenant. I can migrate several labeled files, but I can't open them with the target tenant user account. How to remove the sensitivity label from several documents from the old tenant? pls help me.

Microsoft Security | Microsoft Purview
{count} votes

1 answer

Sort by: Most helpful
  1. Smaran Thoomu 24,260 Reputation points Microsoft External Staff Moderator
    2025-05-26T17:19:15.8033333+00:00

    Hi @Paing Hein Kyaw
    To remove sensitivity labels from multiple files in SharePoint and OneDrive before migrating them to another tenant, you need to ensure a few things:

    Why you can't open Labeled Files in the target tenant

    When files are labeled with Microsoft Purview sensitivity labels, especially those that apply encryption, only users in the source tenant (where the labels were applied) can access or decrypt them. This is why the target tenant users are unable to open the files.

    How to Remove Sensitivity Labels in Bulk (Old Tenant)

    You have two main options:

    Option 1: Use PowerShell (Preferred for Bulk Removal)

    • Connect to SharePoint and OneDrive PowerShell Modules:
    • Install the required modules:
        Install-Module -Name Microsoft.Graph -Scope CurrentUser
      
    • Use PowerShell to Loop Through Files: You can write a script using the Microsoft Graph API or Get-PnPListItem to enumerate files and clear the label using Graph or Purview APIs. For example:
        # Connect to Microsoft Graph with required permissions
        Connect-MgGraph -Scopes "Sites.ReadWrite.All", "Files.ReadWrite.All", "InformationProtectionPolicy.ReadWrite.All"
        # Sample logic to remove labels – pseudocode
        # Loop through each document and remove label using Graph
      

    Option 2: Manual Removal (GUI - Limited Scale)

    1. Log in to the source tenant with sufficient rights.
    2. Open each file (from SharePoint or OneDrive) in Word, Excel, PowerPoint, etc.
    3. Go to Sensitivity > None (in the toolbar) and save the file.

      This is only feasible for a small number of files.

    Alternative Approach (If you want to keep Labels)

    If you want to keep the labels but allow access in the target tenant, you would need to:

    • Re-label the files using labels in the new tenant after migration.
    • Or co-author and decrypt the files before migration (manually or via automation).

    If the label applies encryption (Rights Management), simply removing the label won’t decrypt the file. You must decrypt first using Microsoft Purview or via Azure Information Protection SDK.

    For more information Remove sensitivity labels using Microsoft Graph

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

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.