How to Enable Sensitivity Labels On PDF Using PowerShell?

I am working on a Document Management System where my client asked me to enable sensitivity labels. By default, sensitivity labels work with supported file types like Word, Excel, and PowerPoint. However, they also wanted to apply labels to PDF files.

In this article, I will explain how to enable sensitivity labels for PDFs using PowerShell. Once enabled, you can protect and classify PDFs in the same way as Office files, making your system more secure and compliant.

Enable Sensitivity Labels on PDF Using PowerShell

To enable, we need to run a spo command. Make sure you have the latest version of the SharePoint Online Management Shell installed.

  1. Open the SharePoint Online Management Shell. Run the following PowerShell command to connect:
Connect-SPOService -Url https://<your-tenant>-admin.sharepoint.com
  • Replace <your-tenant> with the name of your tenant.
How to use Microsoft Purview Sensitivity Labels with PDF files
  1. Now run this command to enable Sensitivity Labels for PDFs:
Set-SPOTenant -EnableSensitivityLabelforPDF $true
Enable Sensitivity Labels on PDF using PowerShell

Note: This allows sensitivity label support for PDF files in SharePoint and OneDrive. It may take 15 minutes for the change to take effect.

Apply Sensitivity Labels to PDFs in SharePoint

Once enabled, users can label PDFs:

  1. Open the SharePoint Document library where the PDF is present. Then select it and open the properties pane.
Enable sensitivity labels for pdf files in SharePoint
  1. From the Sensitivity column, choose a label.
How to Enable Sensitivity Labels on PDF using PowerShell

This method extends your system to protect PDFs just like Office files, thereby enhancing overall security.

You may also like the following tutorials:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App