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.
- 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.

- Now run this command to enable Sensitivity Labels for PDFs:
Set-SPOTenant -EnableSensitivityLabelforPDF $true

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:
- Open the SharePoint Document library where the PDF is present. Then select it and open the properties pane.

- From the Sensitivity column, choose a label.

This method extends your system to protect PDFs just like Office files, thereby enhancing overall security.
You may also like the following tutorials:
- PowerShell Find All Files With Extension
- Hide Return to Classic SharePoint link in SharePoint
- Write to a File without a Carriage Return in PowerShell
- Find Files Older Than a Specific Date using PowerShell

Hey! I’m Bijay Kumar, founder of SPGuides.com and a Microsoft Business Applications MVP (Power Automate, Power Apps). I launched this site in 2020 because I truly enjoy working with SharePoint, Power Platform, and SharePoint Framework (SPFx), and wanted to share that passion through step-by-step tutorials, guides, and training videos. My mission is to help you learn these technologies so you can utilize SharePoint, enhance productivity, and potentially build business solutions along the way.