FindFolder

Topic Last Modified: 2007-02-27

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

Syntax

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

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

Type

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="https://schemas.xmlsoap.org/soap/envelope/"
  xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">
  <soap:Body>
    <FindFolder Traversal="Shallow" xmlns="https://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

Namespace

https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name

Messages schema

Validation File

Messages.xsd

Can be Empty

False

See Also

Reference

FindFolder Operation