EWS - public folder question RRS feed

  • Question

  • This XML works great in retrieving the Firm-Wide public folder. Problem is I'm trying to get the ID for a folder below that one.

    The Firm-Wide folder is here: \\Public Folders -\All Public Folders\Firm-Wide

    What I need is the ID for this one:

    \\Public Folders -\All Public Folders\Firm-Wide\Firm Contact List

    Anyone know how I would go about doing that?


    <soap:Envelope xmlns:soap="" 
    <t:RequestServerVersion Version="Exchange2010"/>
      <FindFolder Traversal="Shallow" xmlns="">
    	  <t:Contains ContainmentMode="ExactPhrase" ContainmentComparison="Exact">
    		 <t:FieldURI FieldURI="folder:DisplayName" />
    		 <t:Constant Value="Firm-Wide" />
        <t:DistinguishedFolderId Id="publicfoldersroot"/>


    Friday, August 12, 2011 4:47 PM

All replies

  • Hi,

    you need to perform the FindItems recursively, using the folderId from the last operation as base for the next operation. In Pseudo-code:

    folderId = PublicFolderRootId

    for reach (folderName in folderNames) {
     folderId = FindFolder(folderName)

    The id of the desired folder is then stored in the folderId variable.

    May I ask why you are using raw XML? For .NET and Java, there is a managed API. (See for the .NET version and for the Java API).

    Kind regards,

    Friday, August 12, 2011 8:05 PM
  • Thanks. I'll see if I can use FindItems using the ID of the parent folder.

    I am using IntApp to submit the xml request rather than .Net or Java.



    Monday, August 15, 2011 11:36 AM