How can MS Graph API Get Message List, for a given user and mailbox, using delta retrieve more than 10 messages and sorted by receivedDateTime descending

Zunker, Kent 0 Reputation points
2024-09-19T14:48:09.1233333+00:00

The following query is used in an app-only authentication registered application. The intent is to watch a specific user's mailbox to consume the content and perform an automation.

/users/{userid}/mailFolders({folder})/messages/delta?changeType=created&$select=subject,receivedDateTime

The issue is that when using a delta query there are a few things I have been unable to work around. First, the emails retrieved cannot be sorted by receivedDateTime, the most recent is always returned first. This produces a sequence issue.

Secondly, I am unable to retrieve more than 10 messages per request. This when adding a timer to avoid throttling can significantly increase the processing time of the queue.

Am I missing something related to these items?

Any assistance would be appreciated.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,888 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.