Microsoft graph api - outlook - Returns 仅最新邮件

Microsoft graph api - outlook - Returns only latest mails

Outlook https://graph.microsoft.com/v1.0/me/messages 的 Microsoft 图 api 不会 return 邮箱中的所有邮件。以及如何在特定时间间隔内获取邮件。

您可以使用 $filter 子句按日期和时间过滤电子邮件。

按日期

GET https://graph.microsoft.com/v1.0/me/messages?$filter=ReceivedDateTime ge 2021-05-07 and receivedDateTime lt 2021-05-10

按日期和时间

GET https://graph.microsoft.com/v1.0/me/messages?$filter=ReceivedDateTime ge 2021-05-07T08:00:00Z and receivedDateTime lt 2021-05-07T12:00:00Z