0 votes
ago by (230 points)

In the GraphClient, I would like to get the output ordered based on the retrieval date. I have been looking at both GetMessageListAsync() and SearchAsync() and neither of them give me the result I want. They both return the number of records I want and I can order them myself but there is no guarantee that they will give you the most recent messages, they could give you older ones.

According to what I found online, this should be possible using pure odata queries where I could do an orderby. Something like

GET /me/mailFolders('inbox')/messages?$orderby=receivedDateTime%20desc&$top=10

The concept I need this for is mailboxes which have an Inbox folder well over 100k messages. To avoid having to load them all, I would like to load the messages received in the last 10 days or the first 2500 (whatever limit I hit first)

Applies to: Rebex Secure Mail

Please log in or register to answer this question.

...