Reputation: 39
I query emails from my Office 365 mailbox, which are received before a particular date using Microsoft Graph API.
I use following quert : https://graph.microsoft.com/v1.0/users/*email*/mailfolders/Archive/messages?$filter=ReceivedDateTime lt 2020-04-01
I have manually checked the 'Archive' folder and there are many emails which are received before 2020-04-01. Hence the query should provide output.
My application will automatically run this query every 5 min.
While testing, I found that once the app started it run 12 times (1 hour) and gave correct output, however 13th call onwards, all subsequent calls are giving NULL JSON output.
I get following JSON response:
<?xml version = "1.0" encoding = "UTF-8"?>
<ns0:RESTOutput xmlns:ns0 = "xxx">
<StatusCode>200</StatusCode>
<msg></msg>
</ns0:RESTOutput>
Please suggest.
Upvotes: 0
Views: 258
Reputation: 2464
I tested the Graph API call work in MS Graph Explorer and it works without any issue.
API call:
https://graph.microsoft.com/v1.0/users/*email*/mailfolders/Archive/messages?$filter=ReceivedDateTime lt 2020-04-01
Upvotes: 0