Delta mailbox query not returning all new messages

Meghan Hickey 0 Reputation points
2023-01-17T19:44:26.0233333+00:00

I'm currently building an application that detects when an Outlook mailbox receives new mail. The application starts a delta query against the mailbox and polls every 10 seconds to see if any new mail has come in. The exact query used is /users/<userId>/mailFolders/<folderId>/messages/delta?$select=id,internetMessageId,isRead,from

To test this application, I'm using the sendMessage API to send 20 emails to the Outlook mailbox. I checked the Outlook mailbox using MS 365 online, and all 20 emails appear unread in the mailbox. Frequently, however, the application only receives change notification for 10 of the 20 emails. In 10 test rounds, it received all 20 notifications 20% of the time, and 80% of the time it received notifications for fewer than 20 emails (sometimes 10, sometimes 13 or 14).

Is this expected behavior for the delta query, or could it be a bug? Is there a time limit for how long after a new message is received that the change notification will appear in the delta query? Is there a different or better API I should be using for this application, other than setting up a delta against the mailbox?

I appreciate any help or guidance you can offer!

Outlook
Outlook
A family of Microsoft email and calendar products.
3,319 questions
Microsoft Exchange
Microsoft Exchange
Microsoft messaging and collaboration software.
442 questions
0 comments No comments
{count} votes