How to use Graph/Rest API to listing all sensitive lable in SharePoint

Torres Julie 0 Reputation points
2025-08-14T11:54:59.8166667+00:00

How to use Graph/Rest API to listing all sensitive lable in SharePoint

Thank you

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

1 answer

Sort by: Most helpful
  1. Steven-N 5,575 Reputation points Microsoft External Staff Moderator
    2025-08-14T14:00:56+00:00

    Hi Torres Julie

    Thanks for reaching out to Microsoft Q&A forum support. 

    Based on your description, I understand that you're looking for a way to programmatically list all sensitivity labels applied in SharePoint using either Microsoft Graph API or REST API.   

    This issue centers around accessing sensitivity label metadata for SharePoint content, which is part of Microsoft Information Protection. While REST API does not currently support direct listing of sensitivity labels, Microsoft Graph API (in its beta version) provides endpoints that allow you to retrieve sensitivity labels and inspect labeled content.

    From my perspective view, you can use this HTTP request to listing down all the sensitive label in SharePoint: 

    GET https://graph.microsoft.com/beta/security/informationProtection/sensitivityLabels
    Authorization: Bearer {access_token}
     
    

    Link references: 

    List sensitivityLabels - Microsoft Graph beta | Microsoft Learn 

    sensitivityLabel resource type - Microsoft Graph beta | Microsoft Learn 

    Additionally, I’ve conducted some research and found a discussion on a technology forum that appears to be related to the issue you're experiencing. You can read it at the link below: 

    LINK: azure - How to extract sensitivity label of a sharepoint site? - Stack Overflow 

    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 

    Hope my answer will help you  

    If you have any additional concern, feel free to comment below.


    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. 

    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.