Setting the Category of an Email through an HTTPS PATCH request

Sayyed Babar Ali 21 Reputation points

I want to send a PATCH request to set the "categories" collection of an email to a value say "XYZ". What's wrong with the following HTTP request in Microsoft Graph Explorer and how can it be corrected?


Request Body:

{"categories": ["XYZ"]}

Generally, the question is how to set the categories of emails in Outlook from an HTTP PATCH request as described above. Is it possible at all? Are there any examples?

Azure Information Protection
Azure Information Protection
An Azure service that is used to control and help secure email, documents, and sensitive data that are shared outside the company.
397 questions
Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
12,705 questions
Azure Queue Storage
Azure Queue Storage
An Azure service that provides messaging queues in the cloud.
68 questions
{count} votes

Accepted answer
  1. AmanpreetSingh-MSFT 55,226 Reputation points

    Hello @SayyedBabarAli-3405

    You can use below patch call to set category of a given message:

    Call: PATCH

    Body: {"categories":["your_category_name"]}

    Refer to the screenshot below:


    Please do not forget to "Accept the answer" wherever the information provided helps you. This will help others in the community as well.

0 additional answers

Sort by: Most helpful