EWS API : In-Place Archive Folder Item Count Issue.

ritu123 0 Reputation points
2025-01-24T12:30:08.02+00:00

Hi everyone,

I’m working on a C# application using the Exchange Web Services API to retrieve the email count from In-Place Archive folders, including nested ones.

Here’s the code I’m using to get folder Item Count:

Microsoft.Exchange.WebServices.Data.Folder ParentFolder = Folder.Bind(service, FolderName).Result;

Microsoft.Exchange.WebServices.Data.SearchFilter.SearchFilterCollection FilterCollection = new SearchFilter.SearchFilterCollection(LogicalOperator.Or);

FindFoldersResults FoldersResults = ParentFolder.FindFolders(FilterCollection, objFoldView).Result;

Issue: The API response successfully retrieves the folders (no errors or exceptions), but the ItemCount property always returns 0. Even when attempting to retrieve emails directly using the folder ID, the result is still empty.

However, when I check the user's In-Place Archive folder and nested folders manually, emails are present.

Has anyone encountered this issue before, or is there a workaround to retrieve the correct item counts for archive folders?

Thanks,

Ritu Yadav

Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
563 questions
Microsoft Exchange
Microsoft Exchange
Microsoft messaging and collaboration software.
650 questions
{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.