PnP pws sensitive labels for SharePoint sites

Ahmid Zadhli 0 Reputation points
2025-06-13T06:35:13.67+00:00

I have assigned sensitivity labels to SharePoint sites during their creation, and these labels are visible in the SharePoint admin center. However, when I use the Get-PnPTenantSite command from the PnP PowerShell module, the SensitivityLabel property in the output is consistently empty.

How can I retrieve the sensitivity label assigned to a SharePoint site using PnP pws?

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Teddie-D 1,760 Reputation points Microsoft External Staff Moderator
    2025-06-13T11:05:50.28+00:00

    Hi @Ahmid Zadhli
    Thank you for reaching out to the Microsoft Q&A Forum. 

    I understand your frustration with the SensitivityLabel property in Get-PnPTenantSite not being reliably populated when retrieving all sites in bulk. This is a known issue in the PnP PowerShell module [BUG] Get-PnPTenantSite not getting SensitivityLabel property when getting all sites · Issue #1623 · pnp/powershell 

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link 

    However, when you query a specific site using the -Identity parameter, the label is often returned correctly: 

    Get-PnPTenantSite -Identity "https://yourtenant.sharepoint.com/sites/yoursite"
    
    

    Your scenario is similar to the one discussed in this article, which explains how to get the sensitivity label assigned to a site. How to get the sensitivity label assigned to the Site? - Microsoft Q&A 

    I hope this helps! If you have any other questions, feel free to ask. 


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".   

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread 


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.