[EWS][C#] Find folders in all accounts RRS feed

  • Question

  • Hi all,

    is there a way to find all folders with a specified display name in all exchange accounts on a server? Because if the ImpersonatedUserId is null I get no matches and if it is set, I get only matches from the specified account.



    Wednesday, February 15, 2012 5:33 PM


  • No you cant search across all mailboxes ever operation in EWS is done within the context of 1 particular mailboxes if you don't use Impersonation or Delegation see for a discussion on the difference then you will be accessing the mailbox that belongs to whatever security context your executing the code under. Or if you use Impersonation its the account your impersonating or delegation the account you set in the request but it will only every be that one particular mailbox.

    If you want to search all mailboxes you need to search each mailbox separately with a FindFolders Request.


    • Marked as answer by Stas Gisin Thursday, February 16, 2012 9:54 AM
    Thursday, February 16, 2012 4:13 AM