FindFolder

The FindFolder element defines a request to find folders in a mailbox.

<FindFolder Traversal="Shallow/Deep/SoftDeleted">
   <FolderShape/>
   <IndexedPageFolderView/>
   <Restriction/>
   <ParentFolderIds/>
</FindFolder>
<FindFolder Traversal="Shallow/Deep/SoftDeleted">
   <FolderShape/>
   <FractionalPageFolderView/>
   <Restriction/>
   <ParentFolderIds/>
</FindFolder>

FindFolderType

Attributes and elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description
Traversal
Defines how a search is performed. This attribute is required.

Traversal attribute values

Value Description
Shallow
Instructs the FindFolder operation to search only the identified folder and to return only the folder IDs for items that have not been deleted. This is called a shallow traversal.
Deep
Instructs the FindFolder operation to search in all child folders of the identified parent folder and to return only the folder IDs for items that have not been deleted. This is called a deep traversal.
SoftDeleted
Instructs the FindFolder operation to perform a shallow traversal search for deleted items.

Child elements

Element Description
FolderShape
Identifies the folder properties to include in a FindFolder response.
IndexedPageFolderView
Describes how paged item information is returned in a FindFolder response. This element is optional.
FractionalPageFolderView
Describes where the paged view starts and the maximum number of folders returned in a FindFolder request. This element is optional.
Restriction
Defines a restriction or query that is used to filter folders in a FindFolder operation. This element is optional.
ParentFolderIds
Identifies folders for the FindFolder operation to search.

Parent elements

None.

Remarks

The schema that describes this element is located in the EWS virtual directory of the computer that is running Microsoft Exchange Server 2007 that has the Client Access server role installed.

Example

The following example of a FindFolder request shows how to form a request to find all the folders located in an Inbox.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
  <soap:Body>
    <FindFolder Traversal="Shallow" xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
      <FolderShape>
        <t:BaseShape>Default</t:BaseShape>
      </FolderShape>
      <ParentFolderIds>
        <t:DistinguishedFolderId Id="inbox"/>
      </ParentFolderIds>
    </FindFolder>
  </soap:Body>
</soap:Envelope>

Element information

Element Example
Namespace
http://schemas.microsoft.com/exchange/services/2006/messages
Schema Name
Messages schema
Validation File
Messages.xsd
Can be Empty
False

See also