question

MarcoSolinas-1816 avatar image
0 Votes"
MarcoSolinas-1816 asked

Receiving already read email as 'deleted' via delta query, and can't read initial mailbox content

Hello all,
I am writing a Java application that is able to (correctly) authenticate via Client Credential Flow. This application accesses a specific, configured mailbox in our organization, to read Mail messages. This operation is done periodically from within a scheduled TimerTask. I am reading the email using delta query, and then navigating through pages in this way:
140824-2021-10-15-10-34-44-start.png

Expected behavior:
1. The application at startup (very first access to the mailbox) can read all emails in the Inbox folder, and a first deltaLink is received with the last page
2. Any new email in the mailbox arrived after the first access is also received by the application in the next polling period, and a new deltaLink is also received with the last page
3. An email already received is not received again, because we use a different deltaLink to query the API in the next polling period

Actual behavior:
1. The application is not able to read the initial snapshot of the Inbox at startup. It does receive a valid deltaLink with the last page (nextPage == null)
2. As expected
3. An email already received, is received again by the application in the next polling period, even if the deltaLink used to query the API is the updated one. Moreover, the Message object received has all fields set as null, except for the id (which is exactly the same String received in the previous polling period) and the additionalDataManager which is populated like: @removed -> {JsonObject@8470} "{"reason":"deleted"}"

Is the above expected?
Thank you in advance
Marco







microsoft-graph-sdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers