Ignore non IPM.Note message in Outlook REST API

386 Views Asked by At

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="    }
1

There are 1 best solutions below

4
On

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