简体   繁体   中英

Query reg filter in Microsoft Graph API

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM