Remove Microsoft Information Protection Label from One Drive Files.

Sundram Sontirkey 117 Reputation points
2024-06-18T07:11:39.36+00:00

Hi,

We have got a situation where we need to migrate the OneDrive data to another OneDrive account in different tenant. It is a tenant-to-tenant migration.

Most of the files are MIP labelled, we need to remove these labels from the file before migration.

Please suggest possible ways (PS Script, SDK or any tool etc.) will help here.

Thank you for your answers in advance.

OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
1,153 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,832 questions
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,224 questions
OneDrive Management
OneDrive Management
OneDrive: A Microsoft file hosting and synchronization service.Management: The act or process of organizing, handling, directing or controlling something.
1,278 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA 90,226 Reputation points
    2024-06-18T09:19:28.97+00:00

    @Sundram Sontirkey - Thanks for the question and using MS Q&A platform.

    To remove Microsoft Information Protection (MIP) labels from OneDrive files, you can use the PowerShell module for Azure Information Protection. Here are the steps you can follow:

    1. Install the Azure Information Protection PowerShell module by running the following command in PowerShell as an administrator: Install-Module -Name AzureInformationProtection
    2. Connect to your Azure Information Protection tenant by running the following command: Connect-AipService
    3. The correct cmdlet to remove the Azure Information Protection label from a file is Set-AIPFileLabel with the -RemoveLabel parameter. Here is an example command to remove the label from a specific file:
         Set-AIPFileLabel -Path "C:\path\to\file.docx" -RemoveLabel
      
      And here is an example command to remove the label from all Word documents in a folder:
         Get-ChildItem -Path "C:\path\to\folder" -Filter *.docx | ForEach-Object { Set-AIPFileLabel -Path $_.FullName -RemoveLabel }
      
      This will remove the MIP label from all Word documents in the specified folder.
    4. After removing the MIP label from the files, you can migrate them to the new OneDrive account.

    For more details, refer to Set-AIPFileLabel.

    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.

    1 person found this answer helpful.

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.