How to set Sensitivity label defined in Information protection with encryption (access control) to Office 365 Emails programatic way?

Mohankumar Nagarajan 0 Reputation points
2024-06-06T21:44:37.33+00:00

I am looking for public facing document on applySentivityLabel to Emails or any internal Microsoft API endpoint that can be used to apply Sensitivity Label created in purview.

As an interim solution I tried using workaround provided here: https://learn.microsoft.com/en-us/answers/questions/681331/set-sensitivity-label-on-mail-message-using-graph; However this seems to limit only to apply importance label; not to apply custom label with Encryption. In addition I tried following and api returns error


PATCH API - https://graph.microsoft.com/v1.0/me/messages/
Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
4,363 questions
Microsoft Exchange Online
Outlook
Outlook
A family of Microsoft email and calendar products.
3,427 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,445 questions
{count} votes