MS O365 Outlook Api ambiguity when retrieving emails from emailbox

81 views Asked by At

I currently have wrote an application that retrieves messages from an O365 account and process them to my liking. Currently I have stressed tested this application with up to 150 emails. But I am very uncertain about the Api scalability when my application is processing more than 150 email in my specified folder. For example how about 500 emails? The documentation does not give me a vote of confidence that it will scale that high.

For Example:

    OutlookServicesClient expenseEmailBox = Start_OutLook_Services();
        try
        {
            var Email_Box = expenseEmailBox.Users[emailAccountToUse].Folders[foldertoSearch].Messages.Where(m => m.HasAttachments == true).Expand(m => m.Attachments).ExecuteAsync();

            //what happens to stuff past the current page?
            var messages = Email_Box.Result.CurrentPage;

            foreach (var message in messages.OrderByDescending(m => m.DateTimeReceived))

what happens past the current page? does the current page only load 250? and then it stops reading the emails and drops them ? What is currentpage actually meant to do? The Api doc has no explanation for this.

1

There are 1 answers

0
Mostafa On BEST ANSWER

Actually the API scales as per your subscriptions. You have limited number of requests to execute per day or in other scenarios message, recipient, retentions limits and more. Read more on the link provided and make sure that you do not cross these limitation of your current o365 subscription.

https://technet.microsoft.com/en-us/library/exchange-online-limits.aspx

Hope this helps.