Microsoft Graph retrieve Policy(new feature Office 365 Label) RRS feed

  • Question

  • I noticed we can now Assign policy(Labels in Office 365) to a mail. I want to know if we can retrieve this value for each email using Microsoft Graph using the rest command "". If no, is there any other way to retrieve the value programmatically( example : Outlook API)?
    Wednesday, June 21, 2017 5:56 PM

All replies

  • Hello,

    Outlook Object Model and Outlook JavaScript API don't support Labels in Office 365. Since your issue is related to Office 365 REST API and Office 365 Graph API, I would move this thread into Office 365 for Developers forum.



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Thursday, June 22, 2017 2:23 AM
  • I don't need to get the Office 365 Label value in Office 365 properties, I just need the value of the Label property of each Email. I'm really surprised we can't retrieve this value, because it is not different from any other value that I can get(categories, body, header, etc...). It's just plain text in json and the standard rest api request return everything succefully and easily.... except this(retention policy AKA label).

    • Edited by boby5555 Thursday, June 22, 2017 6:29 PM Edit
    Thursday, June 22, 2017 12:50 PM
  • Hi,

    This is not part of the Microsoft Graph Message API. 

    You can check the documentation for the Office 365 Security & Compliance Center Cmdlets or try the Microsoft Graph (Beta) Policies Endpoint if you can retrieve them.

    Please, let me know if this helps!

    Regards, Sjoukje

    Please remember to click 'Mark as Answer' on the post that helps you.

    Monday, June 26, 2017 1:08 PM
  • Hello,

    Thanks for you help :), but it is not what I expected. Maybe it is my fault and I didn't explain it well. What I need is to retrieve the value shown in the image ("Dossier 3") using Microsoft Graph or Outlook API or anything else :) When you Right Click a message in outlook online, you can assign a policy(Office 365 Label).

    I run the graph command : is the result for this message(As you can notice, the Policy ("Dossier 3") isn't there : 

                "@odata.etag": "W/\"CQAAABYAAAAIJHGo8dB/RqXqa8v9ytj0AAAOuQRW\"",
                "createdDateTime": "2017-06-22T19:24:25Z",
                "lastModifiedDateTime": "2017-06-22T19:24:28Z",
                "changeKey": "CQAAABYAAAAIJHGo8dB/RqXqa8v9ytj0AAAOuQRW",
                "categories": [],
                "receivedDateTime": "2017-06-22T19:24:27Z",
                "sentDateTime": "2017-06-22T19:24:25Z",
                "hasAttachments": false,
                "internetMessageId": "<VI1P193MB0094F722AFEA1ECF50AFCA4ABEDB0@VI1P193MB0094.EURP193.PROD.OUTLOOK.COM>",
                "subject": "Test",
                "bodyPreview": "Test",
                "importance": "normal",
                "parentFolderId": "AAMkADg4MjkxMDFlLWIwOTItNGQ5ZS1hOGU3LTljMWZiNTcwOGFhMAAuAAAAAABa1_NBXsYlQrXDS19kRpaXAQAIJHGo8dB-RqXqa8v9ytj0AAAAAAEJAAA=",
                "conversationId": "AAQkADg4MjkxMDFlLWIwOTItNGQ5ZS1hOGU3LTljMWZiNTcwOGFhMAAQAAxJZ8cIxm1Itk3nQGkpPhg=",
                "isDeliveryReceiptRequested": false,
                "isReadReceiptRequested": false,
                "isRead": true,
                "isDraft": false,
                "webLink": "",
                "inferenceClassification": "focused",
                "body": {
                    "contentType": "html",
                    "content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta content=\"text/html; charset=iso-8859-1\">\r\n<style type=\"text/css\" style=\"display:none\">\r\n<!--\r\np\r\n\t{margin-top:0;\r\n\tmargin-bottom:0}\r\n-->\r\n</style>\r\n</head>\r\n<body dir=\"ltr\">\r\n<div id=\"divtagdefaultwrapper\" dir=\"ltr\" style=\"font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif\">\r\n<p>Test<br>\r\n</p>\r\n</div>\r\n</body>\r\n</html>\r\n"
                "sender": {
                    "emailAddress": {
                        "name": "Charles Simard",
                        "address": "csimard@*****"
                "from": {
                    "emailAddress": {
                        "name": "Charles Simard",
                        "address": "csimard@*****"
                "toRecipients": [
                        "emailAddress": {
                            "name": "Charles Simard",
                            "address": "csimard@*****"
                "ccRecipients": [],
                "bccRecipients": [],
                "replyTo": []

    • Edited by boby5555 Wednesday, June 28, 2017 2:56 PM Edit photo
    Monday, June 26, 2017 3:29 PM
  • Did you ever get an answer on this? I'm trying to get the exact same information. :)

    Scott J. Peterson, MCSD, MCPSB, MCT

    Thursday, May 2, 2019 1:37 PM