I am trying to get a list of contacts from a contacts folder in microsoft exchange.
the results is only returning a 1000 items even when there is more items in the folder.
Here is my code.
FindFoldersResults r = service.FindFolders(new FolderId(WellKnownFolderName.PublicFoldersRoot), new FolderView(10));
Folder folder = getFolder("test", r.Folders);
ContactsFolder contactsfolder = ContactsFolder.Bind(service, new FolderId(folder.Id.ToString()), new PropertySet(BasePropertySet.IdOnly, FolderSchema.TotalCount));
FindItemsResults<Item> items = folder.FindItems(new ItemView(contactsfolder.TotalCount));
how can I get it to return all the items?
I found this article that describes the EWSFindCountLimit setting that might be causing the limit to 1000 items.
This appears to only apply to Exchange Server 2010.
Throttling Policies and the EWSFindCountLimit
From New-ThrottlingPolicy,
Set-ThrottlingPolicy -Identity <ThrottlingPolicyIdParameter> [-EWSFindCountLimit <UInt32>]