Setting the Category of an Email through an HTTPS PATCH request

Sayyed Babar Ali 21 Reputation points
2020-06-13T12:29:05.13+00:00

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?

PATCH

https://graph.microsoft.com/v1.0/me/mailfolders/inbox/messages?$Id=&"correctidofemail"&$top=1

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
    2020-06-13T15:59:22.617+00:00

    Hello @SayyedBabarAli-3405

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

    Call: PATCH https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/messages/your_message_id

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

    Refer to the screenshot below:

    9925-untitled.png


    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