
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.