0

When requesting the Outlook REST API with beta version. I retrieve such kind of message, with type IPM.Activity. Is it possible to ignore all these items when crawling the user's mailbox and retrieve only IPM.Note messages?

 {
        "@odata.id": "https://outlook.office365.com/api/beta/Users('458f8df4-4dd6-4b3e-af2e-c37008e81fb3@e2dde5e3-0421-4c8d-a73b-3b3d8c731602')/Messages('AAMkAGFjNWFjMTY1LTdkYzEtNDZlMy1iOWZkLTczNTg5ZTE3NzFjNwBGAAAAAAAFG5if3a7zSbz0iP-P_sW0BwAULJVV6lbSRpmW2SjukgVkAAAAAAENAAAULJVV6lbSRpmW2SjukgVkAAA4xRzIAAA=')",
        "@odata.etag": "W/\"CQAAABYAAAAULJVV6lbSRpmW2SjukgVkAAB+g4Fs\"",
        "Id": "AAMkAGFjNWFjMTY1LTdkYzEtNDZlMy1iOWZkLTczNTg5ZTE3NzFjNwBGAAAAAAAFG5if3a7zSbz0iP-P_sW0BwAULJVV6lbSRpmW2SjukgVkAAAAAAENAAAULJVV6lbSRpmW2SjukgVkAAA4xRzIAAA=",
        "CreatedDateTime": "2014-12-17T18:09:24Z",
        "ReceivedDateTime": null,
        "SentDateTime": null,
        "HasAttachments": false,
        "Subject": "IPM.Activity",
        "Body": {
            "ContentType": "Text",
            "Content": ""
        },
        "BodyPreview": "",
        "Importance": "Normal",
        "Sender": null,
        "From": null,
        "ToRecipients": [],
        "CcRecipients": [],
        "BccRecipients": [],
        "ConversationId": "AAQkAGFjNWFjMTY1LTdkYzEtNDZlMy1iOWZkLTczNTg5ZTE3NzFjNwAQAAKGuN8bc5hFm_1mdu582UM="    }
Benoit Patra
  • 4,355
  • 5
  • 30
  • 53

1 Answers1

-2

Yes you can do this by adding $filter to your query to this endpoint. Here is a reference to the supported queries for MS graph api:

https://msdn.microsoft.com/en-us/library/azure/ad/graph/howto/azure-ad-graph-api-supported-queries-filters-and-paging-options

Mostafa
  • 3,296
  • 2
  • 26
  • 43
  • Can you be more precise, an odata $filter but on which field? – Benoit Patra Feb 15 '16 at 19:42
  • $filter=subject eq 'IPM.Activity' – Mostafa Feb 15 '16 at 19:57
  • i updated the answer with the a link for a reference. hope this helps. – Mostafa Feb 15 '16 at 19:59
  • 2
    It does not look very robust. Are you sure that the MessageId class is always set in the subject? Or your answer is only based on my sample response? Remember that there is a lot of possibilities https://msdn.microsoft.com/en-us/library/office/ff861573.aspx – Benoit Patra Feb 15 '16 at 21:07