How to list mail filtered by createdDateTime with Graph API?

Wei Zhang 20 Reputation points
2023-12-06T09:41:36.63+00:00

Is there anyway to list mail filtered by createdDateTime with Graph API? For example, I want to list mails created in recent 2 days only.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,379 questions
0 comments No comments
{count} votes

Accepted answer
  1. AsithwMSFT 1,420 Reputation points Microsoft Vendor
    2023-12-06T10:44:54.94+00:00

    @Wei Zhang

    You can try filter like this with relevant dates.

    https://graph.microsoft.com/v1.0/me/messages?$filter=createdDateTime ge 2023-11-02T15:30:04Z and createdDateTime le 2023-11-04T15:30:04
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful