How to increase EWS search-mailboxes results more than 100

11348524 0 Reputation points
2024-10-22T20:08:43.21+00:00

Hello,

I use EWS to perform searches on mailboxes. My account is at discovery management group. When I try to search mailboxes with filter "from:<sender> and subject:'<subject>' " with a mail scope of 500 mailboxes, I only get 100 result. I increased "DiscoveryMaxStatsSearchMailboxes" throttling policy 100 to 500. But still i only get 100 results.

Is there anyone faced and solved this problem?

Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,336 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,576 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,669 questions
Microsoft Exchange
Microsoft Exchange
Microsoft messaging and collaboration software.
564 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Alex Zhang-MSFT 1,675 Reputation points Microsoft Vendor
    2024-10-23T02:50:52.5466667+00:00

    Hello, @11348524,

    Welcome to the Microsoft Q&A platform!

    Based on your description, I understand that you have already adjusted the "DiscoveryMaxStatsSearchMailboxes" throttling policy, but you still failed to adjust the results limit from 100 to 500.

    To solve this problem, please try to perform the following steps.

    1.      Review EWS Limits: Make sure you are aware of all the limits imposed by EWS and adjust your application design accordingly. This includes understanding the default throttling policies and how they apply to your searches.

    2.      Check Throttling Policies: Ensure that other relevant throttling policies are adjusted. For example, the "DiscoveryMaxMailboxes" and "DiscoveryMaxMailboxesResultsOnly" settings might also need to be increased.

    User's image

    3.      Adjust the Search Filter: Modify the search filter by adding a "$top" parameter to your filter query. This parameter specifies the number of items to return in the search results.

    4.      Pagination: Implement pagination in your search queries. This involves breaking down the search into smaller chunks and iterating through the results. You can use the "Paging" property in EWS to handle this.

    For more information about how to achieve these, you can click on EWS throttling in Exchange | Microsoft Learn for reference.

    If the answer is helpful please click on ACCEPT ANSWER as it could help other members of the Microsoft Q&A community who have similar questions and are looking for solutions.

    Thank you for your support and understanding.

    Best Wishes,

    Alex Zhang


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.