0% found this document useful (0 votes)
281 views

Exchange Client Developer

This document provides guidance for developers on which Exchange technologies are supported in current versions of Exchange and Office 365, and recommendations for which technologies to migrate to if an existing technology is no longer supported. It includes tables comparing support for various Exchange development technologies across product versions. The document also provides recommendations for migrating from technologies like ADSI and CDOEX that are no longer supported.

Uploaded by

pcitest123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
281 views

Exchange Client Developer

This document provides guidance for developers on which Exchange technologies are supported in current versions of Exchange and Office 365, and recommendations for which technologies to migrate to if an existing technology is no longer supported. It includes tables comparing support for various Exchange development technologies across product versions. The document also provides recommendations for migrating from technologies like ADSI and CDOEX that are no longer supported.

Uploaded by

pcitest123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5901

Tell us about your PDF experience.

Exchange Online and Exchange


development
Article • 03/29/2023 • 3 minutes to read

Find in-depth developer documentation for Exchange Server, including Exchange Online
as part of Office 365 and Exchange Server on-premises versions.

You can use the how to, get started, new feature, and API reference documentation to
develop tools to access and manage mailbox data from services, websites, desktop
computers, and mobile devices, and to create custom solutions for email, calendar,
contacts, and other items that are stored in Exchange Online or on an Exchange 2010,
2013, 2016, and 2019 server.

You can use Graph API, REST API, Exchange Web Services (EWS), Autodiscover, Outlook
add-ins, or other APIs to develop your applications. This page helps you choose the
right Exchange technology.

7 Note

We’re removing the ability to use Basic authentication in Exchange Online for EWS
beginning October 2022. For more information, see Deprecation of Basic
authentication in Exchange Online. You should use OAuth authentication instead.
Authenticate an EWS application by using OAuth and Authenticate an IMAP, POP
or SMTP connection using OAuth.

Exchange developer content


Use the following table to identify the technology and related API content that will help
you meet your development goals.

) Important

Microsoft Graph is the recommended API to use for accessing Exchange Online
data. New applications designed to access Exchange Online data should use
Microsoft Graph.

If you are building... Start here


If you are building... Start here

A REST-based app to access Exchange Online as part of Office Microsoft Graph REST APIs for
365 mail, calendars, and contacts

A context-sensitive app to display information in Outlook, Outlook add-ins and EWS in


Outlook Web App, or OWA for Devices Exchange

A mailbox client that is not based on the .NET Framework or Explore the EWS Managed API,
Java EWS, and web services in
Exchange

A mailbox client that uses the .NET Framework to access EWS Get started with EWS Managed
API client applications

A mailbox client that uses Java to access EWS EWS Java API on GitHub

An application that customizes the Outlook user interface or Outlook VBA reference
relies on Outlook business logic

An application that targets Exchange Online or Exchange 2013 Migrating to Exchange


that you need to migrate from a previous version of Exchange technologies

A custom management tool that uses Windows PowerShell Exchange Management Shell
from managed code

A solution to back up or restore Exchange data Backup and restore for Exchange

An extension to support accessing messages in the transport Transport agents in Exchange


pipeline

A mailbox client for a mobile device Exchange ActiveSync

Exchange interactions with custom applications


Some of these technologies enable your applications to work with data that is stored in
Exchange, and others are used to manage and control the Exchange server. In many
cases, you can use more than one programming technology or language to accomplish
a task, which makes it possible for you to use the technologies and languages that you
are familiar with. For example, you can set properties on items in the Exchange store by
using the Mail REST API, EWS, or the EWS Managed API.

Exchange interacts with custom applications in a variety of ways, depending on the


application architecture and functionality. At its core, Exchange not only transports
messages, but also maintains mailboxes, executes form-based applications, and more.
Exchange Description
interaction

Message Exchange serves as a standard mail server for applications that send messages.

transport Exchange includes several APIs that transfer messages, including REST, EWS,
and the EWS Managed API.

In addition, applications can use transport agents to respond as messages are


processed and delivered by Exchange.

Mailbox Exchange provides a hierarchical structure of folders, items, and properties for
storage applications that access data stored in mailboxes.

You can access that stored information by using a combination of database


and component object styles.

You can perform queries on the data, and Exchange manages access to the
stored data based on user and store permissions.

Applications that handle mailbox data typically use REST, EWS, or the EWS
Managed API.

Managed Exchange functions as a managed server for applications that manage


enterprise Exchange servers and stores.

server Applications can configure, control, and monitor current activity and the health
of Exchange servers across the organization.

Exchange management applications use the Exchange Management Shell to


manage Exchange servers.

See also
Server API reference for Exchange
Read about Exchange on Office Blogs
Get 101 code samples for Exchange 2013
Get the EWS Managed API (GitHub)
Get support for Exchange Server
Migrating to Exchange technologies
Article • 03/29/2023 • 4 minutes to read

If you're migrating from an earlier version of Exchange, use the information in this article
to find out which development technologies are supported in current product versions,
and which technology to migrate to.

Determine if your technology is available in


current versions
Use the following table to determine whether a development technology is supported in
Exchange Online or Exchange 2019. If the technology is not supported, see Choose a
development technology to migrate to.

Exchange development technologies and product versions

Technology Office 365 Exchange Exchange Exchange Exchange Exchange


and 2019 2016 2013 2010 2007
Exchange
Online

Office 365 APIs X X² X¹ ²


platform
overview

EWS Managed API


X X X X X X

Exchange Web X X X X X X
Services (EWS)

Mail apps for X X X X


Outlook

Outlook Object X X X X X X
Model (OOM)

Exchange X X X X X X
Management Shell

Backup and restore X X X X X

Transport agents
X X X X X
Technology Office 365 Exchange Exchange Exchange Exchange Exchange
and 2019 2016 2013 2010 2007
Exchange
Online

Active Directory X
Services Interface
(ADSI)

Collaborative Data X
Objects for
Exchange (CDOEX)

Collaborative Data X
Objects for
Windows 2000
(CDOSYS)

Exchange OLE DB X
Provider
(EXOLEDB)

Exchange Store X
Event Sinks

Incremental X
Change
Synchronization
(ICS)

Lightweight X
Directory Access
Protocol (LDAP)

Messaging API X X X X X X
(MAPI)

Outlook Web App X X X X


customization

Web Distributed X
Authoring and
Versioning
(WebDAV)

¹REST API and Graph API require the Cumulative Update 3 for Exchange 2016.

²Only hybrid customers are able to take advantage of the REST APIs for both Office 365
and on-premises mailboxes.
Choose a development technology to migrate
to
If the technology your application uses is not supported or deemphasized in Exchange
Online or Exchange 2013, use the following table to decide which technology to migrate
to.

Recommended technology migration paths

Technology Supported in Migrate to More info


Office 365,
Exchange
Online, and
Exchange
2019?

ADSI Yes, but Exchange None.


deemphasized Management
Shell

CDOEX No EWS The EWS Managed API and EWS can access the
Managed API same Exchange store that CDOEX provides.
or EWS
Unlike client applications built by using CDOEX,
you can run EWS applications on a local or
remote computer.

CDOEXM No
Exchange Exchange Management Shell commands control
Management Exchange servers, storage groups, databases,
Shell
and users more simply than the corresponding
CDOEXM APIs. Plus, you can easily migrate your
CDOEXM applications to Exchange
Management Shell commands.

CDOSYS
No
Transport Use transport agents for notification-based
agents applications that work with versions of
Exchange starting with Exchange 2010.

CDOSYS is included in current versions of


Windows. The functionality in CDOSYS is
available in the .NET Framework.

CDOWF No Windows You can use WWF to create advanced workflow


Workflow applications that work with Exchange 2007.
Foundation
(WWF)

Technology Supported in Migrate to More info


Office 365,
Exchange
Online, and
Exchange
2019?

ExOLEDB No EWS The EWS Managed API and EWS provide the
Managed API same access to the Exchange store that
or EWS
ExOLEDB provides. Unlike client applications
built by using ExOLEDB, You can run EWS
applications on a local or remote computer.

ICS Yes, but EWS You can use the EWS Managed API or EWS to
deemphasized Managed API subscribe to notifications and synchronize
or EWS
mailbox data.

LDAP Yes, but Exchange None.


deemphasized Management
Shell

MAPI Yes, but Office 365 Although MAPI is currently a supported


deemphasized APIs development technology, you will eventually
platform have to redesign your MAPI applications to use
overview, a newer technology.

EWS
Managed If your MAPI application is performing simple
API, EWS
read, write, and update operations on mail,
calendar, or contact objects, and targets Office
365, Exchange 2019² or Exchange 2016¹ ² you
can use the Office 365 REST APIs for mail,
calendars, and contacts.

If you are targeting Exchange on-premises and


you need to access all the properties that MAPI
can access, you can use the EWS Managed API
or EWS and either schematized properties or
extended properties .

NOTE: The ExtendedPropertyDefinition class


provides access to MAPI from the EWS
Managed API, and the ExtendedFieldURI
element provides access to MAPI properties
from EWS.

Outlook Web No Mail apps


None.
App
customization
Technology Supported in Migrate to More info
Office 365,
Exchange
Online, and
Exchange
2019?

Store event No EWS You can use the EWS Managed API or EWS to
sinks Managed API subscribe to notifications and synchronize
or EWS
mailbox data.

The notifications in EWS provide the same


access to the Exchange store that store event
sinks provide. You can use Visual Studio tools to
streamline the development of store event-
aware client applications that use EWS.

Streaming No Volume None.


backup and Shadow
restore Copy Service
(VSS) writer

WebDAV No Office 365 If your WebDAV application is performing


APIs simple read, write, and update operations on
platform mail, calendar, or contact objects, and you will
overview, be targeting Office 365, Exchange 2019² or
EWS Exchange 2016¹ ² you can use the Office 365
Managed API REST APIs for mail, calendars, and contacts.

or EWS

Otherwise, if you are targeting Exchange on-


premises and you need access to the same
properties in the Exchange store that WebDAV
provides, use the EWS Managed API or EWS.

WebDAV No EWS You can use the EWS Managed API or EWS to
notifications Managed API subscribe to notifications.
or EWS

Web forms No ASP.NET


Switch to ASP.NET and update applications to
access mailbox and server information by using
EWS.

WMI No Exchange None.


providers Management
Shell

¹REST API and Graph API require the Cumulative Update 3 for Exchange 2016.

²Only hybrid customers are able to take advantage of the REST APIs for both Office 365
and on-premises mailboxes.
See also
Selecting an API or technology for developing solutions for Outlook
On-Premises Architectural Requirements for the REST API
Explore the EWS Managed API, EWS,
and web services in Exchange
Article • 06/14/2022 • 2 minutes to read

Use the EWS Managed API, EWS, Autodiscover, and other web services in Exchange to
create solutions for managing business email, calendar, and contacts on desktop and
mobile devices and online.

Exchange provides Exchange web services (EWS) and other web services that you can
use to implement client applications that access and manage Exchange store items.

7 Note

The terms specified in the License information topic apply to your use of this
content. Please review the terms carefully.

Create EWS Managed API, EWS, and web


services solutions
Use the following table to find to the content that will help you learn about and work
with the EWS Managed API, EWS, and web services in Exchange.

If you want to... Start here

Get started with your first .NET Framework EWS client Get started with EWS Managed API
application. client applications

Get started with your first EWS client application. Get started with EWS client
applications

Find out about the latest new features in the EWS What's new in EWS in Exchange

Managed API and EWS.

Learn the fundamentals of web service development with Start using web services in Exchange

Exchange.

Check out some EWS Managed API code samples. Exchange 2013: 101 Code Samples

Find design guidance for EWS Managed API and EWS EWS client design overview for
applications. Exchange

If you want to... Start here

Find how-to information and code examples for the EWS Develop web service clients for
Managed API and EWS. Exchange

Find reference material. Web services reference for Exchange

See also
Sign up for an Exchange Online and Office 365 Developer Site
What's new in EWS and other web services
in Exchange
Article • 01/15/2020 • 7 minutes to read

Find out what's new in EWS and web services in Exchange and the EWS Managed API.

Web services in Exchange have been updated to include new features.

Table 1. New web service features in Exchange Online, Exchange 2013, and the EWS Managed
API

Feature Implemented in Implemented in Implemented in the EWS


Exchange Online Exchange 2013 Managed API

eDiscovery
Yes Yes Yes

Archiving
Yes Yes Yes

Personas
Yes Yes No

Unified Contact Store


Yes Yes No

Retention policies
Yes Yes Yes

User photos
Yes Yes No

Mail apps for Outlook Yes Yes Yes


management

Propose new meeting Yes No No


time

eDiscovery in EWS
eDiscovery is a federated query web service that enables external applications, such as
SharePoint 2013, to perform queries of Exchange data. Discovery consists of several phases,
including identifying and preserving key data, culling down and reviewing the data, and
producing data in court. eDiscovery queries facilitate the discovery process by providing a single
discovery workflow across Exchange and SharePoint.

Table 2. EWS operations and EWS Managed API methods for working with eDiscovery

Operation name EWS Managed API method Description


Operation name EWS Managed API method Description

GetDiscoverySearchConfiguration ExchangeService.GetDiscoverySearchConfiguration() Gets configuration


operation
information for in-
place holds, saved
discovery searches,
and the mailboxes
that are enabled for
discovery search.

GetHoldOnMailboxes ExchangeService.GetHoldOnMailboxes()
Gets the status of a
operation
query-based hold,
which is set by using
the
SetHoldOnMailboxes
operation.

GetNonIndexableItemDetails ExchangeService.GetNonIndexableItemDetails()
Gets details about
operation
items that cannot be
indexed. This
includes, but is not
limited to, the item
identifier, an error
code, an error
description, when an
attempt was made to
index the item, and
additional
information about
the item.

GetNonIndexableItemStatistics ExchangeService.GetNonIndexableItemStatistics()
Gets the count of
operation
items that cannot be
indexed in a mailbox.

GetSearchableMailboxes ExchangeService.GetSearchableMailboxes()
Gets a list of
operation
mailboxes that the
client has permission
to search or perform
eDiscovery on.

SearchMailboxes operation
ExchangeService.SearchMailboxes()
Searches for items in
specific mailboxes
that match query
keywords.

SetHoldOnMailboxes ExchangeService.SetHoldOnMailboxes()
Sets a query-based
operation
hold on items.

Archiving in EWS
Archive mailboxes are secondary mailboxes that are associated with a user. Archive mailboxes
are typically used to manage email storage limits. For example, older email items might
periodically be moved from the Inbox to the archive mailbox.

Exchange introduces two new EWS operations that you can use to archive a set of mail items
from a primary mailbox. Archiving Inbox items in this way preserves the folder hierarchy of the
items. In addition, archive mailboxes can now be stored either locally on a client, or remotely, in
a way that is mostly opaque to a user, by using a folder path to point to the contents of the
archive.

Table 3. EWS operations and EWS Managed API methods for working with archiving

Operation name EWS Managed API method Description

ArchiveItem ExchangeService.ArchiveItems() Moves an item from the primary mailbox to


operation
the archive mailbox.

CreateFolderPath Not implemented. Creates a folder hierarchy in a primary or


operation
archive mailbox.

Personas in EWS
A persona is a collection of data that is associated with an individual. The data can come from
one or more sources and is associated with the persona by means of a common link ID.
Personas in EWS enable you to link, search, browse, and retrieve information about a person
from multiple sources and organize that information into a single logical entity. Personas differ
from contacts in that a contact is a collection of data from a single source that is associated with
an individual; for example, a personal Outlook contact or an entry in a global address list (GAL).

The EWS Managed API does not implement this functionality.

7 Note

The Unified Contact Store also exposes persona functionality by means of the operations
that support that feature.

Table 4. EWS operations for working with personas

Operation name Description

FindPeople Returns all persona objects from a specified contact folder or retrieves all contacts that
operation
match a specified query string.

GetPersona Retrieves a persona.


operation

Unified Contact Store in EWS


The Unified Contact Store is a feature that provides a consistent contact experience across Office
products and acts as an integration point for third-party applications to use the same contact
store. It allows users and applications to store, manage, and access contact information and
make it available globally among Lync, Exchange 2013, Outlook, Outlook Web App and any
other application that implements access to the Unified Contact Store. Exchange is the contact
store for the Unified Contact Store experience.

The EWS Managed API does not implement this functionality.

Table 5. EWS operations for working with the Unified Contact Store

Operation name Description

AddNewImContactToGroup Adds a new IM contact to a group. The Unified Contact Store can
operation
contain a maximum of 1000 contacts.

AddImContactToGroup operation
Adds an existing IM contact to a group. The Unified Contact Store
can contain a maximum of 1000 contacts.

AddImGroup operation
Adds a new IM group. The Unified Contact Store can contain a
maximum of 64 groups.

AddNewTelUriContactToGroup Adds a new contact to a group based on a contact's phone


operation
number.

AddDistributionGroupToImList Adds a new distribution list group. The Unified Contact Store can
operation
contain a maximum of 64 groups.

GetImItemList operation
Retrieves a list of IM groups and IM contact personas.

GetImItems operation
Retrieves information about the specified IM groups and IM
contact personas.

RemoveContactFromImList Removes the specified contact from all IM groups.


operation

RemoveImContactFromGroup Removes an IM contact from a group.


operation

RemoveDistributionGroupFromImList Removes the specified IM distribution list group.


operation

RemoveImGroup operation
Removes the specified IM group.

SetImGroup operation
Changes the display name of a group.

Retention policies in EWS


Retention policies are policies that are used in Exchange to group one or more retention tags, to
apply retention settings to folders or individual items such as email and voice mail messages,
and to apply retention settings to a mailbox.

Exchange includes three types of retention tags:

Default policy tags that apply to mailbox items that have no other type of retention tag
applied.

System folder policy tags that are applied to default folders such as the Inbox.

Personal tags that a user can apply to folders they create or to individual items.

Only one retention policy can be assigned to a mailbox, but the policy can have one or more
retention tags of various types linked to it. Retention tags can be linked to or unlinked from a
retention policy at any time. EWS in Exchange exposes a new operation,
GetUserRetentionPolicyTags , and the EWS Managed API implements a new method,
ExchangeService.GetUserRetentionPolicyTags() , that provides a list of all the tags that are
linked to a retention policy. You can set and retrieve retention policy tags for items and folders
by using the CreateItem, CreateFolder, UpdateItem, UpdateFolder, GetItem, and GetFolder
operations.

Requesting user photos


You can request user photos from the Exchange server by using one of the two implementations
of the GetUserPhoto operation : REST or SOAP. The REST endpoint uses a standard HTTPS GET
request to get the user photo. The service will either return a user photo stored in Exchange or a
photo from Active Directory Domain Services (AD DS).

The EWS Managed API does not implement this functionality. You can, however, use the EWS
Managed API to return user photos that are stored in a mailbox by getting the photo that is
attached to a contact.

Block senders and mark email as junk in EWS


You can now block senders and mark email as junk by using the new MarkAsJunk operation in
EWS or the ExchangeService.MarkAsJunk() method in the EWS Managed API.

Mail apps for Outlook


EWS now includes support for managing mail apps for Outlook.

Table 6. EWS operations and EWS Managed API methods for working with mail apps for
Outlook

Operation name EWS Managed API method Description

DisableApp operation
ExchangeService.DisableApp()
Disables an installed app.
Operation name EWS Managed API method Description

GetAppManifests operation
ExchangeService.GetAppManifests()
Gets the app manifests for
a mailbox.

GetAppMarketplaceUrl ExchangeService.GetAppMarketplaceUrl() Gets the app marketplace


operation
URL.

GetClientAccessToken ExchangeService.GetClientAccessToken()
Gets client access tokens.
operation

InstallApp operation
ExchangeService.InstallApp()
Installs an app for a
mailbox.

UninstallApp operation
ExchangeService.UninstallApp
Uninstalls an app from a
mailbox.

Propose new meeting time


The propose new time feature was introduced in version 15.00.0800.007 of Exchange. This allows
meeting attendees to propose new meeting times to the meeting organizer.

The EWS Managed API does not implement this functionality.

See also
Explore the EWS Managed API, EWS, and web services in Exchange
EWS client design overview for Exchange
Mail apps for Outlook and EWS in Exchange
Archiving in EWS in Exchange
eDiscovery in EWS in Exchange
People and contacts in EWS in Exchange
Start using web services in Exchange
Article • 01/15/2020 • 3 minutes to read

Find information to help you get started with EWS and other web services in Exchange.

The web services in Exchange provide access to mailbox data stored in Exchange Online,
Exchange Online as part of Office 365, and on-premises versions of Exchange starting
with Exchange Server 2007, and enable you to create custom applications that you can
use to manage that information according to the requirements of your organization.
While the range of EWS and web service applications that you can create is practically
infinite, certain fundamental concepts apply for any type of application. This section
provides information about the fundamental concepts you need to be familiar with in
order to start using EWS and other web services in Exchange.

Build your knowledge


Whether you use the .NET Framework or another platform to develop your web service
application, you will want to understand some important concepts before you begin
your development project.

Table 1. Web services concepts

Concept Summary

Architecture
Learn about how EWS works within the Exchange architecture and the
protocols it uses.

EWS application Find out about the most common types of applications that you can create
types
by using EWS in Exchange.

EWS access
Exchange administrators can limit access to EWS globally for the entire
organization, for individual users, and to individual applications. Find out
which access level is right for you.

Setup
Find information about the tasks you need to complete in order to create
applications that use the EWS Managed API or EWS to communicate with
Exchange.

Authentication
Learn about the authentication options for connecting to Exchange Online
and Exchange on-premises.

Autodiscover
Learn about the set of services that you can use to discover the URL
endpoint where a user's account can access information via EWS.
Concept Summary

Mailbox server
Find out about the primary repository of information made available to an
EWS client. EWS has access to a limited set of information stored in Active
Directory Domain Services (AD DS).

Mail apps for Find information about mail apps for Outlook and how they work with
Outlook and EWS
EWS in Exchange.

Office 365 REST APIs Learn about the Office 365 APIs that you can use to access mail, calendars,
for mail, calendars, and contacts in Exchange Online as part of Office 365.
and contacts

The EWS Managed Find information about the preferred client API for .NET Framework
API
developers.

EWS
Find information about creating your first application by using EWS XML
requests and responses.

EWS functionality in Find out what EWS functionality is available in version of Exchange.
Exchange product
versions

Trace and Find out how to trace EWS requests and responses in order to
troubleshoot
troubleshoot errors in your EWS Managed API application.

Create your first application


If you're ready to get to the business of writing your first .NET Framework or EWS client
application, see Get started with EWS Managed API client applications or Get started
with EWS client applications.

Get code samples


To find code samples and examples that show you how to work with EWS and other web
services in Exchange, see the following resources:

Exchange code samples

CodePlex

Exchange API documentation

Exchange Development forum

Many other samples are available in blogs, code demonstration sites, and forums. We
also recommend that you download the EWSEditor . This project implements most of
the EWS functionality; you can find examples of all the core EWS functionality here.

If you're not a .NET Framework developer, you can find many client libraries out there
for EWS development that use Java, Python, PHP, and other languages.

Ask questions and solve problems


Need help getting things done and you're not finding answers? You can search the
Exchange Development forum to find out whether someone else has encountered
and resolved the same issue. A community of contributors have answered hundreds of
questions about Exchange development. You can also find third-party sites, forums, and
blogs that cover Exchange development and might have the solution you're looking for.

Contact Microsoft support if you need additional assistance. The Exchange Developer
support team is staffed with seasoned professionals who can help answer your
questions about Exchange development.

See also
Explore the EWS Managed API, EWS, and web services in Exchange
EWS client design overview for Exchange
Develop web service clients for Exchange
Web services reference for Exchange
EWS applications and the Exchange
architecture
Article • 01/18/2019 • 6 minutes to read

Learn about how EWS works within the Exchange architecture, and find out which
protocols EWS relies on.

Exchange Web Services (EWS) is a cross-platform API that enables applications to access
mailbox items such as email messages, meetings, and contacts from Exchange Online,
Exchange Online as part of Office 365, or on-premises versions of Exchange starting
with Exchange Server 2007. EWS applications can access mailbox items locally or
remotely by sending a request in a SOAP-based XML message. The SOAP message is
embedded in an HTTP message when sent between the application and the server,
which means that as long as your application can post XML through HTTP, it can use
EWS to access Exchange.

Exchange architecture overview


The following diagrams show the authentication methods and communication paths
used by EWS applications when communicating with Exchange 2013 and Exchange
Online. From the EWS application perspective, the communication paths are identical
and the authentication methods only vary slightly; the main difference is the visibility
you have into the Exchange backend.

Figure 1. EWS application and the Exchange on-premises architecture


Figure 2 shows the same communication paths shown in Figure 1, as used by EWS
applications when communicating with Exchange Online.

Figure 2. EWS application and the Exchange Online architecture


The following are the components that are shown in the diagrams:

1. EWS application — This can be a client, portal, or service application and it can be
installed on a client or on an Exchange on-premises Client Access server. If you use
the EWS Managed API to develop the EWS application, the EWS Managed API
assemblies have to be installed on the client and redistributed by your application.

2. The SOAP XML message — An XML message, in a SOAP envelope, embedded in


an HTTP/S message that conforms to the Services.wsdl file on the Client Access
server. HTTPS is recommended for Exchange on-premises and is required for
Exchange Online.

3. Authentication methods — EWS messages include basic, NTLM (Windows


Integrated authentication), or OAuth authentication information as part of the
HTTP payload.

4. Load balancer — The load balancer distributes the message to a Client Access
server in the Client Access server array. This component is only visible in the
Exchange on-premises architecture.

5. Client Access server array — Client Access servers are organized into a load-
balanced group called a Client Access server array. Individual Client Access servers
provide authentication, limited redirection, and proxy services. The Client Access
servers themselves don't do any data rendering, and no data is queued or stored
on a Client Access server - it is thin and stateless; it simply authenticates the
request, performs an Autodiscover lookup, and then proxies the request to the
Mailbox server. The Client Access server does maintain a 1:1 relationship with the
Mailbox server that hosts the user's data. The HTTP protocol (secured via SSL using
a self-signed certificate) is used between the Client Access server and Mailbox
server. This component is only visible in the Exchange on-premises architecture.

6. Autodiscover service — The Autodiscover service performs a service discovery by


accessing Active Directory Domain Services (AD DS) to retrieve the mailbox version
and the location of the Mailbox server that is hosting the active copy of the user's
data.

7. EWS service —The EWS service is described by three files: Services.wsdl,


Messages.xsd, and Types.xsd, as well as the EWS Managed API assemblies.
Services.wsdl describes the contract between the client and server, Messages.xsd
defines the request and response SOAP messages, and Types.xsd defines the
elements used in the SOAP messages. Messages.xsd and Types.xsd always contain
the latest versions of the schema, although earlier versions of the schema exist.
Note that Services.wsdl, Messages.xsd, and Types.xsd are made available on the
Client Access server, but are not actually used for schema validation — they are
provided for reference only. The EWS Managed API assemblies are provided for
server-side EWS client applications and are deployed on all Exchange Server roles,
not just the Client Access servers. This component is only visible in the Exchange
on-premises architecture.

Feature availability is based on the EWS schema version that your application
targets. Because EWS schemas are backward- and forward-compatible, if you
create an application that targets an earlier schema version, such as Exchange 2007
SP1, your application will also work against a later schema version, such as the
Exchange 2010 SP2 service, as well as Exchange Online. Because features and
feature updates are driven by the schema, we recommend that you use the earliest
common code base that targets the EWS features that you want to implement in
your client application. Many applications can target the Exchange2007_SP1
version, because the Exchange 2007 SP1 schema contains almost all the core
Exchange functionality for working with items and folders in the Exchange store.
For more information, see EWS client features.

8. Database Availability Group (DAG) — Mailbox servers are organized into a highly
available DAG, which can be deployed in one or more datacenters. The Mailbox
server contains the mailbox database and handles all activity for the active
mailboxes on that server. All components that process, render, and store data are
on the Mailbox server. Clients do not connect directly to the Mailbox server; all
connections are handled by the Client Access server. This component is only visible
in the Exchange on-premises architecture.

9. Exchange Online and Exchange Online as part of Office 365 — The hosted
messaging solution that delivers Exchange features as a cloud-based service.

When an EWS application requests information from the Exchange store, an XML
request message that complies with the SOAP standard is created and sent to the
Exchange server. When the Exchange server receives the request, it verifies the
credentials that are provided by the client and automatically parses the XML for the
requested data. The server then builds a SOAP response that contains XML data that
represents the requested strongly typed objects and their properties. The XML data is
sent back to the application in an HTTP response. The application then deserializes the
XML and uses the data to reform the strongly typed objects.

Protocols and standards that EWS applications


must support
To communicate with an Exchange server, EWS applications must support the following
protocols and standards.

Table 1. Protocols

Protocol How it's used

HTTP/S Enables EWS applications to access Exchange database data over the network,
regardless of whether the client is on the Internet or intranet.

SOAP 1.0 Forms an envelope around the messaging payload. EWS implements the SOAP
protocol by using different parts of the SOAP envelope to enable different
functionality. The SOAP header is used for impersonation and to provide versioning
data. The SOAP body provides information about the operation to run and the data
that is submitted to the operation. SOAP relies on WSDL to describe the operations to
call.

WSDL 1.0 Describes the bindings, the operations, and the properties that are used to call EWS
operations, in the Services.wsdl file. This file, along with the referenced schema files,
comprises the contract between an EWS application and the Exchange server, and is
often used along with vendor-specific tools to create platform-specific applications.
The WSDL file is located in the EWS virtual directory, which is at the root of the
website.
Protocol How it's used

Transport Provides secure web communications on the Internet or on intranet. TLS enables
Layer applications to authenticate servers or, optionally, servers to authenticate EWS
Security applications. It also provides a security channel by encrypting communications. TLS is
(TLS)/SSL the latest version of the Secure Sockets Layer (SSL) protocol.

XML/XSD Provides a universal message format for the exchange of information between the
Exchange server and the client. XML provides complex Exchange database data to
client applications, but in a defined structure. The beauty of XML is that it allows for
the exchange of data even when an EWS application and server do not share a
common platform.

In addition, EWS applications must support the following authentication standards:

Basic authentication over SSL, for applications that target Exchange Online or
Exchange on-premises.

NTLM authentication over SSL, for applications that support Exchange on-
premises.

OAuth 2.0 token authentication, for trusted partner applications and


interoperability with Lync Server 2013 and SharePoint Server 2013.

See also
Start using web services in Exchange

EWS application types

EWS client design overview for Exchange


EWS application types
Article • 01/18/2019 • 2 minutes to read

Find out about the most common types of applications that you can create by using
EWS in Exchange.

The EWS and Exchange architecture provides a uniform development model that you
can use to create the most common types of applications in a consistent way, including
the following:

Client applications — Standalone applications that use EWS to access Exchange


data. Outlook and Outlook Web App are examples of client applications.

Portal applications — Applications that extend an existing web page by including


information retrieved from Exchange, such as free/busy or contact information. A
SharePoint web part that retrieves Exchange data is an example of a portal
application.

Service applications — Background jobs used to integrate or synchronize data


from Exchange into an existing system. For example, an application that
synchronizes contact information from Exchange into a CRM application.

Each of these application models can use a common code base to retrieve information
from Exchange - so you don't need to change the EWS code used to retrieve item
information between a client, portal, or service application. What might change from
one application to the next is the mailbox access and authentication mechanism. For
example, client applications commonly use direct user access and basic or NTLM
authentication, whereas a service application likely uses impersonation for mailbox
access and OAuth authentication.

Client applications
An EWS client application is any standalone application that uses EWS to retrieve
information from the Exchange store. EWS client applications use direct client access or
delegate access to retrieve data from the mailbox store. The following are some
examples of client applications that use EWS:

Outlook, in features such as MailTips, availability, and user OOF status

OWA for Devices

Outlook for Mac 2011


Lync, for availability information

Client applications commonly use direct access and basic or NTLM authentication, so
that users are limited to accessing information in their own mailbox with their own
logon credentials. Client applications should also support delegate access for users who
have been given permission to access another user's mailbox.

Portal applications
A portal application extends an existing web page or portal to include Exchange mailbox
information as a personalized component of the page. SharePoint web parts are the
most common portal applications and provide users with a personalized experience by
providing views into Exchange mailbox data, such as unread messages, most recent
messages, and calendar events, alongside their commonly viewed SharePoint portal
page. EWS portal applications can use direct client access, delegate access, or
impersonation to retrieve data from the mailbox store. Because Exchange 2013 and
SharePoint 2013 both support the OAuth authorization protocol for server-to-server
authentication, OAuth provides the most seamless and secure authentication method.

Service applications
A service application is usually a background job built into an existing application that
extends to Exchange to correlate data between the system and the Exchange store.
Service applications typically do not have a user interface and use impersonation or
OAuth for authentication and access. Creating a service account to impersonate users is
common in EWS service apps because you can grant a single account permission to
impersonate a set of users and perform mailbox operations for those accounts. For
example, an EWS service application can synchronize data between marketing lists in a
CRM solution and Exchange distribution groups by using a service account and
impersonation.

See also
Start using web services in Exchange

EWS applications and the Exchange architecture

EWS client design overview for Exchange


Get started with EWS Managed API
client applications
Article • 03/04/2022 • 9 minutes to read

Develop a simple Hello World email client application for Exchange by using the EWS
Managed API.

The EWS Managed API provides an intuitive, easy-to-use object model for sending
and receiving web service messages from client applications, portal applications, and
service applications. You can access almost all the information stored in an Exchange
Online, Exchange Online as part of Office 365, or an Exchange server mailbox by using
the EWS Managed API. You can use the information in this article to help you develop
your first EWS Managed API client application.

7 Note

We’re removing the ability to use Basic authentication in Exchange Online for EWS
beginning October 2022: Deprecation of Basic authentication in Exchange Online.
You should use OAuth authentication instead. Authenticate an EWS application by
using OAuth

7 Note

The EWS Managed API is now available as an open source project on GitHub .
You can use the open source library to:

Contribute bug fixes and enhancements to the API.


Get fixes and enhancements before they are available in an official release.
Access the most comprehensive and up-to-date implementation of the API, to
use as a reference or to create new libraries on new platforms.

We welcome your contributions on GitHub.

You'll need an Exchange server


If you already have an Exchange mailbox account, you can skip this section. Otherwise,
you have the following options for setting up an Exchange mailbox for your first EWS
client application:
Get an Office 365 Developer Site (recommended). This is the quickest way for
you to set up an Exchange mailbox.

Download Exchange Server .

After you have verified that you can send and receive email from Exchange, you are
ready to set up your development environment. You can use the Exchange web client
Outlook Web App to verify that you can send email.

Set up your development environment


Make sure that you have access to the following:

Any version of Visual Studio that supports the .NET Framework 4. Although
technically, you don't need Visual Studio because you can use any C# compiler, we
recommend that you use it.

The EWS Managed API . You can use either the 64-bit or 32-bit version,
depending on your system. Use the default installation location.

Create your first EWS Managed API application


These steps assume that you set up an Office 365 Developer Site. If you downloaded
and installed Exchange, you will need to install a valid certificate on your Exchange
server or implement a certificate validation callback for a self-signed certificate that is
provided by default. Also note that these steps might vary slightly depending on the
version of Visual Studio that you are using.

Step 1: Create a project in Visual Studio


1. In Visual Studio, on the File menu, choose New, and then choose Project. The New
Project dialog box opens.

2. Create a C# Console Application. From the Templates pane, choose Visual C#, and
then choose Console Application.

3. Name the project HelloWorld, and then choose OK.

Visual Studio creates the project and opens the Program.cs code document window.

Step 2: Add a reference to the EWS Managed API


1. If the Solution Explorer window is already open, skip this step and proceed to step
2. To open the Solution Explorer window, on the View menu, choose Solution
Explorer.

2. In the Solution Explorer and the HelloWorld project, open the shortcut menu
(right-click) for References and choose Add Reference from the context menu. A
dialog box for managing project references will open.

3. Choose the Browse option. Browse to the location where you installed the EWS
Managed API DLL. The default path set by the installer is the following: C:\Program
Files\Microsoft\Exchange\Web Services<version>. The path can vary based on
whether you download the 32 or 64 bit version of the
Microsoft.Exchange.WebServices.dll. Choose Microsoft.Exchange.WebServices.dll
and select OK or Add. This adds the EWS Managed API reference to your project.

4. If you are using EWS Managed API 2.0, change the HelloWorld project to target
the .NET Framework 4. Other versions of the EWS Managed API might use a
different target version of the .NET Framework.

5. Confirm that you are using the correct target version of the .NET Framework. Open
the shortcut menu (right-click) for your HelloWorld project in the Solution
Explorer, and choose Properties. Verify that the .NET Framework 4 is selected in
the Target framework drop-down box.

Now that you have your project set up and you created a reference to the EWS
Managed API, you are ready to create your first application. To keep things simple, add
your code to the Program.cs file. Read Reference the EWS Managed API assembly for
more information about referencing the EWS Managed API. In the next step, you will
develop the basic code to write most EWS Managed API client applications.]

Step 3: Set up URL redirection validation for Autodiscover


Add the following redirection validation callback method after the Main(string[]
args) method. This validates whether redirected URLs returned by Autodiscover
represent an HTTPS endpoint.

C#

private static bool RedirectionUrlValidationCallback(string


redirectionUrl)

// The default for the validation callback is to reject the URL.

bool result = false;


Uri redirectionUri = new Uri(redirectionUrl);

// Validate the contents of the redirection URL. In this simple


validation

// callback, the redirection URL is considered valid if it is using


HTTPS

// to encrypt the authentication credentials.

if (redirectionUri.Scheme == "https")

result = true;

return result;

This validation callback will be passed to the ExchangeService object in step 4. You need
this so that your application will trust and follow Autodiscover redirects - the results of
the Autodiscover redirect provides the EWS endpoint for our application.

Step 4: Prepare the ExchangeService object


1. Add a using directive reference to the EWS Managed API. Add the following code
after the last using directive at the top of Program.cs.

C#

using Microsoft.Exchange.WebServices.Data;

2. In the Main method, instantiate the ExchangeService object with the service
version you intend to target. This example targets the earliest version of the EWS
schema.

C#

ExchangeService service = new


ExchangeService(ExchangeVersion.Exchange2007_SP1);

3. If you are targeting an on-premises Exchange server and your client is domain
joined, proceed to step 4. If you client is targeting an Exchange Online or Office
365 Developer Site mailbox, you have to pass explicit credentials. Add the
following code after the instantiation of the ExchangeService object and set the
credentials for your mailbox account. The user name should be the user principal
name. Proceed to step 5.

C#

service.Credentials = new WebCredentials("[email protected]",


"password");

4. Domain-joined clients that target an on-premises Exchange server can use the
default credentials of the user who is logged on, assuming the credentials are
associated with a mailbox. Add the following code after the instantiation of the
ExchangeService object.

C#

service.UseDefaultCredentials = true;

If your client targets an Exchange Online or Office 365 Developer Site mailbox,
verify that UseDefaultCredentials is set to false, which is the default value. Your
client is ready to make the first call to the Autodiscover service to get the service
URL for calls to the EWS service.

5. The AutodiscoverUrl method on the ExchangeService object performs a series of


calls to the Autodiscover service to get the service URL. If this method call is
successful, the URL property on the ExchangeService object will be set with the
service URL. Pass the user's email address and the
RedirectionUrlValidationCallback to the AutodiscoverUrl method. Add the
following code after the credentials have been specified in step 3 or 4. Change
[email protected] to your email address so that the Autodiscover service finds

your EWS endpoint.

C#

service.AutodiscoverUrl("[email protected]",
RedirectionUrlValidationCallback);

At this point, your client is set up to make calls to EWS to access mailbox data. If you run
your code now, you can verify that the AutodiscoverUrl method call worked by
examining the contents of the ExchangeService.Url property. If this property contains
a URL, your call was a success! This means that your application successfully
authenticated with the service and discovered the EWS endpoint for your mailbox. Now
you are ready to make your first calls to EWS. Read Set the EWS service URL by using the
EWS Managed API for more information about setting the EWS URL.

Step 6: Create your first Hello World email message


1. After the AutodiscoverUrl method call, instantiate a new EmailMessage object and
pass in the service object you created.

C#
EmailMessage email = new EmailMessage(service);

You now have an email message on which the service binding is set. Any calls
initiated on the EmailMessage object will be targeted at the service.

2. Now set the To: line recipient of the email message. To do this, change
[email protected] to use your SMTP address.

C#

email.ToRecipients.Add("[email protected]");

3. Set the subject and the body of the email message.

C#

email.Subject = "HelloWorld";

email.Body = new MessageBody("This is the first email I've sent by


using the EWS Managed API.");

4. You are now ready to send your first email message by using the EWS Managed
API. The Send method will call the service and submit the email message for
delivery. Read Communicate with EWS by using the EWS Managed API to learn
about other methods you can use to communicate with Exchange.

C#

email.Send();

5. You are ready to run your Hello World application. In Visual Studio, select F5. A
blank console window will open. You will not see anything in the console window
while your application authenticates, follows Autodiscover redirections, and then
makes its first call to create an email message that you send to yourself. If you
want to see the calls being made, add the following two lines of code before the
AutodiscoverUrl method is called. Then press F5. This will trace out the EWS
requests and responses to the console window.

C#

service.TraceEnabled = true;

service.TraceFlags = TraceFlags.All;

You now have a working EWS Managed API client application. For your convenience, the
following example shows all the code that you added to Program.cs to create your Hello
World application.

C#

using System;

using Microsoft.Exchange.WebServices.Data;

namespace HelloWorld

class Program

static void Main(string[] args)

ExchangeService service = new


ExchangeService(ExchangeVersion.Exchange2007_SP1);

service.Credentials = new WebCredentials("[email protected]",


"password");

service.TraceEnabled = true;

service.TraceFlags = TraceFlags.All;

service.AutodiscoverUrl("[email protected]",
RedirectionUrlValidationCallback);

EmailMessage email = new EmailMessage(service);

email.ToRecipients.Add("[email protected]");

email.Subject = "HelloWorld";

email.Body = new MessageBody("This is the first email I've sent by


using the EWS Managed API");

email.Send();

private static bool RedirectionUrlValidationCallback(string


redirectionUrl)

// The default for the validation callback is to reject the URL.

bool result = false;

Uri redirectionUri = new Uri(redirectionUrl);

// Validate the contents of the redirection URL. In this simple


validation

// callback, the redirection URL is considered valid if it is using


HTTPS

// to encrypt the authentication credentials.

if (redirectionUri.Scheme == "https")

result = true;

return result;

Next steps
If you're ready to do more with your first EWS Managed API client application, explore
the following resources:

Exchange 2013: 101 code samples


Folders and items
EWSEditor

If you run into any issues with your application, try posting a question or comment in
the forum (and don't forget to read the top post).

In this section
Reference the EWS Managed API assembly
Set the EWS service URL by using the EWS Managed API
Communicate with EWS by using the EWS Managed API

See also
Start using web services in Exchange
EWS client design overview for Exchange
Develop web service clients for Exchange
Trace requests and responses to troubleshoot EWS Managed API applications
Reference the EWS Managed API
assembly
Article • 03/04/2022 • 2 minutes to read

Find information about how to reference the EWS Managed API assembly.

The EWS Managed API provides a simple and full-featured interface for developing and
extending applications that use Exchange Web Services (EWS). Whether you are using
Visual Studio or another code editor to develop your EWS Managed API application, you
will need to make a reference to the EWS Managed API assembly. If you haven't
installed the EWS Managed API already, be sure to download the API .

7 Note

The EWS Managed API is now available as an open source project on GitHub .
You can use the open source library to:

Contribute bug fixes and enhancements to the API.


Get fixes and enhancements before they are available in an official release.
Access the most comprehensive and up-to-date implementation of the API, to
use as a reference or to create new libraries on new platforms.

We welcome your contributions via GitHub.

Referencing the assembly


The most common way to add a reference is to use Visual Studio. We know that some
developers out there like to use other editors, so we are including instructions for using
the command-line compiler as well as instructions for using Visual Studio. You might
notice that the code examples that follow have the same using statements. The
difference between the two methods is that the command-line compiler needs the
location of the assembly file. The Visual Studio reference handles this for you behind the
scenes.

To add a reference by using Visual Studio


1. Put the Microsoft.Exchange.WebServices.dll file and the
Microsoft.Exchange.WebServices.xml file into a folder of your choice. By default,
the files are installed in C:\Program Files\Microsoft\Exchange\Web Services\2.0\ ,
but you can store the files anywhere on your computer.

2. In the Solution Explorer pane in Visual Studio, select References, and then choose
Add Reference. This opens the Add Reference window.

3. In the Add Reference window, navigate to the Browse tab, browse to the location
of the Microsoft.Exchange.WebServices.dll file, select that file, and then select OK.

4. To use the EWS Managed API in your application, add a using statement for the
Microsoft.Exchange.WebServices.Data namespace.

C#

using Microsoft.Exchange.WebServices.Data;

To add a reference and build your application with the


command-line compiler
1. Put the Microsoft.Exchange.WebServices.dll file into a folder of your choice. This
folder will be the output folder for the compiler.

2. In your source code editor, add a using statement to the source code for the
Microsoft.Exchange.WebServices.Data namespace.

C#

using Microsoft.Exchange.WebServices.Data;

3. Run the command-line compiler to build the application. The following command
uses the .NET Framework C# compiler to build the Windows application defined in
the source code file "program.cs". It assumes that the compiler is located in the
default installation directory and that the Microsoft.Exchange.WebServices.dll file is
in a subdirectory of the current directory named "build".

C#

c:\Windows\Microsoft.NET\Framework\3.5\csc /target: winexe /out:


build\testApplication /reference:
build\Microsoft.Exchange.WebServices.dll program.cs

See also
Get started with EWS Managed API client applications
Setting up your Exchange application development environment
Communicate with EWS by using the EWS Managed API
Set the EWS service URL by using the
EWS Managed API
Article • 01/15/2020 • 2 minutes to read

Find information about how to set the EWS service URL in your EWS Managed API
application.

The service URL is the address that Exchange uses to communicate with Exchange Web
Services (EWS). After your EWS Managed API application has this address, and has
appropriate access to communicate with EWS, it can make calls to the ExchangeService
class . The service URL for an on-premises Exchange server might look like the
following.

HTML

https://computer.domain.contoso.com/EWS/Exchange.asmx

You can set the EWS URL in your application in a couple of ways. We recommend that
you use the Autodiscover service to get the URL because in a large forest of servers,
the URL can change if the mailbox is migrated to another server. However, because
calling Autodiscover can take some time and can slow down your application if you
need to make multiple calls in a short period of time, you might want to cache the URL
value you get from Autodiscover and manually set the EWS service URL with this cached
value. This will improve the performance of your application; just make sure that you use
Autodiscover to update your cached value periodically in case the value changes on the
server.

Set the EWS service URL by using the


Autodiscover service
The AutodiscoverUrl method uses the email address to set the ExchangeService
endpoint and enables your application to use any methods included in the
ExchangeService proxy classes. The following example shows how to use the
AutodiscoverURL method.

C#

// Create the binding.

ExchangeService service = new ExchangeService();

// Set the credentials for the on-premises server.

service.Credentials = new WebCredentials("[email protected]", "password");

// Set the URL.

service.AutodiscoverUrl("[email protected]");

Set the Exchange service URL manually


The following example shows you how to set the EWS service URL by using a cached
value. Before you do this, make sure to use the Autodiscover service to get the EWS
URL.

C#

// Create the binding.

ExchangeService service = new ExchangeService();

// Set the credentials for the on-premises server.

service.Credentials = new WebCredentials("[email protected]", "password");

// Set the URL.

service.Url = new
Uri("https://computername.domain.contoso.com/EWS/Exchange.asmx");

See also
Get started with EWS Managed API client applications
Setting up your Exchange application development environment
Control access to EWS in Exchange
Communicate with EWS by using the EWS Managed API
Use Autodiscover to find connection points
Communicate with EWS by using the
EWS Managed API
Article • 03/04/2022 • 3 minutes to read

Find information about how to use the EWS Managed API to communicate with EWS in
Exchange.

7 Note

We’re removing the ability to use Basic authentication in Exchange Online for EWS
beginning October 2022 Deprecation of Basic authentication in Exchange Online.
You should use OAuth authentication instead. Authenticate an EWS application by
using OAuth

The ExchangeService class in the EWS Managed API contains the methods and
properties that you use to set user credentials, identify the EWS endpoint, send and
receive SOAP messages, and configure the binding to communicate with EWS. Before
you can use the EWS Managed API to perform any task, you have to create an instance
of the ExchangeService class and bind it to EWS.

After you set up an ExchangeService object with user credentials and the EWS
endpoint, any mailbox object that references the ExchangeService object can use the
following method types to communicate with EWS:

ExchangeService object methods — All the methods on the ExchangeService


object that are not inherited from the base Object type make calls to EWS.
Exchange mailbox item and folder type methods.

Table 1. Mailbox item and folder type methods that communicate with EWS

Method What it does Operations that it


calls

Load
Gets properties on an item, attachment, or user configuration GetItem operation

object.
GetAttachment
operation

GetUserConfiguration
operation

Method What it does Operations that it


calls

Bind
Populates a new item on the client with information from an GetItem operation

existing item on the server.

Save
Saves the copy of the client item on the server. UpdateItem
operation

UpdateFolder
operation

CreateItem
operation

CreateFolder
operation

Update Updates the server with the changes made on the client.
UpdateItem
operation

For items and folders, the Update method uses the


UpdateItem operation and the UpdateFolder operation . UpdateFolder
operation

Delete
Deletes an item on the server.
DeleteItem
operation

For items and folders, the Delete method uses the and the
DeleteFolder operation . DeleteFolder
operation

Copy
Creates a copy of the item or folders on the server. CopyItem
operation

CopyFolder
operation

Move
Moves items or folders on the server. MoveItem
operation

MoveFolder
operation

To use the EWS Managed API to communicate


with EWS
1. Instantiate the ExchangeService class.

C#
ExchangeService service = new ExchangeService();

7 Note

Instantiating ExchangeService with an empty constructor will create an


instance that is bound to the latest known version of Exchange. Alternatively,
you can target a specific version of Exchange by specifying version as a
parameter. ExchangeService service = new
ExchangeService(ExchangeVersion.Exchange2007_SP1);

2. Set the credentials of the user who sends requests to the Exchange server. If you
want to connect to EWS from a computer that is logged on to the domain, using
the credentials of the authenticated user, set the UseDefaultCredentials property
on the ExchangeService object to true.

C#

// Connect by using the default credentials of the authenticated user.

service.UseDefaultCredentials = true;

If you do not want to connect by using the default user credentials, set the
Credentials property on the ExchangeService object to explicitly specify the
credentials of a different user. If you are using Exchange Online or Exchange
Online as part of Office 365, you'll use basic authentication, with just a user name
and password. A domain name is required for NTLM authentication.

C#

// Connect by using the credentials of user1 at contoso.com.

service.Credentials = new WebCredentials("[email protected]",


"password");

You can also specify the credentials of the user by using the user's domain name
and password.

C#

// Connect by using the credentials of contoso/user1.

service.Credentials = new WebCredentials("user1", "password",


"contoso");

7 Note

If the UseDefaultCredentials property is set to true, the value of the


Credentials property is ignored.

3. Set the URL of the EWS endpoint. This URL locates the exchange.asmx file on Client
Access server.

C#

// Use Autodiscover to set the URL endpoint.

service.AutodiscoverUrl("[email protected]");

7 Note

Although you can explicitly set the Url property of the ExchangeService to a
hardcoded value, we recommend that you use the Autodiscover service
instead, for the following reasons:

Autodiscover determines the best endpoint for a given user (the


endpoint that is closest to the user's Mailbox server).
The EWS URL might change if new Client Access servers are deployed. In
this scenario, using Autodiscover means no code changes are necessary.
You should either set the URL explicitly or call AutodiscoverUrl, but you
should not do both.

See also
Get started with EWS Managed API client applications
Use Autodiscover to find connection points
Develop web service clients for Exchange
Trace requests and responses to
troubleshoot EWS Managed API apps
Article • 01/15/2020 • 2 minutes to read

Find out how to trace EWS requests and responses to troubleshoot errors in your EWS
Managed API application.

Debugging a web service-based application can be difficult because part of the


processing is performed on a remote computer that you might not have access to.
Because you cannot step through the code on the server, it can be helpful to see the
XML requests and responses that are sent between the client and the server to
determine which part of the application is causing an error.

If you are using EWS, you already have access to the XML request and response; you can
put a break point in your code to review the server's response to your request in order
to troubleshoot an issue. If you're using the EWS Managed API, you don't have direct
access to the EWS request and response. However, you can use tracing methods on the
ExchangeService object to capture the XML request and response, and you can then
use the XML to determine why your code is not working.

For example, if you did not set a property correctly, you might get an unexpected
response, and you can use the trace output to look at the XML request and response to
identify the error. The trace output from the EWS Managed API can also help you
manually build the XML request to create your EWS application. If you are using EWS,
you can create a small application by using EWS Managed API, trace it, and then use the
XML request information to help you build your EWS request.

Enabling tracing on the ExchangeService object


To enable tracing, create an ExchangeService object for your application, and set the
tracing properties as shown in the following example.

C#

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010);

service.TraceListener = ITraceListenerInstance;

// Optional flags to indicate the requests and responses to trace.

service.TraceFlags = TraceFlags.EwsRequest | TraceFlags.EwsResponse

service.TraceEnabled = true;

After you set the TraceEnabled property to true, all requests that match the trace flags
will be sent to the specified trace listener. You can specify a single trace flag, or you can
specify multiple trace flags by combining them with a logical OR. You can use the
TraceFlags enumeration to specify values for EWS and for Autodiscover requests and
responses.

Implementing a TraceListener object


You can set the TraceEnabled property to true to output the XML requests and
responses to your application, such as a console window. If you want to control the
trace output and save it to a file, we recommend that you implement a TraceListener
class object. The following code example shows a simple object that implements the
ITraceListener interface and stores the traced requests and responses in XML or text
files.

C#

class TraceListener : ITraceListener

#region ITraceListener Members

public void Trace(string traceType, string traceMessage)

CreateXMLTextFile(traceType, traceMessage.ToString());

#endregion

private void CreateXMLTextFile(string fileName, string traceContent)

// Create a new XML file for the trace information.

try

// If the trace data is valid XML, create an XmlDocument object and


save.

XmlDocument xmlDoc = new XmlDocument();

xmlDoc.Load(traceContent);

xmlDoc.Save(fileName + ".xml");

catch

// If the trace data is not valid XML, save it as a text document.

System.IO.File.WriteAllText(fileName + ".txt", traceContent);

See also
Start using web services in Exchange
Handling Autodiscover error messages
Reference the EWS Managed API assembly
Communicate with EWS by using the EWS Managed API
Get started with EWS client applications
Article • 03/04/2022 • 10 minutes to read

Create your first application by using Exchange Web Services (EWS) in Exchange.

EWS is a comprehensive service that your applications can use to access almost all the
information stored in an Exchange Online, Exchange Online as part of Office 365, or
Exchange on-premises mailbox. EWS uses standard web protocols to provide access to
an Exchange server; libraries like the EWS Managed API wrap the EWS operations to
provide an object-oriented interface. After you've run the examples in this article, you
will have a basic understanding of what you can do with EWS.

You can call EWS operations from any operating system or language, because the EWS
requests and responses use the SOAP protocol. The examples in this article are written
using C# and make use of the .NET Framework HttpWebRequest and
HttpWebResponse objects; however, the important part of the code is the XML used
to make the EWS request and the XML response returned from the server. The code
examples emphasize the XML transactions and not processing the XML.

7 Note

We’re removing the ability to use Basic authentication in Exchange Online for EWS
beginning October 2022 Deprecation of Basic authentication in Exchange Online.
You should use OAuth authentication instead. Authenticate an EWS application by
using OAuth

You'll need an Exchange server


If you already have an Exchange mailbox account, you can skip this step. Otherwise, you
have the following options for setting up an Exchange mailbox for your first EWS
application:

Get an Office 365 Developer Site(recommended). This is the quickest way for you
to get an Exchange mailbox.

Download Exchange Server .

After you've verified that you can send and receive email from your Exchange server you
are ready to set up your development environment. You can use Outlook Web App to
verify that you can send email.
You'll also need to know the URL of the EWS endpoint for your server. In a production
application, you'd use Autodiscover to determine the EWS URL. The examples in this
article use the Office 365 EWS endpoint URL,
https://outlook.office365.com/EWS/Exchange.asmx . The Next steps section has links to
more information about Autodiscover when you're ready.

If you are testing your application using an Exchange server that has the default self-
signed certificate, you'll need to create a certificate validation method that meets the
security requirements of your organization.

Set up your development environment


The tools that you use to create your first EWS application depend on the operating
system and language that you use, and are mostly a matter of taste. If you want to
follow along with the C# examples in this article, you'll need:

Any version of Visual Studio that supports the .NET Framework 4.0.
An Internet connection that your development machine can use to contact your
Exchange server. If you can use Outlook Web App with a DNS name rather than an
IP address to connect to your Exchange server, you are set up.

Create your first EWS application


The EWS application that you will create shows two typical scenarios for using EWS:

1. Get information from an Exchange mailbox and display that information to the
user.
2. Perform an action, such as sending an email, and check the response to see if the
action succeeded.

Let's get started.

Set up the solution


First, create a new console application solution using Visual Studio. When the solution is
ready, create a new object called Tracing.cs. Use this object to write information to both
the console and a log file so that you can review the results after you run your code.
Paste the following code into the Tracing.cs file.

C#
using System;

using System.IO;

namespace Microsoft.Exchange.Samples.EWS

class Tracing

private static TextWriter logFileWriter = null;

public static void OpenLog(string fileName)

logFileWriter = new StreamWriter(fileName);

public static void Write(string format, params object[] args)

Console.Write(format, args);

if (logFileWriter != null)

logFileWriter.Write(format, args);

public static void WriteLine(string format, params object[] args)

Console.WriteLine(format, args);

if (logFileWriter != null)

logFileWriter.WriteLine(format, args);

public static void CloseLog()

logFileWriter.Flush();

logFileWriter.Close();

Next, open the Program.cs file. You will put the rest of the code for the example in this
file.

First, set up the shell of the program. The program will:

1. Create a log file so that the request and response can be written to disk for later
study.
2. Get the email address and password of the account that you'll access.
3. Call the sample methods.

Replace the Main method in the Program.cs with the following code.

C#
static void Main(string[] args)

// Start tracing to console and a log file.

Tracing.OpenLog("./GetStartedWithEWS.log");

Tracing.WriteLine("EWS sample application started.");

var isValidEmailAddress = false;

Console.Write("Enter an email address: ");

var emailAddress = Console.ReadLine();

isValidEmailAddress = (emailAddress.Contains("@") &amp;&amp;


emailAddress.Contains("."));

if (!isValidEmailAddress)

Tracing.WriteLine("Email address " + emailAddress + " is not a valid


SMTP address. Closing program.");
return;

SecureString password = GetPasswordFromConsole();

if (password.Length == 0)

Tracing.WriteLine("Password empty, closing program.");

NetworkCredential userCredentials = new


NetworkCredential(emailAddress, password);

// These are the sample methods that demonstrate using EWS.

// ShowNumberOfMessagesInInbox(userCredentials);

// SendTestEmail(userCredentials);

Tracing.WriteLine("EWS sample application ends.");

Tracing.CloseLog();

Console.WriteLine("Press enter to exit: ");

Console.ReadLine();

// These method stubs will be filled in later.

private static void ShowNumberOfMessagesInInbox(NetworkCredential


userCredentials)

private static void SendTestEmail(NetworkCredential userCredentials)

The last thing that you need to do is add the GetPasswordFromConsole static method.
This method returns a SecureString object that contains a password typed at the
console.

C#

private static SecureString GetPasswordFromConsole()

SecureString password = new SecureString();

bool readingPassword = true;

Console.Write("Enter password: ");

while (readingPassword)

ConsoleKeyInfo userInput = Console.ReadKey(true);

switch (userInput.Key)

case (ConsoleKey.Enter):

readingPassword = false;

break;

case (ConsoleKey.Escape):

password.Clear();

readingPassword = false;

break;

case (ConsoleKey.Backspace):

if (password.Length > 0)

password.RemoveAt(password.Length - 1);

Console.SetCursorPosition(Console.CursorLeft - 1,
Console.CursorTop);

Console.Write(" ");

Console.SetCursorPosition(Console.CursorLeft - 1,
Console.CursorTop);

break;

default:

if (userInput.KeyChar != 0)

password.AppendChar(userInput.KeyChar);

Console.Write("*");

break;

Console.WriteLine();

password.MakeReadOnly();

return password;

Get the number of new messages in an Inbox


A common operation in an EWS application is to get information about email messages,
appointments, meetings, and the folders that store them. This example gets the number
of messages in an account's Inbox and displays the total number of messages and the
number of unread messages. It demonstrates the following common actions for EWS
applications:

Making an EWS request to the Exchange server.


Parsing the returned XML response for the requested information.
Handling common exceptions and error messages.
Add the following code to the ShowNumberOfMessagesInInbox method that was stubbed
out after the main method. When you run the application, it will print the number of
messages in the account's Inbox and the number of unread messages in the Inbox. After
you run the application, you can open the GetStartedWithEWS.log file to see the XML
request that was sent to the Exchange server and the response that the server returned.

C#

/// This is the XML request that is sent to the Exchange server.

var getFolderSOAPRequest =

"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +

"<soap:Envelope xmlns:soap=\"https://schemas.xmlsoap.org/soap/envelope/\"\n"
+

"
xmlns:t=\"https://schemas.microsoft.com/exchange/services/2006/types\">\n" +

"<soap:Header>\n" +

" <t:RequestServerVersion Version=\"Exchange2007_SP1\" />\n" +

" </soap:Header>\n" +

" <soap:Body>\n" +

" <GetFolder
xmlns=\"https://schemas.microsoft.com/exchange/services/2006/messages\"\n" +

"
xmlns:t=\"https://schemas.microsoft.com/exchange/services/2006/types\">\n" +

" <FolderShape>\n" +

" <t:BaseShape>Default</t:BaseShape>\n" +

" </FolderShape>\n" +

" <FolderIds>\n" +

" <t:DistinguishedFolderId Id=\"inbox\"/>\n" +

" </FolderIds>\n" +

" </GetFolder>\n" +

" </soap:Body>\n" +

"</soap:Envelope>\n";

// Write the get folder operation request to the console and log file.

Tracing.WriteLine("Get folder operation request:");

Tracing.WriteLine(getFolderSOAPRequest);

var getFolderRequest = WebRequest.CreateHttp(Office365WebServicesURL);

getFolderRequest.AllowAutoRedirect = false;

getFolderRequest.Credentials = userCredentials;

getFolderRequest.Method = "POST";

getFolderRequest.ContentType = "text/xml";

var requestWriter = new


StreamWriter(getFolderRequest.GetRequestStream());

requestWriter.Write(getFolderSOAPRequest);

requestWriter.Close();

try

var getFolderResponse = (HttpWebResponse)


(getFolderRequest.GetResponse());
if (getFolderResponse.StatusCode == HttpStatusCode.OK)

var responseStream = getFolderResponse.GetResponseStream();

XElement responseEnvelope = XElement.Load(responseStream);

if (responseEnvelope != null)

// Write the response to the console and log file.

Tracing.WriteLine("Response:");

StringBuilder stringBuilder = new StringBuilder();

XmlWriterSettings settings = new XmlWriterSettings();

settings.Indent = true;

XmlWriter writer = XmlWriter.Create(stringBuilder, settings);

responseEnvelope.Save(writer);

writer.Close();

Tracing.WriteLine(stringBuilder.ToString());

// Check the response for error codes. If there is an error,


throw an application exception.

IEnumerable<XElement> errorCodes = from errorCode in


responseEnvelope.Descendants

("
{https://schemas.microsoft.com/exchange/services/2006/messages}ResponseCode"
)

select errorCode;

foreach (var errorCode in errorCodes)

if (errorCode.Value != "NoError")

switch (errorCode.Parent.Name.LocalName.ToString())

case "Response":

string responseError = "Response-level error getting


inbox information:\n" + errorCode.Value;

throw new ApplicationException(responseError);

case "UserResponse":

string userError = "User-level error getting inbox


information:\n" + errorCode.Value;

throw new ApplicationException(userError);

// Process the response.

IEnumerable<XElement> folders = from folderElement in

responseEnvelope.Descendants

("
{https://schemas.microsoft.com/exchange/services/2006/messages}Folders")

select folderElement;

foreach (var folder in folders)

Tracing.Write("Folder name: ");

var folderName = from folderElement in

folder.Descendants

("
{https://schemas.microsoft.com/exchange/services/2006/types}DisplayName")

select folderElement.Value;

Tracing.WriteLine(folderName.ElementAt(0));

Tracing.Write("Total messages: ");

var totalCount = from folderElement in

folder.Descendants

("
{https://schemas.microsoft.com/exchange/services/2006/types}TotalCount")

select folderElement.Value;

Tracing.WriteLine(totalCount.ElementAt(0));

Tracing.Write("Unread messages: ");

var unreadCount = from folderElement in

folder.Descendants

("
{https://schemas.microsoft.com/exchange/services/2006/types}UnreadCount")

select folderElement.Value;

Tracing.WriteLine(unreadCount.ElementAt(0));

catch (WebException ex)

Tracing.WriteLine("Caught Web exception:");

Tracing.WriteLine(ex.Message);

catch (ApplicationException ex)

Tracing.WriteLine("Caught application exception:");

Tracing.WriteLine(ex.Message);

Send an email message


Another common operation for an EWS application is to send email messages or
meeting requests. This example creates and sends an email message using the user
credentials that were entered earlier. It demonstrates these common EWS application
tasks:

Creating and sending an email.

Parsing the returned XML response to determine if the email was correctly sent.

Handling common exceptions and error messages.

Add the following code to the SendTestEmail method that was stubbed out after the
main method. After you run the application, you can open the GetStartedWithEWS.log
file to see the XML request that was sent to the Exchange server and the response that
the server returned.

C#

var createItemSOAPRequest =

"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +

"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-
instance\" \n" +

"
xmlns:m=\"https://schemas.microsoft.com/exchange/services/2006/messages\"
\n" +

"
xmlns:t=\"https://schemas.microsoft.com/exchange/services/2006/types\" \n" +

"
xmlns:soap=\"https://schemas.xmlsoap.org/soap/envelope/\">\n" +

" <soap:Header>\n" +

" <t:RequestServerVersion Version=\"Exchange2007_SP1\" />\n" +

" </soap:Header>\n" +

" <soap:Body>\n" +

" <m:CreateItem MessageDisposition=\"SendAndSaveCopy\">\n" +

" <m:SavedItemFolderId>\n" +

" <t:DistinguishedFolderId Id=\"sentitems\" />\n" +

" </m:SavedItemFolderId>\n" +

" <m:Items>\n" +

" <t:Message>\n" +

" <t:Subject>Company Soccer Team</t:Subject>\n" +

" <t:Body BodyType=\"HTML\">Are you interested in joining?


</t:Body>\n" +

" <t:ToRecipients>\n" +

" <t:Mailbox>\n" +

" <t:EmailAddress>[email protected]</t:EmailAddress>\n" +

" </t:Mailbox>\n" +

" </t:ToRecipients>\n" +

" </t:Message>\n" +

" </m:Items>\n" +

" </m:CreateItem>\n" +

" </soap:Body>\n" +

"</soap:Envelope>\n";

// Write the create item operation request to the console and log
file.

Tracing.WriteLine("Get folder operation request:");

Tracing.WriteLine(createItemSOAPRequest);

var getFolderRequest = WebRequest.CreateHttp(Office365WebServicesURL);

getFolderRequest.AllowAutoRedirect = false;

getFolderRequest.Credentials = userCredentials;

getFolderRequest.Method = "POST";

getFolderRequest.ContentType = "text/xml";

var requestWriter = new


StreamWriter(getFolderRequest.GetRequestStream());

requestWriter.Write(createItemSOAPRequest);

requestWriter.Close();

try

var getFolderResponse = (HttpWebResponse)


(getFolderRequest.GetResponse());
if (getFolderResponse.StatusCode == HttpStatusCode.OK)

var responseStream = getFolderResponse.GetResponseStream();

XElement responseEnvelope = XElement.Load(responseStream);

if (responseEnvelope != null)

// Write the response to the console and log file.

Tracing.WriteLine("Response:");

StringBuilder stringBuilder = new StringBuilder();

XmlWriterSettings settings = new XmlWriterSettings();

settings.Indent = true;

XmlWriter writer = XmlWriter.Create(stringBuilder, settings);

responseEnvelope.Save(writer);

writer.Close();

Tracing.WriteLine(stringBuilder.ToString());

// Check the response for error codes. If there is an error,


throw an application exception.

IEnumerable<XElement> errorCodes = from errorCode in


responseEnvelope.Descendants

("
{https://schemas.microsoft.com/exchange/services/2006/messages}ResponseCode"
)

select errorCode;

foreach (var errorCode in errorCodes)

if (errorCode.Value != "NoError")

switch (errorCode.Parent.Name.LocalName.ToString())

case "Response":

string responseError = "Response-level error getting


inbox information:\n" + errorCode.Value;

throw new ApplicationException(responseError);

case "UserResponse":

string userError = "User-level error getting inbox


information:\n" + errorCode.Value;

throw new ApplicationException(userError);

Tracing.WriteLine("Message sent successfully.");

catch (WebException ex)

Tracing.WriteLine("Caught Web exception:");

Tracing.WriteLine(ex.Message);

catch (ApplicationException ex)

Tracing.WriteLine("Caught application exception:");

Tracing.WriteLine(ex.Message);

Next steps
Now that you've written your first EWS application, you're ready to discover other ways
to use EWS. Here are some ideas to get you started:
Implement Autodiscover in your application so that your application will connect
to the correct Exchange server based on the user's email address. See also the
Exchange 2013: Get user settings with Autodiscover sample.

Look at the EWS reference for more information about EWS.

See the EWS operations for information about the operations that are available.

Use EWS Editor to see the SOAP traffic sent to and from the server.

If you run into any issues with your application, try posting a question or comment in
the forum (and don't forget to read the first post).

See also
Start using web services in Exchange
Explore the EWS Managed API, EWS, and web services in Exchange
EWS client design overview for Exchange
Develop web service clients for Exchange
Get started with EWS Managed API client applications
EWS functionality in Exchange product
versions
Article • 09/15/2021 • 2 minutes to read

EWS implements new functionality in new product releases. Use the information in this
article to determine whether the version of Exchange you're targeting includes support
for the data or features you need access to.

The following table lists the versions of Exchange that include EWS and the major
features that were introduced in each version.

EWS features by product version


Product Features
version

Office 365 Includes all the features in the current version of Exchange in addition to any new
and features that are added for online clients.
Exchange
Online

Exchange Includes all features introduced in Exchange 2013. The following features were
2013 SP1 introduced in Exchange 2013 SP1:
Read receipts can now be suspended for updates and deletions.
You can get moderated transport approval information.
Voting responses can be viewed.
The SetHoldOnMailboxes method and SetHoldOnMailboxes operation
accept all the parameters in a single object.
eDiscovery searches can specify a language for search queries and a
culture-specific format for date ranges.
The StreamingSubscriptionConnection object can now access the
StreamingSubscription objects.
Conversations have a setting to indicate whether they contain email
messages that are protected by IRM.
Meeting attendees can propose new start and end times for meetings and
include them in their meeting response.
The SOAP Autodiscover GetUserSettings method now returns the
GroupingInformation setting that is used maintain affinity for a multiple
mailbox event subscription.
Product Features
version

Exchange Includes all features introduced in Exchange 2010 SP2. The following features
2013 were introduced in Exchange 2013:
Archiving
eDiscovery
Personas
Retention policies
Unified Contact Store
User photos

Exchange Includes all the features introduced in Exchange 2010 SP1. The following features
2010 SP2 were introduced in Exchange 2010 SP2:
Get Password Expiration
DateTime precision
Updated property identifiers for contacts
New impersonation scenarios

Exchange Includes all the features introduced in Exchange 2010. The following features
2010 SP1 were introduced in Exchange 2010 SP1:
Create, retrieve and modify Inbox rules
Programmatic access to Archive Mailbox
Conversations actions
Firewall traversing notifications
Improved administration features
Improved mixed version support
Throttling protection support
Control of application access to EWS
Client certificate authentication support

Exchange Includes all features introduced in Exchange 2007 SP1. The following features
2010 were introduced in the initial release version of Exchange 2010:
Full Private Distribution List
User Configuration Objects
Folder Associated Items
Message tracking
Unified Messaging
SOAP Autodiscover
Enhanced Time Zone support
Room resource availability information
Indexed search
Dumpster access
MailTips information
Product Features
version

Exchange Includes all the features introduced in Exchange 2007. The following features
2007 SP1 were introduced in Exchange 2007 SP1:
Delegate management
Folder permissions
Public folders
Post items
ID conversion

Exchange The following features were introduced in the initial release version of Exchange
2007 2007:
Full access to items, folders, and attachments (Create, Get, Update, Delete)
Availability
Out of Office settings
Notifications
Synchronization
Name resolution
Distribution list (DL) expansion
Search

See also
Start using web services in Exchange
Migrating to Exchange technologies
Explore the EWS Managed API, EWS, and web services in Exchange
Setting up your EWS application
Article • 01/18/2019 • 2 minutes to read

Find information about the tasks you need to complete in order to create applications
that use the EWS Managed API or EWS to communicate with Exchange.

When you create a client application that calls web services on Exchange Online,
Exchange Online as part of Office 365, or a version of Exchange starting with Exchange
2013, you'll need to set up your application to communicate with the Exchange server.
The articles in this section provide code examples that show you how to use the
Exchange Web Services (EWS) Managed API or EWS XML requests and responses to set
up your application.

In this section
Setting up your Exchange application development environment

Controlling client application access to EWS in Exchange

Managing user access by using EWS in Exchange

Validate a server certificate for the EWS Managed API

See also
Start using web services in Exchange

EWS client design overview for Exchange

Develop web service clients for Exchange


Setting up your Exchange application
development environment
Article • 01/22/2022 • 3 minutes to read

Learn about how to set up your development environment to create an EWS application
that communicates with Exchange.

Before you start writing your Exchange Web Services (EWS) application, you'll need to
make sure that your development environment meets a few minimum requirements.
You can use the EWS Managed API, the standard client access API for .NET Framework
applications, to develop your application, or you can use EWS on its own, with our
without an autogenerated proxy. In general, we recommend that you use the EWS
Managed API; however, you can explore the difference between these two options in
more detail to find out which one is right for you.

7 Note

The EWS Managed API is now available as an open source project on GitHub .
You can use the open source library to:

Contribute bug fixes and enhancements to the API.


Get fixes and enhancements before they are available in an official release.
Access the most comprehensive and up-to-date implementation of the API, to
use as a reference or to create new libraries on new platforms.

We welcome your contributions via GitHub.

Development environment for the EWS


Managed API
To create an EWS Managed API application, you'll need access to the following:

The EWS Managed API .

You can store the EWS Managed API files anywhere on your computer; by default,
they are installed in the Program Files\Microsoft\Exchange\Web Services<version
number> folder.
A mailbox on an Exchange server that is running Exchange Online, Exchange
Online as part of Office 365, or a version of Exchange starting with Exchange
Server 2007.

You can get an Exchange Online plan for business, including a free trial, from the
Office 365 site . In order to connect to the mailbox you must have the user name
and credentials of the account associated with the mailbox.

A version of Visual Studio starting with Visual Studio 2005. If you don't currently
have Visual Studio, you can download a free version .

A version of the .NET Framework starting with the .NET Framework 3.5. You can
download the .NET Framework 3.5 from the Microsoft Download Center .

In addition, it is helpful if you have some familiarity with C#. Although Visual Studio
supports other languages in addition to C#, most of the sample code available for the
EWS Managed API is written in C#.

Development environment for EWS


You can use EWS to develop your application in a couple of different ways. The simplest
way to use EWS is to create text files that contain your XML requests, and transmit them
to Exchange. To do this, here is what you need:

A simple text editor, like Notepad, to edit your XML request. Any text editor will
do, although you might want one that will help with your XML syntax validation
like XMetal.

A tool or application that can send and receive SOAP XML requests and responses,
in order to communicate with Exchange.

When you work with raw XML, it's also helpful to have a basic understanding of XML
formatting.

The second way to use EWS is to create an autogenerated proxy that enables you to
work with the operations by using a .NET language like C#. Here is what you need to
work with an autogenerated proxy:

A version of Visual Studio starting with Visual Studio 2005, to create a proxy
reference. You can download a free version .

A version of the .NET Framework starting with the .NET Framework 2.0. You can
download the .NET Framework 3.5 from the Microsoft Download Center .
If you use an autogenerated proxy, you'll want to have some familiarity with C#
programming.

7 Note

If you're a .NET Framework developer, we encourage you to use the EWS Managed
API rather than autogenerated proxies to develop against EWS. The EWS Managed
API object model is easier to use than autogenerated proxy object models. Also,
the EWS Managed API implements Autodiscover and includes client-side logic.

See also
Setting up your Exchange application development environment
EWS client design overview for Exchange
Control access to EWS in Exchange
EWS generated object models for Exchange
Controlling client application access to
EWS in Exchange
Article • 06/14/2022 • 2 minutes to read

Learn about the options for managing client application access to EWS.

Any EWS client application that you create must be granted access to Exchange Online,
Exchange Online as part of Office 365, or version of Exchange starting with Exchange
2013 before it can call EWS operations. Test or production server administrators can use
the Exchange Management Shell to limit access to EWS either for all users and
applications, for individual users, or for individual applications. Access control for EWS is
based on domain accounts. When a connection is made with credentials that are
authenticated by the local security authority, the server returns an error that indicates
that only domain accounts can connect.

Access control for EWS clients and users


Your test or production server administrator can configure access control for clients that
connect to EWS in the following ways:

By blocking all client applications from connecting.

By allowing specific client applications only to connect.

By allowing any client application to connect except those that are specifically
blocked.

By allowing any client application to connect.

Applications are identified by the user agent string that they send in the HTTP web
request.

) Important

Application-level blocking is not a security feature. The user agent string is easily
spoofed. If an application is allowed access to EWS, the application must still
present credentials that the server authenticates before the application can connect
to EWS.
Administrators can also configure access control for mailbox owners that connect to
EWS in the following ways:

By blocking or allowing an entire organization.

By blocking or allowing a group of users identified by a role-based authentication


scope that includes or excludes mailbox owners that do not have access to EWS.

By blocking or allowing an individual mailbox owner.

Specific access control settings override general access control settings. For example, if
an organization denies EWS access but an individual mailbox owner is allowed
application access, the individual setting prevails and access is allowed.

Delegation and EWS access management


When delegate users who do not have access to EWS use your client application, they
will not be able to access the principal user's mailbox by using EWS, even if the principal
user has EWS access. If the delegate user has EWS access, the delegate will be able to
use your EWS client application to access the principal user's mailbox even if the
principal user does not have EWS access.

Impersonation and EWS access management


Client applications that connect to EWS on behalf of mailbox owners might not be able
to use the EWS settings of the mailbox owner. For example, an application that archives
email messages for a company has to connect to EWS regardless of what the mailbox
users' settings are. Other applications, such as mail clients, do have to use the mailbox
owner's EWS settings.

Administrators should create an impersonation account for each application or


application class that they use on their server. This will enable the administrator to
configure the role-based access control scope for all users that do not have EWS
permissions.

To enable impersonation accounts, your test or production server administrator should


do one of the following:

Add the Authenticated Users group to the Pre-Win2K Compatible Access Group.

Add the Exchange Servers group to the Windows Authorization Access group.
Exchange Management Shell cmdlets for access
management
Administrators use the following Exchange Management Shell cmdlets to configure EWS
access controls:

Get-CASMailbox
Set-CASMailbox
Get-OrganizationConfig
Set-OrganizationConfig

See also
Start using web services in Exchange
Control access to EWS in Exchange
Exchange Server PowerShell (Exchange Management Shell)
Windows PowerShell
Control access to EWS in Exchange
Article • 06/14/2022 • 2 minutes to read

Find out how to control access to EWS for users, applications, or the entire organization.

Whether you are using the EWS Managed API, or EWS directly, in your application, you
can control access to Exchange Web Services (EWS). If you have administrator access to
your Exchange server, you can manage access to EWS by using the Exchange
Management Shell to control access globally, for each user, and for each application.

Exchange Management Shell cmdlets for


configuring access control
You can use the following Exchange Management Shell cmdlets to view the current
access configuration and set EWS access controls:

Get-CASMailbox - Shows you what parameters are set for a particular mailbox.
Set-CASMailbox - Sets parameters for a particular mailbox.
Get-OrganizationConfig - Shows you the parameters for the entire organization.
Set-OrganizationConfig - Sets the parameters for the entire organization.

Examples: Controlling access to EWS


Let's take a look at a few scenarios that show you how you can control access to your
application.

Table 1. Commands for controlling access to EWS

If you want to Use this command

Block all client applications from Set-OrganizationConfig -


using EWS. EwsApplicationAccessPolicy:EnforceAllowList

This allows applications listed in the AllowList to connect. In


this example, no applications are included in the AllowList, so
no applications can use EWS.
If you want to Use this command

Allow a list of client applications Set-OrganizationConfig -


to use EWS. EwsApplicationAccessPolicy:EnforceAllowList -
EwsAllowList:"OWA/*"

This allows specific applications to use EWS. In this example,


any application that has a user agent string that starts with
"OWA/" is allowed access.

Allow all client applications to Set-OrganizationConfig -


use EWS except those that are EwsApplicationAccessPolicy:EnforceBlockList -
specifically blocked. EwsBlockList:"OWA/*"

This example only blocks applications from using EWS that


have a user agent string that starts with "OWA/".

Allow all client applications to Set-OrganizationConfig -


use EWS. EwsApplicationAccessPolicy:EnforceBlockList

Because no BlockList is specified, all applications can use EWS.

Block the entire organization Set-OrganizationConfig -EwsEnabled:$false


from using EWS.

Allow the entire organization to Set-OrganizationConfig -EwsEnabled:$true


use EWS.

Block an individual mailbox from Set-CASMailbox -Identity [email protected] -


using EWS. EwsEnabled:$false

Allow an individual mailbox to Set-CASMailbox -Identity [email protected] -


use EWS. EwsEnabled:$true

See also
Setting up your EWS application
Controlling client application access to EWS in Exchange
Exchange Server PowerShell (Exchange Management Shell)
Windows PowerShell
Managing user access by using EWS in
Exchange
Article • 06/14/2022 • 2 minutes to read

Find out what your options are for managing user account access to your Exchange
server.

Exchange Web Services (EWS) and the EWS managed API provide a limited number of
operations that you can use to manage accounts on Exchange Online, Exchange Online
as part of Office 365, or a version of Exchange starting with Exchange 2013. You can use
the operations shown in the following figure to manage delegates and to set folder
access permissions for other accounts.

EWS operations for delegate and folder access

If your application needs additional control over the accounts on an Exchange server,
you can use Exchange Management Shell cmdlets to manage the accounts. You can call
the Exchange Management Shell cmdlets by doing one of the following:

Writing an application using C# or Visual Basic that calls the Exchange


Management Shell cmdlets. You can look at the sample code in the Exchange
Management Shell API documentation to learn how to call a cmdlet.

Using Windows PowerShell and Windows PowerShell scripts to call Exchange


Management Shell cmdlets. You can find a complete list of the Exchange Server
PowerShell (Exchange Management Shell), along with examples that show how to
use them.

See also
Setting up your EWS application
Exchange 2013 Cmdlets
Validate a server certificate for the EWS
Managed API
Article • 02/11/2022 • 3 minutes to read

Learn how to create and reference a certificate validation callback method so that you
can make EWS Managed API requests to an Exchange server.

By default, versions of Exchange starting with Exchange 2007 SP1 use self-signed X509
certificates to authenticate calls from EWS. When you are using the EWS Managed API,
you need to create a certificate validation callback method; otherwise, EWS Managed
API requests will fail. If you are using the Autodiscover service, the call to the EWS
Managed API Autodiscover method will fail with an AutodiscoverLocalException error.
If you are using a web-generated web service proxy, you might also have to create a
validation callback method, depending on how the proxy is created.

Prerequisites for creating a validation callback


method
To set up to validate a server certificate, ensure that the following are true:

Your Exchange server is using a self-signed certificate for EWS. If the administrator
has installed a valid certificate that traces to a root certificate, you do not need to
create a validation callback method.

You are creating a managed application that includes a reference to the following
required .NET Framework namespaces:
System.Net
System.Net.Security
System.Security.Cryptography.X509Certificates

Example: Callback method to validate a server


certificate for the EWS Managed API
The following code example shows how to create an X509 certificate validation callback
method for the EWS Managed API. This method will validate an X509 certificate and
only return true when either of the following criteria are met:

The certificate is valid and traces back to a valid root certificate.


The certificate is valid and is self-signed by the server that returned it.
) Important

The certificate validation callback method in this example provides sufficient


security for development and testing of EWS Managed API applications. However,
it might not provide sufficient security for your deployed application. You should
always make sure that the certificate validation callback method that you use meets
the security requirements of your organization.

C#

private static bool CertificateValidationCallBack(

object sender,

System.Security.Cryptography.X509Certificates.X509Certificate
certificate,

System.Security.Cryptography.X509Certificates.X509Chain chain,

System.Net.Security.SslPolicyErrors sslPolicyErrors)

// If the certificate is a valid, signed certificate, return true.

if (sslPolicyErrors == System.Net.Security.SslPolicyErrors.None)

return true;

// If there are errors in the certificate chain, look at each error to


determine the cause.

if ((sslPolicyErrors &amp;
System.Net.Security.SslPolicyErrors.RemoteCertificateChainErrors) != 0)

if (chain != null &amp;&amp; chain.ChainStatus != null)

foreach
(System.Security.Cryptography.X509Certificates.X509ChainStatus status in
chain.ChainStatus)

if ((certificate.Subject == certificate.Issuer) &amp;&amp;

(status.Status ==
System.Security.Cryptography.X509Certificates.X509ChainStatusFlags.Untrusted
Root))

// Self-signed certificates with an untrusted root are valid.

continue;

else

if (status.Status !=
System.Security.Cryptography.X509Certificates.X509ChainStatusFlags.NoError)

// If there are any other errors in the certificate chain,


the certificate is invalid,

// so the method returns false.

return false;

// When processing reaches this line, the only errors in the


certificate chain are

// untrusted root errors for self-signed certificates. These


certificates are valid

// for default Exchange server installations, so return true.

return true;

else

// In all other cases, return false.

return false;

You use the ServicePointManager class in the .NET System.Net namespace to hook up a
validation callback method by setting the ServerCertificateValidationCallback property.
You can use code similar to the following code example to set the
ServerCertificateValidationCallback property.

C#

ServicePointManager.ServerCertificateValidationCallback =
CertificateValidationCallBack;

Next steps
After you have created the validation callback method for the EWS Managed API, you
can use the Autodiscover service to get connection points and user and domain settings
from an Exchange server. For more information, see the following articles:

Use Autodiscover to find connection points

Get user settings from Exchange by using Autodiscover

Get user settings from Exchange by using Autodiscover

Get domain settings from an Exchange server

See also
Setting up your EWS application
Start using web services in Exchange
Authentication and EWS in Exchange
Article • 06/14/2022 • 4 minutes to read

Find information to help you choose the right authentication standard for your EWS
application that targets Exchange.

Authentication is a key part of your Exchange Web Services (EWS) application. Exchange
Online, Exchange Online as part of Office 365, and on-premises versions of Exchange
starting with Exchange Server 2013 support standard web authentication protocols to
help secure the communication between your application and the Exchange server.

If you're targeting Exchange Online, the authentication method that you choose must
use HTTPS to encrypt the requests and responses that your application sends. Although
you can use HTTP with Exchange on-premises servers, we recommend that you use
HTTPS for any request that your application sends to an EWS endpoint to help secure
communication between your application and an Exchange server.

Exchange provides the following authentication options for you to choose from:

OAuth 2.0 (Exchange Online only)

NTLM (Exchange on-premises only)

Basic (no longer recommended)

The authentication method that you choose depends on the security requirements of
your organization, whether you are using Exchange Online or Exchange on-premises,
and whether you have access to a third-party provider that can issue OAuth tokens. This
article provides information that will help you select the authentication standard that's
right for your application.

OAuth authentication
We recommend that all new applications use the OAuth standard to connect to
Exchange Online services. The advantage in security over basic authentication is worth
the additional work required to implement OAuth in your application. For the record,
however, there are also some disadvantages that you should be aware of.

Table 1. Advantages and disadvantages of using OAuth

Advantages Disadvantages
Advantages Disadvantages

OAuth is an industry-standard authentication protocol.


OAuth relies on a third-party
authentication provider. This can
Authentication is managed by a third-party provider. Your impose additional costs on your
application does not have to collect and store the Exchange organization or your customers.

credentials.

The OAuth standard is more


Fewer worries for you, because your application only receives difficult to implement than basic
an opaque token from the authentication provider; therefore, authentication.

a security breach in your application can only expose the


token, not the user's Exchange credentials. To implement OAuth, you need to
integrate your application with
both the authentication provider
and the Exchange server.

To help minimize the disadvantages, you can use the Microsoft Azure AD Authentication
Library (ADAL) to authenticate users to Active Directory Domain Services (AD DS) in the
cloud or on-premises and then obtain access tokens for securing calls to an Exchange
server. Exchange Online requires tokens issued by the Azure Active Directory service,
which is supported by the ADAL; however, you can use any third-party library.

To learn more about using OAuth authentication in your EWS application, see the
following resources:

Office 365 trial, to set up an Exchange server to use to test your client application.

Azure AD Authentication Library for .NET

Configure Azure Active Directory , to enable your application to use OAuth


tokens for authentication.

Review the sample code in Authenticate an EWS application by using OAuth for
example code that you can study.

NTLM authentication
NTLM authentication is only available for Exchange on-premises servers. For
applications that run inside the corporate firewall, integration between NTLM
authentication and the .NET Framework provides a built-in means to authenticate your
application.

Table 2. Advantages and disadvantages of using NTLM authentication

Advantages Disadvantages
Advantages Disadvantages

Works "out of the box" with your Exchange server. You Users must be logged on to a domain
can configure access to Exchange services by using an to use NTLM authentication.

Exchange Management Shell cmdlet.

It can be difficult to access email


Uses the .NET Framework CredentialCache object to accounts that are not associated with
automatically get the user's credentials.
the user's domain account.

Code samples are available that use the logged on Service applications must have a
user's credentials for authentication to an on-premises domain account to take advantage of
Exchange server. NTLM authentication.

Basic authentication
Basic authentication provides a, well, basic level of security for your client application.
We do recommend that all new applications use either NTLM or the OAuth protocol for
authentication; however, basic authentication can be the correct choice for your
application in some circumstances.

Table 3. Advantages and disadvantages of using basic authentication

Advantages Disadvantages

Works "out of the box" with your Exchange server. Requires your application to collect and
You can configure access to Exchange services by store the user's credentials.

using an Exchange Management Shell cmdlet.

You have to turn off NTLM authentication


Windows applications can use the logged on user's if you want to force all users to use basic
default credentials.
authentication.

Many code samples are available that show you If a security breach occurs in your
how to call EWS using basic authentication. application, it can expose the user's email
address and password to the attacker.

You need to decide if basic authentication meets the security requirements of your
organization and customers. Basic authentication can be the right choice if you want to
avoid extensive setup tasks, for example for simple test or demonstration applications.

7 Note

Basic authentication is no longer supported for EWS to connect to Exchange


Online. Use OAuth authentication in all your new or existing EWS applications to
connect to Exchange Online. OAuth authentication for EWS is only available in
Exchange Online as part of Microsoft 365. EWS applications that use OAuth must
be registered with Azure Active Directory first.

See also
Authenticate an EWS application by using OAuth
Start using web services in Exchange
Adding Sign-On to Your Web Application Using Microsoft Azure AD
Control access to EWS in Exchange
Controlling client application access to EWS in Exchange
Supported token and claim types
Authenticate an EWS application by
using OAuth
Article • 10/31/2022 • 6 minutes to read

Learn how to use OAuth authentication with your EWS Managed API applications.

You can use the OAuth authentication service provided by Azure Active Directory to
enable your EWS Managed API applications to access Exchange Online in Office 365. To
use OAuth with your application you will need to:

1. Register your application with Azure Active Directory.


2. Add code to get an authentication token to get an authentication token from a
token server.
3. Add an authentication token to EWS requests that you send.

7 Note

OAuth authentication for EWS is only available in Exchange Online as part of


Microsoft 365. EWS applications that use OAuth must be registered with Azure
Active Directory.

To use the code in this article, you will need to have access to the following:

A Microsoft 365 account with an Exchange Online mailbox. If you do not have a
Microsoft 365 account, you can sign up for the Microsoft 365 Developer Program
to get a free Microsoft 365 subscription.
The Microsoft Authentication Library for .NET.
The EWS Managed API .

There are two types of OAuth permissions that can be used to access EWS APIs in
Exchange Online. Before you proceed with the tutorial, you will need to choose the
specific permission type to use.

Delegated permissions are used by apps that have a signed-in user present. For
these apps, either the user or an administrator consents to the permissions that
the app requests and the app can act as the signed-in user when making API calls.
Application permissions are used by apps that run without a signed-in user
present; for example, apps that run as background services or daemons and can
access multiple mailboxes.
Register your application
To use OAuth, an application must have an application ID issued by Azure Active
Directory. In this tutorial, it is assumed that the application is a console application, so
you need to register your application as a public client with Azure Active Directory. You
can register an application in the Azure Active Directory admin center or by using
Microsoft Graph.

1. Open a browser and navigate to the Azure Active Directory admin center and
login using a personal account (aka: Microsoft Account) or Work or School
Account.

2. Select Azure Active Directory in the left-hand navigation, then select App
registrations under Manage.

3. Select New registration. On the Register an application page, set the values as
follows.

Set Name to a friendly name for your app.


Set Supported account types to the choice that makes sense for your
scenario.
For Redirect URI, change the dropdown to Public client (mobile & desktop)
and set the value to
https://login.microsoftonline.com/common/oauth2/nativeclient .

4. Choose Register. On the next page, copy the values of the Application (client) ID
and Directory (tenant) ID and save them, you will need them later.

Configure for delegated authentication


If your application uses delegated authentication, no further configuration is required.
The Microsoft identity platform allows apps to request permissions dynamically, so you
do not have to pre-configure permissions on the app registration. However, in some
scenarios (like the on-behalf-of flow) pre-configuring permissions is required. Use the
following steps to pre-configure EWS permissions.

1. Select Manifest in the left-hand navigation under Manage.

2. Locate the requiredResourceAccess property in the manifest, and add the following
inside the square brackets ( [] ):

JSON
{

"resourceAppId": "00000002-0000-0ff1-ce00-000000000000",

"resourceAccess": [

"id": "3b5f3d61-589b-4a3c-a359-5dd4b5ee5bd5",

"type": "Scope"

3. Select Save.

4. Select API permissions under Manage. Confirm that the EWS.AccessAsUser.All


permission is listed.

Configure for app-only authentication


To use application permissions, follow these additional steps.

1. Select Manifest in the left-hand navigation under Manage.

2. Locate the requiredResourceAccess property in the manifest, and add the following
inside the square brackets ( [] ):

JSON

"resourceAppId": "00000002-0000-0ff1-ce00-000000000000",

"resourceAccess": [

"id": "dc890d15-9560-4a4c-9b7f-a736ec74ec40",

"type": "Role"

3. Select Save.

4. Select API permissions under Manage. Confirm that the full_access_as_app


permission is listed.

5. Select Grant admin consent for org and accept the consent dialog.

6. Select Certificates & Secrets in the left-hand navigation under Manage.

7. Select New client secret, enter a short description and select Add.
8. Copy the Value of the newly added client secret and save it, you will need it later.

Add code to get an authentication token


The following code snippets show how to use the Microsoft Authentication Library to
get authentication tokens for delegated permissions and application permissions. These
snippets assume that the information required to make the authentication request is
stored in the application's App.config file. These examples do not include error
checking, see the Code samples for the complete code.

Get a token with delegated auth


C#

// Using Microsoft.Identity.Client 4.22.0

// Configure the MSAL client to get tokens

var pcaOptions = new PublicClientApplicationOptions

ClientId = ConfigurationManager.AppSettings["appId"],

TenantId = ConfigurationManager.AppSettings["tenantId"]

};

var pca = PublicClientApplicationBuilder

.CreateWithApplicationOptions(pcaOptions).Build();

// The permission scope required for EWS access

var ewsScopes = new string[] {


"https://outlook.office365.com/EWS.AccessAsUser.All" };

// Make the interactive token request

var authResult = await


pca.AcquireTokenInteractive(ewsScopes).ExecuteAsync();

Get a token with app-only auth


C#

// Using Microsoft.Identity.Client 4.22.0

var cca = ConfidentialClientApplicationBuilder

.Create(ConfigurationManager.AppSettings["appId"])

.WithClientSecret(ConfigurationManager.AppSettings["clientSecret"])

.WithTenantId(ConfigurationManager.AppSettings["tenantId"])

.Build();

// The permission scope required for EWS access

var ewsScopes = new string[] { "https://outlook.office365.com/.default" };

//Make the token request

var authResult = await cca.AcquireTokenForClient(ewsScopes).ExecuteAsync();

Add an authentication token to EWS requests


After you've received the AuthenticationResult object you can use the AccessToken
property to get the token issued by the token service.

C#

// Configure the ExchangeService with the access token

var ewsClient = new ExchangeService();

ewsClient.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx");

ewsClient.Credentials = new OAuthCredentials(authResult.AccessToken);

To use application permissions, you will also need to explicitly impersonate a mailbox
that you would like to access.

C#

//Impersonate the mailbox you'd like to access.

ewsClient.ImpersonatedUserId = new
ImpersonatedUserId(ConnectingIdType.SmtpAddress,
"[email protected]");

Code samples

Delegated authentication
The following is the complete code sample that demonstrates making an OAuth-
authenticated EWS request using delegated authentication.

C#

using Microsoft.Exchange.WebServices.Data;

using Microsoft.Identity.Client;

using System;

using System.Configuration;

namespace EwsOAuth

class Program

static async System.Threading.Tasks.Task Main(string[] args)

// Using Microsoft.Identity.Client 4.22.0

// Configure the MSAL client to get tokens

var pcaOptions = new PublicClientApplicationOptions

ClientId = ConfigurationManager.AppSettings["appId"],

TenantId = ConfigurationManager.AppSettings["tenantId"]

};

var pca = PublicClientApplicationBuilder

.CreateWithApplicationOptions(pcaOptions).Build();

// The permission scope required for EWS access

var ewsScopes = new string[] {


"https://outlook.office365.com/EWS.AccessAsUser.All" };

try

// Make the interactive token request

var authResult = await


pca.AcquireTokenInteractive(ewsScopes).ExecuteAsync();

// Configure the ExchangeService with the access token

var ewsClient = new ExchangeService();

ewsClient.Url = new
Uri("https://outlook.office365.com/EWS/Exchange.asmx");

ewsClient.Credentials = new
OAuthCredentials(authResult.AccessToken);

// Make an EWS call

var folders =
ewsClient.FindFolders(WellKnownFolderName.MsgFolderRoot, new
FolderView(10));

foreach(var folder in folders)

Console.WriteLine($"Folder: {folder.DisplayName}");

catch (MsalException ex)

Console.WriteLine($"Error acquiring access token: {ex}");

catch (Exception ex)

Console.WriteLine($"Error: {ex}");

if (System.Diagnostics.Debugger.IsAttached)

Console.WriteLine("Hit any key to exit...");

Console.ReadKey();

App-only authentication
The following is the complete code sample that demonstrates making an OAuth-
authenticated EWS request using app-only authentication.

7 Note

When using impersonation you must always use the X-AnchorMailbox request
header, which should be set to the SMTP address of the impersonated mailbox.

C#

using Microsoft.Exchange.WebServices.Data;

using Microsoft.Identity.Client;

using System;

using System.Configuration;

namespace EwsOAuth

class Program

static async System.Threading.Tasks.Task Main(string[] args)

// Using Microsoft.Identity.Client 4.22.0

var cca = ConfidentialClientApplicationBuilder

.Create(ConfigurationManager.AppSettings["appId"])

.WithClientSecret(ConfigurationManager.AppSettings["clientSecret"])

.WithTenantId(ConfigurationManager.AppSettings["tenantId"])

.Build();

var ewsScopes = new string[] {


"https://outlook.office365.com/.default" };

try

var authResult = await cca.AcquireTokenForClient(ewsScopes)

.ExecuteAsync();

// Configure the ExchangeService with the access token

var ewsClient = new ExchangeService();

ewsClient.Url = new
Uri("https://outlook.office365.com/EWS/Exchange.asmx");

ewsClient.Credentials = new
OAuthCredentials(authResult.AccessToken);

ewsClient.ImpersonatedUserId =

new ImpersonatedUserId(ConnectingIdType.SmtpAddress,
"[email protected]");

//Include x-anchormailbox header

ewsClient.HttpHeaders.Add("X-AnchorMailbox",
"[email protected]");

// Make an EWS call

var folders =
ewsClient.FindFolders(WellKnownFolderName.MsgFolderRoot, new
FolderView(10));

foreach(var folder in folders)

Console.WriteLine($"Folder: {folder.DisplayName}");

catch (MsalException ex)

Console.WriteLine($"Error acquiring access token: {ex}");

catch (Exception ex)

Console.WriteLine($"Error: {ex}");

if (System.Diagnostics.Debugger.IsAttached)

Console.WriteLine("Hit any key to exit...");

Console.ReadKey();

The sample code in both cases requires an App.config file with the following entries:

XML

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

<startup>

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />

</startup>

<appSettings>

<!-- The application ID from your app registration -->

<add key="appId" value="YOUR_APP_ID_HERE" />

<!-- The tenant ID copied from your app registration -->

<add key="tenantId" value="YOUR_TENANT_ID_HERE"/>

<!-- The application's client secret from your app registration. Needed
for application permission access -->

<add key="clientSecret" value="YOUR_CLIENT_SECRET_HERE"/>

</appSettings>

</configuration>

See also
Authentication and EWS in Exchange
What to do with EWS Managed API PowerShell scripts that use Basic
Authentication
Autodiscover for Exchange
Article • 09/14/2022 • 5 minutes to read

Learn about the Autodiscover service in Exchange.

The Exchange Autodiscover service provides an easy way for your client application to
configure itself with minimal user input. Most users know their email address and
password, and with those two pieces of information, you can retrieve all the other
details you need to get up and running. For Exchange Web Services (EWS) clients,
Autodiscover is typically used to find the EWS endpoint URL, but Autodiscover can also
provide information to configure clients that use other protocols. Autodiscover works
for client applications that are inside or outside firewalls and will work in resource forest
and multiple forest scenarios.

Overview of the Autodiscover process


The Autodiscover process essentially has three phases. In phase one, you generate a list
of potential Autodiscover servers, and in phase two, you try each server in your list until
you (hopefully) get a successful response. If none of your candidates worked out, you
move on to phase three, which represents a "last ditch" attempt to find an Autodiscover
endpoint.

The ExchangeService.AutodiscoverUrl method in the EWS Managed API implements


all three phases of this process for you, so if you are using the EWS Managed API, you
don't need to worry about implementing Autodiscover yourself. The following figure
shows the three phases of the Autodiscover process.

Figure 1. Three phases of the Autodiscover process


Phase 1: Defining the candidate pool
Before you can use Autodiscover, you have to locate the right Autodiscover server for
your user. Luckily, Autodiscover defines a limited number of places for you to look. In
the case where multiple candidates are found, Autodiscover also defines a way to
generate and prioritize the list.

Table 1: Autodiscover endpoint candidate sources

Place to What you'll find


look

Active For domain-joined clients, this is the first place to look. Exchange publishes service
Directory connection point (SCP) objects in AD DS, which allows Autodiscover requests to be
Domain routed to servers based on Active Directory sites. The results of an SCP lookup
Services should be at the top of your candidate list.
(AD DS)
NOTE: SCP lookup isn't available for clients that are not joined to a domain or that
do not have access to Active Directory servers. In this case, you should skip SCP
lookup.

Place to What you'll find


look

The user's Autodiscover defines two standard endpoint URL forms that are derived from the
email domain portion of the user's email address:
address "https://" + domain + "/autodiscover/autodiscover" + *fileExtension*
domain "https://autodiscover." + domain + "/autodiscover/autodiscover" +
*fileExtension*

The value of fileExtension depends on which Autodiscover access method you are
using, SOAP or POX . The SOAP service uses a ".svc" file extension; POX uses
".xml".

The following figure shows how to generate an Autodiscover endpoint list.

Figure 2. Process for generating an Autodiscover endpoint list

Phase 2: Trying each candidate


After you generate an ordered list of potential candidates, the next step is try each one
in the list by sending a request to the URL and validating the results, as shown in Figure
3. When you get a successful response, you're done!

Figure 3. Trying each endpoint candidate in order


Before you send a request to a candidate, make sure it is trustworthy. Remember that
you're sending the user's credentials, so it's important to make sure that you're only
sharing them with a server you can trust. At a minimum, you should verify:

That the endpoint is an HTTPS endpoint. Client applications should not


authenticate or send data to a non-SSL endpoint.

That the SSL certificate presented by the server is valid and from a trusted
authority.

7 Note

These are just basic security suggestions. Whenever you are working with
authentication, make sure that your code meets the security requirements of your
organization.

The type of request you send depends on how you are accessing the Autodiscover
service.

Table 2. Types of Autodiscover requests

If you are using… Send a request by using…

The EWS Managed API The GetUserSettings method.

The SOAP Autodiscover service The GetUserSettings operation.


If you are using… Send a request by using…

The POX Autodiscover service An HTTP POST with an Autodiscover request body .

Phase 3: Trying other alternatives


In some cases you might try all the endpoints in your list, only to find that all of them
return an error. Before throwing in the towel, you can try a couple more things: you can
send an unauthenticated GET request, or query DNS for an SRV record. If these attempts
also don't yield results, you cannot contact the Autodiscover service.

Figure 4. Trying other alternatives

Sending an unauthenticated GET request

The first thing to try is to send an unauthenticated GET request to an endpoint derived
from the user's email address. The format of that endpoint is "http://autodiscover." +
domain + "/autodiscover/autodiscover.xml". Note that this is NOT an SSL endpoint. If
the server returns a 302 redirect response, you can then attempt to resend the
Autodiscover request to the endpoint URL in the Location header of the response.

Querying DNS for an SRV record


If the unauthenticated GET request doesn't work out, the last thing to try is a DNS query
for SRV records for the Autodiscover service. The record will take the form
"_autodiscover._tcp." + domain. This query might return multiple records, but you
should only use records that point to an SSL endpoint and that have the highest priority
and weight.

Options for using Autodiscover


You can access Autodiscover either by using the SOAP or the POX web service. The
method you use depends on your requirements and environment; however, we
recommend using the SOAP web service, if possible. The EWS Managed API is also an
option. It implements the client portion of both the SOAP and POX Autodiscover
services.

Table 3: Options for accessing Autodiscover

Option Pros Cons

EWS Managed Implements Limited to the user settings that are available in the
API
the Microsoft.Exchange.WebServices.Autodiscover.UserSettingName
Autodiscover enumeration.

process for
you.
Only available for .NET Framework applications.

Uses both
the SOAP
and POX
Autodiscover
services.

Works with
Exchange
Online,
Exchange
Online as
part of Office
365, or a
version of
Exchange
starting with
Exchange
2007 SP1.

Easy to use.

SOAP Platform Not available in Exchange 2007.


Autodiscover independent.

Allows you
to request
just the
settings you
are
interested in.
Option Pros Cons

POX Platform Does not allow you to request specific settings.


Autodiscover independent.

Supported in
Exchange
Online and
all versions
of Exchange
starting with
Exchange
2007 SP1.

In this section
Find Autodiscover endpoints by using SCP lookup in Exchange

Generate a list of Autodiscover endpoints

Use Autodiscover to find connection points

Get user settings from Exchange by using Autodiscover

Get domain settings from an Exchange server

Refresh configuration information by using Autodiscover

Handling Autodiscover error messages

Improving performance when using Autodiscover for Exchange

See also
Start using web services in Exchange
Develop web service clients for Exchange
Find Autodiscover endpoints by using
SCP lookup in Exchange
Article • 11/18/2020 • 8 minutes to read

Find out how to locate Autodiscover SCP objects in Active Directory Domain Services
(AD DS) and use them to find Autodiscover endpoint URLs to use with the Exchange
Autodiscover service.

Autodiscover makes it easy to retrieve information that you need to connect to


mailboxes on Exchange servers. However, in order to use Autodiscover, you need a way
to find Autodiscover servers that are appropriate for the user you're retrieving settings
for. Service connection point (SCP) objects in AD DS provide an easy way for domain-
joined clients to look up Autodiscover servers.

Get set up to find Autodiscover endpoints


To locate Autodiscover SCP objects in AD DS, you need to have access to the following:

A server that is running a version of Exchange on-premises starting with Exchange


2007 SP1.

A client computer that is joined to the domain that the Exchange server is installed
in.

A user account that has a mailbox on the Exchange server.

Also, before you begin, you'll want to be familiar some basic concepts. The following are
some resources that you'll find helpful.

Table 1. Related articles for finding Autodiscover endpoints from SCP objects

Read this article To learn about…

Autodiscover for Exchange


How the Autodiscover service works.

Publishing with Service Connection How SCP objects are used to publish service-specific
Points
data.

Locate Autodiscover SCP objects in AD DS


The first step toward finding Autodiscover endpoints published in AD DS is to locate the
Autodiscover SCP objects. Exchange publishes two types of SCP objects for
Autodiscover:

SCP pointers — These contain information that points to specific LDAP servers that
should be used to locate Autodiscover SCP objects for the user's domain. SCP
pointers are stamped with the following GUID: 67661d7F-8FC4-4fa7-BFAC-
E1D7794C1F68.

SCP URLs — These contain URLs for Autodiscover endpoints. SCP URLs are
stamped with the following GUID: 77378F46-2C66-4aa9-A6A6-3E7A48B19596.

To locate Autodiscover SCP objects


1. Read the configurationNamingContext property of the root DSE entry in AD DS to
get the path to the configuration naming context for the domain. You can do this
by using the DirectoryEntry class, or any other API that can acces AD DS.

2. Search for SCP objects in the configuration naming context that have either the
SCP pointer GUID or the SCP URL GUID in the keywords property.

3. Check the SCP objects you found for an SCP pointer that is scoped to the user's
domain by checking the keywords property for an entry equal to "Domain=
<domain>" . For example, if the user's email address is [email protected], you

would look for an SCP pointer with an entry in the keywords property that is equal
to "Domain=contoso.com" . If a matching SCP pointer is found, discard the set of SCP
objects and start over at step 1 using the value of the serviceBindingInformation
property as the server to connect to for the Root DSE entry.

4. If you don't find any SCP pointers scoped to the user's domain, check for any SCP
pointers that aren't scoped to any domain, and save the value of the
serviceBindingInformation property as a "fallback" server, in case the current
server doesn't give you any results.

5. If you didn't find any SCP pointers scoped to the domain, you're ready to move on
to the next step: generating a prioritized list of Autodiscover endpoints from your
results.

Generate a prioritized list of Autodiscover


endpoints
You can generate a prioritized list of Autodiscover endpoint URLs, using the set of SCP
objects that you located, by doing the following:

1. Get the Active Directory site name of the client computer.

2. Check the keywords property on each SCP URL in the set of SCP objects you
found, and assign a priority to the URL based on the following rules:

If the keywords property contains a value of "Site=<site name>" , where <site


name> equals the name of the Active Directory site you retrieved in the previous
step, assign the URL a priority of 1.

If the keywords property does not contain an entry with a value that starts with
"Site=" , assign the URL a priority of 2.

If the keywords property contains a value of "Site=<site name> , where <site


name> does not equal the name of the Active Directory site you retrieved in the
previous step, assign the URL a priority of 3.

Code example: Performing an SCP lookup


In the following code example, you'll see how to locate Autodiscover SCP objects and
generate a prioritized list of Autodiscover endpoints.

C#

using System;

using System.Collections.Generic;
using System.DirectoryServices;

using System.DirectoryServices.ActiveDirectory;

namespace ScpLookup

// This sample is for demonstration purposes only. Before you run this
sample, make sure

// that the code meets the coding requirements of your organization.

class Program

static void Main(string[] args)

string domain = args[0];

Console.WriteLine("Performing SCP lookup for {0}.", domain);

List<string> scpUrls = GetScpUrls(null, domain);

Console.WriteLine("\nOrdered List of Autodiscover endpoints:");

foreach (string url in scpUrls)

Console.WriteLine(" {0}", url);

Console.WriteLine("SCP lookup done.");

// GUID for SCP URL keyword.

private const string ScpUrlGuidString = @"77378F46-2C66-4aa9-A6A6-


3E7A48B19596";

// GUID for SCP pointer keyword.

private const string ScpPtrGuidString = @"67661d7F-8FC4-4fa7-BFAC-


E1D7794C1F68";

static List<string> GetScpUrls(string ldapServer, string domain)

// Create a new list to return.

List<string> scpUrlList = new List<string>();

string rootDSEPath = null;

// If ldapServer is null/empty, use LDAP://RootDSE to

// connect to Active Directory Domain Services (AD DS).


Otherwise, use

// LDAP://SERVERNAME/RootDSE to connect to a specific server.

if (string.IsNullOrEmpty(ldapServer))

rootDSEPath = "LDAP://RootDSE";

else

rootDSEPath = ldapServer + "/RootDSE";

SearchResultCollection scpEntries = null;

try

// Get the root directory entry.

DirectoryEntry rootDSE = new DirectoryEntry(rootDSEPath);

// Get the configuration path.

string configPath =
rootDSE.Properties["configurationNamingContext"].Value as string;

// Get the configuration entry.

DirectoryEntry configEntry = new DirectoryEntry("LDAP://" +


configPath);

// Create a search object for the configuration entry.

DirectorySearcher configSearch = new


DirectorySearcher(configEntry);

// Set the search filter to find SCP URLs and SCP pointers.

configSearch.Filter = "(&amp;
(objectClass=serviceConnectionPoint)" +

"(|(keywords=" + ScpPtrGuidString + ")(keywords=" +


ScpUrlGuidString + ")))";

// Specify which properties you want to retrieve.

configSearch.PropertiesToLoad.Add("keywords");

configSearch.PropertiesToLoad.Add("serviceBindingInformation");

scpEntries = configSearch.FindAll();

catch (Exception ex)

Console.WriteLine("SCP lookup failed with: ");

Console.WriteLine(ex.ToString());

// If no SCP entries were found, then exit.

if (scpEntries == null || scpEntries.Count <= 0)

Console.WriteLine("No SCP records found.");

return null;

string fallBackLdapPath = null;

// Check for SCP pointers.

foreach (SearchResult scpEntry in scpEntries)

ResultPropertyValueCollection entryKeywords =
scpEntry.Properties["keywords"];

if (CollectionContainsExactValue(entryKeywords,
ScpPtrGuidString))

string ptrLdapPath =
scpEntry.Properties["serviceBindingInformation"][0] as string;

// Determine whether this pointer is scoped to the


user's domain.

if (CollectionContainsExactValue(entryKeywords,
"Domain=" + domain))

Console.WriteLine("Found SCP pointer for " + domain


+ " in " + scpEntry.Path);

// Restart SCP lookup with the server assigned for


the domain.

Console.WriteLine("Restarting SCP lookup in " +


ptrLdapPath);

return GetScpUrls(ptrLdapPath, domain);

else

// Save the first SCP pointer that is not scoped to


a domain as a fallback

// in case you do not get any results from this


server.

if (entryKeywords.Count == 1 &&
string.IsNullOrEmpty(fallBackLdapPath))

fallBackLdapPath = ptrLdapPath;

Console.WriteLine("Saved fallback SCP pointer: "


+ fallBackLdapPath);

string computerSiteName = null;

try

// Get the name of the ActiveDirectorySite the computer

// belongs to (if it belongs to one).

ActiveDirectorySite site =
ActiveDirectorySite.GetComputerSite();

computerSiteName = site.Name;

Console.WriteLine("Local computer in site: " +


computerSiteName);

catch (Exception ex)

Console.WriteLine("Unable to get computer site name.");

Console.WriteLine(ex.ToString());

if (!string.IsNullOrEmpty(computerSiteName))
{

// Scan the search results for SCP URLs.

// SCP URLs fit into three tiers:

// Priority 1: The URL is scoped to the computer's Active


Directory site.

// Priority 2: The URL is not scoped to any Active


Directory site.

// Priority 3: The URL is scoped to a different Active


Directory site.

// Temporary lists to hold priority 2 and 3 URLs.

List<string> priorityTwoUrls = new List<string>();

List<string> priorityThreeUrls = new List<string>();

foreach (SearchResult scpEntry in scpEntries)

ResultPropertyValueCollection entryKeywords =
scpEntry.Properties["keywords"];

// Check for SCP URLs.

if (CollectionContainsExactValue(entryKeywords,
ScpUrlGuidString))

string scpUrlPath = scpEntry.Properties["adsPath"]


[0] as string;

Console.WriteLine("SCP URL found at {0}",


scpUrlPath);

string scpUrl =
scpEntry.Properties["serviceBindingInformation"][0] as string;

scpUrl = scpUrl.ToLower();

// Determine whether this entry is scoped to the


computer's site.

if (CollectionContainsExactValue(entryKeywords,
"Site=" + computerSiteName))

// Priority 1.

if (!scpUrlList.Contains(scpUrl.ToLower()))

Console.WriteLine("Adding priority 1 SCP


URL: {0}", scpUrl.ToLower());

scpUrlList.Add(scpUrl);

else

Console.WriteLine("Priority 1 SCP URL


already found: {0}", scpUrl);

else

// Determine whether this is a priority 2 or 3


URL.

if (CollectionContainsPrefixValue(entryKeywords,
"Site="))

// Priority 3.

if (!priorityThreeUrls.Contains(scpUrl))

{
Console.WriteLine("Adding priority 3 SCP
URL: {0}", scpUrl);

priorityThreeUrls.Add(scpUrl);

}
else

{
Console.WriteLine("Priority 3 SCP URL
already found: {0}", scpUrl);

}
}

else

// Priority 2.

if (!priorityTwoUrls.Contains(scpUrl))

{
Console.WriteLine("Adding priority 2 SCP
URL: {0}", scpUrl);

priorityTwoUrls.Add(scpUrl);

}
else

{
Console.WriteLine("Priority 2 SCP URL
already found: {0}", scpUrl);

}
}

// Now add the priority 2 URLs into the main list.

foreach (string priorityTwoUrl in priorityTwoUrls)

// If the URL is already in the list as a priority 1,

// don't add it again.

if (!scpUrlList.Contains(priorityTwoUrl))

scpUrlList.Add(priorityTwoUrl);

// Now add the priority 3 URLs into the main list.

foreach (string priorityThreeUrl in priorityThreeUrls)

// If the URL is already in the list as a priority 1

// or priority 2, don't add it again.

if (!scpUrlList.Contains(priorityThreeUrl))

scpUrlList.Add(priorityThreeUrl);

// If after all this, you still have no URLs in your list,

// try the fallback SCP pointer, if you have one.

if (scpUrlList.Count == 0 && fallBackLdapPath != null)

return GetScpUrls(fallBackLdapPath, domain);

return scpUrlList;

private static bool


CollectionContainsExactValue(ResultPropertyValueCollection collection,
string value)

foreach (object obj in collection)

string entry = obj as string;

if (entry != null)

if (string.Compare(value, entry, true) == 0)

return true;

return false;

private static bool


CollectionContainsPrefixValue(ResultPropertyValueCollection collection,
string value)

foreach (object obj in collection)

string entry = obj as string;

if (entry != null)

if (entry.StartsWith(value))

return true;

return false;

Next steps
The next step in the Autodiscover process is to send Autodiscover requests to the URLs
that you found, starting with priority 1 URLs, then priority 2 URLs, and finally priority 3
URLs. To learn more about how to send Autodiscover requests and handle responses,
read the following articles:

Get user settings from Exchange by using Autodiscover


Handling Autodiscover error messages

See also
Autodiscover for Exchange
Setting up your EWS application
Generate a list of Autodiscover
endpoints
Article • 01/15/2020 • 3 minutes to read

Find out how to generate a prioritized list of Autodiscover endpoints.

The first task in the Autodiscover process is to generate a list of Autodiscover endpoints
for your application to try. These Autodiscover endpoints can come from an SCP lookup
or can be derived from the user's email address. In the end, you can end up with a large
number of endpoints. Let's take a look at how you can organize them by priority.

Start with SCP lookup


Autodiscover endpoints that come from an SCP lookup should have top priority in your
list. Administrators can configure SCP objects to route your client to the closest or most
efficient Autodiscover endpoint, so it is a good idea to start with these endpoints.
Because the SCP lookup process has its own prioritization scheme, the results of an SCP
lookup are already prioritized, as follows:

1. Autodiscover endpoints from SCP objects scoped to the Active Directory site that
the client computer belongs to.

2. Autodiscover endpoints from SCP objects not scoped to any Active Directory site.

3. Autodiscover endpoints from SCP objects scoped to a different Active Directory


site than the site that the client computer belongs to.

After you have the results of the SCP lookup process, you can add endpoints that derive
from the user's email address. These can serve as a default set of endpoints and a
fallback in case there are no SCP results or the endpoints returned from the SCP lookup
are not sufficient.

Add endpoints derived from the user's email


address
When SCP lookup doesn't work, or the endpoints returned by the SCP lookup don't
return a successful response, you can derive a set of default Autodiscover endpoints
from the user's email address. These endpoints should be a lower priority than any that
come from an SCP lookup, but you might need them if the SCP lookup was not
successful.
To derive Autodiscover endpoints
1. Extract the domain name from the user's email address. For example, if the user's
email address is [email protected], the domain name would be
contoso.com.

2. Construct endpoint URLs without file extensions in the following formats:

"https://" + domain + "/autodiscover/autodiscover"

"https://autodiscover." + domain + "/autodiscover/autodiscover"

After you compile the list of endpoint URLs that derive from both SCP lookup and the
user's email address, you might need to revise file name extensions in those URLs,
depending on whether you're using the SOAP Autodiscover web service or the POX
Autodiscover web service .

Add or replace file name extensions in


endpoint URLs
You can access the Autodiscover service by using either the SOAP Autodiscover web
service or the POX Autodiscover web service. Each service uses similar endpoint URLs,
with the only difference being the file name extension. The SOAP Autodiscover web
service uses the ".svc" file name extension, and the POX Autodiscover web service uses
the ".xml" file name extension.

By default, the Autodiscover endpoint URLs returned from an SCP lookup are POX URLs.
However, if you are using SOAP Autodiscover, you can simply change the file name
extension from ".xml" to ".svc" and try a SOAP request.

For the derived Autodiscover endpoint URLs, the file extension is omitted. Add the
appropriate file extension for the Autodiscover web service you are using prior to trying
the URL.

Example: Generating a list of Autodiscover


endpoints
Let's take a look at an example. Sadie Daniels ([email protected]) is using an
Exchange Web Services (EWS) application for the first time. The application uses
Autodiscover to configure itself. Sadie's computer is joined to the contoso.com domain
and is in the Redmond Active Directory site. The application generates the list of
Autodiscover endpoints shown in Figure 1.

Figure 1: Sample list of Autodiscover endpoints

The EWS application in this example prefers the SOAP Autodiscover web service, so it
changes the file name extension for the SCP results to ".svc" before sending SOAP
requests to them.

Next steps
After you generate a list of Autodiscover endpoints, try them by sending requests to
those endpoints.

See also
Autodiscover for Exchange

Find Autodiscover endpoints by using SCP lookup in Exchange

Handling Autodiscover error messages


Use Autodiscover to find connection
points
Article • 01/15/2020 • 6 minutes to read

Find out how to use the Autodiscover service to direct your client application to the
correct Exchange server.

The Exchange Autodiscover service provides your client application with configuration
settings for email accounts that are hosted on Exchange Online, Exchange Online as part
of Office 365, or an Exchange server running a version of Exchange starting with
Exchange 2013. The Autodiscover service is a web service that provides configuration
settings. The Autodiscover service is a web service that provides Exchange server
configuration information to your client application. Client applications use
Autodiscover to determine the endpoint of the Autodiscover service for a specific
mailbox. This article explains how to follow the responses from an Exchange server to
find the correct endpoint.

For information about how to get email address configuration settings, see Get user
settings from Exchange by using Autodiscover and Get domain settings from an
Exchange server.

7 Note

The process for finding the correct endpoint is part of the request for user or
domain settings. The Autodiscover service uses a series of redirect responses to
send the client application to the correct endpoint for an email address.

You can use one of the following Exchange development technologies to access the
Autodiscover service:

The Exchange Web Services (EWS) Managed API

EWS

If you are using EWS, you can use the following methods to retrieve user settings:

The SOAP-based Autodiscover service

The XML (POX) Autodiscover service

An autogenerated proxy generated from the SOAP or XML Autodiscover service


For more information about these methods, see Autodiscover for Exchange.

For more information about these Exchange development technologies, see Explore the
EWS Managed API, EWS, and web services in Exchange.

The EWS Managed API provides an object-based interface for retrieving user settings. If
your client application uses managed code, we recommend that you use the EWS
Managed API. The EWS Managed API interface is better optimized for a simple object
model than the typical autogenerated web service proxy.

If you are using EWS, we suggest that you use the SOAP Autodiscover service, because it
supports a richer set of features than the POX Autodiscover service.

Prerequisites for finding an endpoint


Before you can create a client application that uses the Autodiscover service, you need
to have access to the following:

Exchange Online or a server that is running a version of Exchange starting with


Exchange 2007 SP1. If you are using the SOAP-based Autodiscover service,
Exchange Online or a version of Exchange starting with Exchange 2010.

An Exchange server that is configured to accept connections from your client


application. For information about how to configure your Exchange server, see
Controlling client application access to EWS in Exchange.

An account that is authorized to use EWS. For information about how to configure
an account, see Controlling client application access to EWS in Exchange.

7 Note

If you are using the EWS Managed API, you must provide a certificate validation
callback in some circumstances. You may also need a certificate validation callback
with some generated proxy libraries, such as those created by Visual Studio. For
more information, see Validate a server certificate for the EWS Managed API.

Core concepts for finding an endpoint


Before you use Autodiscover to find an endpoint, you should be familiar with the
concepts listed in the following table.

Concept Description
Concept Description

Autodiscover for Exchange


Provides an overview of how the Autodiscover service works.

If you are using the EWS Managed API, you use the
Microsoft.Exchange.WebServices.Data.ExchangeService class in the
Microsoft.Exchange.WebServices.Data namespace to manage your connection to EWS.
To use the EWS Managed API code samples in this article, you need to reference the
following namespaces in your code:

System.Net

Microsoft.Exchange.WebServices.Data.ExchangeService

Find the correct endpoint by using the EWS


Managed API
If you are using the EWS Managed API, calls to the Autodiscover service are handled by
the ExchangeService class. To determine the correct endpoint for an email account, you
call the AutodiscoverUrl method on an [ExchangeService] object. The following code
example shows how to set the EWS web service endpoint for an email address to the
Exchange.asmx file on the correct Client Access server by using the EWS Managed API.

C#

NetworkCredential credentials = new NetworkCredential(securelyStoredEmail,


securelyStoredPassword);

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013);

service.Credentials = credentials;

service.AutodiscoverUrl("[email protected]");

Find the correct endpoint by using EWS


The SOAP Autodiscover service may use a series of requests and responses to direct
your application to the correct endpoint for EWS. For information about the process for
determining the correct endpoint for an email account, see Autodiscover for Exchange.
The following XML examples show the series of requests and responses that you can
expect when making a SOAP Autodiscover request to find the correct endpoint.

SOAP Autodiscover endpoint request


The following example shows an XML request that is sent to the Autodiscover service to
find the correct endpoint.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope
xmlns:a="https://schemas.microsoft.com/exchange/2010/Autodiscover"

xmlns:wsa="http://www.w3.org/2005/08/addressing"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<a:RequestedServerVersion>Exchange2013</a:RequestedServerVersion>

<wsa:Action>https://schemas.microsoft.com/exchange/2010/Autodiscover/Autodis
cover/GetUserSettings</wsa:Action>

<wsa:To>https://mail.microsoft.com/autodiscover/autodiscover.svc</wsa:To>

</soap:Header>

<soap:Body>

<a:GetUserSettingsRequestMessage
xmlns:a="https://schemas.microsoft.com/exchange/2010/Autodiscover">

<a:Request>

<a:Users>

<a:User>

<a:Mailbox>[email protected]</a:Mailbox>

</a:User>

</a:Users>

<a:RequestedSettings>

<a:Setting>InternalEwsUrl</a:Setting>

<a:Setting>ExternalEwsUrl</a:Setting>

</a:RequestedSettings>

</a:Request>

</a:GetUserSettingsRequestMessage>

</soap:Body>

</soap:Envelope>

SOAP Autodiscover redirection response


The Autodiscover service may respond with one of two redirection responses: an HTTP
302 redirect, or a SOAP redirection response. If the response from the Exchange server is
an HTTP 302 redirect, the client application should validate that the redirection address
is acceptable and then follow the redirection response.

) Important

For criteria for validating a redirection response, see Autodiscover for Exchange.
If the Autodiscover service returns a redirection response, indicated by the ErrorCode
element of the UserResponse element, your client application should use the
RedirectTarget element to construct a new settings request that is sent to the server
specified in the redirection response. The following example shows a redirection
response from the server.

XML

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/"
xmlns:a="http://www.w3.org/2005/08/addressing">

<s:Header>

<a:Action
s:mustUnderstand="1">https://schemas.microsoft.com/exchange/2010/

Autodiscover/Autodiscover/GetUserSettingsResponse</a:Action>

<h:ServerVersionInfo
xmlns:h="https://schemas.microsoft.com/exchange/2010/Autodiscover"

xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

<h:MajorVersion>15</h:MajorVersion>

<h:MinorVersion>0</h:MinorVersion>

<h:MajorBuildNumber>682</h:MajorBuildNumber>

<h:MinorBuildNumber>1</h:MinorBuildNumber>

<h:Version>Exchange2013</h:Version>

</h:ServerVersionInfo>

</s:Header>

<s:Body>

<GetUserSettingsResponseMessage
xmlns="https://schemas.microsoft.com/exchange/2010/Autodiscover">

<Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

<ErrorCode>NoError</ErrorCode>

<ErrorMessage />

<UserResponses>

<UserResponse>

<ErrorCode>RedirectAddress</ErrorCode>

<ErrorMessage>Redirection address.</ErrorMessage>

<RedirectTarget>[email protected]</RedirectTarget>

<UserSettingErrors />

<UserSettings />

</UserResponse>

</UserResponses>

</Response>

</GetUserSettingsResponseMessage>

</s:Body>

</s:Envelope>

After a redirection, the client uses the redirection URL to prepare another request. The
following code shows an example of the request that you create from the redirection
response.

XML
<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope
xmlns:a="https://schemas.microsoft.com/exchange/2010/Autodiscover"

xmlns:wsa="http://www.w3.org/2005/08/addressing"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<a:RequestedServerVersion>Exchange2013</a:RequestedServerVersion>

<wsa:Action>https://schemas.microsoft.com/exchange/2010/

Autodiscover/Autodiscover/GetUserSettings</wsa:Action>

<wsa:To>https://autodiscover.exchange.microsoft.com/autodiscover/autodiscove
r.svc</wsa:To>

</soap:Header>

<soap:Body>

<a:GetUserSettingsRequestMessage
xmlns:a="https://schemas.microsoft.com/exchange/2010/Autodiscover">

<a:Request>

<a:Users>

<a:User>

<a:Mailbox>[email protected]</a:Mailbox>

</a:User>

</a:Users>

<a:RequestedSettings>

<a:Setting>InternalEwsUrl</a:Setting>

<a:Setting>ExternalEwsUrl</a:Setting>

</a:RequestedSettings>

</a:Request>

</a:GetUserSettingsRequestMessage>

</soap:Body>

</soap:Envelope>

When the client application has been directed to the correct endpoint for the
Autodiscover service, the server will send a response with the ErrorCode element of
the UserResponse element set to NoError and containing the requested user settings.
Only the requested user settings, InternalEwsUrl and ExternalEwsUrl, are returned. The
following example shows the response from the server.

XML

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/"

xmlns:a="http://www.w3.org/2005/08/addressing">

<s:Header>

<a:Action
s:mustUnderstand="1">https://schemas.microsoft.com/exchange/2010/

Autodiscover/Autodiscover/GetUserSettingsResponse</a:Action>

<h:ServerVersionInfo
xmlns:h="https://schemas.microsoft.com/exchange/2010/Autodiscover"

xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

<h:MajorVersion>15</h:MajorVersion>

<h:MinorVersion>0</h:MinorVersion>

<h:MajorBuildNumber>160</h:MajorBuildNumber>

<h:MinorBuildNumber>4</h:MinorBuildNumber>

<h:Version>Exchange2013</h:Version>

</h:ServerVersionInfo>

</s:Header>

<s:Body>

<GetUserSettingsResponseMessage
xmlns="https://schemas.microsoft.com/exchange/2010/Autodiscover">

<Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

<ErrorCode>NoError</ErrorCode>

<ErrorMessage />

<UserResponses>

<UserResponse>

<ErrorCode>NoError</ErrorCode>

<ErrorMessage>No error.</ErrorMessage>

<RedirectTarget i:nil="true" />

<UserSettingErrors />

<UserSettings>

<UserSetting i:type="StringSetting">

<Name>InternalEwsUrl</Name>

<Value>https://server.Contoso.com/ews/exchange.asmx</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>ExternalEwsUrl</Name>

<Value>https://server.Contoso.com/ews/exchange.asmx</Value>

</UserSetting>

</UserSettings>

</UserResponse>

</UserResponses>

</Response>

</GetUserSettingsResponseMessage>

</s:Body>

</s:Envelope>

Next steps
Finding the endpoint by following the Autodiscover process returns the requested
domain or user settings. For information about making a request for specific settings,
see the following articles:

Get domain settings from an Exchange server


Get user settings from Exchange by using Autodiscover

See also
Setting up your EWS application
Autodiscover for Exchange
Autodiscover web service reference for Exchange
EWS reference for Exchange
Get user settings from Exchange by
using Autodiscover
Article • 01/15/2020 • 5 minutes to read

Learn how to get user configuration settings from an Exchange server by using
Autodiscover.

Autodiscover simplifies application configuration by providing easy access to user


configuration information using only the user's email address and password. A number
of user configuration settings are available via Autodiscover, such as the user's display
name or external web service URL.

You can use one of the following development technologies to retrieve user settings
from the Autodiscover service:

The Get started with EWS Managed API client applications

The SOAP Autodiscover web service

The POX Autodiscover web service

The EWS Managed API provides an object-based interface for retrieving user settings. If
your client application uses managed code, we recommend that you use the EWS
Managed API. If you are using the EWS Managed API, determine whether the settings
that you need are available in the
Microsoft.Exchange.WebServices.Autodiscover.UserSettingName enumeration. If they
aren't, you might want to use the SOAP or POX Autodiscover services.

If you are using a web service, we suggest that you use the SOAP Autodiscover service,
because it supports a richer set of features than the POX Autodiscover service. If the
SOAP Autodiscover service isn't available, the POX Autodiscover service is a good
alternative.

Set up to get user settings


Before you get user settings by using the Autodiscover service, make sure that you have
access to the following:

If you are using the EWS Managed API or the POX-based Autodiscover service,
Exchange Online, Exchange Online as part of Office 365, or a server that is running
a version of Exchange starting with Exchange 2007 SP1.
If you are using the SOAP-based Autodiscover service, Exchange Online or a
version of Exchange starting with Exchange 2010.

7 Note

If you are using the EWS Managed API, you will need to provide a certificate
validation callback method in some circumstances. You might also need a
certificate validation callback method with some generated proxy libraries, such as
those created by Visual Studio.

Get user settings by using the EWS Managed


API
You can use the GetUserSettings method to retrieve configuration information for a
user, as shown in the following example. In this example, you can specify an array of
user settings to return (from those available in the UserSettingName enumeration),
and the method will follow redirection responses from the Exchange server.

C#

using System;

using System.Net;

using Microsoft.Exchange.WebServices.Autodiscover;

public static GetUserSettingsResponse GetUserSettings(

AutodiscoverService service,

string emailAddress,

int maxHops,

params UserSettingName[] settings)

Uri url = null;

GetUserSettingsResponse response = null;

for (int attempt = 0; attempt < maxHops; attempt++)

service.Url = url;

service.EnableScpLookup = (attempt < 2);

response = service.GetUserSettings(emailAddress, settings);

if (response.ErrorCode == AutodiscoverErrorCode.RedirectAddress)

url = new Uri(response.RedirectTarget);

else if (response.ErrorCode == AutodiscoverErrorCode.RedirectUrl)

url = new Uri(response.RedirectTarget);

else

return response;

throw new Exception("No suitable Autodiscover endpoint was found.");

You can parse the collection returned to access each key/value pair in the user settings
array. The following example shows how to parse through each returned element and
display the name and value of each key/value pair.

C#

// Display each retrieved value. The settings are part of a key/value pair.

// userresponse is a GetUserSettingsResonse object.

foreach (KeyValuePair<UserSettingName, Object> usersetting in


userresponse.Settings)

Console.WriteLine(usersetting.Key.ToString() + ": " +


usersetting.Value);

Alternatively, you can obtain the value of a specific setting. In the following example, the
UserDisplayName setting is to be displayed.

C#

// Display a specific setting, such as UserDisplayName.

Console.WriteLine(userresponse.Settings[UserSettingName.UserDisplayName]);

Get user settings by using SOAP Autodiscover


If you're not using the EWS Managed API, we recommend that you use the SOAP
Autodiscover web service. Only use the POX Autodiscover web service if the SOAP
Autodiscover web service fails or is not available.

To get user settings, use the GetUserSettings operation (SOAP) . The requested
settings are returned as UserSetting elements .

The following example shows a SOAP Autodiscover request to get user settings from the
server.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope
xmlns:a="https://schemas.microsoft.com/exchange/2010/Autodiscover"

xmlns:wsa="http://www.w3.org/2005/08/addressing"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<a:RequestedServerVersion>Exchange2013</a:RequestedServerVersion>

<wsa:Action>https://schemas.microsoft.com/exchange/2010/Autodiscover/Autodis
cover/GetUserSettings</wsa:Action>

<wsa:To>https://autodiscover.exchange.microsoft.com/autodiscover/autodiscove
r.svc</wsa:To>

</soap:Header>

<soap:Body>

<a:GetUserSettingsRequestMessage
xmlns:a="https://schemas.microsoft.com/exchange/2010/Autodiscover">

<a:Request>

<a:Users>

<a:User>

<a:Mailbox>[email protected]</a:Mailbox>

</a:User>

</a:Users>

<a:RequestedSettings>

<a:Setting>UserDisplayName</a:Setting>

<a:Setting>UserDN</a:Setting>

<a:Setting>UserDeploymentId</a:Setting>

<a:Setting>InternalMailboxServer</a:Setting>

<a:Setting>MailboxDN</a:Setting>

<a:Setting>PublicFolderServer</a:Setting>

<a:Setting>ActiveDirectoryServer</a:Setting>

<a:Setting>ExternalMailboxServer</a:Setting>

<a:Setting>EcpDeliveryReportUrlFragment</a:Setting>

<a:Setting>EcpPublishingUrlFragment</a:Setting>

<a:Setting>EcpTextMessagingUrlFragment</a:Setting>

<a:Setting>ExternalEwsUrl</a:Setting>

<a:Setting>CasVersion</a:Setting>

<a:Setting>EwsSupportedSchemas</a:Setting>

<a:Setting>GroupingInformation</a:Setting>

</a:RequestedSettings>

</a:Request>

</a:GetUserSettingsRequestMessage>

</soap:Body>

</soap:Envelope>

The following example shows the SOAP response that is returned by the server after it
parses the request from the client. The response contains only the settings that are
requested, if they exist.

XML

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/"
xmlns:a="http://www.w3.org/2005/08/addressing">

<s:Header>

<a:Action
s:mustUnderstand="1">https://schemas.microsoft.com/exchange/2010/

Autodiscover/Autodiscover/GetUserSettingsResponse</a:Action>

<h:ServerVersionInfo
xmlns:h="https://schemas.microsoft.com/exchange/2010/Autodiscover"

xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

<h:MajorVersion>15</h:MajorVersion>

<h:MinorVersion>0</h:MinorVersion>

<h:MajorBuildNumber>160</h:MajorBuildNumber>

<h:MinorBuildNumber>4</h:MinorBuildNumber>

<h:Version>Exchange2013</h:Version>

</h:ServerVersionInfo>

</s:Header>

<s:Body>

<GetUserSettingsResponseMessage
xmlns="https://schemas.microsoft.com/exchange/2010/Autodiscover">

<Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

<ErrorCode>NoError</ErrorCode>

<ErrorMessage />

<UserResponses>

<UserResponse>

<ErrorCode>NoError</ErrorCode>

<ErrorMessage>No error.</ErrorMessage>

<RedirectTarget i:nil="true" />

<UserSettingErrors />

<UserSettings>

<UserSetting i:type="StringSetting">

<Name>UserDisplayName</Name>

<Value>Mara Whitley</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>UserDN</Name>

<Value>/o=microsoft/ou=Exchange Administrative Group


(FYDIBOHF23SPDLT)/cn=Recipients/cn=mara</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>UserDeploymentId</Name>

<Value>649d50b8-a1ce-4bac-8ace-2321 e463f701</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>CasVersion</Name>

<Value>15.01.0160.004</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>EwsSupportedSchemas</Name>

<Value>Exchange2007, Exchange2007_SP1, Exchange2010,


Exchange2010_SP1, Exchange2010_SP2, Exchange2013</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>InternalMailboxServer</Name>

<Value>mail.contoso.com</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>ActiveDirectoryServer</Name>

<Value>dc.contoso.com</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>MailboxDN</Name>

<Value>/o=microsoft/ou=Exchange Administrative Group

(FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=mail.contoso.com/cn=Contoso
Private MDB</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>PublicFolderServer</Name>

<Value>public.contoso.com</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>EcpDeliveryReportUrlFragment</Name>

<Value>PersonalSettings/DeliveryReport.aspx?
exsvurl=1&amp;amp;IsOWA=&amp;lt;IsOWA&amp;gt;&amp;amp;MsgID=&amp;lt;MsgID&am
p;gt;&amp;amp;Mbx=&amp;lt;Mbx&amp;gt;</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>EcpTextMessagingUrlFragment</Name>

<Value>?p=sms/textmessaging.slab&amp;amp;exsvurl=1</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>EcpPublishingUrlFragment</Name>

<Value>customize/calendarpublishing.slab?
exsvurl=1&amp;amp;FldID=&amp;lt;FldID&amp;gt;</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>ExternalEwsUrl</Name>

<Value>https://mail.contoso.com/EWS/Exchange.asmx</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>ExternalMailboxServer</Name>

<Value>mail.contoso.com</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>GroupingInformation</Name>

<Value>CONTOSO-1</Value>

</UserSetting>

</UserSettings>

</UserResponse>

</UserResponses>

</Response>

</GetUserSettingsResponseMessage>

</s:Body>

</s:Envelope

Get user settings by using POX Autodiscover


Although we recommend that you use the SOAP Autodiscover web service, the POX
Autodiscover web service is a good backup option for those times when SOAP isn't
available. For example, Exchange 2007 does not support the SOAP Autodiscover web
service, so if you are targeting Exchange 2007, you have to use the POX Autodiscover
web service. Unlike the SOAP Autodiscover web service, the POX Autodiscover service
does not allow you to request specific settings. Instead, the server returns a full list of
available settings as child elements of the Protocol element .

The following example shows a POX Autodiscover request to get user settings from the
server. The following XML is sent to the server via an HTTP POST.

XML

<?xml version="1.0" encoding="utf-8"?>

<Autodiscover
xmlns="https://schemas.microsoft.com/exchange/autodiscover/outlook/requestsc
hema/2006">

<Request>

<EMailAddress>[email protected]</EMailAddress>

<AcceptableResponseSchema>https://schemas.microsoft.com/exchange/autodiscove
r/outlook/responseschema/2006a</AcceptableResponseSchema>

</Request>

</Autodiscover>

The following example shows the POX response that is returned by the server.

XML

<?xml version="1.0" encoding="utf-8"?>

<Autodiscover
xmlns="https://schemas.microsoft.com/exchange/autodiscover/responseschema/20
06">

<Response
xmlns="https://schemas.microsoft.com/exchange/autodiscover/outlook/responses
chema/2006a">

<User>

<DisplayName>Mara Whitley</DisplayName>

<LegacyDN>/o=First Organization/ou=Exchange Administrative Group


(FYDIBOHF23SPDLT)/cn=Recipients/cn=f5eeabead90d4b6fb51d6379474692cd-
Mara</LegacyDN>

<AutoDiscoverSMTPAddress>[email protected]</AutoDiscoverSMTPAddress>

<DeploymentId>50817eff-b925-4578-a0db-13bfc635e7a5</DeploymentId>

</User>

<Account>

<AccountType>email</AccountType>

<Action>settings</Action>

<MicrosoftOnline>False</MicrosoftOnline>

<Protocol>

<Type>EXCH</Type>

<Server>[email protected]</Server>

<ServerDN>/o=First Organization/ou=Exchange Administrative Group


(FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=5f76be3c-9138-4f66-85e0-
[email protected]</ServerDN>

<ServerVersion>73C08204</ServerVersion>

<MdbDN>/o=First Organization/ou=Exchange Administrative Group


(FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=5f76be3c-9138-4f66-85e0-
[email protected]/cn=Microsoft Private MDB</MdbDN>

<PublicFolderServer>public.contoso.com</PublicFolderServer>

<AD>dc.contoso.com</AD>

<ASUrl>https://mail.contoso.com/EWS/Exchange.asmx</ASUrl>

<EwsUrl>https://mail.contoso.com/EWS/Exchange.asmx</EwsUrl>

<EmwsUrl>https://mail.contoso.com/EWS/Exchange.asmx</EmwsUrl>

<EcpUrl>https://mail.contoso.com/ecp/</EcpUrl>

<EcpUrl-um>?
rfr=olk&amp;amp;p=customize/voicemail.aspx&amp;amp;exsvurl=1&amp;amp;realm=c
ontoso.com</EcpUrl-um>

<EcpUrl-aggr>?
rfr=olk&amp;amp;p=personalsettings/EmailSubscriptions.slab&amp;amp;exsvurl=1
&amp;amp;realm=contoso.com</EcpUrl-aggr>

<EcpUrl-mt>PersonalSettings/DeliveryReport.aspx?
rfr=olk&amp;amp;exsvurl=1&amp;amp;IsOWA=&amp;lt;IsOWA&amp;gt;&amp;amp;MsgID=
&amp;lt;MsgID&amp;gt;&amp;amp;Mbx=&amp;lt;Mbx&amp;gt;&amp;amp;realm=contoso.
com</EcpUrl-mt>

<EcpUrl-ret>?
rfr=olk&amp;amp;p=organize/retentionpolicytags.slab&amp;amp;exsvurl=1&amp;am
p;realm=contoso.com</EcpUrl-ret>

<EcpUrl-sms>?
rfr=olk&amp;amp;p=sms/textmessaging.slab&amp;amp;exsvurl=1&amp;amp;realm=con
toso.com</EcpUrl-sms>

<EcpUrl-publish>customize/calendarpublishing.slab?
rfr=olk&amp;amp;exsvurl=1&amp;amp;FldID=&amp;lt;FldID&amp;gt;&amp;amp;realm=
contoso.com</EcpUrl-publish>

<EcpUrl-photo>PersonalSettings/EditAccount.aspx?
rfr=olk&amp;amp;chgPhoto=1&amp;amp;exsvurl=1&amp;amp;realm=contoso.com</EcpU
rl-photo>

<EcpUrl-tm>?
rfr=olk&amp;amp;ftr=TeamMailbox&amp;amp;exsvurl=1&amp;amp;realm=contoso.com<
/EcpUrl-tm>

<EcpUrl-tmCreating>?
rfr=olk&amp;amp;ftr=TeamMailboxCreating&amp;amp;SPUrl=&amp;lt;SPUrl&amp;gt;&
amp;amp;Title=&amp;lt;Title&amp;gt;&amp;amp;SPTMAppUrl=&amp;lt;SPTMAppUrl&am
p;gt;&amp;amp;exsvurl=1&amp;amp;realm=contoso.com</EcpUrl-tmCreating>

<EcpUrl-tmEditing>?
rfr=olk&amp;amp;ftr=TeamMailboxEditing&amp;amp;Id=&amp;lt;Id&amp;gt;&amp;amp
;exsvurl=1&amp;amp;realm=contoso.com</EcpUrl-tmEditing>

<EcpUrl-extinstall>Extension/InstalledExtensions.slab?
rfr=olk&amp;amp;exsvurl=1&amp;amp;realm=contoso.com</EcpUrl-extinstall>

<OOFUrl>https://mail.contoso.com/EWS/Exchange.asmx</OOFUrl>

<UMUrl>https://mail.contoso.com/EWS/UM2007Legacy.asmx</UMUrl>

<OABUrl>https://mail.contoso.com/OAB/c21c7bc2-53b3-4ddc-ad89-
1219b486c37c/</OABUrl>

<ServerExclusiveConnect>off</ServerExclusiveConnect>

</Protocol>

<Protocol>

<Type>EXPR</Type>

<Server>mail.contoso.com</Server>

<SSL>Off</SSL>

<AuthPackage>Ntlm</AuthPackage>

<ServerExclusiveConnect>on</ServerExclusiveConnect>

<CertPrincipalName>None</CertPrincipalName>

</Protocol>

<Protocol>

<Type>WEB</Type>

<Internal>

<OWAUrl AuthenticationMethod="Basic,
Fba">https://mail.contoso.com/owa/</OWAUrl>

<Protocol>

<Type>EXCH</Type>

<ASUrl>https://mail.contoso.com/EWS/Exchange.asmx</ASUrl>

</Protocol>

</Internal>

</Protocol>

</Account>

</Response>

</Autodiscover>

Next steps
After you've retrieved the necessary configuration details for your user from the server,
you are ready to communicate with Exchange to do the things your application needs to
do. What you do next depends on how you communicate with Exchange and what you
want to accomplish. If you need some inspiration, and you're using EWS, you might
explore the Exchange 101 code samples for some ideas.

See also
Autodiscover for Exchange

Exchange Web Services (EWS) Managed API

SOAP Autodiscover web service reference for Exchange

POX Autodiscover web service reference for Exchange


Get domain settings from an Exchange
server
Article • 01/15/2020 • 4 minutes to read

Learn how to get domain settings from an Exchange server by using the Autodiscover
service.

You can retrieve configuration information for an email domain by using the
Autodiscover service. The Autodiscover service provides your application with a process
for connecting to the correct service endpoint for a specific domain.

You can use one of the following development technologies to access the Autodiscover
service:

The Exchange Web Services (EWS) Managed API

EWS

If you are using EWS, you can use the following methods to retrieve user settings:

The SOAP-based Autodiscover service

The XML (POX) Autodiscover service

An autogenerated proxy generated from the SOAP or XML Autodiscover service

For more information about these methods, see Autodiscover for Exchange.

The EWS Managed API provides an object-based interface for retrieving user settings. If
your client application uses managed code, we recommend that you use the EWS
Managed API. The EWS Managed API interface is better optimized for a simple object
model than the typical autogenerated web service proxy.

If you are using EWS, we suggest that you use the SOAP Autodiscover service, because it
supports a richer set of features than the POX Autodiscover service.

The Autodiscover service returns only the requested configuration settings. The
following table lists the domain configuration settings that the Autodiscover service can
return.

Table 1: Domain configuration settings

Configuration setting Description


Configuration setting Description

ExternalEwsUrl The external URL for EWS.

ExternalEwsVersion The version of the Exchange server that hosts the EWS URL.

Prerequisites for getting domain settings


Before you create an application that connects to the Autodiscover service to get
domain settings, make sure that you have access to the following:

Exchange Online, Exchange Online as part of Office 365, or a server running a


version of Exchange starting with Exchange 2007. If you are using the EWS SOAP-
based Autodiscover service, a server running a version of Exchange starting with
Exchange 2010.

An Exchange server that is configured to accept connections from your client


application. For information about how to configure your Exchange server, see
Controlling client application access to EWS in Exchange.

An account that is authorized to use EWS. For information about how to configure
an account, see Controlling client application access to EWS in Exchange.

7 Note

If you are using the EWS Managed API, you must provide a certificate validation
callback in some circumstances. You may also need a certificate validation callback
with some generated proxy libraries, such as those created by Visual Studio. For
more information, see Validate a server certificate for the EWS Managed API.

Core concepts for getting domain settings


Before you use Autodiscover to get domain settings, you should be familiar with the
concepts listed in the following table.

Concept Description

Autodiscover for Provides an overview of how the Autodiscover service works.


Exchange

Use Autodiscover to find Describes the process used by the Autodiscover service to redirect
connection points
your client application to the correct service endpoint.
If you are using the EWS Managed API, you use the
Microsoft.Exchange.WebServices.Data.ExchangeService class in the
Microsoft.Exchange.WebServices.Data namespace to manage your connection to EWS.
The code examples in this section assume that you reference the following namespaces
in your code:

System.Net

Microsoft.Exchange.WebServices.Data.ExchangeService

Get domain settings by using the EWS


Managed API
If you are using the EWS Managed API, you can use the
Microsoft.Exchange.WebServices.Data.AutodiscoverSettings.GetUserSettings method
of the Microsoft.Exchange.WebServices.Data.AutodiscoverService object to generate
the request that retrieves configuration information for a domain, as shown in the
following example. In this example, only some of the possible domain settings are
requested, and only the requested settings are returned from the server.

C#

AutodiscoverService autodiscoverService = new


AutodiscoverService("domain.contoso.com");

autodiscoverService.Credentials = new NetworkCredential("User1", "password",


"domain.contoso.com");

// Submit a request and get the settings. The response contains only the

// settings that are requested, if they exist.

GetDomainSettingsResponse domainresponse =
autodiscoverService.GetDomainSettings(

"domain",

ExchangeVersion.Exchang2013,

DomainSettingName.ExternalEwsUrl,

DomainSettingName.ExternalEwsVersion);

You can parse the collection returned to access each key/value pair. The following
example shows how to parse through each returned element and display the name and
value of each key/value pair.

C#

// Display each retrieved value. The settings are part of a key/value pair.

foreach (KeyValuePair<DomainSettingName, Object> domainsetting in


domainresponse.Settings)

Console.WriteLine(domainsetting.Key.ToString() + ": " +


domainsetting.Value.ToString());

Alternatively, you can obtain the value of a specific setting. In the following example, the
ExternalEwsUrl setting is to be displayed.

C#

// Display a specific setting, such as ExternalEwsUrl.

Console.WriteLine(domainresponse.Settings[DomainSettingName.ExternalEwsUrl])
;

Get user settings by using EWS SOAP


Autodiscover
The following example shows a SOAP XML request to get both domain settings from the
Autodiscover service.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope
xmlns:a="https://schemas.microsoft.com/exchange/2010/Autodiscover"

xmlns:wsa="http://www.w3.org/2005/08/addressing"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<a:RequestedServerVersion>Exchange2013</a:RequestedServerVersion>

<wsa:Action>https://schemas.microsoft.com/exchange/2010/Autodiscover/Autodis
cover/GetDomainSettings</wsa:Action>

<wsa:To>https://autodiscover.exchange.microsoft.com/autodiscover/autodiscove
r.svc</wsa:To>

</soap:Header>

<soap:Body>

<a:GetDomainSettingsRequestMessage
xmlns:a="https://schemas.microsoft.com/exchange/2010/Autodiscover">

<a:Request>

<a:Domains>

<a:Domain>domain</a:Domain>

</a:Domains>

<a:RequestedSettings>

<a:Setting>ExternalEwsUrl</a:Setting>

<a:Setting>ExternalEwsVersion</a:Setting>

</a:RequestedSettings>

<a:RequestedVersion>Exchange2013</a:RequestedVersion>

</a:Request>

</a:GetDomainSettingsRequestMessage>

</soap:Body>

</soap:Envelope>

The following example shows the XML response that is returned by the server after it
parses the request from the client.

XML

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/"

xmlns:a="http://www.w3.org/2005/08/addressing">

<s:Header>

<a:Action
s:mustUnderstand="1">https://schemas.microsoft.com/exchange/2010/

Autodiscover/Autodiscover/GetDomainSettingsResponse</a:Action>

<h:ServerVersionInfo
xmlns:h="https://schemas.microsoft.com/exchange/2010/Autodiscover"

xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

<h:MajorVersion>15</h:MajorVersion>

<h:MinorVersion>0</h:MinorVersion>

<h:MajorBuildNumber>160</h:MajorBuildNumber>

<h:MinorBuildNumber>4</h:MinorBuildNumber>

<h:Version>Exchange2013</h:Version>

</h:ServerVersionInfo>

</s:Header>

<s:Body>

<GetDomainSettingsResponseMessage
xmlns="https://schemas.microsoft.com/exchange/2010/Autodiscover">

<Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

<ErrorCode>NoError</ErrorCode>

<ErrorMessage />

<DomainResponses>

<DomainResponse>

<ErrorCode>NoError</ErrorCode>

<ErrorMessage>No error.</ErrorMessage>

<DomainSettingErrors />

<DomainSettings>

<DomainSetting i:type="DomainStringSetting">

<Name>ExternalEwsUrl</Name>

<Value>https://failover.exchange.microsoft.com/ews/exchange.asmx</Value>

</DomainSetting>

<DomainSetting i:type="DomainStringSetting">

<Name>ExternalEwsVersion</Name>

<Value>15.00.0085.000</Value>

</DomainSetting>

</DomainSettings>

<RedirectTarget i:nil="true" />

</DomainResponse>

</DomainResponses>

</Response>

</GetDomainSettingsResponseMessage>

</s:Body>

</s:Envelope>

Next steps
Domain settings provide the basic information that your client needs to connect to EWS.
You can use this information to connect to EWS, or you can retrieve additional
configuration settings for an email account from the server. For more information, see
the following article:

Get user settings from Exchange by using Autodiscover

See also
Setting up your EWS application

Autodiscover web service reference for Exchange

EWS reference for Exchange


Refresh configuration information by
using Autodiscover
Article • 06/14/2022 • 3 minutes to read

Learn how and when to refresh configuration information for your Exchange connection
by using Autodiscover.

When your EWS application runs for the first time, Autodiscover provides a great way
for you to collect the information you need in order to connect to your user's Exchange
mailbox. But Autodiscover isn't just for first time use. Using Autodiscover on a regular
basis can help keep your application connected by enabling it to respond to changes in
the Exchange deployment.

Cache Autodiscover endpoint and EWS settings


While we recommend that you use Autodiscover regularly, how regularly you use it
requires some consideration. Ideally you can balance responding quickly to changes in
the environment against generating too much unnecessary network traffic. When your
application gets a successful Autodiscover response for the first time, you should save
the following information so that you do not have to repeat the Autodiscover process
every time you send an EWS request.

Table 1. Information to cache for Autodiscover requests

Setting to Valid Details


cache for…

Autodiscover As When you save the Autodiscover endpoint that returned a successful
endpoint long response, you do not have to repeat the process of generating a list of
as it Autodiscover endpoints and trying them until you get a successful
works response.

NOTE: The EWS Managed API does not support caching the
Autodiscover endpoint.
Setting to Valid Details
cache for…

EWS URL and One By saving the EWS URL and other related settings, you do not have to
any other week send a new Autodiscover request for each EWS request or if your
settings application restarts. However, even if an EWS URL works for your user, a
retrieved from server might be available that is more optimal.

the
Autodiscover For example, the user's mailbox might have moved to a new mailbox
response server, resulting in a new preferred EWS endpoint. We recommend that
you refresh your user settings by sending a new Autodiscover request
after one week has passed since your last Autodiscover request. This
time can be adjusted to meet the requirements of your application.

Refresh cached configuration information


Now that you have the information cached, let's examine how you can keep that cache
fresh. We recommend that you refresh your cached information when:

The information's validity period expires.

A Connection-related error occurs AND your cached information was last refreshed
over an hour ago.

To refresh your cached information, send an Autodiscover request to a cached


Autodiscover endpoint, and do the following:

If the request succeeds, compare the EWS endpoint in the response with the
cached EWS endpoint, and do the following:

If they are different, use the new EWS endpoint. If you're refreshing to recover
from an error, retry the failed request with the new endpoint.

If they are the same, continue to use the original EWS endpoint. If you're
refreshing to recover from an error, handle the error as appropriate.

If the request fails, start the Autodiscover process from the beginning. After you
get a successful response, replace the cached Autodiscover endpoint with the
Autodiscover endpoint that succeeded and continue to use the new EWS endpoint.
If you do not get a successful response, continue to use the original Autodiscover
endpoint and EWS endpoint. If you're refreshing to recover from an error, handle
the error as appropriate.

The following figure provides a visual representation of this process.


Figure 1. Process for refreshing configuration information by using Autodiscover

Connection-related errors
Refreshing your cached configuration information can help with some errors, but not all.

Table 2. Errors addressed by refreshing your cache

Error EWS Managed API Notes


implementation

DNS or network ServiceRemoteException Any error that indicates that the server could
failure errors
not be found or could not be reached might
be resolved by trying Autodiscover.

Example: Host name


could not be found. Your cached EWS endpoint might no longer
be valid, and Autodiscover might be able to
point you to the new server.

HTTP status errors


ServiceRemoteException HTTP status errors can happen for many
different reasons.

Example: 503 Service


Unavailable However, it's a good idea to try Autodiscover
to see if a new EWS endpoint is available for
the user.
Error EWS Managed API Notes
implementation

EWS error codes


ResponseCodeType
Most EWS error codes don't warrant
refreshing your configuration information.

Example:
ErrorConnectionFailed However, the following specifically indicate
that the configuration information needs to
be updated:

- ErrorConnectionFailed

- ErrorMailboxMoveInProgress

See also
Autodiscover for Exchange
Generate a list of Autodiscover endpoints
Get user settings from Exchange by using Autodiscover
Handling Autodiscover error messages
Article • 01/15/2020 • 5 minutes to read

Learn about the different types of Autodiscover errors and what to do with them.

Autodiscover enables your applications to retrieve configuration information


automatically, and it works great. However, things don't always go according to plan.
Let's look at the common errors that might occur and how you can handle them to
minimize the need to prompt your user to manually configure your client.

HTTP status errors


The first type of error you might encounter when sending Autodiscover requests is the
HTTP status. If the HTTP status in your response is anything other than 200 (OK), the
response payload doesn't contain the Autodiscover response you were looking for. For
simplicity, we can group non-200 status codes into three categories.

Table 1. HTTP status codes

Status Type of error To handle…


code

301 Redirect Resend your request to the URI contained in the "Location" HTTP
or error response header. For details, see Handling redirect errors.
302

401 Unauthorized Because the Autodiscover process involves trying multiple potential
error URLs, you could get this on one URL only to have the next one accept
your credentials. For this reason, you shouldn't consider a single 401
error to indicate that the credentials are invalid. However, if you receive
401 errors from multiple URLs, you might want to prompt the user to
reenter their password (if possible).

Any Invalid Consider the URL that returns any other non-200 status code to be
other Autodiscover invalid, and continue trying the next URL in your list.
non- endpoint
200 error
status

Autodiscover errors
Even if you get a 200 (OK) status code after sending an Autodiscover request, that
doesn't mean that the server sent the information you need. The 200 status only means
that you have an Autodiscover response, and that response might contain an error
within the payload. The location of the error information differs depending on whether
the format is SOAP or POX.

SOAP Autodiscover errors


For SOAP Autodiscover, the response can contain one or more ErrorCode (SOAP)
elements, in different places. Typically you can expect one as a child element of the
Response (SOAP) element, and one as a child of each UserResponse (SOAP)
element in the response. You might also encounter one as a child of a UserSettingError
(SOAP) element, if one is present. The context of the error depends on where the
ErrorCode element is located, as follows:

As a child element of the Response element, the ErrorCode element represents an


error that applies to the entire request.

As a child of the UserResponse element, it represents an error that applies just to


that specific user.

As a child of a UserSettingError element, it represents an error that applies to a


specific setting that was requested.

Let's take a look at an example of a response. In this example, the ErrorCode element
under the Response element has a value of "NoError", which indicates overall success.
However, the ErrorCode element under the UserResponse element has a value of
"RedirectAddress", which indicates that an error occurred for that particular user.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/"

xmlns:a="http://www.w3.org/2005/08/addressing">

<s:Header>

<a:Action
s:mustUnderstand="1">https://schemas.microsoft.com/exchange/2010/Autodiscove
r/Autodiscover/GetUserSettingsResponse</a:Action>

<h:ServerVersionInfo
xmlns:h="https://schemas.microsoft.com/exchange/2010/Autodiscover"

xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

<h:MajorVersion>14</h:MajorVersion>

<h:MinorVersion>3</h:MinorVersion>

<h:MajorBuildNumber>136</h:MajorBuildNumber>

<h:MinorBuildNumber>1</h:MinorBuildNumber>

<h:Version>Exchange2010_SP2</h:Version>

</h:ServerVersionInfo>

</s:Header>

<s:Body>

<GetUserSettingsResponseMessage
xmlns="https://schemas.microsoft.com/exchange/2010/Autodiscover">

<Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

<ErrorCode>NoError</ErrorCode>

<ErrorMessage />

<UserResponses>

<UserResponse>

<ErrorCode>RedirectAddress</ErrorCode>

<ErrorMessage>Redirection address.</ErrorMessage>

<RedirectTarget>[email protected]</RedirectTarget>

<UserSettingErrors />

<UserSettings />

</UserResponse>

</UserResponses>

</Response>

</GetUserSettingsResponseMessage>

</s:Body>

</s:Envelope>

The ErrorCode (SOAP) article contains a full list of possible errors. Most of these
indicate an unrecoverable error, but a few warrant special handling.

Table 2. SOAP Autodisover ErrorCode values

ErrorCode To handle…
value

RedirectAddress Restarting Autodiscover with a new email address with the email address in the
RedirectTarget (SOAP) element.

RedirectUrl Resending your request to a new URL to the URL in the RedirectTarget
element.

ServerBusy Retry this URL after a small delay. You might wait a set amount of time or
simply move this URL to the end of your list of URLs to try. If you receive this
error multiple times from a URL, you should consider the URL to be invalid.

POX Autodiscover errors


The POX Autodiscover service reports errors a little differently. Non-recoverable errors
are contained in the Error (POX) element. The ErrorCode (POX) article contains a full
list of possible error codes.

Redirect errors are contained in the Action (POX) element. Any value of the Action
element other than "settings" indicates a redirect error.

Table 3. POX Autodisover ErrorCode values


Action To handle…
value

redirectAddr Restarting Autodiscover with a new email address with the email address in the
RedirectAddr (POX) element.

redirectUrl Resending your request to a new URL to the URL in the RedirectUrl (POX)
element.

In this example, the Action element has a value of "redirectAddr", which indicates that a
new request should be sent with the new email address contained in the RedirectAddr
element.

XML

<?xml version="1.0" encoding="utf-8"?>

<Autodiscover
xmlns="https://schemas.microsoft.com/exchange/autodiscover/responseschema/20
06">

<Response
xmlns="https://schemas.microsoft.com/exchange/autodiscover/outlook/responses
chema/2006a">

<Account>

<Action>redirectAddr</Action>

<RedirectAddr>[email protected]</RedirectAddr>

</Account>

</Response>

</Autodiscover>

Handling redirect errors


You can handle redirect error scenarios in two ways:

By restarting Autodiscover with a new email address.

By resending your request to a new URL.

Both scenarios require some validation before proceeding.

Restarting Autodiscover with a new email address


When you get a new email address in an Autodiscover redirect response, first verify that
the new email address that was provided in the redirect error response is not the same
address that you sent in the request that resulted in the error. If it is, you should not
restart Autodiscover and instead consider the URL that generated the response to be
invalid.
If the new email address is different, discard your existing list of potential Autodiscover
endpoint URLs and generate a new list based on the new email address.

Resending your request to a new URL


When you get a new URL in an Autodiscover redirect response, you should first validate
the URL as follows:

Verify that the URL is an HTTPS URL.

Verify that you have not received an error from this URL with the current email
address before.

If applicable to your application, inform the user of the redirection and get their
permission to follow the redirect.

Send a request to the URL and verify that the SSL certificate presented by the
server is valid.

If the URL passes validation, resend the request to this new URL.

See also
Autodiscover for Exchange

Find Autodiscover endpoints by using SCP lookup in Exchange

ErrorCode (SOAP)

ErrorCode (POX)
Improving performance when using
Autodiscover for Exchange
Article • 09/15/2021 • 2 minutes to read

Learn about ways to improve the performance of the Autodiscover process in your
application.

There are a lot of reasons to like Autodiscover. Configuring your application to connect
to Exchange with no user intervention is great! If you're reading this article, you
probably already know all the reasons to use and love Autodiscover, so we won't list
them here. Instead, we're going to talk about a potential downside: performance.

Autodiscover isn't inherently a slow process, but it's not inherently fast either. The
Autodiscover process involves a lot of network activity, and that introduces a lot of
potential for delays. The Autodiscover process has three phases; all three have the
potential to affect performance:

Defining the Autodiscover endpoint candidate pool — For applications running on


domain-joined computers, this can involve SCP lookups, which involves
communicating with Active Directory Domain Services (AD DS).

Trying each candidate — This requires an HTTP request/response to each


candidate endpoint.

Trying other alternatives — When the candidates in your Autodiscover endpoint


candidate pool don't produce results, you can do an unauthenticated GET request
(HTTP request/response) and a DNS lookup.

On the surface this might not seem like much. However, imagine a scenario where the
Autodiscover endpoint candidate pool is more than one or two URLs, and you don't find
a working one until the last URL in your pool. The delay can become a bit more
noticeable. So, what can you do?

Consider the need for SCP lookup


When SCP objects are present and configured well, they can speed up the Autodiscover
process. In other situations, however, they can slow it down. If SCP isn't used in your
environment, skip the entire SCP lookup portion of the Autodiscover process to save
time.
The EWS Managed API makes this easy: just set the
ExchangeService.EnableScpLookup property to false before calling the
ExchangeService.AutodiscoverUrl method. If you're using the AutodiscoverService
class, set the AutodiscoverService.EnableScpLookup property to false before calling
any of its methods.

Use Autodiscover less often


Autodiscover isn't designed to be used frequently use by applications. The intent behind
Autodiscover is for an application to use it to discover configuration information, and
then cache that information for a period of time. If you aren't caching configuration
information, consider adding caching to your application to reduce the number of times
you use Autodiscover.

Even if you are already caching, evaluate how long you cache configuration information.
The standard is to refresh Autodiscover information every 24 hours, but you might be
able to extend that time. You should test with your target environments and come up
with a "time-to-live" for your configuration that works for you.

Minimize requested data


If you're using the AutodiscoverService class in the EWS Managed API, or the
GetUserSettings operation (SOAP) operation via SOAP, you have direct control over
what settings are returned in the response. Although you can request quite a few
settings, chances are that your application only needs a handful of them. Every setting
that you request requires more processing on the server, which means more time
waiting for a response. Evaluate the settings you are requesting, and eliminate any that
you don't need.

If you're using the ExchangeService.AutodiscoverUrl method in the EWS Managed API,


you cannot change the settings you request. However, this method is already fairly
efficient; it only requests the ExternalEwsUrl and InternalEwsUrl settings from the
UserSettingName enumeration .

If you're using the POX Autodiscover service, you cannot request specific properties.

See also
Autodiscover for Exchange

Find Autodiscover endpoints by using SCP lookup in Exchange


Refresh configuration information by using Autodiscover

ExchangeService class

AutodiscoverService class
Outlook add-ins and EWS in Exchange
Article • 06/14/2022 • 4 minutes to read

Find information about Outlook add-ins and how they work with EWS in Exchange.

Outlook add-ins provide a single interface and programming model that uses web
standards to enable you to create a custom experience for your email users. You can
create mail apps that display contextual or helpful information in an HTML5 frame
hosted in Outlook; for example, a mail app can show a Bing map with an address
highlighted when an email message contains an address. Or when a user is composing a
message, a mail app can show additional information about the recipient, and insert a
standard greeting into the email at the touch of a button.

7 Note

"Outlook" in this article refers to the Outlook rich client, Outlook RT, Outlook Web
App, and OWA for Devices.

The mail apps interface is part of the JavaScript API for Office. You can use the API to
access information in Exchange to enable your mail app to:

Recognize entities , like addresses, phone numbers, task suggestions, or meeting


suggestions in an email.

Open and display existing messages and appointments in a separate view so


that users can cross-reference information in one or more messages.

Make EWS requests to the Exchange server that hosts the user's mailbox. A mail
app can, for example, get a list of folders so that the user can choose one to store
the message, or show all the items in a conversation, or mark an email message as
junk.

Get a token to uniquely identify an email account to enable single sign on on a


third-party service.

Get a token that enables a third-party service to make EWS requests on behalf of
the user, for example, to extract the attachments from an item, or to get an item
from the Exchange server for further processing.

You can use mail apps to customize the Outlook Web App experience for your users; if,
however, you want to customize the "look and feel" of Outlook Web App, see these
articles on TechNet:
Create a theme for Outlook Web App

Customize the Outlook Web App sign-in, language selection, and error pages

Your organization can install mail apps on an internal server to limit access to authorized
users, or you and other mail app developers can put mail apps on the Office Store for
sale to the general public. Anyone who is running Outlook can download, install, and
use mail apps from the marketplace.

If you want to learn more about creating mail apps, check out the Outlook add-ins
documentation or the Make an EWS request sample.

EWS and Outlook add-ins


You can use a subset of EWS operations on the Exchange server that hosts the account
that runs a mail app.

The mailbox.makeEwsRequestAsync function enables you to make EWS requests from


your mail app back to the server that hosts the user's mailbox. You create the SOAP
envelope and XML request, and the makeEwsRequestAsync function calls EWS with an
authentication token that identifies the mailbox and mail app that is making the request.
To help secure the user's mailbox, the Exchange server will reject any requests that do
not come from the mail app or from a mailbox that is not hosted on the server.

Like any other application, a mail app needs permissions to work. Your administrator
needs to:

Grant EWS access to the mail apps user.

Set "OAuthAuthentication" to true on the Client Access Server EWS directory.

You also need to make sure that your app requests the read/write mailbox permission in
the apps for Office permission model.

When these steps are complete, a subset of folder and item EWS operations are
available for the mail app to use.

Table 1. EWS folder and item operations that mail apps can use

Folder operations Item operations


Folder operations Item operations

CreateFolder operation
CopyItem operation

FindFolder operation
CreateItem operation

GetFolder operation
FindItem operation

UpdateFolder operation
FindConversation operation

GetConversationItems operation

GetItem operation

MarkAsJunk operation

MoveItem operation

SendItem operation

UpdateItem operation

Service callback tokens


Service callback tokens enable mail apps to pass an access token to a third-party service
so that the service can make EWS requests to the Exchange server that hosts the
mailbox. For example, a mail app can pass a service callback token to a third-party
service along with a list of attachment IDs for pictures attached to an email. The service
can then use the attachment IDs and the callback token to make an EWS request to the
user's Exchange server to get the attached pictures. Mail apps can also use the service
callback token with a list of item IDs to get email and appointment items from the
Exchange server.

The service callback token is an opaque token that the third-party service attaches to
the EWS request in a bearer authentication header. The token identifies the mail app
and the mailbox to help secure the EWS request. To learn how to use service callback
tokens, see the Outlook add-ins: Get attachments from an Exchange server sample.

See also
Controlling client application access to EWS in Exchange

Mailbox.makeEwsRequestAsync method (JavaScript API for Office)

Outlook add-ins

Mailbox.getUserIdentityTokenAsync method (JavaScript API for Office)

Authenticate an Outlook add-in by using Exchange identity tokens

Understanding Outlook add-in permissions

Set-WebServicesVirtualDirectory
Outlook add-ins: Make an EWS request

Outlook add-ins: Use a client identity token

Outlook add-ins: Get attachments from an Exchange server


Microsoft Graph REST APIs for mail,
calendars, and contacts
Article • 10/11/2021 • 2 minutes to read

Find information about the Microsoft Graph APIs that you can use to access mail,
calendars, and contacts in Office 365, Exchange Online, or Exchange Server in hybrid
deployments.

Office 365, Exchange Online, and Exchange Server in hybrid deployments provide a new
way to work with email, calendars, and contacts. The Microsoft Graph Mail, Calendar,
and Contact REST APIs provide a powerful, easy-to-use way to access and manipulate
Exchange data. These APIs are based on open standards: OAuth version 2.0 for
authentication, and OData version 4.0 and JSON for data abstraction. This provides the
following advantages:

Because these APIs require OAuth for authentication, your application does not
have to handle or store user credentials.

OAuth makes it possible to request tightly scoped permissions to user data. For
example, you might design your application to request permission and read only a
user's calendar.

Work with email and mail folders


You can use the Mail API to get, create, update, delete, move, copy, and send email. You
can also get, create, update, and delete mail folders.

Work with events, calendars, and calendar


groups
You can use the Calendar API to get, create, update, and delete events. You can also get,
create, update, and delete calendar groups and calendars.

Work with contacts and contact folders


You can use the Contacts API to get, create, update, and delete contacts in a user's
mailbox. You can also get contact folders.
Next steps
Head over to the Microsoft Graph documentation page to get more information about
the Mail, Calendar, and Contacts APIs, including guidance for setting up your
environment and getting started with the APIs.

Also be sure to check out the quick starts and code samples to see these APIs in action.

See also
Microsoft Graph documentation
On-premises requirements for the REST API
License information
Article • 09/15/2021 • 2 minutes to read

Notwithstanding any other terms that may be applicable to your use of the EWS
Content (defined below), the following restrictions apply to your use of documentation,
software code or other materials made available by Microsoft from this web site that are
associated with Microsoft Exchange Web Services Managed API, version 1.1 or later, or
Exchange Web Services in Exchange Server 2010 SP1 or later versions of the Exchange
Server product, including any pre-release or finalized versions thereof (collectively, "EWS
Content"): you may use the EWS Content solely in programs developed by you that
interoperate with Microsoft Exchange Server.
EWS client design overview for
Exchange
Article • 03/04/2022 • 6 minutes to read

Learn about the design considerations for developing with EWS for Exchange.

This article provides overview information about designing an Exchange Web Services
(EWS) application. You can use this information to determine whether EWS is the right
API for your application, and if so, what type of client implementation you should use.
This article also provides best practice information for designing applications that can
target Office 365, Exchange Online, and versions of Exchange starting with Exchange
2007, in one code base, and important decision points for targeting on-premises
Exchange servers versus targeting Exchange Online.

Is EWS the right API for your application?


Before you begin to design your application, it is important to consider whether EWS is
the right API for you. If you are developing against Exchange Server or Exchange Online,
EWS is the preferred client access technology. Client access development for versions of
Exchange starting with Exchange 2007 has primarily been focused on EWS. New client
access functionality that is implemented in Outlook uses EWS, including the Out of
Office (OOF) and Availability features introduced in Exchange 2007, and the MailTips
and Get Rooms functionality introduced in Exchange 2010. This represents a committed
investment in EWS for both internal and external partners who develop Exchange client
applications.

EWS is the primary client access API for your Exchange client applications. However, in
some cases, you might consider other Exchange APIs for client application development.
For example, Exchange ActiveSync provides the following advantages over EWS:

The XML structure has been tokenized to make Exchange ActiveSync a more
compact protocol.
Exchange ActiveSync contains a policy mechanism to control client access and to
provide other robust enterprise mobile messaging solutions.

7 Note

You need a license in order to develop Exchange ActiveSync clients. To learn about
the differences between Exchange ActiveSync and EWS, see Choosing between
Exchange ActiveSync and Exchange Web Services (EWS) .
MAPI RPC over HTTP is another programmability option for Exchange client
applications. However, MAPI RPC over HTTP does not provide an intuitive interface for
communicating between clients and the server.

For more information about Exchange development technologies, see Explore the EWS
Managed API, EWS, and web services in Exchange.

Options for EWS client development


Several options are available for developing against Exchange by using EWS. The best
option for you will depend on the development platform, tools, available
implementations, and application requirements for your organization. The following are
the four primary options that are available for building EWS client applications:

The EWS Managed API


The EWS Java API
The EWS autogenerated proxies
A custom EWS client API

EWS Managed API


The EWS Managed API is a custom web service client. It is the standard client access
API for .NET Framework applications.

The following are some of the benefits of using the EWS Managed API:

It provides an intuitive object model.


It abstracts the complexities of the service description in the WSDL and schema
files.
It includes client-side business logic.
It handles the web requests and responses and object serialization and
deserialization.
It is Microsoft-supported.

Note, however, that the EWS Managed API is not a complete solution. Some
functionality is not implemented in the EWS Managed API. Although the EWS Managed
API doesn't implement all EWS functionality, it might be the best choice for your client
application development, for the following reasons:

You can use the .NET Framework for development.


It implements Autodiscover in addition to most parts of the EWS object model.
It implements client-side business logic for working with EWS, in the
ExchangeService class.

You might choose to use the EWS web service API instead of the EWS Managed API for
any of the following reasons:

Your application does not use the .NET Framework.


You don't want to distribute the EWS Managed API assembly.
Your application uses features that aren't implemented in the EWS Managed API.

To more, see Get started with EWS Managed API client applications.

7 Note

The EWS Managed API is now available as an open source project on GitHub .
You can use the open source library to:

Contribute bug fixes and enhancements to the API.


Get fixes and enhancements before they are available in an official release.
Access the most comprehensive and up-to-date implementation of the API, to
use as a reference or to create new libraries on new platforms.

We welcome your contributions via GitHub.

EWS Java API


The EWS Java API is an open source project on GitHub that can be updated and
extended by the community. It is stylistically similar to the EWS Managed API and
uses EWS SOAP requests and responses over the wire. Although you can't access all
EWS SOAP operations by using the EWS Java API, with the recent creation of the
open source project, we are looking to the community to bridge this gap. Note that
Microsoft Support, with an appropriate support contract, will address any questions
related to the EWS SOAP protocol but not the EWS Java API itself. The EWS Java API is
available for download and community contribution on GitHub .

EWS autogenerated proxies


Autogenerated client APIs are generated from the EWS WSDL and XML schema
definitions. Client object model generators are available for many languages. In general,
the autogenerated object models manage object serialization and deserialization. They
do not include business logic and the autogeneration process often creates artifacts that
make the object model less intuitive to use. Exchange support covers the XML that is
sent and received by the client but not the object model.

Custom EWS client API


For some applications that use a small set of EWS functionality, you might create a
custom client API to communicate with Exchange. This enables you to consume fewer
system resources. This is useful for clients that run on memory-constrained devices, such
as clients running the .NET Micro Framework.

EWS client features


Regardless of the development option that you choose, you should consider how EWS
features are implemented in your client. Feature availability is based on the EWS schema
version that your application targets. Because EWS schemas are backward- and forward-
compatible, if you create an application that targets an earlier schema version, such as
Exchange Server 2007 SP1, your application will also work against a later schema
version, such as the Exchange Server 2013 SP1 service, as well as Exchange Online.

Because features and feature updates are driven by the schema, we recommend that
you use the earliest common code base that targets the EWS features that you want to
implement in your client application. Many applications can target the
Exchange2007_SP1 version, because the Exchange 2007 SP1 schema contains almost all
the core Exchange functionality for working with items and folders in the Exchange
store. We recommend that you maintain code forks for each EWS schema version. The
following are the schema versions that are currently available.

XML

<xs:simpleType name="ExchangeVersionType">

<xs:restriction base="xs:string">

<xs:enumeration value="Exchange2007" />

<xs:enumeration value="Exchange2007_SP1" />

<xs:enumeration value="Exchange2010" />

<xs:enumeration value="Exchange2010_SP1" />

<xs:enumeration value="Exchange2010_SP2" />

<xs:enumeration value="Exchange2013" />

<xs:enumeration value="Exchange2013_SP1" />

</xs:restriction>

</xs:simpleType>

The schema versions are maintained in the ExchangeVersionType simple type.


For information about the features that are available in each EWS schema version, see
EWS schema versions in Exchange.

In this section
Web service API feature availability in Exchange and the EWS Managed API
EWS schema versions in Exchange
Configuration options for EWS in Exchange
Comparing Exchange Online and Exchange on-premises client programming
EWS throttling in Exchange
Redistribution requirements for the EWS Managed API
Instrumenting client requests for EWS and REST in Exchange

See also
Start using web services in Exchange
Develop web service clients for Exchange
EWS application types
Web service API feature availability in
Exchange and the EWS Managed API
Article • 09/15/2021 • 3 minutes to read

Learn about which EWS and web service API features are available in each version of Exchange and
the EWS Managed API.

Exchange client applications often target many versions of Exchange. For this reason, you might
want to design your application such that you can turn EWS client features on and off based on the
version of Exchange that hosts your users' mailbox. This article provides information about which
service API features are available in different versions of Exchange and the EWS Managed API. Use
this information to design your application to apply broadly to customers running multiple
versions of Exchange.

For detailed information about the differences between versions of Exchange, review the EWS
schema files and the associated reference documentation .

API features by Exchange version


The Exchange web service APIs, including EWS and Autodiscover, are developed with multi-version
compatibility in mind. Therefore, an application that targets Exchange 2007 also works against
versions of Exchange starting with Exchange 2013, including Exchange Online and Exchange Online
as part of Office 365.

The following table indicates which API features are available in each version of Exchange and
versions of the EWS Managed API starting with version 2.0. Because your application might target
multiple versions of Exchange, it will be helpful for you to know which versions support the
features that your client implements. You can use the Autodiscover service to discover which
version of Exchange a client targets for a user so that you can turn features on and off depending
on whether they are available to your users.

Table 1. Web service feature availability in versions of Exchange and the EWS Managed API

API feature Exchange EWS Exchange Exchange Exchange Exchange Exchange Exchange
Online Managed 2013 2010 SP2 2010 SP1 2010 2007 SP1 2007
(Office API
365)

Ambiguous X X X X X X X X
name
resolution

Apps for X X X
Outlook
management
API feature Exchange EWS Exchange Exchange Exchange Exchange Exchange Exchange
Online Managed 2013 2010 SP2 2010 SP1 2010 2007 SP1 2007
(Office API
365)

Archive mailbox X X X X X
access

Autodiscover X X X X X X X X
(POX)

Autodiscover X X X X X
(SOAP)

Automatic X X X X X X X X
replies (OOF)

Availability X X X X X X X X

Availability X X X X X X
(Rooms)

Bulk transfer X X X X

Contact groups X X X X X X

Conversation X X X X X
management

DateTime X X X X
precision

Delegate X X X X X X X
management

Distribution list X X X X X X X X
expansion

Dumpster X X X X X X
access

eDiscovery
X X X

Enhanced time X X X X X X
zones

Folder X X X X X X X
permissions

Identifier X X X X X X X
conversion

Inbox X X X X X
management

Item and folder X X X X X X X X


access

API feature Exchange EWS Exchange Exchange Exchange Exchange Exchange Exchange
Online Managed 2013 2010 SP2 2010 SP1 2010 2007 SP1 2007
(Office API
365)

Mailbox events X X X X X X X X
(pull and push)

Mailbox events X X X X X
(streaming)

Mailtips X X X X X

Password X X X X
expiration

Personas
X X

Post items X X X X X X X

Public folder X X X X X X X
access

Retention X X X
policies

Search X X X X X X
(indexed)

Search (store)
X X X X X X X X

Synchronization X X X X X X X X

Unified Contact X X
Store

Unified X X X X X X X
Messaging Web
Service

Unified X X X X X X
Messaging
(EWS-based)

User X X X X X X
configuration
objects

User photos
X X

You can find more information about the web service features that are available in different
versions of Exchange by reading about the EWS operations , the Autodiscover service , and the
ExchangeService methods .

To learn more
If you want to go deeper to understand the specific differences between Exchange versions, you
can do any of the following:

Explore the EWS schema to investigate the differences between each version of EWS in
more detail.

Download EWSEditor . You can use EWSEditor to specify different target schema versions
and submit queries based on the target schema version.

See also
EWS client design overview for Exchange
Get started with EWS Managed API client applications
What's new in EWS and other web services in Exchange
EWS schema versions in Exchange
Article • 01/15/2020 • 6 minutes to read

Learn about the EWS schema and how to design your application to work with it, as well
as the features that are available with each schema version, and how the schema relates
to the Exchange service version.

The EWS schema defines the data structures that can be sent to and returned by
Exchange. Each new version of Exchange that contains a significant change to EWS
functionality will contain a new schema. EWS and the EWS schema are both backward,
and in some cases, forward compatible - applications designed against earlier versions
of EWS will work, in most cases, with later versions of EWS, and applications that target
later versions of EWS will work if the same functionality was included in an earlier
version. This article will help you understand the role of the EWS schema, how schema
versioning works, the relationship between the schema version and the service version,
and how to design your application to work with the EWS schema.

Role of the EWS schema


The EWS schema does the following:

Defines the feature set that is available to a client. A client can get the list of the
supported schema versions by using the SOAP Autodiscover service. The client can
then determine which features it can access, because each schema version
represents an EWS feature set. Each new schema released for EWS contains of the
schema entities from the previous version plus the schema definitions for any new
functionality. This way, EWS supports applications that target an earlier version of
EWS.

Provides a general description of the API contract. You can use this contract to
determine the data structures that can be sent to and received from Exchange.

Provides a versioning mechanism for sending requests. The Exchange server


contains all the supported EWS schema versions in its virtual directory.

Designing your application with schema


version in mind
Keep the following points in mind as you design your application to work with different
versions of the EWS schema:
Turn on/off functionality based on the schema version. You'll want to map client
functionality to the schema version and, in some cases, to the version of the
service. The following example will return a PropertySet based on the version of
the schema and service.

C#

private static PropertySet InitPropertySetByVersion(ExchangeService


service)

PropertySet props;

// The schema version to target to access the NormalizedBody


property

// is Exchange2013 or later. The server version to target to access


the

// NormalizedBody property on an email is 15 or later, which

// equates to Exchange 2013.

if (service.RequestedServerVersion >= ExchangeVersion.Exchange2013


&amp;&amp;

service.ServerInfo.MajorVersion >= 15)

props = new PropertySet(EmailMessageSchema.NormalizedBody);

else

props = new PropertySet(EmailMessageSchema.Body);

return props;

Version your requests with the earliest version of the EWS schema that supports
the functionality you want to use. This will make your client applicable to a larger
number of potential Exchange servers. This is less important if you're developing a
line-of-business application to target your organization's servers only, but is very
important if you're building an application for a wider Exchange audience.

Features by schema version


The schema versions that are available to a client are identified in the
ExchangeVersionType simple type located in the types.xsd schema. The
ExchangeVersionType is implemented by the RequestServerVersion element. The
RequestServerVersion element is sent in all EWS requests to indicate to the server which
version of the schema the client targets. This in turn identifies the feature set that is
available to the client.

Table 1: EWS features by product and schema version


Product Associated Features
version schema version

Exchange The latest schema Includes all the features in the current version of Exchange in
Online version. addition to any new features that are added for online clients.

Exchange Exchange2013_SP1 Includes all the features in Exchange 2013.

2013 SP1
The following features were introduced in Exchange 2013 SP1:

Mailbox hold policy


Propose new time
Read receipt updates for updating and deleting
items
IRM information update for conversations

Exchange Exchange2013 Includes all features introduced in Exchange 2007 and Exchange
2013 2010.

The following features were introduced in Exchange 2013:

Archiving
eDiscovery
Personas
Retention policies
Unified Contact Store
User photos

Exchange Exchange2010_SP2 Includes all the features introduced in Exchange 2010 SP1.

2010 SP2
The following features were introduced in Exchange 2010 SP2:

Get Password Expiration


DateTime precision
Updated property identifiers for contacts
New impersonation scenarios
Product Associated Features
version schema version

Exchange Exchange2010_SP1 Includes all the features introduced in Exchange 2010.

2010 SP1
The following features were introduced in Exchange 2010 SP1:

Create, retrieve and modify Inbox rules


Programmatic access to Archive Mailbox
Conversations actions
Firewall traversing notifications
Improved administration features
Improved mixed version support
Throttling protection support
Control of application access to EWS
Client certificate authentication support

Exchange Exchange2010 Includes all features introduced in Exchange 2007 SP1.

2010
The following features were introduced in the initial release
version of Exchange 2010:

Full Private Distribution List


User Configuration Objects
Folder Associated Items
Message tracking
Unified Messaging
SOAP Autodiscover
Enhanced Time Zone support
Room resource availability information
Indexed search
Dumpster access
MailTips information

Exchange Exchange2007_SP1 Includes all the features introduced in Exchange 2007.

2007 SP1
The following features were introduced in Exchange 2007 SP1:

Delegate management
Folder permissions
Public folders
Post items
ID conversion
Product Associated Features
version schema version

Exchange Exchange2007 The following features were introduced in the initial release
2007 version of Exchange 2007:
Full access to items, folders, and attachments (Create, Get,
Update, Delete)
Availability
Out of Office settings
Notifications
Synchronization
Name resolution
Distribution list (DL) expansion
Search

Relationship between the EWS schema and the


service version
The EWS schema version is related to the version of the EWS service that the server is
running. The naming pattern for the EWS schema is related to the on-premises versions
of Exchange. For example, the initial release of Exchange 2013 has a service version of
15.00.0516.032 and the schema name Exchange2013. Because the schema was updated
for Exchange 2013, both Exchange 2013 and Exchange Online with a service version of
15.00.0516.032 and later have the same version name for the latest schema. In earlier
versions of Exchange, the EWS schema was not updated with cumulative updates
(formerly called rollups). But because Exchange is updated more frequently to support
Exchange Online, cumulative updates now contain schema updates for EWS. The
schema file names, and the associated schema version name, are only updated with
service packs or major releases of Exchange on-premises.

While the EWS schema defines the contract, in some scenarios, the service version is the
only way for a client to determine how it is supposed to interact with the service. Service
behavior changes that aren't reflected in the schema can only be determined by the
service version returned in all EWS responses. For example, when public folders were
redesigned in Exchange 2013, the operations that are used to move and copy public
folders changed. If you designed a client to copy public folders in Exchange 2010, you
would need to update it to use different operations to get the same result in Exchange
2013.

How the EWS schema is updated


Exchange servers running versions of Exchange starting with Exchange 2007 include the
EWS schema in the virtual directory that hosts the EWS service. The current schema
version is always represented by the types.xsd and messages.xsd files. Figure 1 shows
how the messages.xsd schema is forked when a new version of the schema is
developed. Before new functionality is added, a copy of the original messages.xsd
schema is included and renamed to represent the previous version of the schema. The
messages.xsd file is then updated with the service description for the new version.

Figure 1. How the EWS schema is updated

Before the EWS schema is updated for a new version, the current version of the schema
is forked and renamed using the following convention:

<schemaname>-<majorserverversion><servicepack>.xsd

The original file name then represents the latest schema. All new features are added to
the latest schema, with the exception of updates and fixes to the earlier versions of the
schema.

See also
EWS schema versions in Exchange
Autodiscover for Exchange
Develop web service clients for Exchange
Configuration options for EWS in
Exchange
Article • 09/15/2021 • 2 minutes to read

Find information about configuration settings that your EWS client can access, and the
configurable Exchange settings that can affect your EWS client.

Many configuration settings can affect what your EWS client application can do. These
configuration settings are either:

Read-only or read-writeable from the client.

Accessed on the Exchange server that hosts your EWS service.

A client can access settings on Exchange Online, Exchange Online as part of Office 365,
and an on-premise Exchange server. All on-premise Exchange server settings are
available to Exchange administrators; however, not all of these settings are available to
Exchange Online tenant administrators. This article describes which configuration
settings clients, Exchange Server administrators, and Exchange Online tenant
administrators can access.

Configuration settings that clients can access


Your client application can get and set a number of configuration options from the
Exchange server. Configuration settings that all EWS applications need are provided by
the Autodiscover service. Other configuration settings are used for specific application
scenarios.

Table 1. Web service features that provide configuration options for EWS clients

Feature Description

Autodiscover The Autodiscover service provides your client applications with configuration
service information so that your client can automatically configure itself to communicate
with EWS.

Custom You can use one of several options to store custom configuration information in
configuration your mailbox: user configuration objects, custom items, or extended properties.
information
stored in a
mailbox
Feature Description

Delegate EWS provides CRUD operations for managing delegate access to a mailbox.
management Delegates are users who have been given permission to access another user's
mailbox.

You can use the delegate management operations to enable delegate


management by using EWS, or, if you're using the EWS Managed API, you can use
the following methods:

- ExchangeService.AddDelegates

- ExchangeService.GetDelegates

- ExchangeService.UpdateDelegates

- ExchangeService.RemoveDelegates

eDiscovery eDiscovery client applications can get search configuration information that
search includes an eDiscovery search query, a list of searchable mailboxes, and the
configuration identifier of in-place mailbox holds.

Folder Folder permissions limit what a user can do in a public folder, and in the case of
permissions delegate access, what a delegate can do in another user's folder. You can use
either the Folder.Bind method or the GetFolder operation to access the
permission set of every folder, including public folders, shared private folders, or
folders to which users have delegate access.

Mail tips, The GetServiceConfiguration operation provides read-only service


Unified configuration information for mail tips, Unified Messaging, and protection rules.
Messaging,
or protection
rules

Configuration settings that administrators can


access on the Exchange server
Most client application scenarios don't require changes to server configuration settings;
however, some scenarios do. For example, to enable a middle-tier application to act as a
user, you need to set Exchange Impersonation on the server. Note that some settings
can only be accessed on on-premise Exchange servers. If you are targeting Exchange
Online, your client application might need to work with the default settings.

Table 2. Exchange server configuration options that affect EWS clients

Feature Accessible from For more information, see…


Exchange Online?
Feature Accessible from For more information, see…
Exchange Online?

Virtual directory settings (including No Get-


authentication) WebServicesVirtualDirectory

Set-
WebServicesVirtualDirectory

Autodiscover No Get-
AutodiscoverVirtualDirectory
Set-
AutodiscoverVirtualDirectory

Compliance Yes Archiving

eDiscovery

Retention hold

Data loss prevention

Delegate management Yes Manage Permissions for


Recipients

Exchange Impersonation Yes Configure Exchange


Impersonation

Mail tips, Unified Messaging, or Yes MailTips

protection rules Unified Messaging Cmdlets

Outlook Protection Rules

Throttling No Throttling settings

User agent filtering Yes User agent filtering

See also
Get service configuration information by using EWS in Exchange
EWS client design overview for Exchange
Start using web services in Exchange
Develop web service clients for Exchange
Get service configuration information
by using EWS in Exchange
Article • 09/15/2021 • 2 minutes to read

Find out how to get service configuration information for UM, policy nudges, mail tips,
and protection rules from EWS in Exchange.

Does your EWS application work with Unified Messaging (UM), policy nudges, mail tips,
or protection rules? If so, your application will need to call the GetServiceConfiguration
operation to get the service configuration information that it needs. The
GetServiceConfiguration operation returns configuration information that is specific to
each of these EWS features.

7 Note

The EWS Managed API does not implement this functionality.

Table 1. Configuration information that the GetServiceConfiguration operation returns

EWS GetServiceConfiguration operation returns…


feature

UM A value that indicates whether UM is enabled.


A value that indicates whether play on phone is enabled.
The play on phone dial string.

Policy Policy nudges for display in your client.


nudges

Mail tips A value that indicates whether mail tips are enabled.
The maximum number of recipients per request.
The maximum message size.
The large audience threshold.
A value that indicates whether the number of external recipients is shown.
A list of internal domains.
A value that indicates whether policy tips are enabled.
The large audience cap threshold for indicating whether your mail is
considered to have a large number of recipients.

Protection Protection rules setup for your client.


rules A list of domains that are internal to your organization.
Code example: Get service configuration
information for mail tips by using EWS
The following code example uses the GetServiceConfiguration operation to request
service configuration information for mail tips. You can request additional service
configuration information by adding more ConfigurationName elements with
different values.

C#

private static void GetServiceConfiguration(ExchangeService service,


NetworkCredential creds)

// XML for the GetServiceConfiguration request SOAP envelope for mail tips
configuration information.

const string getServiceConfigurationRequest =

"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +

"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-
instance\"\n" +

"
xmlns:m=\"http://schemas.microsoft.com/exchange/services/2006/messages\"\n"
+

"
xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\" \n" +

"
xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"\n" +

" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\n" +

" <soap:Header>\n" +

" <t:RequestServerVersion Version=\"Exchange2013\" />\n" +

" </soap:Header>\n" +

" <soap:Body>\n" +

" <m:GetServiceConfiguration>\n" +

" <m:ActingAs>\n" +

" <t:EmailAddress>[email protected]</t:EmailAddress>\n" +

" <t:RoutingType>SMTP</t:RoutingType>\n" +

" </m:ActingAs>\n" +

" <m:RequestedConfiguration>\n" +

" <m:ConfigurationName>MailTips</m:ConfigurationName>\n" +

" </m:RequestedConfiguration>\n" +

" </m:GetServiceConfiguration>\n" +

" </soap:Body>\n" +

"</soap:Envelope>";

// Encoded GetServiceConfiguration operation request.

byte[] payload =
System.Text.Encoding.UTF8.GetBytes(getServiceConfigurationRequest);

try

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(service.Url);

request.AllowAutoRedirect = false;

request.Credentials = creds;

request.Method = "POST";

request.ContentType = "text/xml";

Stream requestStream = request.GetRequestStream();

requestStream.Write(payload, 0, payload.Length);

requestStream.Close();

HttpWebResponse response = (HttpWebResponse)request.GetResponse();

if (response.StatusCode == HttpStatusCode.OK)

Stream responseStream = response.GetResponseStream();

StreamReader reader = new StreamReader(responseStream);

string responseFromServer = reader.ReadToEnd();

Console.WriteLine("You will need to parse this response to get the


configuration information:\n\n" + responseFromServer);

reader.Close();

responseStream.Close();

else

throw new WebException(response.StatusDescription);

catch (WebException e)

Console.WriteLine(e.Message);
}

Next steps
After you request service configuration information, use the XmlDocument class to
load the response XML so that you can parse it. Then, depending on your scenario, you
can do one of the following:

Use the GetMailTips operation to get mail tips for client applications to display
to users.

If UM is enabled, learn about how to play mailbox items over your phone.

See also
Configuration options for EWS in Exchange
Setting up your EWS application
Develop web service clients for Exchange
Comparing Exchange Online and
Exchange on-premises client
programming
Article • 09/15/2021 • 5 minutes to read

Learn about the design considerations for creating an EWS Managed API or EWS client
application that works against Exchange Online and Exchange on-premises.

For the most part, clients and the web services in Exchange they target will work the
same way regardless of whether the target is an Exchange Online, Exchange Online as
part of Office 365, or Exchange on-premises server. There are, however, some
exceptions, and you'll want to make sure that your application can handle them. Use the
information in this article to help you design your client to target both Exchange Online
and Exchange on-premises.

Autodiscover client programming


considerations
Autodiscover provides configuration information for Exchange clients. A client
application can discover its configuration information in one of three ways, depending
on whether the client is targeting Exchange Online or Exchange on-premises.

Table 1. Autodiscover service types and Exchange applicability

Autodiscover service type Applies to

SOAP Autodiscover
Exchange Online and versions of Exchange on-premises starting
with Exchange 2010

POX Autodiscover Exchange Online and versions of Exchange on-premises starting


with Exchange 2007

Service connection point Versions of Exchange on-premises starting with Exchange 2007
(SCP) lookup

In addition to the client configuration information, that SOAP and POX Autodiscover
also return the Exchange service version and indicate whether the service is hosted by
Exchange Online. This information is returned in different elements, depending on the
type of Autodiscover you use.
Table 2. Autodiscover elements that return service version and Exchange Online
hosting information

Autodiscover XML element that contains XML element that indicates whether the
service type service version user has an Exchange Online account

SOAP Setting (SOAP) element with Setting (SOAP) element with the
Autodiscover the CasVersion text value. UserMSOnline text value.

POX ServerVersion (POX)


MicrosoftOnline

Autodiscover

Ensure that your client captures this information so that it can target the feature set that
is available on the Exchange server. This can be useful to determine whether your client
can expect different behavior based on whether the user's mailbox is located in an
Exchange Online or Exchange on-premises organization.

Testing and log files in applications that target


Exchange Online
Exchange Online does not provide access to the EWS protocol log files, EWS
performance counters, and EWS-related service events that are available on on-premises
Exchange servers. Access to these is useful, however, in discovering how your
application performs when it interacts with EWS. Make sure that you test your
application against a test Exchange on-premise server so that you can optimize its
performance. If possible, you can change the throttling settings on your test server to
match the throttling settings for Exchange Online, so you can evaluate how your
application will behave when it connects to Exchange Online.

 Tip

You can use the EWSRelentless tool to perform an EWS load test. You can use
this tool with a test server, the EWS protocol logs, EWS performance counters,
service events, and the EWS throttling settings to better understand how EWS
performs under load.

Throttling settings and Exchange Online


The default values for the EWS throttling settings are different for Exchange Online than
they are for Exchange on-premises. Also, you cannot change Exchange Online throttling
settings. You can use Exchange Management Shell cmdlets to discover the throttling
settings for Exchange on-premises; however, those cmdlets are not enabled for
Exchange Online.

Exchange Management Shell cmdlets and


configuration settings
A number of cmdlets can directly or indirectly affect the web service APIs in Exchange
Online and Exchange on-premises. Cmdlets are not available for the following in
Exchange Online:

Throttling settings

Virtual directory settings

Authentication settings

For details about the cmdlets that are available for Exchange Online, see PowerShell
cmdlets in Exchange Online . For more about cmdlets that are available for Exchange
on-premises, see Exchange 2013 cmdlets .

Client affinity and network load balancers


Most EWS communication does not require that the client participate in maintaining
affinity with Exchange. The subscriptions to mailbox events do require that the client
provide cookies and other information to maintain affinity with the Exchange server that
maintains the queue of mailbox events for a user. Exchange Server 2010 uses the
exchangecookie to maintain client affinity across the network load balancers. Exchange
Online and versions of Exchange on-premises starting with Exchange 2013 use the X-
AnchorMailbox header, X-PreferServerAffinity header, and X-BackEndOverrideCookie
cookie to maintain affinity for mailbox notifications.

Authentication
Clients can authenticate with Exchange Online by using either Basic or OAuth. Versions
of Exchange on-premises starting with Exchange 2013 use NTLM by default; however,
it's possible to configure Exchange on-premises to use Basic authentication as well.

Client latency diagnostics


Exchange Online collects client latency diagnostics if they are reported. This helps
Microsoft support troubleshoot connectivity issues with Exchange Online. Exchange on-
premises does not collect client latency diagnostics. If your client targets Exchange on-
premises, the client can't report latency diagnostics to the server.

Functionality in the EWS Managed API


The EWS Managed API exposes some functionality that is specific to Exchange on-
premises, such as service point connection lookup, and some functionality that is
specific to Exchange Online, such as client latency reporting. Note that it's possible for
some functionality to be implemented in Exchange Online before it is implemented in
the EWS Managed API.

The following EWS Managed API functionality is only applicable to Exchange Online:

Client latency reporting

Basic pre-authentication

The ability to request that the RequestId be returned in responses

API features in Exchange Online plans and


Exchange Server editions
Different feature sets might be available in different Office 365 and Exchange Online
plans, or in the standard and enterprise versions of Exchange Server. Be aware that
some API functionality might not be available to your client application depending on
the Exchange Online plan or Exchange Server edition that hosts a user's mailbox.

Because feature availability can change, we recommend that you check the Exchange
Online plans and Exchange Server editions to evaluate how feature availability might
affect your client. You can also design your client to check feature availability by using
the GetServiceConfiguration operation or by sending test requests for the operations
that implement the features. If the feature isn't available, the response from the server
will indicate as such.

Other considerations
You can do the following when targeting Exchange on-premises but not Exchange
Online:
Create a client that is installed on the Exchange server.

Install custom transport agents that can affect the delivery and content of
messages you create and send with EWS and other clients.

See also
EWS client design overview for Exchange
Comparing Exchange Online and Exchange Server 2013
Compare all Office 365 for business plans
EwsRelentless - EWS load generation tool
Web service API feature availability in Exchange and the EWS Managed API
EWS throttling in Exchange
EWS throttling in Exchange
Article • 02/11/2022 • 25 minutes to read

Learn about the throttling policies that affect EWS when you are using Exchange.

Provided by: Glen Scales; Michael Mainer, Microsoft Corporation

The article provides information about EWS throttling in Exchange Online, Exchange
Online as part of Office 365, and on-premises versions of Exchange starting with
Exchange 2010. Throttling in Exchange helps to ensure server reliability and uptime by
limiting the amount of server resources that a single user or application can consume.
Throttling is a reactive response to overuse of system resources that may affect service
reliability and functionality. Exchange constantly monitors the health of critical
infrastructure resources, such as mailbox databases. When high load factors are
detected that degrade the performance of these resources, EWS connections are
throttled proportionally based on the amount that each caller has contributed to this
high load condition. The result is that a user may be within their throttling limit and still
experience slowdowns until the health of the resource is back to operational levels.

Each client access protocol in Exchange, including EWS, has a throttling policy. When
you design applications that use EWS, it is important to account for throttling policies,
to help ensure application reliability and the health of your Exchange server. This article
identifies the different throttling policies and service limits for EWS, whether you are
targeting Exchange Online or versions of Exchange on-premises starting with Exchange
Server 2010. As applicable, this article also identifies differences in throttling policies in
different versions of Exchange.

) Important

Default throttling policy, access to throttling policy, and throttling policy


configuration differs between Exchange Online and Exchange on-premises. Specific
throttling setting values are only accurate for a specific version of Exchange.
Because setting values vary across versions, and because Exchange administrators
can change the default throttling policies for on-premises deployments, this article
does not provide the default setting values. It is more important for you to be
aware of the considerations for designing an application that functions within
throttling limits and reacts appropriately to throttling scenarios.

If you are an application developer, you need to factor throttling into your application
design. Different versions of Exchange have different default values for the EWS
throttling parameters. Client and service applications that are designed to access
different versions of Exchange will need to account for these settings, whether they be
default values, custom values set by an Exchange administrator, or, as for Exchange
Online, set by default and not discoverable. Because throttling parameter values cannot
be discovered programmatically, your client design specifications should include a plan
for the application to adapt to different potential throttling limits. When you design
multi-threaded applications that will access a large number of mailboxes, or when many
clients are accessing the same mailbox, consider the limits on concurrency that the
default policy applies to Exchange.

Throttling policies that affect EWS


The throttling polices in Exchange affect not only EWS, but also all client connections to
the Exchange server, including the protocols used by Office Outlook, Outlook Web App,
and Exchange ActiveSync.

The CPUStartPercent throttling policy can affect EWS performance when you are
running Exchange 2010. When the average CPU utilization of Exchange processes
running on the Client Access server — including, but not limited to, the EWS process —
exceeds the value specified by this policy, inbound requests will be delayed to reduce
CPU utilization. You cannot change the value of this policy, but knowing about it can
help you troubleshoot performance issues. The sampling logic the Client Access server
performs for this value is an average over a 10 second rolling window. This allows the
process to respond appropriately to quick spikes in CPU utilization. When this threshold
is exceeded, inbound connections to EWS are delayed. This delay is capped at 500
milliseconds (msecs) at a theoretical 100% CPU usage per EWS request. If a batch EWS
request to get 100 items is passed, the server will check the CPU usage 100 times (once
per item) for a maximum delay of 50 seconds. The delay time is linearly proportional to
CPU usage. At CPUStartPercent, the delay is 0 (a thread yield) and it increases linearly
up to 500 msec at 100% CPU usage. Because throttling policies apply to all Exchange
users, it's unlikely that CPU usage would exceed the CPUStartPercent limit on an
Exchange Client Access server, because individual users or applications cannot gain
enough CPU utilization to affect server operation.

The following table lists the throttling policy parameters that affect applications that use
EWS.

Table 1: Throttling policy parameters that affect EWS

Throttling policy parameter name Applies Description


to
Throttling policy parameter name Applies Description
to

DiscoveryMaxConcurrency Exchange Specifies the number of concurrent


2013 discovery search connections that a user
Exchange can have at the same time.
Online

DiscoveryMaxKeywords Exchange Specifies the maximum number of


2013 keywords that a user can include in a
Exchange discovery search.
Online

DiscoveryMaxKeywordsPerPage Exchange Specifies the number of keywords for


2013 which to show statistics.
Exchange
Online

DiscoveryMaxMailboxes Exchange Specifies the maximum number of source


2013 mailboxes that a user can include in a
Exchange discovery search.
Online

DiscoveryMaxMailboxesResultsOnly Exchange Specifies the maximum number of


2013 mailboxes you can search in an In-Place
Exchange eDiscovery search without being able to
Online view the statistics.

DiscoveryPreviewSearchResultsPageSize Exchange Specifies the number of messages


2013 returned in a eDiscovery search preview
Exchange response.
Online

EwsCutoffBalance Exchange Defines the resource consumption limits


2013 for EWS user before that user is
Exchange completely blocked from performing
Online operations on a specific component.

EwsMaxBurst Exchange Defines the amount of time that an EWS


2013 user can consume an elevated amount of
Exchange resources before being throttled. This is
Online measured in milliseconds. This value is set
separately for each component.

EwsRechargeRate Exchange Defines the rate at which an EWS user's


2013 budget is recharged (budget grows by)
Exchange during the budget time.
Online
Throttling policy parameter name Applies Description
to

EWSMaxSubscriptions Exchange Defines the maximum number of active


2010 push, pull, and streaming notification
Exchange subscriptions that a user can have on a
2013 specific Client Access server at one time.
Exchange This is budgeted differently for different
Online Exchange versions.

EWSFastSearchTimeoutInSeconds Exchange Defines the amount of time in seconds


2010 that fast searches made by using
Exchange Search in EWS continue before
they time out. Fast searches are searches
made by using an Advanced Query Syntax
(AQS) query string in a FindItem
operation .

EWSFindCountLimit Exchange Defines the maximum number of items


2010 from a FindItem operation or
Exchange FindFolder operation that can exist in
2013 memory on the Client Access server at
Exchange one time for one user. The default value
Online for this property is 1000. The fallback
value for this value is 1000. In Exchange
Online and on-premises versions of
Exchange starting with Exchange 2013,
this throttling policy cannot be queried or
configured by a cmdlet. In Exchange
Online and on-premises versions of
Exchange starting with Exchange 2013,
the EWSFindCountLimit for AQS search
and any Exchange search with a
restriction is 250 results. An Exchange
search without a restriction will return up
to 1000 results.

EWSPercentTimeInAD Exchange Defines the percentage of time per


2010 minute during which a specific user can
execute Active Directory requests.

EWSPercentTimeInCAS Exchange Defines the percentage of time per


2010 minute during which a specific user can
execute Client Access server code.

EWSPercentTimeInMailboxRPC Exchange Defines the percentage of time per


2010 minute during which a specific user can
execute mailbox RPC requests
Throttling policy parameter name Applies Description
to

EWSMaxConcurrency Exchange Defines the number of concurrent open


2010 connections that a specific user can have
Exchange against an Exchange server that is using
2013 EWS at one time. The default value for
Exchange Exchange 2010 is 10. The default value for
Online Exchange 2013 and Exchange Online is
27. This policy applies to all operations
except for streaming notifications.
Streaming notifications use the
HangingConnectionLimit to indicate the
number of open streaming event
connections that are available. For more
information, see What throttling values
do I need to take into consideration?.

MessageRateLimit Exchange Defines the number of messages per


2010 minute that can be submitted.
Exchange
2013
Exchange
Online

RecipientRateLimit Exchange Defines the limit to the number of


2010 recipients that a user can address in a 24-
Exchange hour period.
2013
Exchange
Online

ForwardeeLimit Exchange Defines the limit to the number of


2010 recipients for Inbox forward/redirect
Exchange actions in a 24-hour period.
2013
Exchange
Online

ConcurrentSyncCalls Exchange Defines the limit to the number of


2019 concurrent sync calls
Exchange (SyncFolderHierarchy, SyncFolderItems)
2016 for a user.
Exchange
Online

U Caution
Do not set throttling polices to null. This will set the policy to equal unlimited,
which indicates that a throttling policy isn't set.

Displaying the policies that apply to Exchange


mailboxes
Exchange on-premises provides Exchange Management Shell cmdlets that you can use
to set and get throttling policy. Exchange Online does not provide access to the
throttling policy cmdlets.

Use the following cmdlets to display throttling polices for an on-premises Exchange
Server deployment:

Get-ThrottlingPolicy — Gets the client throttling settings for one or more


throttling policies. For more information, see Get-ThrottlingPolicy on TechNet.

Get-ThrottlingPolicyAssociation — Enables you to view the relationship between


an object and its associated throttling policies. The object can be a user with a
mailbox, a user without a mailbox, or a contact. For more information, see Get-
ThrottlingPolicyAssociation on TechNet.

Use the following command to show the default throttling policy for Exchange 2010.

Get-ThrottlingPolicy | Where-Object {$_.IsDefault -eq "True"} | format-list

Use the following command to show the global throttling policy (which equates to the
default throttling policy in Exchange 2010) in Exchange 2013.

Get-ThrottlingPolicy | Where-Object {$_.ThrottlingPolicyScope -eq "Global"} |


format-list

Use the following command to show the throttling policy associated with a user in
Exchange 2010 or Exchange 2013. Replace the user name [email protected] with the
user name of the target user for whom you want to get throttling policy information.

Get-ThrottlingPolicyAssociation [email protected] | format-list

Running this command in Exchange Management Shell results in an output similar to


the following.

PowerShell

PS C:\>Get-ThrottlingPolicyAssociation [email protected]

RunspaceId : 72153d6-9dce-2fae-8dbd-5ca5f760g2df

ObjectId : john

ThrottlingPolicyId :

Name : john

Identity : FHXB-28178dom.contoso.com/Users/john

IsValid : True

NeedsToSuppressPii : False

ExchangeVersion : 0.10 (15.0.0.0)

DistinguishedName : CN=john,CN=Users,DC=FHXB-
28178dom,DC=contoso,DC=com

Guid : 2c10dab6-de28-1937-ad8g-535832613a08

7 Note

When the ThrottlingPolicyId property is blank, the default policy is applied to the
mailbox.

You can set throttling policy on an Exchange server by using the Set-ThrottlingPolicy
and Set-ThrottlingPolicyAssociation cmdlets. You can create and remove non-default
throttling policies by using the New-ThrottlingPolicy and Remove-ThrottlingPolicy
cmdlets.

 Tip

We recommend that you design your applications to adhere to the default


throttling policy. Only make changes to default throttling policies if your client
application design cannot accommodate the default policy. Be aware that less
restrictive throttling policies can negatively affect service reliability.

Throttling considerations for applications that


use EWS impersonation
Impersonation is an authorization method that enables a single account to access many
accounts. When a service account impersonates users, it acts as the users and therefore
assumes the rights that are assigned to those users. Log files record the access as the
impersonated user. Administrators use role-based access control (RBAC) to configure
impersonation via the Exchange Management Shell.

When impersonation is used, the budgets for all the throttling thresholds apply
differently depending on the version of Exchange. The budget is either calculated
against the account that is impersonated, or the service account. If your application is
multi-threaded and makes concurrent requests against multiple mailboxes, you should
consider how the throttling threshold will affect your application's performance. In
general, be aware of the following limits on service accounts when you create a service-
based application that uses impersonation to access all mailboxes:

When you use Impersonation, the service account has a separate budget for the
following policy parameters:
EWSMaxConcurrency
EWSPercentTimeInAD
EWSPercentTimeInCAS
EWSPercentTimeInMailboxRPC
EWSMaxSubscriptions
EWSFastSearchTimeoutInSeconds
EWSFindCountLimit

The EWSMaxConcurrency budget is shared for the service account and the
account being impersonated for all connections to versions of Exchange earlier
than Exchange 2010 Service Pack 2 (SP2) Update Rollup 4 (RU4). Starting with
Exchange 2010 SP2 RU4, and including Exchange Online, the service account
access uses a separate budget from the user EWSMaxConcurrency budget. For
more information about the update to the Exchange concurrent connection
throttling policy for EWS, see Description of Update Rollup 4 for Exchange Server
2010 Service Pack 2 .

EWS streaming notifications in versions of Exchange starting with Exchange 2010,


and including Exchange Online, have an additional cloned EWSMaxConcurrency
budget from all other EWS client connections. Streaming notification connections
are counted against a separate budget than all other EWS operations. The
streaming notification maximum concurrency budget is actually two different
budgets: one budget is for all service accounts, and one budget is for the account
being impersonated. Streaming notifications in Exchange Online and versions of
Exchange starting with Exchange 2013 use the HangingConnectionLimit to limit
the number of connections.

For example, let's assume that EWSMaxConcurrency is equal to five. A user can
have five open pull notification connections, while an service account can have five
concurrent pull notification connections against the user's mailbox at the same
time as the user.

The following table identifies how EWSMaxSubscriptions throttling budgets are


calculated between the service account and the account to impersonate.

Table 2: EWSMaxSubscriptions budget accounting


Exchange EWSMaxSubscriptions throttling budget accounting
version

Exchange Charged against the target mailbox.


Online

Exchange Charged against the target mailbox.


2013

Exchange Charged against the target mailbox.


2010 SP3

Exchange Charged against the calling account. Starting with Exchange 2010 SP2 RU4,
2010 SP2 the budget is charged against the target mailbox.

Exchange Charged against the calling account.


2010 SP1

Exchange Charged against the calling account.


2010

Because the EWSMaxSubscriptions throttling budget is charged against the


account being impersonated, there is no limit on the number of mailboxes a
service account can subscribe to and receive streaming notifications for, as long as
impersonation is being used. For the account being impersonated, you can't have
more than n concurrent requests per target mailbox, where n is the
EWSMaxSubscriptions value. If you were not using impersonation, the same
service account could not have more than n concurrent requests total. So, the
takeaway is that by using impersonation on a service account, you exponentially
increase the number of mailboxes you can service. For more information, see
Maintain affinity between a group of subscriptions and the Mailbox server in
Exchange.

The EWSPercentTimeInMailboxRPC, EWSPercentTimeInCAS, and


EWSPercentTimeInAD policy parameters refer to actions performed by a single
thread. When an application performs multiple concurrent operations, you should
account for the cumulative effect of these operations on the user resource budget.

Throttling implications for EWS batch requests


EWS enables you to batch multiple item requests into a single request that is executed
by the Client Access server. This allows for greater efficiency and performance. When an
Exchange server executes a batched request, it checks the user's budget after the
execution of each item within the batch. If the application is over budget, the processing
of the next item in the batch is delayed until the budget for that user has recharged. To
ensure that applications that use batch operations run successfully, limit the number of
item requests that can be included in a single batch, and divide large batches across
multiple smaller batches to increase the reliability of the results. The effect that a batch
operation has on particular throttling thresholds depends on the type of the request,
the size of the items to be processed (for example in UploadItems or ExportItems
operations) and the mailbox content. Throttling policies affect batch operations by
causing the request to take longer to process. The caller will therefore have to wait
longer for the response, and, because EWS limits the execution time of a batch request
to one minute, the call could time out.

To determine the optimum batch size for an application, perform unit testing using
various input sets to ensure that the application does not encounter any errors in a
production environment.

Throttling policy parameters that affect EWS


search operations
Search operations in EWS can require large amounts of time and resources, depending
on how the search is run and what information is requested. To control resource usage
during searches, two policy parameters take effect: EWSFastSearchTimeoutInSeconds
and EWSFindCountLimit.

The EWSFastSearchTimeoutInSeconds policy parameter specifies the amount of time, in


seconds, that EWS fast searches (also known as content indexing search) run before they
time out. A fast search is a search made by using an Advanced Query Syntax (AQS)
query string in a FindItem operation .

You can search an Exchange mailbox folder in two ways:

By using an Exchange store search, which performs a sequential scan of all


messages in the target search scope.

By using the Exchange Search service (content indexing).

Both of these types of searches can result in timeouts. When possible, use the Exchange
Search service because these searches are often targeted against mailbox indexes and
use AQS queries. The following example shows how to perform an AQS search of the
Inbox by using EWS and the Exchange Search service.

C#

ItemView iv = new ItemView(1000);

FindItemsResults<Item> fiitems =
service.FindItems(WellKnownFolderName.Inbox, "subject:football", iv);

If you can't use an AQS search, avoid using overly complex search filters. Also try to
avoid creating search filters based on computed values if the query involves extended
MAPI properties. AQS search was introduced in Exchange 2010.

7 Note

The first time you run a complex Exchange store search query, it runs very slowly
and may time out. After that, the query will respond more quickly. For more
information about the backend Exchange server processes that occur during
Exchange store search queries, see Understanding the Performance Impact of
High Item Counts and Restricted Views on TechNet. Using a SearchFilter creates
a dynamic restriction that helps similar queries in the future, but because these
restrictions are dynamic in nature, they are not permanent or reliable, and are
deleted after a maximum of three days.

The EWSFindCountLimit policy parameter specifies the maximum number of items from
the results of a FindItem or FindFolder operation that can exist in memory on a Client
Access server at the same time for one user. Every item or folder that EWS processes in a
FindItem or FindFolder request is counted against the budget specified in the
EWSFindCountLimit element. When the response is sent back to the requester, the find
count charge for the current call is released. The response the server returns to a
requester when the budget is exceeded is based on the RequestServerVersion element
value and whether the requester specified paging. When the value of the
RequestServerVersion element indicates Exchange 2010 or an earlier version of
Exchange, the server sends a failure response with error code ErrorServerBusy. If the
value of the RequestServerVersion element indicates a version of Exchange starting with
Exchange 2010 SP1 or Exchange Online, and the client is using paging, EWS may return
a partial result set instead of an error. Your application should expect that EWS might
not return all items. If the value of the IncludesLastItemInRange element is false, the
application should make another FindItem or FindFolder request with the new offset
and continue until the IncludesLastItemInRange element returns true.

When you use a FindItem or FindFolder operation, it is important to use paging. The
EWS Managed API enforces the use of paging, but if you are using other methods, such
as EWS proxy objects or raw SOAP, you need to explicitly set paging. The following
example shows how to use paging in the EWS Managed API.

C#
ItemView iv = new ItemView(1000);

FindItemsResults<Item> fiFindItemResults =
service.FindItems(WellKnownFolderName.Inbox, iv);

7 Note

The default policy in Exchange limits the page size to 1000 items. Setting the page
size to a value that is greater than this number has no practical effect.

Applications should also account for the fact that the EWSFindCountLimit throttling
parameter value may result in a partial result set being returned for applications that
make concurrent requests. The following example shows how to use the MoreAvailable
property in the EWS Managed API to ensure that all results are included in a query.

C#

ItemView iv = new ItemView(1000);

service.TraceEnabled = false;

FindItemsResults<Item> fiResults = null;

Do

fiResults = service.FindItems(WellKnownFolderName.Inbox, iv);

PropertySet itItemPropSet = new PropertySet(BasePropertySet.IdOnly) {


EmailMessageSchema.Body };

//Process Items in Result Set


iv.Offset += fiResults.Items.Count;

while (fiResults.MoreAvailable == true);

Throttling policies and concurrency


Concurrency refers to the number of connections from a specific user. A connection is
held from the moment a request is received until a response is sent to the requester. If
users try to make more concurrent requests than their policy allows, the new connection
attempt fails. However, the existing connections remain valid. Throttling policies can
affect concurrency in a number of different ways.

The EWSMaxConcurrency throttling policy parameter sets the number of concurrent


connections that a specific user can have against an Exchange server at one time. To
determine the maximum number of concurrent connections to allow, consider the
connections that Outlook clients will use. Outlook 2007 and Outlook 2010 use EWS to
access availability and Out of Office (OOF) information. Mac Outlook 2011 uses EWS for
all client access functionality. Depending on the number of Outlook clients that are
actively connecting to a user's mailbox, the number of concurrent connections available
for a user might be limited. Also, if your application has to connect to multiple
mailboxes simultaneously while using a single security context, it is important to take
the value of the EWSMaxConcurrency policy into account. For more information about
using a single security context with concurrent connections, see Throttling
considerations for applications that use EWS impersonation earlier in this article.

Applications that concurrently connect to multiple mailboxes have to be able to track


resource usage on the client side. Because EWS operations are request/response-based,
you can ensure that your applications function well within the EWSMaxConcurrency
threshold by tracking the number of connections that occur between the start of a
request and when the response is received and ensuring that no more than ten open
requests occur concurrently.

The EWSFindCountLimit policy parameter specifies the maximum result size a FindItem
or FindFolder operation can use on a Client Access server at the same time for one user.
If an application (or potentially multiple applications) makes two concurrent EWS
FindItem requests that return 100 items each for a specific user, the
EWSFindCountLimit charge against that specific user's budget will be 200. When the
first request returns, the budget drops to 100, and when the second request returns, the
budget drops to zero. If the same application were to make two simultaneous requests
for 1000 items, the budget value would be 2000 items, which exceeds the
EWSFindCountLimit value. If the user's budget for items drops below zero, the next
request results in an error until the user's budget recharges to one or more.

Throttling considerations for EWS notification


applications
If you are building EWS notification applications that make use of either push, pull, or
streaming notifications, you should consider the implications of the
EWSMaxSubscriptions and the EWSMaxConcurrency throttling policies, and the
HangingConnectionLimit.

The EWSMaxSubscriptions policy parameter specifies the maximum number of active


push, pull, and streaming subscriptions that a user can have on a specific Client Access
server at the same time. Different versions of Exchange have different default values for
this parameter. A user can subscribe to all folders in a mailbox by using the
SubscribeToAllFolders property - this uses a single subscription against the
EWSMaxSubscriptions budget. Users can subscribe to individual folders, with each
folder subscription counting towards the EWSMaxSubscriptions budget, up to the limit
set by the value of the EWSMaxSubscriptions parameter (for example, users can
subscribe to 20 calendar folders in different mailboxes if EWSMaxSubscriptions is set to
20).

For information about impersonation and the EWSMaxSubscriptions parameter, see


Throttling considerations for applications that use EWS impersonation earlier in this
article.

The EWSMaxConcurrency policy parameter can also be an issue for EWS notifications;
for example:

When EWS increments the connection count for the owner of the subscription
while the notification is being generated by a push subscription.

When an application is designed to listen to multiple users' mailboxes, and users


receive simultaneous notifications for an instance of a message that is sent to a
distribution list.

If the notification application is multi-threaded and makes simultaneous connection


requests to get more information about a particular message that was received by a
user account, the EWSMaxConcurrency policy limit can be exceeded. To account for
this, consider monitoring the concurrent connections in your application, including
those that might be used by the server, and implementing request queuing on the
client.

The HangingConnectionLimit is only applicable to streaming notifications. This limit is


set in the web.config file, which means that an Exchange administrator can set this value
on an on-premises Exchange server, but Exchange Online mailboxes must use the
default value for this limit, which is 10 for Exchange Online, Exchange 2019, Exchange
2016 and 3 for Exchange 2013. To learn more, see What throttling values do I need to
take into consideration?.

Throttling policy and application performance


The following three parameters of the PercentTimeIn throttling policy affect the amount
of time an EWS application can consume on a Client Access server:

EWSPercentTimeInAD
EWSPercentTimeInCAS
EWSPercentTimeInMailboxRPC

The values specified in the PercentTimeIn policy parameters indicate the amount of
time that one thread making one request is allocated. For example, assuming a
EWSPercentTimeInCAS value of 90, if a process makes two concurrent requests that
spend 54 seconds each running code on the Client Access server, the process uses 108
seconds in a 60 second window. This represents an EWSPercentTimeInCAS parameter
value of 180 percent.

7 Note

The EWSPercentTimeInCAS parameter value is an overlapping superset of the


EWSPercentTimeInAD and EWSPercentTimeInMailboxRPC parameter values. This
means that the expenditure in Client Access server processing time will always be
larger than the expenditures in EWSPercentTimeInAD and
EWSPercentTimeInMailboxRPC. This is because for the Exchange component to
make an Active Directory or RPC call, it must already be running Client Access
server code. In addition, the expenditure in processing time for
EWSPercentTimeInCAS doesn't stop while LDAP or RPC calls are being made.
Although the request might be synchronously waiting for a response from Active
Directory Domain Services (AD DS) or the Exchange store, the process is still
consuming a thread on the server, and therefore the thread should continue to be
charged for that usage.

The amount of CPU time an application may take in a 60-second period might exceed
these throttling limits; therefore, it is important to consider the volume and type of
requests that are being made. For example, a large batch of ResolveNames operations
that are made simultaneously can exceed the EWSPercentTimeInAD policy parameter
value. The policy values that are contained in the default throttling policy are designed
to allow most EWS applications to function without issue; however, when multi-
threaded high-volume applications place a large volume of requests on one particular
Client Access server, this can create problems. To avoid this, consider limiting the size of
batches that are going to execute against the server.

Throttling policies and applications that send a


large volume of email
The default throttling policies include three rate limit policy parameters that can affect
applications that use EWS to send a large volume of messages or send messages in
large batches in a short period of time.

7 Note

In general, we recommend that you do not use EWS to send bulk email. Use an
SMTP host that specializes in bulk mail services to submit frequent large bulk email
messages.

The MessageRateLimit policy parameter specifies the number of messages per minute
that can be submitted by any Exchange client, including EWS. By default, this policy is
set to 30 messages per minute in Exchange Online (it's unlimited in Exchange Server).
For ordinary users in Exchange Online, this rate limit is generally sufficient. However,
applications that send large batches of email messages, for example as part of an
invoicing program, can run into problems. When this policy limit is exceeded, message
delivery for the mailbox is delayed. Specifically, messages will appear in the Outbox or
Drafts folder for longer periods of time when a user or application submits a larger
number of messages than the value specified by the MessageRateLimit parameter. Be
sure to consider this when you are developing a delivery tracking system, especially if
your application uses a mailbox that users connect to via Outlook. When deferred items
are stored in the Outbox or drafts folder, users might interpret that as an error.

The RecipientRateLimit policy parameter specifies the limit on the number of recipients
that a user can address in a 24-hour period. For example, if this value is set to 500, it
means that a single Exchange mailbox account can send messages to no more than 500
recipients each day. This limit applies to messages to recipients that are inside and
outside the organization. This default limit might cause problems for some line-of-
business applications that do end-of-month invoice runs and need to send messages to
more than this number of recipients. You can use external services that enable batch
processing of messages or separate on-premises outbound relay solutions to work
around this limitation.

The ForwardeeLimit policy parameter specifies the maximum number of recipients that
messages can be forwarded or redirected to by means of Inbox rules. This parameter
doesn't limit the number of messages that can be forwarded or redirected to the
recipients.

Errors generated when throttling limits are


exceeded
When throttling polices are exceeded, EWS generates one of the errors listed in the
following table.

Table 3: Throttling limit errors

Error Throttling policy parameter Description


Error Throttling policy parameter Description

ErrorExceededConnectionCount EWSMaxConcurrency Indicates that there are


more concurrent requests
against the server than are
allowed by a user's policy.

ErrorExceededSubscriptionCount EWSMaxSubscriptions Indicates that a user's


throttling policy maximum
subscription count has been
exceeded.

ErrorExceededFindCountLimit EWSFindCountLimit Indicates that a search


operation call has exceeded
the total number of items
that can be returned.

ErrorServerBusy EWSPercentTimeInMailboxRPC
Occurs when the server is
EWSPercentTimeInCAS
busy. The
EWSPercentTimeInAD BackOffMilliseconds value
returned with
ErrorServerBusy errors
indicates to the client the
amount of time it should
wait until it should resubmit
the request that caused the
response that returned this
error code.

The following table lists the HTTP status codes that are returned by throttling errors.

Table 4: HTTP status codes returned by throttling errors

HTTP Description
status
code

HTTP Indicates that EWS requests are queuing with IIS. The client should delay sending
503 additional requests until a later time.

HTTP Indicates an internal server error with the ErrorServerBusy error code. This indicates that
500 the client should delay sending additional requests until a later time. The response may
contain a back off hint called BackOffMilliseconds. If present, the value of
BackOffMilliseconds should be used as the duration until the client resubmits a request.

HTTP Contains an EWS schema-based error response with an ErrorInternalServerError error


200 code. An inner ErrorServerBusy error code may be present. This indicates that the client
should delay sending additional requests until a later time.
See also
Exchange Workload Management
New-ThrottlingPolicy cmdlet
Understanding Client Throttling Policies
ThrottlingPolicy Class
Throttling Policies and the EWSFindCountLimit
Budget Snapshots in the IIS Logs
Effects of Throttling on Your Deployment in Exchange 2010 SP1
Throttling Policy Associations in Exchange 2010 SP1
Throttling Policies and CPUStartPercent
Impersonation and EWS in Exchange
Redistribution requirements for the EWS
Managed API
Article • 09/15/2021 • 2 minutes to read

Find out how you can redistribute the EWS Managed API assemblies with your
application.

As you design your EWS Managed API application, you'll also want to consider how you
will release it to your users.

Redistributing your EWS Managed API


application
Unless your application is located on the Exchange server, you will need to redistribute
the EWS Managed API assemblies. The EWS Managed API download contains two
assemblies that you can redistribute: Microsoft.Exchange.WebServices.dll and
Microsoft.Exchange.WebServices.Auth.dll. Keep the following information in mind when
you design how you will release your EWS Managed API application:

The EWS Managed API was designed such that you can download it and distribute
it with your application that targets an Exchange server. Alternatively, your
application can download the EWS Managed API.

You can use the EWS Managed API to communicate with an Exchange server
running Exchange Online, Exchange Online as part of Office 365, or an on-
premises version of Exchange starting with Exchange Server 2007.

In versions of the EWS Managed API starting with version 2.1, you can install the
API in the Global Assembly Cache (GAC). The MSI will automatically add the DLL to
the GAC and will be accessible on per computer basis, not on a per user basis.

The license terms are included in the EWS Managed API download. Review the terms for
the authoritative information about what you can do with the EWS Managed API.

See also
EWS client design overview for Exchange

EWS Managed API (download)


Instrumenting client requests for EWS
and REST in Exchange
Article • 09/15/2021 • 3 minutes to read

Learn about the HTTP headers in EWS and REST requests and responses that can help
you monitor and troubleshoot your Exchange application.

Has this ever happened to you? A user of your application reports an unexpected error.
You want to investigate, but you can't reproduce it. The error has disappeared for the
user, and you're left with very little actionable data. Frustrating, isn't it? Let's look at how
you can proactively prepare for this scenario and hopefully avoid frustration in the
future.

Add instrumentation to requests


We recommend that you add additional HTTP headers to your requests to facilitate
troubleshooting. You should keep a record of this information somewhere (for example,
in a log file) so that you can retrieve it later if you need to. This is helpful when
examining network traffic, and is also helpful if you contact Microsoft support for
assistance.

Table 1. Request headers for troubleshooting

HTTP header EWS Managed API equivalent Notes


(EWS)

User-Agent ExchangeService.UserAgent
Set this to a unique value that
identifies your client application.

Using the same value for all requests


that your application sends allows
Microsoft to help troubleshoot call
failures, should they arise.
HTTP header EWS Managed API equivalent Notes
(EWS)

client- ExchangeService.ClientRequestId
Set this to a different unique value
request-id for every request your application
sends.

We recommend that you use a


GUID. This unique identifier is
intended to be used to correlate
activities between two systems in
the event that something goes
wrong.

return-client- ExchangeService.ReturnClientRequestId Set this to true to signal to the


request-id Exchange server that it should return
the value of your client-request-id in
the corresponding response.

You can use this to correlate


requests and responses in network
traces or EWS Managed API traces.

X- ExchangeService.SendClientLatencies
Used to report EWS latencies to
ClientStatistics Microsoft if your application is
accessing Exchange Online or
Exchange Online as part of Office
365.

Log information from responses


Just as your client can add additional instrumentation to the requests it sends, Exchange
adds additional instrumentation to the responses in the form of HTTP headers. Your
client should capture this information to go along with the request instrumentation
information.

7 Note

If you are using the EWS Managed API, there is no direct equivalent for the HTTP
headers. However, all HTTP response headers can be accessed via the
ExchangeService.HttpResponseHeaders property.

Table 2. HTTP response headers

HTTP header Description


HTTP header Description

request-id A server-generated ID for the request that corresponds to this response.

client-request- The value of the client-request-id header in the request.

id
This header is only present if the request contains the return-client-request-id
header with a value of true.

X-FEServer The FQDN of the Client Access server that processed the request.

X- The FQDN of the mailbox server that processed the request.


TargetBEServer

X-DiagInfo Additional diagnostic information, depending on the request.

x-ms- This header is only applicable if OAuth authentication is used in the request.

diagnostics
It contains an explicit error code that specifies why an OAuth authentication
failed.

It takes the following format: errorId;reason="reason"error_type="error type"

The reason field is a human-readable description of the error.

The errorId field is an integer, and the error_type field is the string
representation of that integer, as follows:

2000000: invalid_signature
2000001: invalid_token
2000002: token_expired
2000003: invalid_resource
2000004: invalid_tenant
2000005: invalid_user
2000006: invalid_client
2000007: internal_error
2000008: invalid_grant

Report EWS latency to Microsoft


If your application uses the EWS Managed API or EWS to connect to Exchange Online,
you can report latency in EWS requests directly to Microsoft. The information is passed
via the X-ClientStatistics request header. If you are using the EWS Managed API, all you
have to do is set the ExchangeService.SendClientLatencies property to true. If you are
using EWS, you'll need to measure the time between issuing a request and receiving a
response, then add the X-ClientStatistics header to the next EWS request your
application sends, using the following format.
X-ClientStatistics: MessageId=<value of request-id header>,ResponseTime=<time in

milliseconds>,SoapAction=<EWS operation>

We maintain reports for these latencies and use them to continuously improve EWS
services in Exchange Online.

Next steps
After you've added client instrumentation to your application, you're better prepared if
something goes wrong. If that happens, you can use your instrumentation data to
troubleshoot your application.

See also
EWS client design overview for Exchange
Trace requests and responses to troubleshoot EWS Managed API applications
Tools and resources for troubleshooting EWS applications for Exchange
Develop web service clients for
Exchange
Article • 09/14/2022 • 2 minutes to read

Find information to help you develop EWS and web service client applications for
Exchange.

The articles in this section explain how to use EWS and web services in your Exchange
client applications for Exchange Online, Exchange Online as part of Office 365, and on-
premises versions of Exchange starting with Exchange 2013, and provide examples that
show you how to perform specific tasks.

In this section
Archiving in EWS in Exchange

Attachments and EWS in Exchange

Calendars and EWS in Exchange

Delegate access and EWS in Exchange

Distribution groups and EWS in Exchange

eDiscovery in EWS in Exchange

Email and EWS in Exchange

Folders and items in EWS in Exchange

Identifiers in Exchange

Impersonation and EWS in Exchange

Inbox management and EWS in Exchange

Notification subscriptions, mailbox events, and EWS in Exchange

People and contacts in EWS in Exchange

Persistent application settings in EWS in Exchange

Properties and extended properties in EWS in Exchange


Property sets and response shapes in EWS in Exchange

Public folder access with EWS in Exchange

Search and EWS in Exchange

Mailbox synchronization and EWS in Exchange

Time zones and EWS in Exchange

Tools and resources for troubleshooting EWS applications for Exchange

Verifying the results of an EWS or EWS Managed API call

See also
Explore the EWS Managed API, EWS, and web services in Exchange
Start using web services in Exchange
EWS client design overview for Exchange
Web services reference for Exchange
Archiving in EWS in Exchange
Article • 09/15/2021 • 2 minutes to read

Learn about archiving in EWS in Exchange.

Archive mailboxes are secondary mailboxes that are associated with a user. Archive
mailboxes are typically used to manage email storage limits. For example, older email
items might periodically be moved from the Inbox to the archive mailbox.

Exchange Online, Exchange Online as part of Office 365, and Exchange Server 2013
introduce two new Exchange Web Services (EWS) operations that you can use to archive
a set of mail items from a primary mailbox. Archiving Inbox items in this way preserves
the folder hierarchy of the items. In addition, archive mailboxes can now be stored either
locally on a client, or remotely, in a way that is mostly opaque to a user, by using a
folder path to point to the contents of the archive.

Archiving operations in EWS


The following table lists the archiving operations that were introduced in Exchange
2013.

Operation name Description

ArchiveItem
Moves an item from the primary mailbox to the archive mailbox.

CreateFolderPath
Creates a URI that points to the storage location for the archive mailbox.

See also
Develop web service clients for Exchange

Start using web services in Exchange

EWS client design overview for Exchange


Attachments and EWS in Exchange
Article • 09/14/2022 • 3 minutes to read

Learn about attachments and how your EWS Managed API or EWS in Exchange client
represents them.

Usually, attachments are associated with email items, but in fact, all EWS items — email
messages, calendar items, contacts, tasks — can include attachments.

Types of attachments
EWS categorizes attachments into two groups: file attachments and item attachments.

Item attachments: Strongly-typed EWS items, such as email messages and


calendar items, that are attached to another strongly-typed EWS item. Any
strongly-typed item that can be created by using the EWS Managed API or EWS
can be used as an item attachment. The content of an item attachment is the
strongly-typed item, which provides easy access to all its properties. Item
attachments can have their own item attachments, so a hierarchy of item
attachments (or nesting of attachments) is possible.

File attachments: Any file, such as a .txt, .jpg, .zip, .pdf, or even a .msg file. A file
attachment only has a few properties, one of which is the base-64 encoded
content of the file.

Reference attachments: Any attachment that is referenced by a file provider, such


as a file located in the cloud. An attachment can be from multiple providers.

When you add or retrieve attachments from an item, you'll do it differently depending
on whether it's a file attachment or an item attachment. For example, to add a file
attachment to an item, you can just pass in the location of the file. To add an existing
item as an item attachment, you actually have to copy the properties or the MIME
content of the existing item to a new item attachment; you can't just bind to the existing
item. So distinguishing between the two types of attachments is important. More details
about the differences between item attachments and file attachments are discussed in
the articles In this section.

How are attachments represented


programmatically?
Attachments are stored in a collection on the EWS item. The attachments collection is
made up of file attachments and/or item attachments. Metadata about the attachment
collection is available when you get an item by using the EWS Managed API Item.Bind
method or the EWS GetItem operation, but additional calls are required to actually
retrieve the contents of the attachments.

Table 1. Item metadata about attachments

Metadata entity EWS Managed API EWS element


property

Attachment indicator (does not flag inline Item.HasAttachments


HasAttachments
attachments)

Attachment collection Item.Attachments


Attachments

Attachment ID Attachment.Id
AttachmentId

Table 2. Attachment entities

Attachment type EWS Managed API class EWS element

File attachment FileAttachment


FileAttachment

Item attachment ItemAttachment


ItemAttachment

ItemAttachment<TItem>

Reference ReferenceAttachmentType complexType ReferenceAttachment


attachment (EWS)

Inline attachments
Inline attachments are a special breed of attachment. Both file attachments and item
attachments can be inline attachments. An inline attachment appears as part of the
body content and retains its position relative to the rest of the content in the item.

An attachment is an inline attachment if the EWS Managed API IsInline property or


the EWS IsInline element is set to true. Inline attachments use the following optional
properties and elements to identify the location of an inline attachment:

EWS Managed API — ContentId or ContentLocation properties.

EWS — ContentId or ContentLocation element.

Note that the EWS Managed API HasAttachments property and the EWS
HasAttachments element do not reflect the existence of inline attachments, and that's
why inline attachments are also called hidden attachments. So if you set the EWS
Managed API IsInline property or the EWS IsInline element to true, and the item has
no other attachments, HasAttachments will be set to false. If your client uses
HasAttachments to populate an attachment indicator or icon on an email, be aware that
the icon will not appear for emails with inline attachments.

In this section
Add attachments by using EWS in Exchange

Get attachments by using EWS in Exchange

Delete attachments by using EWS in Exchange

See also
Develop web service clients for Exchange

Folders and items in EWS in Exchange

Email and EWS in Exchange


Add attachments by using EWS in
Exchange
Article • 01/15/2020 • 13 minutes to read

Learn how to create new items with attachments, or add attachments to existing items
by using the EWS Managed API or EWS in Exchange.

You can add file attachments or item attachments to new or existing items by using the
EWS Managed API or EWS. If you are using the EWS Managed API, you use the same
method to add attachments to new or existing items; however, the method changes if
you're using a file or item attachment. Conversely, if you are using EWS, you use the
same operation to add either a file or item attachment to an item, but the operation
changes if you're adding the attachment to a new or existing item.

Table 1. EWS Managed API methods and EWS operations for adding attachments

Task EWS Managed API method EWS operation

Add a file attachment to a AttachmentCollection.AddFileAttachment


CreateItem for a
new or existing email new email
CreateAttachment
to add to an
existing email

Add an item attachment to AttachmentCollection.AddItemAttachment CreateItem for a


a new or existing email new email
CreateAttachment
to add to an
existing email

Create an email with file and item attachments


by using the EWS Managed API
The following code example shows how to create an email with multiple file
attachments and an item attachment by:

1. Using the EmailMessage object to create an email message.

2. Using the AttachmentCollection.AddFileAttachment and


AttachmentCollection.AddItemAttachment methods to add attachments to the
message.
3. Using the EmailMessage.SendAndSaveCopy method to send the message to the
recipients and save the message in the Sent Items folder.

This code example shows the four ways in which a file attachment can be added to an
item by using the EWS Managed API:

By using a fully qualified file location.

By using a fully qualified file location and a new attachment name.

By using a byte array.

By using a stream.

Note that the item attachment in this example is created at the same time as the email
message. To add an existing email message as an item attachment, see Add an existing
item to a new email by using the MimeContent and the EWS Managed API.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server.

C#

public static void CreateEmailWithAttachments(ExchangeService service)

// Create an email message and set properties on the message.

EmailMessage message = new EmailMessage(service);

// Set properties on the email message.

message.Subject = "Message with Attachments";

message.Body = "This message contains four file attachments

and one message item attachment.";

message.ToRecipients.Add("[email protected]");

message.ToRecipients.Add("[email protected]");

// Add a file attachment by using the fully qualified location of the


file.

message.Attachments.AddFileAttachment("C:\\temp\\FileAttachment.txt");

// Add a file attachment by using the fully qualified string name,

// and specify the name of the attachment as it will appear in the


email.

// The new name of the file attachment is SecondAttachment.txt.

message.Attachments.AddFileAttachment("SecondAttachment.txt",
"C:\\temp\\FileAttachment2.txt");
// Add a file attachment by using a byte array.

// In this example, theBytes is the byte array that represents the


content of the image file to attach.

byte[] theBytes = File.ReadAllBytes("C:\\Temp\\Tulips.jpg");

// The byte array file attachment is named ThirdAttachment.jpg.

message.Attachments.AddFileAttachment("ThirdAttachment.jpg", theBytes);

// Add a file attachment by using a stream.

FileStream theStream = new FileStream("C:\\temp\\FileAttachment4.txt",


FileMode.OpenOrCreate);

// The streamed file attachment is named FourthAttachment.txt.


message.Attachments.AddFileAttachment("FourthAttachment.txt",
theStream);

// Add an email message as an item attachment and set properties on the


item.

ItemAttachment<EmailMessage> itemAttachment =
message.Attachments.AddItemAttachment<EmailMessage>();

itemAttachment.Name = "Attached Message Item";

itemAttachment.Item.Subject = "Message Item Subject";

itemAttachment.Item.Body = "Message Item Body";

itemAttachment.Item.ToRecipients.Add("[email protected]");

itemAttachment.Item.ToRecipients.Add("[email protected]");

// Send the mail and save a copy in the Sent Items folder.

// This method results in a CreateItem and SendItem call to EWS.

message.SendAndSaveCopy();

Create an email with file and item attachments


by using EWS
The following code example shows how to use the CreateItem operation to create an
email message with four file attachments and one item attachment. This is also one of
the XML requests that the EWS Managed API sends when you create an email with file
and item attachments.

Note that the item attachment in this example is created at the same time as the email
message. To add an existing email message as an item attachment, see Add an existing
item to a new email by using the MimeContent and the EWS Managed API.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:CreateItem MessageDisposition="SaveOnly">

<m:Items>

<t:Message>

<t:Subject>Message with Attachments</t:Subject>

<t:Body BodyType="HTML">This message contains four file


attachments

and one message item attachment.</t:Body>

<t:Attachments>

<t:FileAttachment>

<t:Name>FileAttachment.txt</t:Name>

<t:IsInline>false</t:IsInline>

<t:IsContactPhoto>false</t:IsContactPhoto>
<t:Content>VGhpcyBpcyBhIGZpbGUgYXR0YWNobWVudC4=</t:Content>

</t:FileAttachment>

<t:FileAttachment>

<t:Name>SecondAttachment.txt</t:Name>

<t:IsInline>false</t:IsInline>

<t:IsContactPhoto>false</t:IsContactPhoto>
<t:Content>VGhpcyBpcyB0aGUgc2Vjb25kIGZpbGUgYXR0YWNobWVudC4=
</t:Content>

</t:FileAttachment>

<t:FileAttachment>

<t:Name>ThirdAttachment.jpg</t:Name>

<t:IsInline>false</t:IsInline>

<t:IsContactPhoto>false</t:IsContactPhoto>
<t:Content>nAoAXNIZMVEZs5GKhdzRcLH/9k=</t:Content>

</t:FileAttachment>

<t:FileAttachment>

<t:Name>FourthAttachment.txt</t:Name>

<t:IsInline>false</t:IsInline>

<t:IsContactPhoto>false</t:IsContactPhoto>
<t:Content>obWVudC4=…</t:Content>

</t:FileAttachment>

<t:ItemAttachment>

<t:Name>Attached Message Item</t:Name>

<t:IsInline>false</t:IsInline>

<t:Message>

<t:Subject>Message Item Subject</t:Subject>

<t:Body BodyType="HTML">Message Item Body</t:Body>

<t:ToRecipients>

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:ToRecipients>

</t:Message>

</t:ItemAttachment>

</t:Attachments>

<t:ToRecipients>

<t:Mailbox>
<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

<t:Mailbox>
<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:ToRecipients>

</t:Message>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The server responds to the CreateItem request with a CreateItemResponse message


that includes a ResponseCode value of NoError, which indicates that the email and
the attachments were created successfully. The ItemId of the newly created message
and the AttachmentId values for each of the attachments is also included in the
response. The values of some attributes have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="939"

MinorBuildNumber="12"

Version="V2_11"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:CreateItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Message>
<t:ItemId Id="upV4AAA="

ChangeKey="CQAAABYAAAAFI5DJmZv+TLtyLOLIF1S5AAAXuktU"
/>

<t:Attachments>

<t:FileAttachment>

<t:AttachmentId Id="6ts3NuI=" />

</t:FileAttachment>

<t:FileAttachment>

<t:AttachmentId Id="gOIZx1I=" />

</t:FileAttachment>

<t:FileAttachment>

<t:AttachmentId Id="esRan5I=" />

</t:FileAttachment>

<t:FileAttachment>

<t:AttachmentId Id="t7sU6s=" />

</t:FileAttachment>

<t:ItemAttachment>

<t:AttachmentId Id="XgDCggM=" />

</t:ItemAttachment>

</t:Attachments>

</t:Message>

</m:Items>

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</m:CreateItemResponse>

</s:Body>

</s:Envelope>

To send this newly created message, call the SendItem operation.

Add an existing item to a new email by using


the MimeContent and the EWS Managed API
To add an existing item as an item attachment to another item, you need to create a
new item attachment and copy the content of the existing item to the new item. There
are two ways to do this:

1. If you're working with email messages specifically, you can copy the value of the
MimeContent property from the email into the newly created item attachment.
You will lose some properties during this process, such as follow up flags and
categories, but it works great for standard email messages.

2. If you need full fidelity for all item types, you can bind to an existing item and copy
all the properties and extended properties into the new attachment.

The following code example shows the first approach, copying the MimeContent into
the new item attachment. Following this example is a procedure that shows how you
can modify the code to use the second approach.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server, and that the itemId is the ItemId of the
item to attach.

C#

public static void CreateEmailExistingItem(ExchangeService service, ItemId


itemId)

// This method results in a GetItem call to EWS.

EmailMessage msgToAttach = EmailMessage.Bind(service,itemId,

new PropertySet(ItemSchema.MimeContent, ItemSchema.Subject));

// Create an email message and set properties on the message.

EmailMessage message = new EmailMessage(service);

message.Subject = "Message with Item Attachment (MimeContent)";

message.Body = "The attachment to this message was created by copying

the MimeContent from the original message and adding it to a new


item attachment.";

message.ToRecipients.Add("[email protected]");

// Add an email message item attachment and set properties on the item.

ItemAttachment<EmailMessage> itemAttachment =
message.Attachments.AddItemAttachment<EmailMessage>();

itemAttachment.Item.MimeContent = msgToAttach.MimeContent;

itemAttachment.Name = msgToAttach.Subject;

// Send the mail and save a copy in the Sent Items folder.

// This method results in a CreateItem and SendItem call to EWS.

message.SendAndSaveCopy();

To modify this example to copy each of the properties on the existing item into the new
item attachment, do the following:

1. Change the property set to include PropertySet.FirstClassProperties and any


additional properties or extended properties you need.

C#

// Add additional properties to the PropertySet.

EmailMessage msgToAttach = EmailMessage.Bind(service, itemId, new


PropertySet(PropertySet.FirstClassProperties));

2. Remove the following line, because you do not need the MimeContent property.

C#

itemAttachment.Item.MimeContent = msgToAttach.MimeContent;

3. Repeat this line for each property to copy from the existing item to the new
attachment. Do not copy the ItemId into the new item attachment because that's a
read-only property.

C#

itemAttachment.Item.Subject = msgToAttach.Subject;

4. Set the PidTagMessageFlags (0x0E070003) property on the attachment to Sent.

C#
ExtendedPropertyDefinition sent = new ExtendedPropertyDefinition(3591,
MapiPropertyType.Integer);

msgToAttach.Item.SetExtendedProperty(sent, "1");

Add an existing item to a new email by using


the MimeContent and EWS
There are two ways to add an existing item to a new item:

1. If you're working with email messages specifically, you can copy the value of the
MimeContent element from the email into the newly created item attachment.
You will lose some properties during this process, such as follow up flags and
categories, but it works great for standard email messages.

2. If you need full fidelity for all item types, you can bind to an existing item and copy
all the properties and extended properties into the new attachment.

The following code example shows how to use the MimeContent element to copy the
content of the original item into the MimeContent value of the new item attachment.
The example uses the following operations:

1. GetItem — To get the MimeContent and Subject of the message that will
become the item attachment on the new message.

2. CreateItem — To create the new email message.

3. CreateAttachment — To create the new attachment, using the MimeContent and


Subject retrieved by the GetItem operation.

4. SendItem — To send and save the message.

The example starts by retrieving the MimeContent and the Subject of the existing item.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<m:GetItem>

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:MimeContent" />

<t:FieldURI FieldURI="item:Subject" />

</t:AdditionalProperties>

</m:ItemShape>

<m:ItemIds>

<t:ItemId Id="jCrTAAA=" />

</m:ItemIds>

</m:GetItem>

</soap:Body>

</soap:Envelope>

The server responds to the GetItem request with a GetItemResponse message that
includes a ResponseCode value of NoError, which indicates that the email was
retrieved successfully, and the MimeContent and Subject of the email.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="944"

MinorBuildNumber="11"

Version="V2_12"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Message>
<t:MimeContent CharacterSet="UTF-8">tDQe/Eo=…</t:MimeContent>

<t:ItemId Id="jCrTAAA="

ChangeKey="CQAAABYAAAAFI5DJmZv+TLtyLOLIF1S5AAAZi+7u"
/>

<t:Subject>Play tennis?</t:Subject>

</t:Message>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</m:GetItemResponse>

</s:Body>

</s:Envelope>

Next, call the CreateItem operation to create the new email.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:CreateItem MessageDisposition="SaveOnly">

<m:Items>

<t:Message>

<t:Subject>Message with Item Attachment (MimeContent)</t:Subject>

<t:Body BodyType="HTML">The attachment to this message was created


by copying the MimeContent from the original message and adding it to a new
item attachment.</t:Body>

<t:ToRecipients>

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:ToRecipients>

</t:Message>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The server responds to the CreateItem request with a CreateItemResponse message


that includes a ResponseCode value of NoError, which indicates that the email was
created successfully.

Next, create the new item attachment by using the MimeContent and Subject retrieved
by the GetItem operation. The value of the ParentItemId element is populated by
using the ItemId value returned in the CreateItem response.

XML
<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:CreateAttachment>

<m:ParentItemId Id="jDKsAAA=" />

<m:Attachments>

<t:ItemAttachment>

<t:Name>Play tennis?</t:Name>

<t:IsInline>false</t:IsInline>

<t:Message>

<t:MimeContent CharacterSet="UTF-8">tDQe/Eo=…</t:MimeContent>

</t:Message>

</t:ItemAttachment>

</m:Attachments>

</m:CreateAttachment>

</soap:Body>

</soap:Envelope>

The server responds to the CreateAttachment request with a


CreateAttachmentResponse message that includes a ResponseCode value of
NoError, which indicates that the attachment was created successfully, and the
AttachmentId of the newly created attachment.

Now that the new message has been created, and the item was attached, you can send
this newly created message by calling the SendItem operation.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:SendItem SaveItemToFolder="true">

<m:ItemIds>

<t:ItemId Id="jDKsAAA="

ChangeKey="CQAAABYAAAAFI5DJmZv+TLtyLOLIF1S5AAAZi/q/" />

</m:ItemIds>

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="sentitems" />

</m:SavedItemFolderId>

</m:SendItem>

</soap:Body>

</soap:Envelope>

The server responds to the SendItem request with a SendItemResponse message that
includes a ResponseCode value of NoError, which indicates that the email was sent
successfully.

Create an email with an inline attachment by


using the EWS Managed API
The following code example shows how to create an email with an inline attachment by:

1. Using the EmailMessage object to create an email message.

2. Setting the EmailMessage.Body property to an HTML body that includes an


inline attachment.

3. Using the AttachmentCollection.AddFileAttachment method to add the


attachment to the message.

4. Using the EmailMessage.SendAndSaveCopy method to send the message to the


recipient and save the message in the Sent Items folder.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server.

C#

public static void CreateEmailWithInlineAttachment(ExchangeService service)

// Create the HTML body with the content identifier of the attachment.

string html = @"<html>

<head>

</head>

<body>

<img width=100 height=100 id=""1""


src=""cid:Party.jpg"">

</body>

</html>";

// Create the email message.

EmailMessage message = new EmailMessage(service);

message.Subject = "Inline Attachment";

message.Body = new MessageBody(BodyType.HTML, html);

message.ToRecipients.Add("[email protected]");

// Add the attachment to the local copy of the email message.

string file = @"C:\Temp\Party.jpg";

message.Attachments.AddFileAttachment("Party.jpg", file);

message.Attachments[0].IsInline = true;

message.Attachments[0].ContentId = "Party.jpg";

// Send the mail and save a copy in the Sent Items folder.

// This method results in a CreateItem and SendItem call to EWS.

message.SendAndSaveCopy();

Create an email with an inline attachment by


using EWS
The following code example shows how to use the CreateItem operation to create an
email message with an inline file attachment. The BodyType attribute of the Body
element indicates that the content is in HTML format and includes the image source.
This is also one of the XML requests that the EWS Managed API sends when you use the
EWS Managed API to create an email with an inline attachment.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:CreateItem MessageDisposition="SaveOnly">

<m:Items>

<t:Message>

<t:Subject>Inline Attachment</t:Subject>

<t:Body BodyType="HTML">

&amp;lt;html&amp;gt;

&amp;lt;head&amp;gt;

&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;

&amp;lt;img width=100 height=100 id="1"


src="cid:Party.jpg"&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
</t:Body>

<t:ToRecipients>

<t:Mailbox>
<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:ToRecipients>

</t:Message>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The server responds to the CreateItem request with a CreateItemResponse message


that includes a ResponseCode value of NoError, which indicates that the email was
created successfully, and the ItemId of the newly created message.

To send this newly created message, call the SendItem operation.

Add an attachment to an existing email by


using the EWS Managed API
The following code example shows how to add an attachment to an existing email by:

1. Using the EmailMessage.Bind method to bind to an existing email message.

2. Adding a file attachment to the message by using the AddFileAttachment method.

3. Saving the updates by calling the EmailMessage.Update method.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server.

XML

public static void AddAttachmentToExisting(ExchangeService service, ItemId


itemId)

// This method results in a GetItem call to EWS.

EmailMessage message = EmailMessage.Bind(service, itemId);

message.Attachments.AddFileAttachment("C:\\temp\\FileAttachment.txt");

// This method results in a CreateAttachment call to EWS.

message.Update(ConflictResolutionMode.AlwaysOverwrite);

Add an attachment to an existing email by


using EWS
The following code example shows how to use the CreateAttachment operation to
add a file attachment to an existing email message. This is also one of the XML requests
that the EWS Managed API sends when you use the EWS Managed API to add an
attachment to an existing email.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Central Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:CreateAttachment>

<m:ParentItemId Id="uqE2AAA=" />

<m:Attachments>

<t:FileAttachment>

<t:Name>FileAttachment.txt</t:Name>

<t:Content>VGhpcyBpcyBhIGZpbGUgYXR0YWNobWVudC4=</t:Content>

</t:FileAttachment>

</m:Attachments>

</m:CreateAttachment>

</soap:Body>

</soap:Envelope>

The server responds to the CreateAttachment request with a


CreateAttachmentResponse message that includes a ResponseCode value of
NoError, which indicates that the attachment was created successfully, and the
AttachmentId of the newly created attachment.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="939"

MinorBuildNumber="12"

Version="V2_11"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:CreateAttachmentResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:CreateAttachmentResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Attachments>

<t:FileAttachment>

<t:AttachmentId Id="yRLhCh8="

RootItemId="uqE2AAA="

RootItemChangeKey="CQAAABYAAAAFI5DJmZv+TLtyLOLIF1S5AAAXulcf" />

</t:FileAttachment>

</m:Attachments>

</m:CreateAttachmentResponseMessage>

</m:ResponseMessages>

</m:CreateAttachmentResponse>

</s:Body>

</s:Envelope>

See also
Attachments and EWS in Exchange

Add attachments by using EWS in Exchange

Delete attachments by using EWS in Exchange

Get attachments by using EWS in Exchange

Send email messages by using EWS in Exchange


Get attachments by using EWS in
Exchange
Article • 01/15/2020 • 5 minutes to read

Learn how to get attachments from EWS items by using the EWS Managed API or EWS
in Exchange.

You can get attachments from an item by using the EWS Managed API or EWS. Because
the initial call to get an item only includes metadata about the attachment collection on
the item, retrieving attachments is always a two-step process. First, retrieve the item.
Next, retrieve the attachment.

Table 1. EWS Managed API methods and EWS operations for adding attachments

Task EWS Managed API method EWS operation

Get item Item.Bind followed by GetItem followed by


attachments ItemAttachment.Load
GetAttachment

Get file Item.Bind followed by GetItem followed by


attachments FileAttachment.Load
GetAttachment

Get attachments from an email by using the


EWS Managed API
The following code example shows how to get an EmailMessage object by using the
Bind method, then iterate through the attachment collection and call the
FileAttachment.Load or ItemAttachment.Load method on each attachment as
appropriate. Each file attachment is saved to the C:\temp\ folder, and each item
attachment is loaded into memory. For information about how to save an item
attachment, see Save an attached email by using the EWS Managed API.

This example assumes that service is a valid ExchangeService object, that itemId is the
ItemId of the message from which attachments will be retrieved, and that the user has
been authenticated to an Exchange server.

C#

public static void GetAttachmentsFromEmail(ExchangeService service, ItemId


itemId)

// Bind to an existing message item and retrieve the attachments


collection.

// This method results in an GetItem call to EWS.

EmailMessage message = EmailMessage.Bind(service, itemId, new


PropertySet(ItemSchema.Attachments));

// Iterate through the attachments collection and load each attachment.

foreach (Attachment attachment in message.Attachments)

if (attachment is FileAttachment)

FileAttachment fileAttachment = attachment as FileAttachment;

// Load the attachment into a file.

// This call results in a GetAttachment call to EWS.

fileAttachment.Load("C:\\temp\\" + fileAttachment.Name);

Console.WriteLine("File attachment name: " +


fileAttachment.Name);

else // Attachment is an item attachment.

ItemAttachment itemAttachment = attachment as ItemAttachment;

// Load attachment into memory and write out the subject.

// This does not save the file like it does with a file
attachment.

// This call results in a GetAttachment call to EWS.

itemAttachment.Load();

Console.WriteLine("Item attachment name: " +


itemAttachment.Name);

Get an attachment from an email by using EWS


To get attachments by using EWS, you first need to retrieve the message and the
attachment collection to get the AttachmentId (GetAttachment and
DeleteAttachment) of the attachment to retrieve. After you have one or more
AttachmentId values to retrieve, call the GetAttachment operation to load all the
properties for the attachment.

The following code example shows how to use the GetItem operation to get an email
message and the collection of attachments on the message. This is also the first XML
request that the EWS Managed API sends when you use the EWS Managed API to get all
attachments from an email. The values of some attributes are shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange207_SP1" />

</soap:Header>

<soap:Body>

<m:GetItem>

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Attachments" />

</t:AdditionalProperties>

</m:ItemShape>

<m:ItemIds>

<t:ItemId Id="ERu/AAA=" />

</m:ItemIds>

</m:GetItem>

</soap:Body>

</soap:Envelope>

The server responds to the GetItem request with a GetItemResponse message that
includes a ResponseCode value of NoError, which indicates that the email was
retrieved successfully, and the AttachmentId values of the existing attachments.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="939"

MinorBuildNumber="12"

Version="V2_11"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Message>
<t:ItemId Id="ERu/AAA="

ChangeKey="CQAAABYAAAAFI5DJmZv+TLtyLOLIF1S5AAAYEMnd"
/>

<t:Attachments>

<t:FileAttachment>

<t:AttachmentId Id="5zTzlqU=" />

<t:Name>FileAttachment.txt</t:Name>

<t:Size>212</t:Size>

<t:LastModifiedTime>2014-05-
14T17:59:30</t:LastModifiedTime>

<t:IsInline>false</t:IsInline>

<t:IsContactPhoto>false</t:IsContactPhoto>

</t:FileAttachment>

<t:ItemAttachment>

<t:AttachmentId Id="Ktum21o=" />

<t:Name>Attached Message Item</t:Name>

<t:Size>3063</t:Size>

<t:LastModifiedTime>2014-05-
14T17:59:30</t:LastModifiedTime>

<t:IsInline>false</t:IsInline>

</t:ItemAttachment>

</t:Attachments>

</t:Message>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</m:GetItemResponse>

</s:Body>

</s:Envelope>

Now that you have the AttachmentId values, call GetAttachment on each
attachment you want to retrieve.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:GetAttachment>

<m:AttachmentIds>
<t:AttachmentId Id="5zTzlqU=" />

</m:AttachmentIds>

</m:GetAttachment>

</soap:Body>

</soap:Envelope>

When retrieving an item attachment, the server responds to the GetAttachment request
with a GetAttachmentResponse message that includes a ResponseCode value of
NoError, which indicates that the attachment was retrieved successfully, and all the
elements for the attached item, which in this case is an email message.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="939"

MinorBuildNumber="12"

Version="V2_11"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetAttachmentResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetAttachmentResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Attachments>

<t:ItemAttachment>

<t:AttachmentId Id="Ktum21o=" />


<t:Name>Attached Message Item</t:Name>

<t:Message>

<t:ItemClass>IPM.Note</t:ItemClass>

<t:Subject>Message Item Subject</t:Subject>

<t:Body BodyType="HTML">&amp;lt;meta http-equiv="Content-


Type"

content="text/html; charset=utf-8"&amp;gt;Message Item


Body</t:Body>

<t:Size>2859</t:Size>

<t:IsSubmitted>false</t:IsSubmitted>

<t:IsDraft>true</t:IsDraft>

<t:IsFromMe>false</t:IsFromMe>

<t:IsResend>false</t:IsResend>

<t:IsUnmodified>false</t:IsUnmodified>

<t:DateTimeCreated>2014-05-14T17:59:37Z</t:DateTimeCreated>

<t:ResponseObjects>

<t:ForwardItem />

</t:ResponseObjects>

<t:DisplayCc />

<t:DisplayTo>primary; emaildelegate</t:DisplayTo>

<t:HasAttachments>false</t:HasAttachments>

<t:Culture>en</t:Culture>

<t:EffectiveRights>

<t:CreateAssociated>false</t:CreateAssociated>

<t:CreateContents>false</t:CreateContents>

<t:CreateHierarchy>false</t:CreateHierarchy>

<t:Delete>true</t:Delete>

<t:Modify>true</t:Modify>

<t:Read>true</t:Read>

</t:EffectiveRights>

<t:LastModifiedName>primary</t:LastModifiedName>

<t:LastModifiedTime>2014-05-
14T17:59:30Z</t:LastModifiedTime>

<t:IsAssociated>false</t:IsAssociated>

<t:WebClientReadFormQueryString>?
ItemID=AAMk3D&amp;amp;exvsurl=1&amp;amp;viewmodel=

ReadMessageItem</t:WebClientReadFormQueryString>

<t:ConversationId Id="AAQkADIwM2ZlM2ZlLWMwYjctNDg2N/Rc+d0="
/>

<t:ToRecipients>

<t:Mailbox>

<t:Name>primary</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Mailbox>

<t:Mailbox>

<t:Name>emaildelegate</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Mailbox>

</t:ToRecipients>

<t:IsReadReceiptRequested>false</t:IsReadReceiptRequested>

<t:ConversationIndex>AQHPb55BxR5Fm0Arx0yY4xbL9Fz53Q==
</t:ConversationIndex>

<t:ConversationTopic>Message Item
Subject</t:ConversationTopic>

<t:IsRead>true</t:IsRead>

</t:Message>

</t:ItemAttachment>

</m:Attachments>

</m:GetAttachmentResponseMessage>

</m:ResponseMessages>

</m:GetAttachmentResponse>

</s:Body>

</s:Envelope>

When retrieving a file attachment, the server responds to the GetAttachment request
with a GetAttachmentResponse message that includes a ResponseCode value of
NoError, which indicates that the attachment was retrieved successfully, and all the
elements of the file attachment.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="939"

MinorBuildNumber="12"

Version="V2_11"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetAttachmentResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetAttachmentResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Attachments>

<t:FileAttachment>

<t:AttachmentId Id="5zTzlqU=" />


<t:Name>FileAttachment.txt</t:Name>

<t:Content>VGhpcyBpcyBhIGZpbGUgYXR0YWNobWVudC4=</t:Content>

</t:FileAttachment>

</m:Attachments>

</m:GetAttachmentResponseMessage>

</m:ResponseMessages>

</m:GetAttachmentResponse>

</s:Body>

</s:Envelope>

Save an attached email by using the EWS


Managed API
In order to save the contents of an email attachment using the EWS Managed API, you
need to save the MimeContent to a file. In doing so, you will lose any extended
properties set on the item, such as follow-up flags and categories. This example saves
the email attachment to the to the C:\temp\ folder.

Note that you cannot move or copy the item attachment to another folder because the
item attachment is not a strongly-typed item, so if you're trying to move an attachment
to a different folder, use the following code example and then import the file into a
different folder.

C#

public static void SaveEmailAttachment(ExchangeService service, ItemId


itemId)

// Bind to an existing message item and retrieve the attachments


collection.

// This method results in an GetItem call to EWS.

EmailMessage message = EmailMessage.Bind(service, itemId, new


PropertySet(ItemSchema.Attachments));

foreach (Attachment attachment in message.Attachments)

if (attachment is ItemAttachment)

ItemAttachment itemAttachment = attachment as ItemAttachment;

itemAttachment.Load(ItemSchema.MimeContent);

string fileName = "C:\\Temp\\" + itemAttachment.Item.Subject +


".eml";

// Write the bytes of the attachment into a file.

File.WriteAllBytes(fileName,
itemAttachment.Item.MimeContent.Content);

Console.WriteLine("Email attachment name: "+


itemAttachment.Item.Subject + ".eml");

See also
Attachments and EWS in Exchange

Add attachments by using EWS in Exchange

Delete attachments by using EWS in Exchange


Delete attachments by using EWS in
Exchange
Article • 09/15/2021 • 5 minutes to read

Learn how to delete attachments from items by using the EWS Managed API or EWS in
Exchange.

You have a number of options when it comes to deleting file and item attachments from
items by using the EWS Managed API. You can delete all the attachments from the
message, delete by a file name, or delete by position in the collection. For each of these
options, there is an AttachmentCollection method.

Conversely, with EWS, no matter whether you're deleting all attachments from an item
or just one, the sequence of operations is same. Unlike the EWS Managed API, EWS
does not include separate operations to delete based on name or position in the
attachments array.

Table 1. EWS Managed API methods and EWS operations for deleting attachments

Task EWS Managed API method EWS operation

Delete all attachments from Item.Bind , followed by GetItem followed


an item. AttachmentCollection.Clear , followed by by
EmailMessage.Update
DeleteAttachment

Delete an attachment from Item.Bind , followed by GetItem followed


an item by name. AttachmentCollection.Remove , followed by
by EmailMessage.Update
DeleteAttachment

Delete an attachment from Item.Bind , followed by GetItem followed


an item by position in the AttachmentCollection.RemoveAt , by
collection. followed by EmailMessage.Update
DeleteAttachment

Delete all attachments from an email by using


the EWS Managed API
The following code example shows how to delete all attachments from an email by:

1. Using the EmailMessage.Bind method to bind to an existing email message and


retrieve the collection of Attachments .
2. Using the AttachmentCollection.Clear method to delete all the attachments from
the email.

3. Using the EmailMessage.Update method to save the changes.

This example assumes that service is a valid ExchangeService object, itemId is the
ItemId of the message from which attachments will be deleted, and that the user has
been authenticated to an Exchange server.

C#

public static void DeleteAllAttachments(ExchangeService service, ItemId


itemId)

// Bind to an existing message by using its item ID and requesting its


attachments collection.

// This method results in a GetItem call to EWS.

EmailMessage message = EmailMessage.Bind(service, itemId, new


PropertySet(ItemSchema.Attachments));

// Delete all attachments from the message.

message.Attachments.Clear();

// Save the updated message.

// This method results in an DeleteAttachment call to EWS.

message.Update(ConflictResolutionMode.AlwaysOverwrite);

Delete an attachment by name from an email


by using the EWS Managed API
The following code example shows how delete an attachment by name by:

1. Using the EmailMessage.Bind method to bind to an existing email message and


retrieve the collection of Attachments .

2. Using the AttachmentCollection.Remove method to delete an attachment


named FileAttachment.txt.

3. Using the EmailMessage.Update method to save the changes.

This example assumes that service is a valid ExchangeService object, itemId is the
ItemId of the message from which the attachment will be deleted, and that the user
has been authenticated to an Exchange server.

C#
public static void DeleteNamedAttachments(ExchangeService service, ItemId
itemId)

// Bind to an existing message by using its item ID and requesting its


attachments collection.

// This method results in a GetItem call to EWS.

EmailMessage message = EmailMessage.Bind(service, itemId, new


PropertySet(ItemSchema.Attachments));

// Iterate through the attachments collection and delete the attachment


named "FileAttachment.txt," if it exists.

foreach (Attachment attachment in message.Attachments)

if (attachment.Name == "FileAttachment.txt")

message.Attachments.Remove(attachment);

break;

// Save the updated message.

// This method results in an DeleteAttachment call to EWS.

message.Update(ConflictResolutionMode.AlwaysOverwrite);

Delete attachments by position by using the


EWS Managed API
The following code example shows how to delete an attachment by position by:

1. Using the EmailMessage.Bind method to bind to an existing email message and


retrieve the collection of Attachments and the EmailMessage.HasAttachments
property.

2. Using the AttachmentCollection.Remove method to delete the first attachment


in the collection.

3. Using the EmailMessage.Update method to save the changes.

This example assumes that service is a valid ExchangeService object, itemId is the
ItemId of the message from which the attachment will be deleted, and that the user
has been authenticated to an Exchange server.

C#

public static void DeleteAttachmentByPosition(ExchangeService service,


ItemId itemId)

// Bind to an existing message by using its item ID and requesting the


HasAttachments property and the attachments collection.

// This method results in a GetItem call to EWS.

EmailMessage message = EmailMessage.Bind(service, itemId, new


PropertySet(EmailMessageSchema.HasAttachments, ItemSchema.Attachments));

// Remove attachments using the zero-based index position of the


attachment in the attachments collection.

if (message.HasAttachments)

message.Attachments.RemoveAt(0);

// Save the updated message.

// This method results in an DeleteAttachment call to EWS.

message.Update(ConflictResolutionMode.AlwaysOverwrite);

Delete attachments from an item by using EWS


To delete attachments by using EWS, you first need to retrieve the message and the
attachment collection to determine the AttachmentId (GetAttachment and
DeleteAttachment) of the attachment to delete. After you have one or more
AttachmentId values to delete, call the DeleteAttachment operation to remove the
specified attachments from the message.

The following code example shows how to use the GetItem operation to get an email
message and the collection of attachments on the message. This is also the first XML
request that the EWS Managed API sends when you use the EWS Managed API to delete
all attachments from an email. The values of some attributes are shortened for
readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Central Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:GetItem>

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Attachments" />

</t:AdditionalProperties>

</m:ItemShape>

<m:ItemIds>

<t:ItemId Id="uqE1AAA=" />

</m:ItemIds>

</m:GetItem>

</soap:Body>

</soap:Envelope>

The server responds to the GetItem request with a GetItemResponse message that
includes a ResponseCode value of NoError, which indicates that the email was
retrieved successfully, and the AttachmentId values of the existing attachments.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="939"

MinorBuildNumber="12"

Version="V2_11"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Message>
<t:ItemId Id="uqE1AAA="

ChangeKey="CQAAABYAAAAFI5DJmZv+TLtyLOLIF1S5AAAXulcd"
/>

<t:Attachments>

<t:FileAttachment>

<t:AttachmentId Id="IpHLObE=" />

<t:Name>FileAttachment.txt</t:Name>

</t:FileAttachment>

<t:FileAttachment>

<t:AttachmentId Id="QuHSSmY=" />

<t:Name>SecondAttachment.txt</t:Name>

</t:FileAttachment>

<t:FileAttachment>

<t:AttachmentId Id="qf2KoPo=" />

<t:Name>ThirdAttachment.jpg</t:Name>

</t:FileAttachment>

<t:FileAttachment>

<t:AttachmentId Id="NFQMnMc=" />

<t:Name>FourthAttachment.txt</t:Name>

</t:FileAttachment>

<t:ItemAttachment>

<t:AttachmentId Id="jJvbLXQ=" />

<t:Name>Attached Message Item</t:Name>

</t:ItemAttachment>

</t:Attachments>

</t:Message>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</m:GetItemResponse>

</s:Body>

</s:Envelope>

After you determine which attachment to delete, call the DeleteAttachment operation
and include the AttachmentId values of the attachments to delete.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Central Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:DeleteAttachment>

<m:AttachmentIds>
<t:AttachmentId Id="IpHLObE=" />

<t:AttachmentId Id="QuHSSmY=" />

<t:AttachmentId Id="qf2KoPo=" />

<t:AttachmentId Id="NFQMnMc=" />

<t:AttachmentId Id="jJvbLXQ=" />

</m:AttachmentIds>

</m:DeleteAttachment>

</soap:Body>

</soap:Envelope>

The server responds to the DeleteAttachment request with a


DeleteAttachmentResponse message that includes a ResponseCode value of
NoError for each DeleteAttachmentResponseMessage , which indicates that each
attachment was deleted successfully. The values of some attributes are shortened for
readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="939"

MinorBuildNumber="12"

Version="V2_11"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:DeleteAttachmentResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:DeleteAttachmentResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootItemId RootItemId="uqE1AAA=" RootItemChangeKey="AAAXulck"


/>

</m:DeleteAttachmentResponseMessage>

<m:DeleteAttachmentResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootItemId RootItemId="uqE1AAA=" RootItemChangeKey="AAAXulck"


/>

</m:DeleteAttachmentResponseMessage>

<m:DeleteAttachmentResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootItemId RootItemId="uqE1AAA=" RootItemChangeKey="AAAXulck"


/>

</m:DeleteAttachmentResponseMessage>

<m:DeleteAttachmentResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootItemId RootItemId="uqE1AAA=" RootItemChangeKey="AAAXulck"


/>

</m:DeleteAttachmentResponseMessage>

<m:DeleteAttachmentResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootItemId RootItemId="uqE1AAA=" RootItemChangeKey="AAAXulck"


/>

</m:DeleteAttachmentResponseMessage>

</m:ResponseMessages>

</m:DeleteAttachmentResponse>

</s:Body>

</s:Envelope>

See also
Attachments and EWS in Exchange

Add attachments by using EWS in Exchange

Get attachments by using EWS in Exchange


Calendars and EWS in Exchange
Article • 09/14/2022 • 4 minutes to read

Learn about calendars, calendar folders and items, appointments, and meetings in
Exchange.

You're probably familiar with many of the calendar features in email clients like Outlook,
which enable you to track appointments, schedule meetings, check people's availability,
invite attendees, and change or cancel meetings.

Calendar-related features in Exchange are a little different than what you see in a client
like Outlook. Instead of displaying information, EWS in Exchange enables you to do
things like create, store, send, or change information. To use EWS to work with
calendars, you'll need to be familiar with concepts such as information storage, time,
recurrence, and message flow. More specifically, you'll need to be familiar with the
following:

Calendar folders, calendar items, and calendar views

Meeting requests, responses, scheduling, attendees, resources, rooms, and


availability

Time durations, time zones, and start and end times of meetings and
appointments

Recurring series, recurrence patterns, exceptions, and single instance appointments


and meetings

Fortunately, EWS and the EWS Managed API provide a rich set of operations and
methods that enable you to perform a wide range of calendar-related tasks. For
example, using the EWS Managed API, you can create a meeting and send invitations to
attendees with just a few lines of code, as shown in the following example.

C#

Appointment meeting = new Appointment(service);

// Set the properties on the meeting object to create the


meeting.

meeting.Subject = "Team building exercise";

meeting.Body = "Let's learn to really work as a team and then


have lunch!";

meeting.Start = DateTime.Now.AddDays(2);

meeting.End = meeting.Start.AddHours(2);

meeting.Location = "Conference Room 12";

meeting.RequiredAttendees.Add("[email protected]");

meeting.RequiredAttendees.Add("[email protected]");

meeting.OptionalAttendees.Add("[email protected]");

meeting.ReminderMinutesBeforeStart = 60;

// Send the meeting request

meeting.Save(SendInvitationsMode.SendToAllAndSaveCopy);

Calendar folders and calendar items


Calendar folders contain calendar items. Calendar folders have a folder class of
IPF.Appointment, and can include only the items defined by the ItemClass EWS
Managed API property, which is associated with an Appointment Class object, or the
EWS CalendarItemType element.

Items in a Calendar folder are a little different from items in other folders in a mailbox
because occurrences in a recurring series and exceptions to a recurring series are not
actual items in the mailbox, but rather are stored internally as attachments to a recurring
master. Therefore, in order to retrieve all appointments in a given date range, you need
to use a calendar view. To learn more about retrieving appointments and calendar views,
see Get appointments and meetings by using EWS in Exchange.

Meetings and appointments


The essential difference between meetings and appointments is that meetings have
attendees, and appointments don't. Internally, Exchange uses the same object for both
meetings and appointments. You use the EWS Managed API Appointment class or the
EWS CalendarItem element to work with meetings and appointments.

Both appointments and meetings can be single instances or part of a recurring series,
but because appointments don't include attendees, rooms, or resources, they do not
require a message to be sent.

Because meetings include sending and responding to requests and updates, they
involve more than just accessing items in a Calendar folder. They also have an
associated workflow. Meetings must be scheduled when attendees are available, and
can also involve reserving a meeting room, or resources such as a projector or other
equipment.

The meeting workflow typically involves the following steps:

1. A meeting is created and populated with information such as start and end time,
location, and a message body.
2. A list of prospective attendees, resources, and rooms is created.
3. The availability status of attendees is checked.
4. A meeting request is sent to attendees.
5. Attendees reply to the meeting with their intention to attend or not. Attendees
may also propose a new time for the meeting.
6. Meetings can be canceled or updated, which typically trigger new messages to be
sent to attendees.

Calendars and time


Time-related functionality is integral to calendaring. Appointments and meetings have
start and end times, durations, and other time-related properties, such as the time at
which a message is created, sent, and received. Existing appointments and meetings can
be retrieved from a Calendar folder based on a start and end time. Recurring series have
beginnings and ends. And meetings occur within a given time zone, which is
increasingly important in a global economy.

Times are stored internally on an Exchange server in Coordinated Universal Time (UTC).
Exchange converts them to local time zone based on client settings. DateTime
properties are scoped to the computer's local time zone.

Recurring series
A recurring series of appointments or meetings is comprised of a recurring master, a set
of occurrence items, and optionally, a set of exception items. Recurrence information is
stored on the recurring master item. The RecurringMasterItemId EWS element is
associated with occurrences and exceptions in a series, or you can use the
Appointment.BindToRecurringMaster EWS Managed API method to get the recurring
master. Using an instance of a series, you can find all the elements and information
associated with the series.

Note that recurrence properties exist on all calendar items, but they are populated only
on recurring master items. In addition to an index of all occurrences in a series, the
recurring master has a reference to modified and deleted occurrences and the
recurrence pattern of a series (for example, daily, weekly, monthly, or yearly).

In this section
Create appointments and meetings by using EWS in Exchange 2013

Create all-day events by using EWS in Exchange


Get appointments and meetings by using EWS in Exchange

Update appointments and meetings by using EWS in Exchange

Delete appointments and cancel meetings by using EWS in Exchange

Get room lists by using EWS in Exchange

Get free/busy information by using EWS in Exchange

Propose a new meeting time by using EWS in Exchange

Process calendar items in batches in Exchange

Recurrence patterns and EWS

See also
Develop web service clients for Exchange
Start using web services in Exchange
EWS client design overview for Exchange
Create appointments and meetings by
using EWS in Exchange 2013
Article • 01/15/2020 • 6 minutes to read

Learn how to create appointments and meetings by using the EWS Managed API or
EWS in Exchange.

The essential difference between meetings and appointments is that meetings have
attendees, and appointments don't. Both appointments and meetings can be single
instances or part of a recurring series, but because appointments don't include
attendees, rooms, or resources, they do not require a message to be sent. Internally,
Exchange uses the same object for both meetings and appointments. You use the EWS
Managed API Appointment class or the EWS [CalendarItem]
(https://msdn.microsoft.com/library/Title Topic ID Project Name Writer Editor Publish
Preview.aspx) element to work with meetings and appointments.

Table 1. EWS Managed API methods and EWS operations for working with
appointments and meetings

EWS Managed API method EWS operation

Appointment.Save
CreateItem operation (calendar item)

Item.Bind
GetItem operation (calendar item)

Create an appointment by using the EWS


Managed API
The following code example shows how to use the Appointment object to create an
appointment, the Save method to save it to your calendar folder, and the Item.Bind
method to verify that the appointment was created.

This example assumes that you have authenticated to an Exchange server and have
acquired an ExchangeService object named service.

C#

Appointment appointment = new Appointment(service);

// Set the properties on the appointment object to create the appointment.

appointment.Subject = "Tennis lesson";

appointment.Body = "Focus on backhand this week.";

appointment.Start = DateTime.Now.AddDays(2);

appointment.End = appointment.Start.AddHours(1);

appointment.Location = "Tennis club";

appointment.ReminderDueBy = DateTime.Now;

// Save the appointment to your calendar.

appointment.Save(SendInvitationsMode.SendToNone);

// Verify that the appointment was created by using the appointment's item
ID.

Item item = Item.Bind(service, appointment.Id, new


PropertySet(ItemSchema.Subject));
Console.WriteLine("\nAppointment created: " + item.Subject + "\n");

After setting the properties on the appointment object, you save the appointment to the
calendar folder by using the appointment object's Save method.

Note that in the verification step, you use the item Id associated with the appointment
to verify that the appointment is in the calendar folder. As a best practice, limit the
properties returned by the server to only what you need — in this case, the
appointment's subject.

Create an appointment by using EWS


The request and response XML in the following examples correspond to calls made by
the EWS Managed API code in Create an appointment by using the EWS Managed API.
The request and response XML that verifies that the appointment items are in the
calendar folder are shown as well.

The following example shows the request XML when you use the CreateItem
operation to create an appointment.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Pacific Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:CreateItem SendMeetingInvitations="SendToNone">

<m:Items>

<t:CalendarItem>

<t:Subject>Tennis lesson</t:Subject>

<t:Body BodyType="HTML">Focus on backhand this week.</t:Body>

<t:ReminderDueBy>2013-09-19T14:37:10.732-07:00</t:ReminderDueBy>

<t:Start>2013-09-21T19:00:00.000Z</t:Start>

<t:End>2013-09-21T20:00:00.000Z</t:End>

<t:Location>Tennis club</t:Location>

<t:MeetingTimeZone TimeZoneName="Pacific Standard Time" />

</t:CalendarItem>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The following example shows the response XML that is returned by the CreateItem
operation.

7 Note

The ItemId and ChangeKey attributes have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="775" MinorBuildNumber="7" Version="V2_4"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:CreateItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

</t:CalendarItem>

</m:Items>

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</m:CreateItemResponse>

</s:Body>

</s:Envelope>

The following example shows the request XML that is generated when you use the
GetItem operation to verify that the appointment was created.

7 Note

The ItemId and ChangeKey attributes have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Pacific Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:GetItem>

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

</t:AdditionalProperties>

</m:ItemShape>

<m:ItemIds>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

</m:ItemIds>

</m:GetItem>

</soap:Body>

</soap:Envelope>

The following example shows the response XML that is returned by the GetItem
operation.

7 Note

The ItemId and ChangeKey attributes have been shortened for readability.

XML
<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="775" MinorBuildNumber="7" Version="V2_4"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

<t:Subject>Tennis lesson</t:Subject>

</t:CalendarItem>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</m:GetItemResponse>

</s:Body>

</s:Envelope>

Create a meeting by using the EWS Managed


API
When you create a meeting, in addition to saving an item to the calendar folder, you
also typically want to send meeting requests to attendees. The following code example
shows how to create a meeting and send meeting requests.

This example assumes that you have authenticated to an Exchange server and have
acquired an ExchangeService object named service.

C#

Appointment meeting = new Appointment(service);

// Set the properties on the meeting object to create the meeting.

meeting.Subject = "Team building exercise";

meeting.Body = "Let's learn to really work as a team and then have lunch!";

meeting.Start = DateTime.Now.AddDays(2);

meeting.End = meeting.Start.AddHours(4);

meeting.Location = "Conference Room 12";

meeting.RequiredAttendees.Add("[email protected]");

meeting.RequiredAttendees.Add("[email protected]");

meeting.OptionalAttendees.Add("[email protected]");

meeting.ReminderMinutesBeforeStart = 60;

// Save the meeting to the Calendar folder and send the meeting request.

meeting.Save(SendInvitationsMode.SendToAllAndSaveCopy);

// Verify that the meeting was created.

Item item = Item.Bind(service, meeting.Id, new


PropertySet(ItemSchema.Subject));
Console.WriteLine("\nMeeting created: " + item.Subject + "\n");

After setting the properties on the Appointment object, save the meeting to your
calendar folder by using the Save method. When you set the SendInvitationsMode
enumeration value to SendOnlyToAll or SendToAllAndSaveCopy, invitations are sent to
attendees.

Use the item Id associated with the meeting to verify that it was saved in the calendar
folder. As a best practice, limit the properties returned by the server to only what you
need - in this case, the meeting's subject.

Create a meeting by using EWS


The request and response XML in the following examples correspond to calls made by
the EWS Managed API code in Create a meeting by using the EWS Managed API. The
request and response XML that verifies that the meeting items are in the calendar folder
are shown as well.

The following example shows the request XML when you use the CreateItem
operation to create a meeting.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Pacific Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:CreateItem SendMeetingInvitations="SendToAllAndSaveCopy">

<m:Items>

<t:CalendarItem>

<t:Subject>Team building exercise</t:Subject>

<t:Body BodyType="HTML">Let's learn to really work as a team and


then have lunch!</t:Body>

<t:ReminderMinutesBeforeStart>60</t:ReminderMinutesBeforeStart>

<t:Start>2013-09-21T16:00:00.000Z</t:Start>

<t:End>2013-09-21T20:00:00.000Z</t:End>

<t:Location>Conference Room 12</t:Location>

<t:RequiredAttendees>

<t:Attendee>

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:Attendee>

<t:Attendee>

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:Attendee>

</t:RequiredAttendees>

<t:OptionalAttendees>

<t:Attendee>

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:Attendee>

</t:OptionalAttendees>

<t:MeetingTimeZone TimeZoneName="Pacific Standard Time" />

</t:CalendarItem>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The following example shows the response XML that is returned by the CreateItem
operation.

7 Note

The ItemId and ChangeKey attributes have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="775" MinorBuildNumber="7" Version="V2_4"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:CreateItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

</t:CalendarItem>

</m:Items>

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</m:CreateItemResponse>

</s:Body>

</s:Envelope>

The following example shows the request XML that is generated by the GetItem
operation when you verify that the meeting was created.

7 Note

The ItemId and ChangeKey attributes have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Pacific Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:GetItem>

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

</t:AdditionalProperties>

</m:ItemShape>

<m:ItemIds>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

</m:ItemIds>

</m:GetItem>

</soap:Body>

</soap:Envelope>

The following example shows the response XML that is returned by the GetItem
operation.

7 Note

The ItemId and ChangeKey attributes have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="775" MinorBuildNumber="7" Version="V2_4"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

<t:Subject>Team building exercise</t:Subject>

</t:CalendarItem>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</m:GetItemResponse>

</s:Body>

</s:Envelope>

See also
Calendars and EWS in Exchange
Get appointments and meetings by using EWS in Exchange
Update appointments and meetings by using EWS in Exchange
Delete appointments and cancel meetings by using EWS in Exchange
Propose a new meeting time by using EWS in Exchange
Create all-day events by using EWS in
Exchange
Article • 02/11/2022 • 3 minutes to read

Learn how to create all-day events by using the EWS Managed API or EWS in Exchange.

All-day events provide a way to represent something that happens for an entire day or
multiple days—for example, a holiday, or vacation days. Creating all-day events with the
EWS Managed API or EWS is a snap. It's just like creating appointments, but with a few
small changes.

Setting start and end times


By definition, all-day events start at midnight on a specific day, and end 24 hours (or a
multiple of 24 hours) later. However, the EWS Managed API and EWS allow you to
specify times other than midnight when creating all day events. This can lead to
unintended behavior if you're not aware of how these times get translated on the server.

When a request is received to create a new all-day event with non-midnight (in the time
zone of the request or appointment) start and/or end times, those times get adjusted to
midnight in the appropriate time zone according to the following rules:

Non-midnight start times are adjusted to the midnight prior to the time specified.
For example, 1:00 PM on June 6 gets adjusted to 12:00 AM on June 6.
Non-midnight end times are adjusted to the midnight after the time specified. For
example, 1:00 PM on June 6 gets adjusted to 12:00 AM on June 7.

So the all-day event that you create is always inclusive of the start and end time that you
specify, but might claim additional time on the user's calendar due to the shift to
midnight. Because the server will adjust the start and end time to midnight, we
recommend that you specify your start and end time at midnight to avoid any
unintended changes to the times.

It's also important to consider time zones when creating all-day events. Because the
Exchange server enforces a midnight start and end time in the time zone of the request
or appointment, viewing that all-day event in a client configured for a different time
zone can yield unexpected results. Depending on the client, it might appear as an all-
day event with extra days that you did not intend to include, or it might not appear as
an all-day event altogether. Because of this, we recommend that you use the user's
preferred time zone whenever possible when you create all-day events.
Create an all-day event by using the EWS
Managed API
The following example shows how to use the EWS Managed API to create an all-day
event, starting on the date specified by the startDate parameter and lasting for the
number of days specified by the numDays parameter. Note that the appointment will be
created in the time zone specified by the ExchangeService.TimeZone property. This
example assumes that the ExchangeService object passed in the service parameter has
been initialized with valid values for the Credentials and Url properties.

C#

static void CreateAllDayAppointment(ExchangeService service, DateTime


startDate, int numDays)
{

// Best practice is to set the start date to midnight

// on the first day of the all-day event.

DateTime startDateMidnight = startDate.Date;

// The end date should be midnight on the first day

// after the event.

DateTime endDateMidnight = startDateMidnight.AddDays(numDays);

Appointment allDayEvent = new Appointment(service);

// Set IsAllDayEvent to true.


allDayEvent.IsAllDayEvent = true;

// Set other properties.

allDayEvent.Subject = "Vacation";

allDayEvent.LegacyFreeBusyStatus = LegacyFreeBusyStatus.OOF;

allDayEvent.Start = startDateMidnight;

allDayEvent.End = endDateMidnight;

// Save the appointment.

try

allDayEvent.Save(WellKnownFolderName.Calendar,
SendInvitationsMode.SendToNone);

Console.WriteLine("All day event created.");

catch (Exception ex)

Console.WriteLine("Error saving all day event: {0}", ex.Message);

Create an all-day event by using EWS


The following example shows an EWS CreateItem operation request to create an all-
day event. The appointment is created in the Eastern time zone, as indicated by the
TimeZoneContext element. Notice that the time portion of the values of the Start
and End elements are both 04:00Z, which converts to midnight in the Eastern time
zone during daylight saving time.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Eastern Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:CreateItem SendMeetingInvitations="SendToNone">

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="calendar" />

</m:SavedItemFolderId>

<m:Items>

<t:CalendarItem>

<t:Subject>Vacation</t:Subject>

<t:Start>2014-06-09T04:00:00.000Z</t:Start>

<t:End>2014-06-10T04:00:00.000Z</t:End>

<t:IsAllDayEvent>true</t:IsAllDayEvent>

<t:LegacyFreeBusyStatus>OOF</t:LegacyFreeBusyStatus>

</t:CalendarItem>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

See also- Calendars and EWS in Exchange


Create appointments and meetings by using EWS in Exchange 2013
Time zones and EWS in Exchange
Get appointments and meetings by
using EWS in Exchange
Article • 01/15/2020 • 4 minutes to read

Learn how to get appointments and meetings by using the EWS Managed API or EWS in
Exchange.

You can retrieve appointments and meetings from a calendar folder by using the
CalendarFolder.FindAppointments EWS Managed API method or the FindItem EWS
operation.

Get appointments by using the EWS Managed


API
The following code example shows how to use the EWS Managed API to retrieve a
user's appointments that fall between a specified start and end time.

C#

// Initialize values for the start and end times, and the number of
appointments to retrieve.

DateTime startDate = DateTime.Now;

DateTime endDate = startDate.AddDays(30);

const int NUM_APPTS = 5;

// Initialize the calendar folder object with only the folder


ID.

CalendarFolder calendar = CalendarFolder.Bind(service,


WellKnownFolderName.Calendar, new PropertySet());

// Set the start and end time and number of appointments to


retrieve.

CalendarView cView = new CalendarView(startDate, endDate,


NUM_APPTS);

// Limit the properties returned to the appointment's subject,


start time, and end time.

cView.PropertySet = new PropertySet(AppointmentSchema.Subject,


AppointmentSchema.Start, AppointmentSchema.End);

// Retrieve a collection of appointments by using the calendar


view.

FindItemsResults<Appointment> appointments =
calendar.FindAppointments(cView);
Console.WriteLine("\nThe first " + NUM_APPTS + " appointments on
your calendar from " + startDate.Date.ToShortDateString() +

" to " + endDate.Date.ToShortDateString() + "


are: \n");

foreach (Appointment a in appointments)

Console.Write("Subject: " + a.Subject.ToString() + " ");

Console.Write("Start: " + a.Start.ToString() + " ");

Console.Write("End: " + a.End.ToString());

Console.WriteLine();

The following is the output from the code example.

text

The first five appointments on your calendar from 8/21/2013 to 9/20/2013


are:

Subject: Contoso devs team meeting Start: 8/21/2013 12:30:00 PM End:


8/21/2013 1:00:00 PM

Subject: Daily status meeting Start: 8/21/2013 1:00:00 PM End: 8/21/2013


2:00:00 PM

Subject: Lunch with sales team Start: 8/21/2013 2:30:00 PM End: 8/21/2013
3:30:00 PM

Subject: Tennis at the club Start: 8/22/2013 11:00:00 AM End: 8/22/2013


12:00:00 PM

Subject: Online training webcast: 8/22/2013 2:00:00 PM End: 8/22/2013


3:00:00 PM

Get appointments by using EWS


The following XML shows a GetFolder operation request to return a folder ID for the
FindItem operation.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:GetFolder>

<m:FolderShape>

<t:BaseShape>IdOnly</t:BaseShape>

</m:FolderShape>

<m:FolderIds>

<t:DistinguishedFolderId Id="calendar" />

</m:FolderIds>

</m:GetFolder>

</soap:Body>

</soap:Envelope>

The following XML shows the GetFolder response. Note that the FolderID and
ChangeKey attributes are shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="731" MinorBuildNumber="10" Version="V2_3"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Folders>

<t:CalendarFolder>

<t:FolderId Id="AAMk" ChangeKey="AgAA" />

</t:CalendarFolder>

</m:Folders>

</m:GetFolderResponseMessage>

</m:ResponseMessages>

</m:GetFolderResponse>

</s:Body>

</s:Envelope>

The following XML shows the FindItem request used to return the requested
appointments. Note that the FolderID and ChangeKey attributes are shortened for
readability.
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:FindItem Traversal="Shallow">

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

<t:FieldURI FieldURI="calendar:Start" />

<t:FieldURI FieldURI="calendar:End" />

</t:AdditionalProperties>

</m:ItemShape>

<m:CalendarView MaxEntriesReturned="5" StartDate="2013-08-


21T17:30:24.127Z" EndDate="2013-09-20T17:30:24.127Z" />

<m:ParentFolderIds>

<t:FolderId Id="AAMk" ChangeKey="AgAA" />

</m:ParentFolderIds>

</m:FindItem>

</soap:Body>

</soap:Envelope>

The following XML shows the FindItem response. Note that the ItemID and ChangeKey
attributes are shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="731" MinorBuildNumber="10" Version="V2_3"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:FindItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder TotalItemsInView="33"
IncludesLastItemInRange="false">

<t:Items>

<t:CalendarItem>

<t:ItemId Id="AAMk" ChangeKey="DwAA" />

<t:Subject>Contoso devs team meeting</t:Subject>

<t:Start>2013-08-21T19:30:00Z</t:Start>

<t:End>2013-08-21T20:00:00Z</t:End>

</t:CalendarItem>

<t:CalendarItem>

<t:ItemId Id="AAMk" ChangeKey="DwAA" />

<t:Subject>Daily status meeting</t:Subject>

<t:Start>2013-08-21T20:00:00Z</t:Start>

<t:End>2013-08-21T21:00:00Z</t:End>

</t:CalendarItem>

<t:CalendarItem>

<t:ItemId Id="AAMk" ChangeKey="DwAA" />

<t:Subject>Lunch with sales team</t:Subject>

<t:Start>2013-08-21T21:30:00Z</t:Start>

<t:End>2013-08-21T22:30:00Z</t:End>

</t:CalendarItem>

<t:CalendarItem>

<t:ItemId Id="AAMk" ChangeKey="DwAA" />

<t:Subject>Tennis at the club</t:Subject>

<t:Start>2013-08-22T18:00:00Z</t:Start>

<t:End>2013-08-22T19:00:00Z</t:End>

</t:CalendarItem>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAA" />

<t:Subject>Online training webcast</t:Subject>

<t:Start>2013-08-22T21:00:00Z</t:Start>

<t:End>2013-08-22T22:00:00Z</t:End>

</t:CalendarItem>

</t:Items>

</m:RootFolder>

</m:FindItemResponseMessage>

</m:ResponseMessages>

</m:FindItemResponse>

</s:Body>

</s:Envelope>

Recurring meetings and the calendar view


The calendar folder is a little different from other folders in a mailbox because
occurrences in a recurring series and exceptions to a recurring series are not actual
items in the mailbox, but rather are stored internally as attachments to a recurring
master. This means that although you can create an EWS request that returns values
between a set of start and end values by using one of the EWS Managed API FindItems
overload methods, such as ExchangeService.FindItems or the EWS FindItem
operation, EWS would not look through the attachment table of every calendar item to
find exceptions and occurrences.

Instead, what you really want to do is something akin to applying a Dataview onto a
union of two SQL tables, using a CalendarView object. Note that for performance
reasons, we recommend that you use the PropertySet property to limit the size of the
response by indicating the number of appointments or meetings you want returned, as
well as the specific properties you want.

See also
Calendars and EWS in Exchange
Create appointments and meetings by using EWS in Exchange 2013
Update appointments and meetings by using EWS in Exchange
Delete appointments and cancel meetings by using EWS in Exchange
Develop web service clients for Exchange
Update appointments and meetings by
using EWS in Exchange
Article • 03/04/2022 • 5 minutes to read

Learn how to update appointments and meetings by using the EWS Managed API or
EWS in Exchange.

The essential difference between meetings and appointments is that meetings have
attendees, and appointments don't. Both appointments and meetings can be single
instances or part of a recurring series, but because appointments don't include
attendees, rooms, or resources, they do not require a message to be sent. Internally,
Exchange uses the same object for both meetings and appointments. You use the EWS
Managed API Appointment class or the EWS CalendarItem element to work with
meetings and appointments.

Table 1. EWS Managed API method and EWS operations for updating appointments
and meetings

EWS Managed API method Corresponding EWS operations

Appointment.Update
UpdateItem

UpdateItemResponse

Update an appointment by using the EWS


Managed API
The following code example shows how to use the Appointment object to update
properties associated with an appointment and the Update method to save the
appointment to your calendar folder.

This example assumes that you have authenticated to an Exchange server and have
acquired an ExchangeService object named service. The local variable appointmentId
is an identifier associated with an existing appointment.

C#

// Instantiate an appointment object by binding to it by using the ItemId.

// As a best practice, limit the properties returned to only the ones you
need.

Appointment appointment = Appointment.Bind(service, appointmentId, new


PropertySet(AppointmentSchema.Subject, AppointmentSchema.Start,
AppointmentSchema.End));

string oldSubject = appointment.Subject;

// Update properties on the appointment with a new subject, start time, and
end time.

appointment.Subject = appointment.Subject + " moved one hour later and to


the day after " + appointment.Start.DayOfWeek + "!";

appointment.Start.AddHours(25);

appointment.End.AddHours(25);

// Unless explicitly specified, the default is to use SendToAllAndSaveCopy.

// This can convert an appointment into a meeting. To avoid this,

// explicitly set SendToNone on non-meetings.

SendInvitationsOrCancellationsMode mode = appointment.IsMeeting ?

SendInvitationsOrCancellationsMode.SendToAllAndSaveCopy :
SendInvitationsOrCancellationsMode.SendToNone;

// Send the update request to the Exchange server.

appointment.Update(ConflictResolutionMode.AlwaysOverwrite, mode);

// Verify the update.

Console.WriteLine("Subject for the appointment was \"" + oldSubject + "\".


The new subject is \"" + appointment.Subject + "\"");

Update an appointment by using EWS


The request and response XML in the following examples correspond to calls made by
the EWS Managed API code in Update an appointment by using the EWS Managed API.

The following example shows the request XML when you use the UpdateItem
operation to update an appointment.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Pacific Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:UpdateItem MessageDisposition="SaveOnly"
ConflictResolution="AlwaysOverwrite"
SendMeetingInvitationsOrCancellations="SendToNone">

<m:ItemChanges>

<t:ItemChange>

<t:ItemId Id="AAMkA" ChangeKey="DwAAAB" />

<t:Updates>

<t:SetItemField>

<t:FieldURI FieldURI="item:Subject" />

<t:CalendarItem>

<t:Subject>Tennis Lesson moved one hour later and to the day


after Wednesday!</t:Subject>

</t:CalendarItem>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

</m:ItemChanges>

</m:UpdateItem>

</soap:Body>

</soap:Envelope>

The following example shows the XML that is returned in response to an UpdateItem
request. The ItemId and ChangeKey attributes have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="815" MinorBuildNumber="6" Version="V2_7"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:UpdateItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exc

hange/services/2006/types">

<m:ResponseMessages>

<m:UpdateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAAB" />

</t:CalendarItem>

</m:Items>

<m:ConflictResults>

<t:Count>0</t:Count>

</m:ConflictResults>

</m:UpdateItemResponseMessage>

</m:ResponseMessages>

</m:UpdateItemResponse>

</s:Body>

</s:Envelope>

Update a meeting by using the EWS Managed


API
When you update a meeting, in addition to saving the modified appointment item to
the calendar folder, you also typically want to send updated meeting requests to
attendees. The following code example shows how to update a meeting and send
meeting requests.

This example assumes that you have authenticated to an Exchange server and have
acquired an ExchangeService object named service. The local variable meetingId is an
identifier that is associated with an existing appointment.

C#

// Instantiate an appointment object by binding to it using the ItemId.

// As a best practice, limit the properties returned to only the Appointment


ID.

Appointment meeting = Appointment.Bind(service, meetingId, new


PropertySet(AppointmentSchema.Subject,

AppointmentSchema.Location,

AppointmentSchema.RequiredAttendees,

AppointmentSchema.Resources));

string oldSubject = meeting.Subject;

// Update properties on the appointment with a new subject, location, an


additional required attendee, and a resource.

meeting.Subject = "Team building exercise has moved!";

meeting.Location = "4567 Contoso Way, Redmond, OH 33333, USA";

meeting.RequiredAttendees.Add("[email protected]");

meeting.Resources.Add("[email protected]");

// Send the update request to the Exchange server.

meeting.Update(ConflictResolutionMode.AlwaysOverwrite,
SendInvitationsOrCancellationsMode.SendToAllAndSaveCopy);

// Verify the update.

Console.WriteLine("Subject for the meeting was \"" + oldSubject + "\". The


new subject is \"" + meeting.Subject + "\"");

After setting the properties on the Appointment object, save the meeting to your
calendar folder and send updated meeting requests by using the Update method.

You can pass in one of two enumeration values as parameters when you call the
Update method:

ConflictResolutionMode enumeration — Determines how conflicting states


between client and server are handled.
SendInvitationsOrCancellationsMode enumeration — Affects the sending and
saving of meeting update requests.

When you set the ConflictResolutionMode enumeration value to AlwaysOverwrite,


your version of the meeting will always be saved to the calendar folder.

Update a meeting by using EWS


The request and response XML in the following examples correspond to calls made by
the EWS Managed API code in Update a meeting by using the EWS Managed API.

The following example shows the request XML when you use the UpdateItem
operation to update a meeting.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Pacific Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:UpdateItem MessageDisposition="SaveOnly"
ConflictResolution="AlwaysOverwrite"
SendMeetingInvitationsOrCancellations="SendToAllAndSaveCopy">

<m:ItemChanges>

<t:ItemChange>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

<t:Updates>

<t:SetItemField>

<t:FieldURI FieldURI="item:Subject" />

<t:CalendarItem>

<t:Subject>Team building exercise has moved!</t:Subject>

</t:CalendarItem>

</t:SetItemField>

<t:SetItemField>

<t:FieldURI FieldURI="calendar:Location" />

<t:CalendarItem>

<t:Location>4567 Contoso Way, Redmond, OH 33333,


USA</t:Location>

</t:CalendarItem>

</t:SetItemField>

<t:SetItemField>

<t:FieldURI FieldURI="calendar:RequiredAttendees" />

<t:CalendarItem>

<t:RequiredAttendees>

<t:Attendee>

<t:Mailbox>

<t:Name>[email protected]</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Mailbox>

</t:Attendee>

<t:Attendee>

<t:Mailbox>

<t:Name>[email protected]</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Mailbox>

</t:Attendee>

<t:Attendee>

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:Attendee>

</t:RequiredAttendees>

</t:CalendarItem>

</t:SetItemField>

<t:SetItemField>

<t:FieldURI FieldURI="calendar:Resources" />

<t:CalendarItem>

<t:Resources>

<t:Attendee>

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:Attendee>

</t:Resources>

</t:CalendarItem>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

</m:ItemChanges>

</m:UpdateItem>

</soap:Body>

</soap:Envelope>

The following example shows the XML that is returned in response to an UpdateItem
request. The ChangeKey and ItemId attributes have been shortened for readability.

XML
<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="815" MinorBuildNumber="6" Version="V2_7"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:UpdateItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:UpdateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

</t:CalendarItem>

</m:Items>

<m:ConflictResults>

<t:Count>0</t:Count>

</m:ConflictResults>

</m:UpdateItemResponseMessage>

</m:ResponseMessages>

</m:UpdateItemResponse>

</s:Body>

</s:Envelope>

See also
Calendars and EWS in Exchange
Create appointments and meetings by using EWS in Exchange 2013
Get appointments and meetings by using EWS in Exchange
Delete appointments and cancel meetings by using EWS in Exchange
Propose a new meeting time by using EWS in Exchange
Delete appointments and cancel
meetings by using EWS in Exchange
Article • 03/04/2022 • 8 minutes to read

Learn how to delete appointments and meetings by using the EWS Managed API or
EWS in Exchange.

The essential difference between meetings and appointments is that meetings have
attendees, and appointments don't. Both appointments and meetings can be single
instances or part of a recurring series, but because appointments don't include
attendees, rooms, or resources, they do not require a message to be sent. Internally,
Exchange uses the same object for both meetings and appointments. You use the EWS
Managed API Appointment class or the EWS [CalendarItem]
(https://msdn.microsoft.com/library/Title Topic ID Project Name Writer Editor Publish
Preview.aspx) element to work with meetings and appointments.

Table 1. EWS Managed API methods and EWS operations for deleting appointments
and meetings

EWS Managed API method EWS Operation What it does

Appointment.Delete
DeleteItem
Deletes an appointment.

Appointment.Delete
CreateItem (calendar item)
Deletes a meeting.

Note that when you delete an appointment by using EWS, you use the DeleteItem
operation, but when you delete a meeting, you use the CreateItem operation. This might
seem counterintuitive, but it is because you have to create a meeting response object to
send meeting cancellation messages to attendees.

Delete an appointment by using the EWS


Managed API
The following code example shows how to use the Delete method to delete an
appointment from your calendar folder, and the ExchangeService.FindItems method
to verify that the appointment was deleted by looking for it in the Deleted Items folder.

This example assumes that you have authenticated to an Exchange server and have
acquired an ExchangeService object named service. The local variable appointmentId
is an identifier associated with an existing appointment.
C#

// Instantiate an appointment object by binding to it by using the ItemId.

// As a best practice, limit the properties returned to only the ones you
need.

Appointment appointment = Appointment.Bind(service, appointmentId, new


PropertySet());

// Delete the appointment. Note that the item ID will change when the item
is moved to the Deleted Items folder.

appointment.Delete(DeleteMode.MoveToDeletedItems);

// Verify that the appointment has been deleted by looking for a matching
subject in the Deleted Items folder's first entry.

ItemView itemView = new ItemView(1);

itemView.Traversal = ItemTraversal.Shallow;

// Just retrieve the properties you need.

itemView.PropertySet = new PropertySet(ItemSchema.Id,


ItemSchema.ParentFolderId, ItemSchema.Subject);

// Note that the FindItems method results in a call to EWS.

FindItemsResults<Item> deletedItems =
service.FindItems(WellKnownFolderName.DeletedItems, itemView);

Item deletedItem = deletedItems.First();

Folder parentFolder = Folder.Bind(service, deletedItem.ParentFolderId, new


PropertySet(FolderSchema.DisplayName));

Console.WriteLine("The appointment " + "\"" + deletedItem.Subject + "\"" + "


is now in the " + parentFolder.DisplayName + " folder.");

This example shows a simple way to verify that the appointment was deleted, by
verifying that the subject of the first item in the Deleted Items folder matches that of the
deleted appointment. How you choose to verify that your appointment was deleted will
vary based the needs of your application.

As you can see, deleting an appointment is straightforward and pretty much what you
might expect. Note when you create your verification step that the appointment item in
the Deleted Items folder has a different ItemId than the appointment item in the
calendar folder. The item is copied and deleted rather than simply moved to the Deleted
Items folder.

Delete an appointment by using EWS


The request and response XML in the following examples correspond to calls made by
the EWS Managed API code in Delete an appointment by using the EWS Managed API.
The request and response XML that verifies that the appointment item is in the Deleted
Items folder is shown as well.

The following example shows the request XML for the DeleteItem operation to delete an
appointment.
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Pacific Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:DeleteItem DeleteType="MoveToDeletedItems"
SendMeetingCancellations="SendToAllAndSaveCopy">

<m:ItemIds>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

</m:ItemIds>

</m:DeleteItem>

</soap:Body>

</soap:Envelope>

The following example shows the response XML that is returned by the DeleteItem
operation. The ItemId and ChangeKey attributes are shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="800" MinorBuildNumber="5" Version="V2_6"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:DeleteItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:DeleteItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

</m:DeleteItemResponseMessage>

</m:ResponseMessages>

</m:DeleteItemResponse>

</s:Body>

</s:Envelope>

The following example shows the request XML for the FindItem operation that
retrieves the first item in the Deleted Items folder in order to compare the item's subject
with that of the deleted appointment object.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages

" xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Pacific Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:FindItem Traversal="Shallow">

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:ItemId" />

<t:FieldURI FieldURI="item:ParentFolderId" />

<t:FieldURI FieldURI="item:Subject" />

</t:AdditionalProperties>

</m:ItemShape>

<m:IndexedPageItemView MaxEntriesReturned="1" Offset="0"


BasePoint="Beginning" />

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="deleteditems" />

</m:ParentFolderIds>

</m:FindItem>

</soap:Body>

</soap:Envelope>

The following example shows the response XML that is returned by the FindItem
operation during the verification step.

7 Note

The ItemId and ChangeKey attributes are shortened for readability.

XML
<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="800" MinorBuildNumber="5" Version="V2_6"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:FindItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder IndexedPagingOffset="1" TotalItemsInView="10748"


IncludesLastItemInRange="false">

<t:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA=" ChangeKey="DwAAA" />

<t:ParentFolderId Id="AAMkA" ChangeKey="AQAAA" />

<t:Subject>Tennis lesson</t:Subject>

</t:CalendarItem>

</t:Items>

</m:RootFolder>

</m:FindItemResponseMessage>

</m:ResponseMessages>

</m:FindItemResponse>

</s:Body>

</s:Envelope>

Delete a meeting by using the EWS Managed


API
When you delete a meeting, in addition to removing the appointment item from the
calendar folder, you might also want to send meeting cancellations to attendees. You
can use the following three methods to cancel a meeting:

Appointment.Delete
Appointment.CancelMeeting
CancelMeetingMessage

The method that you choose depends on the level of detail you need to provide in your
cancellation message. Appointment.CancelMeeting makes it easy to update the
cancellation message by passing an updated message as a parameter.
CancelMeetingMessage allows you to modify properties on your message before
sending a cancellation, so you can do things like request a receipt.

The code examples in this section show the different ways to delete a meeting and send
meeting cancellations. The examples assume that you have authenticated to an
Exchange server and have acquired an ExchangeService object named service. The
local variable meetingId is an identifier associated with an existing meeting where the
target user is the meeting organizer.

The following code example shows how to delete a meeting by using the
Appointment.Delete method.

C#

// Instantiate an appointment object for the meeting by binding to it using


the ItemId.

// As a best practice, limit the properties returned to only the Appointment


ID.

Appointment meeting = Appointment.Bind(service, meetingId, new


PropertySet());

// Delete the meeting by using the Delete method.

meeting.Delete(DeleteMode.MoveToDeletedItems,
SendCancellationsMode.SendToAllAndSaveCopy);

// Verify that the meeting has been deleted by looking for a matching
subject in the Deleted Items folder's first entry.

ItemView itemView = new ItemView(1);

itemView.Traversal = ItemTraversal.Shallow;

// Just retrieve the properties you need.

itemView.PropertySet = new PropertySet(ItemSchema.Id,


ItemSchema.ParentFolderId, ItemSchema.Subject);

// Note that the FindItems method results in a call to EWS.

FindItemsResults<Item> deletedItems =
service.FindItems(WellKnownFolderName.DeletedItems, itemView);

Item deletedItem = deletedItems.First();

Folder parentFolder = Folder.Bind(service, deletedItem.ParentFolderId, new


PropertySet(FolderSchema.DisplayName));

Console.WriteLine("The meeting " + "\"" + deletedItem.Subject + "\"" + " is


now in the " + parentFolder.DisplayName + " folder.");

The following code example shows how to delete a meeting by using the
CancelMeeting method.

C#

// Instantiate an appointment object by binding to it using the ItemId.

// As a best practice, limit the properties returned to only the Appointment


ID.

Appointment meeting = Appointment.Bind(service, meetingId, new


PropertySet());

// Delete the meeting by using the CancelMeeting method.

meeting.CancelMeeting("The outdoor meeting has been cancelled due to


hailstorms.");

The following code example shows how to delete a meeting by using the
Appointment.CreateCancelMeetingMessage method.

C#

// Instantiate an appointment object by binding to it using the ItemId.

// As a best practice, limit the properties returned to only the Appointment


ID.

Appointment meeting = Appointment.Bind(service, meetingId, new


PropertySet());

// Delete the meeting by using the CreateCancelMeetingMessage method.

CancelMeetingMessage cancelMessage = meeting.CreateCancelMeetingMessage();

cancelMessage.Body = new MessageBody("The outdoor meeting has been canceled


due to hailstorms.");

cancelMessage.IsReadReceiptRequested = true;

cancelMessage.SendAndSaveCopy();

Delete a meeting by using EWS


The request and response XML in the following examples correspond to calls made by
the EWS Managed API code in Delete a meeting by using the EWS Managed API by
using the Appointment.Delete method.

The following example shows the request XML when you use the CreateItem
operation to send cancellation messages to attendees and delete a meeting.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Pacific Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:CreateItem MessageDisposition="SendAndSaveCopy">

<m:Items>

<t:CancelCalendarItem>

<t:ReferenceItemId Id="AAMkA" ChangeKey="DwAAA" />

<t:NewBodyContent BodyType="HTML">The outdoor meeting has been


canceled due to hailstorms.</t:NewBodyContent>

</t:CancelCalendarItem>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The following example shows the XML that is returned in response to a CreateItem
operation request used to delete a meeting.

7 Note

The ItemId and ChangeKey attributes are shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="800" MinorBuildNumber="5" Version="V2_6"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:CreateItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

</t:CalendarItem>

</m:Items>

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</m:CreateItemResponse>

</s:Body>

</s:Envelope>

The following example shows the request XML for the FindItem operation that
retrieves the first item in the Deleted Items folder in order to compare the item's subject
with that of the deleted appointment object.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Pacific Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:FindItem Traversal="Shallow">

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:ItemId" />

<t:FieldURI FieldURI="item:ParentFolderId" />

<t:FieldURI FieldURI="item:Subject" />

</t:AdditionalProperties>

</m:ItemShape>

<m:IndexedPageItemView MaxEntriesReturned="1" Offset="0"


BasePoint="Beginning" />

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="deleteditems" />

</m:ParentFolderIds>

</m:FindItem>

</soap:Body>

</soap:Envelope>

The following example shows the XML that is returned by the FindItem operation
during the verification step.

7 Note

The Id and ChangeKey attributes are shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="800" MinorBuildNumber="5" Version="V2_6"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:FindItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder IndexedPagingOffset="1" TotalItemsInView="10750"


IncludesLastItemInRange="false">

<t:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

<t:ParentFolderId Id="AAMkA" ChangeKey="AQAAA" />

<t:Subject>Team building exercise</t:Subject>

</t:CalendarItem>

</t:Items>

</m:RootFolder>

</m:FindItemResponseMessage>

</m:ResponseMessages>

</m:FindItemResponse>

</s:Body>

</s:Envelope>

See also
Calendars and EWS in Exchange
Create appointments and meetings by using EWS in Exchange 2013
Get appointments and meetings by using EWS in Exchange
Update appointments and meetings by using EWS in Exchange
Propose a new meeting time by using EWS in Exchange
Propose a new meeting time by using EWS in Exchange
Get room lists by using EWS in
Exchange
Article • 01/15/2020 • 3 minutes to read

Learn how to get a list of all the room lists in your organization or a single room list
from an Exchange server by using the EWS Managed API or EWS.

You can use the EWS Managed API or EWS to get information about rooms and how the
rooms are grouped in your organization. Room lists don't exist by default; your
administrator needs to create and organize them. Typically, they're organized by
location or department, as shown in the following example.

Contoso room list names and email addresses

Name of room list Email address of room list

Building 11 room list [email protected]

Health Science Building Conference Room List [email protected]

Accounting Floor Meeting Rooms [email protected]

Each room in a room list has a name and email address associated with it.

Contoso room names and email addresses

Name of room Email address of room

Conf Room 11/101 (8) AV [email protected]

HS Demonstration Lab (100) [email protected]

Accounting 305 WB [email protected]

You can get a list that contains all room lists by using either the
ExchangeService.GetRoomLists EWS Managed API method or the GetRoomLists
EWS operation.

You can retrieve a single room list that contains all the rooms for a location or
department by supplying its email address by using the GetRooms EWS Managed API
method or the GetRooms EWS operation. When you have a collection of rooms
associated with a room list, you can then search through the collection to identify the
room or rooms you want, either by email address, or by looking for key words in the
name, such as "AV", or "Lab".
Get all room lists by using the EWS Managed
API
The following example shows how to get a list that contains all the room lists in your
organization by using the GetRoomLists method.

This example assumes that you have authenticated to an Exchange server and have
acquired an ExchangeService object named service.

C#

// Return all the room lists in the organization.

// This method call results in a GetRoomLists call to EWS.

EmailAddressCollection myRoomLists = service.GetRoomLists();

// Display the room lists.

foreach (EmailAddress address in myRoomLists)

Console.WriteLine("Email Address: {0} Mailbox Type: {1}",


address.Address, address.MailboxType);

Get all room lists by using EWS


The following example shows how to get a collection of all your organization's
RoomLists by using the GetRoomLists operation. This is also the XML request that
the EWS Managed API sends when you use the EWS Managed API to get all room lists.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:GetRoomLists />

</soap:Body>

</soap:Envelope>

The server responds to the GetRoomLists request with a GetRoomListsResponse


message that contains the room lists for your organization.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="868" MinorBuildNumber="8" Version="V2_9"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetRoomListsResponse ResponseClass="Success"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseCode>NoError</m:ResponseCode>
<m:RoomLists>

<t:Address>

<t:Name>Contoso Building 1 Room List</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>PublicDL</t:MailboxType>

</t:Address>

<t:Address>

<t:Name>Contoso Building 2 Room List</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>PublicDL</t:MailboxType>

</t:Address>

<t:Address>

<t:Name>Contoso Building 3 Room List</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>PublicDL</t:MailboxType>

</t:Address>

</m:RoomLists>

</m:GetRoomListsResponse>

</s:Body>

</s:Envelope>

Get all the rooms in a room list by using the


EWS Managed API
The following example shows how to get a collection of rooms in a room list by using
the GetRooms method.

C#

EmailAddress myRoomList = "[email protected]";

// This method call results in a GetRooms call to EWS.

System.Collections.ObjectModel.Collection<EmailAddress> myRoomAddresses =
service.GetRooms(myRoomList);

// Display the individual rooms.

foreach (EmailAddress address in myRoomAddresses)

Console.WriteLine("Email Address: {0}", address.Address);

Get all the rooms in a room list by using EWS


The following example shows how to get a list of rooms in a RoomList by using the
GetRooms operation. This is also the XML request that the EWS Managed API sends
when you use the EWS Managed API to get all the rooms in a room list.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:GetRooms>

<m:RoomList>

<t:EmailAddress>[email protected]</t:EmailAddress>

</m:RoomList>

</m:GetRooms>

</soap:Body>

</soap:Envelope>

The server responds to the GetRooms request with a GetRoomsResponse message


that contains the rooms in the room list.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="873" MinorBuildNumber="9"

Version="V2_9"
xmlns:h="http://scemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetRoomsResponse ResponseClass="Success"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://scemas.microsoft.com/exchange/services/2006/types">

<m:ResponseCode>NoError</m:ResponseCode>
<m:Rooms>

<t:Room>

<t:Id>

<t:Name>Conf Room 3/101 (16) AV</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Id>

</t:Room>

<t:Room>

<t:Id>

<t:Name>Conf Room 3/102 (8) AV</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Id>

</t:Room>

<t:Room>

<t:Id>

<t:Name>Conf Room 3/103 (14) AV RoundTable</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Id>

</t:Room>

</m:Rooms>

</m:GetRoomsResponse>

</s:Body>

</s:Envelope>

See also
Calendars and EWS in Exchange

Get free/busy information by using EWS in Exchange

Create and Manage Room Mailboxes


Get free/busy information by using EWS
in Exchange
Article • 01/15/2020 • 4 minutes to read

Learn how to get free/busy information and suggested meeting times by using the EWS
Managed API or EWS in Exchange.

Using the EWS Managed API or EWS to programmatically create a meeting and send
out meeting requests is great, but finding a time that works for all your attendees is
often a challenge. If you have to manually check to see when everyone is available, it
defeats the purpose of automating the task. Fortunately, the
ExchangeService.GetUserAvailability EWS Managed API method and the
GetUserAvailability EWS operation come to your rescue. You can use this method or
operation to query an Exchange server to find the best time to schedule a meeting or
just get free/busy information for attendees. You can get the free/busy information for a
list of attendees, or have your Exchange server find a meeting time for you, or both

Figure 1 illustrates the problem and the solution.

Figure 1. Requesting availability information from an Exchange server


Get suggested meeting times and free/busy
information by using the EWS Managed API
You can get both a list of suggested meeting times and all the scheduled event times for
your attendees when you use an AvailabilityData enumeration value of
FreeBusyAndSuggestions in your ExchangeService.GetUserAvailability method call, as
shown in the following example.

This example assumes that you have authenticated to an Exchange server and have
acquired an ExchangeService object named service.

C#

private static void GetSuggestedMeetingTimesAndFreeBusyInfo(ExchangeService


service)

// Create a collection of attendees.

List<AttendeeInfo> attendees = new List<AttendeeInfo>();

attendees.Add(new AttendeeInfo()

SmtpAddress = "[email protected]",

AttendeeType = MeetingAttendeeType.Organizer

});

attendees.Add(new AttendeeInfo()

SmtpAddress = "[email protected]",

AttendeeType = MeetingAttendeeType.Required

});

// Specify options to request free/busy information and suggested


meeting times.

AvailabilityOptions availabilityOptions = new AvailabilityOptions();

availabilityOptions.GoodSuggestionThreshold = 49;

availabilityOptions.MaximumNonWorkHoursSuggestionsPerDay = 0;

availabilityOptions.MaximumSuggestionsPerDay = 2;

// Note that 60 minutes is the default value for MeetingDuration, but


setting it explicitly for demonstration purposes.

availabilityOptions.MeetingDuration = 60;

availabilityOptions.MinimumSuggestionQuality = SuggestionQuality.Good;

availabilityOptions.DetailedSuggestionsWindow = new
TimeWindow(DateTime.Now.AddDays(1), DateTime.Now.AddDays(2));

availabilityOptions.RequestedFreeBusyView = FreeBusyViewType.FreeBusy;

// Return free/busy information and a set of suggested meeting times.

// This method results in a GetUserAvailabilityRequest call to EWS.

GetUserAvailabilityResults results =
service.GetUserAvailability(attendees,

availabilityOptions.DetailedSuggestionsWindow,

AvailabilityData.FreeBusyAndSuggestions,

availabilityOptions);

// Display suggested meeting times.

Console.WriteLine("Availability for {0} and {1}",


attendees[0].SmtpAddress, attendees[1].SmtpAddress);

Console.WriteLine();

foreach (Suggestion suggestion in results.Suggestions)

Console.WriteLine("Suggested date: {0}\n",


suggestion.Date.ToShortDateString());

Console.WriteLine("Suggested meeting times:\n");

foreach (TimeSuggestion timeSuggestion in


suggestion.TimeSuggestions)

Console.WriteLine("\t{0} - {1}\n",

timeSuggestion.MeetingTime.ToShortTimeString(),

timeSuggestion.MeetingTime.Add(TimeSpan.FromMinutes(availabilityOptions.Meet
ingDuration)).ToShortTimeString());

int i = 0;

// Display free/busy times.

foreach (AttendeeAvailability availability in


results.AttendeesAvailability)

Console.WriteLine("Availability information for {0}:\n",


attendees[i].SmtpAddress);

foreach (CalendarEvent calEvent in availability.CalendarEvents)

Console.WriteLine("\tBusy from {0} to {1} \n",


calEvent.StartTime.ToString(), calEvent.EndTime.ToString());

i++;

Get suggested meeting times and free/busy


information by using EWS
You can get both a list of suggested meeting times and all the scheduled event times for
your attendees by using the GetUserAvailability operation, as shown in the following
example. This is also the XML request that the EWS Managed API sends when you use
the EWS Managed API to get suggested meeting times.
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Name="(UTC-08:00) Pacific Time (US &amp;amp;
Canada)" Id="Pacific Standard Time">

<t:Periods>

<t:Period Bias="P0DT8H0M0.0S" Name="Standard" Id="Std" />

<t:Period Bias="P0DT7H0M0.0S" Name="Daylight" Id="Dlt/1" />

<t:Period Bias="P0DT7H0M0.0S" Name="Daylight" Id="Dlt/2007" />

</t:Periods>

<t:TransitionsGroups>

<t:TransitionsGroup Id="0">

<t:RecurringDayTransition>

<t:To Kind="Period">Dlt/1</t:To>

<t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>

<t:Month>4</t:Month>

<t:DayOfWeek>Sunday</t:DayOfWeek>

<t:Occurrence>1</t:Occurrence>

</t:RecurringDayTransition>

<t:RecurringDayTransition>

<t:To Kind="Period">Std</t:To>

<t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>

<t:Month>10</t:Month>

<t:DayOfWeek>Sunday</t:DayOfWeek>

<t:Occurrence>-1</t:Occurrence>

</t:RecurringDayTransition>

</t:TransitionsGroup>

<t:TransitionsGroup Id="1">

<t:RecurringDayTransition>

<t:To Kind="Period">Dlt/2007</t:To>

<t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>

<t:Month>3</t:Month>

<t:DayOfWeek>Sunday</t:DayOfWeek>

<t:Occurrence>2</t:Occurrence>

</t:RecurringDayTransition>

<t:RecurringDayTransition>

<t:To Kind="Period">Std</t:To>

<t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>

<t:Month>11</t:Month>

<t:DayOfWeek>Sunday</t:DayOfWeek>

<t:Occurrence>1</t:Occurrence>

</t:RecurringDayTransition>

</t:TransitionsGroup>

</t:TransitionsGroups>

<t:Transitions>

<t:Transition>

<t:To Kind="Group">0</t:To>

</t:Transition>

<t:AbsoluteDateTransition>

<t:To Kind="Group">1</t:To>

<t:DateTime>2007-01-01T08:00:00.000Z</t:DateTime>

</t:AbsoluteDateTransition>

</t:Transitions>

</t:TimeZoneDefinition>

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:GetUserAvailabilityRequest>

<m:MailboxDataArray>

<t:MailboxData>

<t:Email>

<t:Address>[email protected]</t:Address>

</t:Email>

<t:AttendeeType>Organizer</t:AttendeeType>

<t:ExcludeConflicts>false</t:ExcludeConflicts>
</t:MailboxData>

<t:MailboxData>

<t:Email>

<t:Address>[email protected]</t:Address>

</t:Email>

<t:AttendeeType>Required</t:AttendeeType>

<t:ExcludeConflicts>false</t:ExcludeConflicts>
</t:MailboxData>

</m:MailboxDataArray>

<t:FreeBusyViewOptions>

<t:TimeWindow>

<t:StartTime>2014-02-13T00:00:00</t:StartTime>

<t:EndTime>2014-02-14T00:00:00</t:EndTime>

</t:TimeWindow>

<t:MergedFreeBusyIntervalInMinutes>30</t:MergedFreeBusyIntervalInMinutes>

<t:RequestedView>FreeBusy</t:RequestedView>

</t:FreeBusyViewOptions>

<t:SuggestionsViewOptions>

<t:GoodThreshold>49</t:GoodThreshold>

<t:MaximumResultsByDay>2</t:MaximumResultsByDay>

<t:MaximumNonWorkHourResultsByDay>0</t:MaximumNonWorkHourResultsByDay>

<t:MeetingDurationInMinutes>60</t:MeetingDurationInMinutes>

<t:MinimumSuggestionQuality>Good</t:MinimumSuggestionQuality>

<t:DetailedSuggestionsWindow>

<t:StartTime>2014-02-13T00:00:00</t:StartTime>

<t:EndTime>2014-02-14T00:00:00</t:EndTime>

</t:DetailedSuggestionsWindow>

</t:SuggestionsViewOptions>

</m:GetUserAvailabilityRequest>

</soap:Body>

</soap:Envelope>

The server responds to the GetUserAvailability request with a GetUserAvailability


response message, as shown in the following example.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="873" MinorBuildNumber="9" Version="V2_9"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<GetUserAvailabilityResponse
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<FreeBusyResponseArray>

<FreeBusyResponse>

<ResponseMessage ResponseClass="Success">

<ResponseCode>NoError</ResponseCode>

</ResponseMessage>

<FreeBusyView>

<FreeBusyViewType
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">FreeBusy<
/FreeBusyViewType>

<CalendarEventArray
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<CalendarEvent>

<StartTime>2014-02-13T08:00:00</StartTime>

<EndTime>2014-02-13T10:00:00</EndTime>

<BusyType>Free</BusyType>

</CalendarEvent>

<CalendarEvent>

<StartTime>2014-02-13T11:00:00</StartTime>

<EndTime>2014-02-13T12:00:00</EndTime>

<BusyType>Busy</BusyType>

</CalendarEvent>

</CalendarEventArray>

<WorkingHours
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<TimeZone>

<Bias>480</Bias>

<StandardTime>

<Bias>0</Bias>

<Time>02:00:00</Time>

<DayOrder>1</DayOrder>

<Month>11</Month>

<DayOfWeek>Sunday</DayOfWeek>

</StandardTime>

<DaylightTime>

<Bias>-60</Bias>

<Time>02:00:00</Time>

<DayOrder>2</DayOrder>

<Month>3</Month>

<DayOfWeek>Sunday</DayOfWeek>

</DaylightTime>

</TimeZone>

<WorkingPeriodArray>

<WorkingPeriod>

<DayOfWeek>Monday Tuesday Wednesday Thursday


Friday</DayOfWeek>

<StartTimeInMinutes>480</StartTimeInMinutes>

<EndTimeInMinutes>1020</EndTimeInMinutes>

</WorkingPeriod>

</WorkingPeriodArray>

</WorkingHours>

</FreeBusyView>

</FreeBusyResponse>

<FreeBusyResponse>

<ResponseMessage ResponseClass="Success">

<ResponseCode>NoError</ResponseCode>

</ResponseMessage>

<FreeBusyView>

<FreeBusyViewType
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">FreeBusy<
/FreeBusyViewType>

<CalendarEventArray
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<CalendarEvent>

<StartTime>2014-02-12T00:00:00</StartTime>

<EndTime>2014-02-13T00:00:00</EndTime>

<BusyType>Free</BusyType>

</CalendarEvent>

<CalendarEvent>

<StartTime>2014-02-13T08:00:00</StartTime>

<EndTime>2014-02-13T10:00:00</EndTime>

<BusyType>Free</BusyType>

</CalendarEvent>

<CalendarEvent>

<StartTime>2014-02-13T11:00:00</StartTime>

<EndTime>2014-02-13T12:00:00</EndTime>

<BusyType>Busy</BusyType>

</CalendarEvent>

<CalendarEvent>

<StartTime>2014-02-13T15:00:00</StartTime>

<EndTime>2014-02-13T16:00:00</EndTime>

<BusyType>Tentative</BusyType>

</CalendarEvent>

</CalendarEventArray>

<WorkingHours
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<TimeZone>

<Bias>480</Bias>

<StandardTime>

<Bias>0</Bias>

<Time>02:00:00</Time>

<DayOrder>1</DayOrder>

<Month>11</Month>

<DayOfWeek>Sunday</DayOfWeek>

</StandardTime>

<DaylightTime>

<Bias>-60</Bias>

<Time>02:00:00</Time>

<DayOrder>2</DayOrder>

<Month>3</Month>

<DayOfWeek>Sunday</DayOfWeek>

</DaylightTime>

</TimeZone>

<WorkingPeriodArray>

<WorkingPeriod>

<DayOfWeek>Monday Tuesday Wednesday Thursday


Friday</DayOfWeek>

<StartTimeInMinutes>540</StartTimeInMinutes>

<EndTimeInMinutes>1020</EndTimeInMinutes>

</WorkingPeriod>

</WorkingPeriodArray>

</WorkingHours>

</FreeBusyView>

</FreeBusyResponse>

</FreeBusyResponseArray>

<SuggestionsResponse>

<ResponseMessage ResponseClass="Success">

<ResponseCode>NoError</ResponseCode>

</ResponseMessage>

<SuggestionDayResultArray>

<SuggestionDayResult
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Date>2014-02-13T00:00:00</Date>

<DayQuality>Excellent</DayQuality>

<SuggestionArray>

<Suggestion>

<MeetingTime>2014-02-13T09:00:00</MeetingTime>

<IsWorkTime>true</IsWorkTime>

<SuggestionQuality>Excellent</SuggestionQuality>

<AttendeeConflictDataArray>

<IndividualAttendeeConflictData>

<BusyType>Free</BusyType>

</IndividualAttendeeConflictData>

<IndividualAttendeeConflictData>

<BusyType>Free</BusyType>

</IndividualAttendeeConflictData>

</AttendeeConflictDataArray>

</Suggestion>

<Suggestion>

<MeetingTime>2014-02-13T09:30:00</MeetingTime>

<IsWorkTime>true</IsWorkTime>

<SuggestionQuality>Excellent</SuggestionQuality>

<AttendeeConflictDataArray>

<IndividualAttendeeConflictData>

<BusyType>Free</BusyType>

</IndividualAttendeeConflictData>

<IndividualAttendeeConflictData>

<BusyType>Free</BusyType>

</IndividualAttendeeConflictData>

</AttendeeConflictDataArray>

</Suggestion>

</SuggestionArray>

</SuggestionDayResult>

</SuggestionDayResultArray>

</SuggestionsResponse>

</GetUserAvailabilityResponse>

</s:Body>

</s:Envelope>

See also
Calendars and EWS in Exchange

Create appointments and meetings by using EWS in Exchange 2013

Update appointments and meetings by using EWS in Exchange


Propose a new meeting time by using
EWS in Exchange
Article • 10/25/2022 • 5 minutes to read

Find out how to propose new meeting times from your Exchange client application by
using EWS in Exchange.

The propose new time feature enables attendees to propose new meeting times to the
meeting organizer as part of the Exchange calendar workflow. When an attendee
proposes a new meeting, the organizer can use the proposed new meeting time to
update the meeting and send updates to all attendees. Before you can enable attendees
to propose new meeting times, you need to determine whether the organizer allows for
new time proposals. This article describes how to determine whether you can propose a
new time and how to use EWS to propose a new time.

7 Note

The EWS Managed API does not implement this functionality.

Determine whether you can propose a new


time for a meeting by using EWS
Before you can propose a new time for a meeting, you need to find a reference to that
meeting and determine whether the meeting organizer configured the meeting to
support new time proposals. You can get a reference to a meeting by doing either of the
following:

Finding the meeting request in the Inbox

Finding the appointment in the calendar

Use the following steps to find a meeting reference:

1. Use the FindItem EWS operation (or the Folder.FindItems EWS Managed API
method) to find the target meeting request or calendar item. Alternatively, you can
use the SyncFolderItems EWS operation to get the identifier of the target
meeting request or calendar item.

2. Parse the results of the FindItem operation (or Folder.FindItems method) to get
the item identifier of the meeting item.
3. Use the GetItem EWS operation to get the response objects for the meeting.

The following XML shows what is sent to request the response objects on an item.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:MailboxCulture>en-US</t:MailboxCulture>

</soap:Header>

<soap:Body>

<m:GetItem>

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:ResponseObjects"/>

<t:FieldURI FieldURI="item:Subject"/>

<t:FieldURI FieldURI="calendar:Start"/>

<t:FieldURI FieldURI="calendar:End"/>

</t:AdditionalProperties>

</m:ItemShape>

<m:ItemIds>

<t:ItemId Id="AAMkADEzOTExYjJkL1AAA=" ChangeKey="CwAAAB/G6X"/>

</m:ItemIds>

</m:GetItem>

</soap:Body>

</soap:Envelope>

The GetItem operation response will look similar to the following XML if you request the
item identifier, the meeting start and end time, the response object collection, and if the
organizer allows for proposed changes to the meeting time. The response object
collection, which is represented by the ResponseObjects element, contains the set of
responses that are valid for the calendar item. The ProposeNewTime element is a
response object that indicates that the user can propose a new time for the meeting.
The AcceptItem , TentativelyAcceptItem , and DeclineItem elements represent the
response objects that you can use to propose a new meeting time to the meeting
organizer.

XML

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="815"

MinorBuildNumber="6"

Version="V2_7"

xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetItemResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:MeetingRequest>

<t:ItemId Id="AAMkADEzOTExYjJkL1AAA=" ChangeKey="CwAAAB/G6X"/>

<t:Subject>Competitive analysis: kick off meeting</t:Subject>

<t:ResponseObjects>

<t:AcceptItem/>

<t:TentativelyAcceptItem/>

<t:DeclineItem/>

<t:ProposeNewTime/>

<t:ReplyToItem/>

<t:ReplyAllToItem/>

<t:ForwardItem/>

</t:ResponseObjects>

<t:Start>2013-11-09T17:00:00Z</t:Start>

<t:End>2013-11-09T17:30:00Z</t:End>

</t:MeetingRequest>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</m:GetItemResponse>

</s:Body>

</s:Envelope>

Propose a new meeting time by using EWS


If you received a ProposeNewTime response object when you used the GetItem
operation to get a calendar item or meeting request, you can respond with a proposed
new meeting time. If you didn't receive a ProposeNewTime response object, you won't
be able to propose a new meeting time as part of the calendar workflow. You can,
however, reply to the organizer to request a new meeting time. If you receive a
ProposeNewTime response object, you can respond to the meeting by referencing its
identifier, and propose a new meeting time to the organizer. This is where the
ProposeNewTime response object is different than the typical response object pattern
in that you don't respond with a ProposeNewTime response object. You use one of the
other meeting response objects, such as AcceptItem, TentativelyAcceptItem, or
DeclineItem, to propose a new meeting. This example uses the AcceptItem response
object.

XML

<?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"

xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013"/>

</soap:Header>

<soap:Body>

<m:CreateItem>

<m:Items>

<t:AcceptItem>

<t:Body BodyType="Text">This time works better for the HiPPO.


</t:Body>

<t:ReferenceItemId Id="AAMkADEzOTExYjJkL1AAA="
ChangeKey="CwAAAB/G6X"/>

<t:ProposedStart>2013-11-28T04:00:00Z</t:ProposedStart>

<t:ProposedEnd>2013-11-28T04:30:00Z</t:ProposedEnd>

</t:AcceptItem>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The response to this request contains the identifier of the calendar item that was added
to the attendee's calendar and a copy of the meeting request that was placed in the
attendee's Deleted Items folder. The response message with the new time proposal was
also saved in the attendee's Sent Items folder (you will need to find the meeting
response message to get a handle on it).

XML

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="815"

MinorBuildNumber="6"

Version="V2_7"

xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:CreateItemResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkAGRmOWE2OWAAA=" ChangeKey="DwAAJsmU"/>

</t:CalendarItem>

<t:MeetingRequest>

<t:ItemId Id="AAMkAGRmOWE2AAABB=" ChangeKey="AAAGJu1A"/>

</t:MeetingRequest>

</m:Items>

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</m:CreateItemResponse>

</s:Body>

</s:Envelope>

The organizer will receive a MeetingResponse message when the attendee responds
with a proposed new meeting time. The MeetingResponse message contains the
proposed new meeting start time and end time, and the identifier of the associated
calendar item in the organizer's calendar. The organizer can use that information to
update their existing calendar item for the meeting. The following is the workflow for
the organizer to respond to a MeetingResponse message that proposes a new meeting
time:

1. Determine whether the ProposedStart or ProposedEnd elements have been set in


the MeetingResponse. If so, go to step 2. If not, the MeetingResponse message
only indicates whether the attendee has accepted, tentatively accepted, or declined
the meeting.

2. Get the organizer's existing calendar item for the meeting by using the EWS
identifier returned in the AssociatedCalendarItemId element.
3. Compare the original start and end time with the proposed new meeting time. If
the proposed new meeting time is acceptable to the organizer, go to step 4.
Otherwise, the meeting organizer can either ignore the proposed meeting time, or
send an email response to the attendee that proposed the new meeting time.

4. (Optional) Perform a GetUserAvailability EWS operation call to find out whether


the proposed time will work for all attendees, including room and resource
mailboxes. (You can also use the ExchangeService.GetUserAvailability EWS
Managed API method to do this.)

5. The organizer can then update their meeting with the new proposed meeting
times and send the updates to all attendees by using the UpdateItem EWS
operation (or the Appointment.Update EWS Managed API method).

The following figure shows the process that occurs between the meeting organizer, the
attendee, and the Exchange server that handled the EWS calls.

Figure 1. Process for proposing a new meeting time


Version differences
The propose new time feature was introduced in Exchange build version 15.00.0800.007.
In earlier versions of Exchange, EWS application users have to send a separate email to
the meeting organizer to request a different meeting time.

See also
Calendars and EWS in Exchange

Create appointments and meetings by using EWS in Exchange 2013

Get appointments and meetings by using EWS in Exchange

Update appointments and meetings by using EWS in Exchange

Delete appointments and cancel meetings by using EWS in Exchange


Process calendar items in batches in
Exchange
Article • 09/15/2021 • 15 minutes to read

Learn how to create, get, update, or delete batches of calendar items in a single call by
using the EWS Managed API or EWS in Exchange.

You can use the EWS Managed API or EWS to work with batches of appointments and
meetings to reduce the number of calls a client makes to an Exchange server. When you
use the EWS Managed API to create, get, update, and delete a batch of calendar items,
you use ExchangeService object methods, whereas when you work with single
calendar items, you use Appointment object methods. If you are using EWS, you use
the same operation for batch calls that you use for single calls.

Table 1. EWS Managed API methods and EWS operations for working with batches of
calendar items

In order to… Use this EWS Managed API Use this EWS
method operation

Create calendar items in batches CreateItems


CreateItem

Get calendar items in batches BindToItems


GetItem

Update calendar items in batches UpdateItems


UpdateItem

Delete calendar items in batches DeleteItems


DeleteItem

In this article, you'll learn how to complete basic tasks for batches of calendar items by
using the EWS Managed API or EWS.

Note that in the EWS Managed API examples in this article, if the methods are called
sequentially, you can create, get, update, and then delete a batch of calendar items.

C#

Collection<ItemId> itemIds = BatchCreateCalendarItems(service);

Collection<Appointment> myAppointments = BatchGetCalendarItems(service,


itemIds);

itemIds = BatchUpdateCalendarItems(service, myAppointments);

BatchDeleteCalendarItemsTwice(service, itemIds);

Create calendar items in batches by using the


EWS Managed API
You can create calendar items in batches by using the CreateItems EWS Managed API
method, as shown in the following example. This example creates three Appointment
objects — a single-instance appointment, a recurring appointment, and a meeting —
and then adds them to a collection.

This example assumes that you have authenticated to an Exchange server and have
acquired an ExchangeService object named service.

C#

public static Collection<ItemId> BatchCreateCalendarItems(ExchangeService


service)

// These are unsaved local instances of an Appointment object.


// Despite the required parameter of an ExchangeService object
(service), no call

// to an Exchange server is made when the objects are instantiated.

// A call to the Exchange server is made when the service.CreateItems()


method is called.

Appointment appt1 = new Appointment(service);

Appointment recurrAppt2 = new Appointment(service);

Appointment meeting3 = new Appointment(service);

// Set the properties for a single instance appointment.

appt1.Subject = "Review current quarterly deliverables";

appt1.Body = "Wrap up all outstanding deliverables for this quarter and


prepare for Q2.";

appt1.Start = DateTime.Now.AddDays(2);

appt1.End = appt1.Start.AddHours(3);

appt1.Location = "My office";

appt1.ReminderMinutesBeforeStart = 30;

// Set the properties for a recurring appointment.

recurrAppt2.Subject = "Food bank delivery";

recurrAppt2.Body = "Deliver the team's weekly food drive collection to


the food bank.";

recurrAppt2.Start = DateTime.Now.AddDays(1);

recurrAppt2.End = recurrAppt2.Start.AddHours(1);

recurrAppt2.Location = "Local food bank";

arecurrAppt2.ReminderMinutesBeforeStart = 30;

DayOfTheWeek[] dow = new DayOfTheWeek[]


{(DayOfTheWeek)recurrAppt2.Start.DayOfWeek};

recurrAppt2.Recurrence = new
Recurrence.WeeklyPattern(recurrAppt2.Start.Date, 1, dow);

recurrAppt2.Recurrence.StartDate = recurrAppt2.Start.Date;

recurrAppt2.Recurrence.NumberOfOccurrences = 10;

// Set the properties for a single instance meeting.

meeting3.Subject = "Code Blast";

meeting3.Body = "Let's get together to finish all the methods and unit
tests for the ContosoLive project.";

meeting3.Start = DateTime.Now.AddDays(3);

meeting3.End = meeting3.Start.AddHours(6);

meeting3.Location = "The lounge";

meeting3.RequiredAttendees.Add("[email protected]");

meeting3.RequiredAttendees.Add("[email protected]");

meeting3.RequiredAttendees.Add("[email protected]");

meeting3.ReminderMinutesBeforeStart = 30;

// Add the appointment objects to a collection.

Collection<Appointment> calendarItems = new Collection<Appointment>() {


appt1, recurrAppt2, meeting3 };

// Instantiate a collection of item IDs to populate from the values that


are returned by the Exchange server.

Collection<ItemId> itemIds = new Collection<ItemId>();

// Send the batch of Appointment objects.

// Note that multiple calls to the Exchange server might be made when
Appointment objects have attachments.

// Note also that the the ID of the item collection passed as the first
parameter to CreateItems is set on return.

ServiceResponseCollection<ServiceResponse> response =
service.CreateItems(calendarItems,

WellKnownFolderName.Calendar,

MessageDisposition.SendAndSaveCopy,

SendInvitationsMode.SendToAllAndSaveCopy);

if (response.OverallResult == ServiceResult.Success)

Console.WriteLine("All appointments and meetings sucessfully


created.");

// Collect the item IDs from the created calendar items.

foreach (Appointment appt in calendarItems)

itemIds.Add(appt.Id);

int counter = 1;

// Show the IDs and errors for each message.

foreach (ServiceResponse resp in response)

// Because item IDs are long, show only five characters.

Console.WriteLine("Result (message {0}), id {1}: {2}", counter,


itemIds[counter - 1].ToString().Substring(0, 5), resp.Result);

Console.WriteLine("Error Code: {0}", resp.ErrorCode);

Console.WriteLine("ErrorMessage: {0}\r\n", resp.ErrorMessage);

counter++;

// Return the collection of item IDs.

return itemIds;

The Appointment objects in the collection can be appointments or meetings, and


either single instances or a recurring series of either.

Create calendar items in batches by using EWS


You can create calendar items in batches by using the CreateItem EWS operation, as
shown in the following code example. This is also the XML request that the EWS
Managed API sends when you use the EWS Managed API to create calendar items in
batches.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Pacific Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:CreateItem MessageDisposition="SendAndSaveCopy"
SendMeetingInvitations="SendToAllAndSaveCopy">

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="calendar" />

</m:SavedItemFolderId>

<m:Items>

<t:CalendarItem>

<t:Subject>Review current quarterly deliverables</t:Subject>

<t:Body BodyType="HTML">Wrap up all outstanding deliverables for


this quarter and prepare for Q2.</t:Body>

<t:ReminderDueBy>2014-01-07T12:13:40.333-08:00</t:ReminderDueBy>

<t:Start>2014-01-08T13:13:37.717-08:00</t:Start>

<t:End>2014-01-08T16:13:37.717-08:00</t:End>

<t:Location>Local food bank</t:Location>

<t:MeetingTimeZone TimeZoneName="Pacific Standard Time" />

</t:CalendarItem>

<t:CalendarItem>

<t:Subject>Food bank delivery</t:Subject>

<t:Body BodyType="HTML">Deliver the team's weekly food drive


collection to the food bank.</t:Body>

<t:Start>2014-01-07T13:13:40.333-08:00</t:Start>

<t:End>2014-01-07T14:13:40.333-08:00</t:End>

<t:Recurrence>

<t:WeeklyRecurrence>

<t:Interval>1</t:Interval>

<t:DaysOfWeek>Tuesday</t:DaysOfWeek>

</t:WeeklyRecurrence>

<t:NumberedRecurrence>

<t:StartDate>2014-01-07-08:00</t:StartDate>

<t:NumberOfOccurrences>10</t:NumberOfOccurrences>

</t:NumberedRecurrence>

</t:Recurrence>

<t:MeetingTimeZone TimeZoneName="Pacific Standard Time" />

</t:CalendarItem>

<t:CalendarItem>

<t:Subject>Code Blast</t:Subject>

<t:Body BodyType="HTML">Let's get together to finish all the


methods and unit tests for the ContosoLive project.</t:Body>

<t:ReminderMinutesBeforeStart>30</t:ReminderMinutesBeforeStart>

<t:Start>2014-01-09T13:13:44.998-08:00</t:Start>

<t:End>2014-01-09T19:13:44.998-08:00</t:End>

<t:Location>The lounge</t:Location>

<t:RequiredAttendees>

<t:Attendee>

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:Attendee>

<t:Attendee>

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:Attendee>

<t:Attendee>

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:Attendee>

</t:RequiredAttendees>

<t:MeetingTimeZone TimeZoneName="Pacific Standard Time" />

</t:CalendarItem>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The server responds to the CreateItem request with a CreateItemResponse message


that includes a ResponseCode value of NoError for each of the new calendar items,
which indicates that each calendar item was created successfully.

Note that the calendar items are either meetings or appointments, or single instances or
a recurring series, according to the element values of each calendar item passed to the
Exchange server.

The following is the response from the server. The ItemId and ChangeKey attributes are
shortened for readability.
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="847" MinorBuildNumber="12" Version="V2_8"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:CreateItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

</t:CalendarItem>

</m:Items>

</m:CreateItemResponseMessage>

<m:CreateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

</t:CalendarItem>

</m:Items>

</m:CreateItemResponseMessage>

<m:CreateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

</t:CalendarItem>

</m:Items>

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</m:CreateItemResponse>

</s:Body>

</s:Envelope>

Get calendar items in batches by using the EWS


Managed API
You can get calendar items in batches by using the BindToItems EWS Managed API
method, as shown in the following example.

This example assumes that you have authenticated to an Exchange server and have
acquired an ExchangeService object named service.

C#

public static Collection<Appointment> BatchGetCalendarItems(ExchangeService


service, Collection<ItemId> itemIds)

// As a best practice, create a property set that limits the properties


returned by the Bind method to only those that are required.

PropertySet appointmentProps = new PropertySet(BasePropertySet.IdOnly,

AppointmentSchema.Subject,

AppointmentSchema.Body,

AppointmentSchema.ReminderMinutesBeforeStart,

AppointmentSchema.Start,

AppointmentSchema.End,

AppointmentSchema.AppointmentType,

AppointmentSchema.Location,

AppointmentSchema.RequiredAttendees);

ServiceResponseCollection<GetItemResponse> response =
service.BindToItems(itemIds, appointmentProps);

Collection<Appointment> calendarItems = new Collection<Appointment>();

foreach (GetItemResponse items in response)

Item item = items.Item;

Appointment appointmentItem = (Appointment)item;

calendarItems.Add(appointmentItem);

Console.WriteLine("Found item {0}.",


appointmentItem.Id.ToString().Substring(144));

if (response.OverallResult == ServiceResult.Success)

Console.WriteLine("All calendar items retrieved successfully.");

Console.WriteLine("\r\n");

else

int counter = 1;

// List the status of each message.

foreach (ServiceResponse resp in response)

// Because item IDs are long, show only last 8 characters.

Console.WriteLine("Result (message {0}), id {1}: {2}", counter,


itemIds[counter - 1].ToString().Substring(144), resp.Result);

Console.WriteLine("Error Code: {0}", resp.ErrorCode);

Console.WriteLine("ErrorMessage: {0}\r\n", resp.ErrorMessage);

Console.WriteLine("\r\n");

counter++;

return calendarItems;

Get calendar items in batches by using EWS


You can get calendar items in batches by using the GetItem EWS operation, as shown
in the following example. This is also the XML request that the EWS Managed API sends
when you use the EWS Managed API to get calendar items in batches.

The ItemId and ChangeKey attributes are shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Pacific Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:GetItem>

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

<t:FieldURI FieldURI="item:Body" />

<t:FieldURI FieldURI="item:ReminderMinutesBeforeStart" />

<t:FieldURI FieldURI="calendar:Start" />

<t:FieldURI FieldURI="calendar:End" />

<t:FieldURI FieldURI="calendar:CalendarItemType" />

<t:FieldURI FieldURI="calendar:Location" />

<t:FieldURI FieldURI="calendar:RequiredAttendees" />

</t:AdditionalProperties>

</m:ItemShape>

<m:ItemIds>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

</m:ItemIds>

</m:GetItem>

</soap:Body>

</soap:Envelope>

The server responds to the GetItem request with a GetItemResponse message with
the requested properties for each item, as shown in the following example.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="847" MinorBuildNumber="16" Version="V2_8"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

<t:Subject>Review current quarterly deliverables</t:Subject>

<t:Body BodyType="HTML">

&amp;lt;html&amp;gt;

&amp;lt;head&amp;gt;

&amp;lt;meta http-equiv="Content-Type" content="text/html;


charset=utf-8"&amp;gt;

&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;

Wrap up all outstanding deliverables for this quarter and


prepare for Q2.

&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;

</t:Body>

<t:ReminderMinutesBeforeStart>30</t:ReminderMinutesBeforeStart>

<t:Start>2014-01-19T18:59:07Z</t:Start>

<t:End>2014-01-19T21:59:07Z</t:End>

<t:Location>Local food bank</t:Location>

<t:CalendarItemType>Single</t:CalendarItemType>

</t:CalendarItem>

</m:Items>

</m:GetItemResponseMessage>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

<t:Subject>Food bank delivery</t:Subject>

<t:Body BodyType="HTML">

&amp;lt;html&amp;gt;

&amp;lt;head&amp;gt;

&amp;lt;meta http-equiv="Content-Type" content="text/html;


charset=utf-8"&amp;gt;

&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;

Deliver the team's weekly food drive collection to the food


bank.

&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;

</t:Body>

<t:ReminderMinutesBeforeStart>15</t:ReminderMinutesBeforeStart>

<t:Start>2014-01-18T18:59:07Z</t:Start>

<t:End>2014-01-18T19:59:07Z</t:End>

<t:CalendarItemType>RecurringMaster</t:CalendarItemType>

</t:CalendarItem>

</m:Items>

</m:GetItemResponseMessage>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

<t:Subject>Code Blast</t:Subject>

<t:Body BodyType="HTML">

&amp;lt;html&amp;gt;

&amp;lt;head&amp;gt;

&amp;lt;meta http-equiv="Content-Type" content="text/html;


charset=utf-8"&amp;gt;

&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;

Let's get together to finish all the methods and unit tests
for the ContosoLive project.

&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;

</t:Body>
<t:ReminderMinutesBeforeStart>30</t:ReminderMinutesBeforeStart>

<t:Start>2014-01-20T18:59:08Z</t:Start>

<t:End>2014-01-21T00:59:08Z</t:End>

<t:Location>The lounge</t:Location>

<t:CalendarItemType>Single</t:CalendarItemType>

<t:RequiredAttendees>

<t:Attendee>

<t:Mailbox>

<t:Name>[email protected]</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Mailbox>

<t:ResponseType>Unknown</t:ResponseType>

</t:Attendee>

<t:Attendee>

<t:Mailbox>

<t:Name>[email protected]</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Mailbox>

<t:ResponseType>Unknown</t:ResponseType>

</t:Attendee>

<t:Attendee>

<t:Mailbox>

<t:Name>[email protected]</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Mailbox>

<t:ResponseType>Unknown</t:ResponseType>

</t:Attendee>

</t:RequiredAttendees>

</t:CalendarItem>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</m:GetItemResponse>

</s:Body>

</s:Envelope>

Update calendar items in batches by using the


EWS Managed API
You can update calendar item properties in batches by using the UpdateItems EWS
Managed API method, as shown in the following example.

This example assumes that you have authenticated to an Exchange server and have
acquired an ExchangeService object named service.

C#
public static Collection<ItemId> BatchUpdateCalendarItems(ExchangeService
service, Collection<Appointment> calendarItems)

int i = 1;

// Appointment item IDs to return.

Collection<ItemId> itemIds = new Collection<ItemId>();

// Update the subject of each calendar item locally.

foreach (Appointment appointment in calendarItems)

// Update the subject of each calendar item in the collection

appointment.Subject = "Company headquarters are moving down the


street to 1234 Contoso Drive!: " + appointment.Subject.ToString();

Console.WriteLine("Updated the subject property for calendar item


{0} of {1}, item id {2}.", i, calendarItems.Count,
appointment.Id.ToString().Substring(0, 5));

i++;

// Collect item IDs to return instead of appointment objects.

itemIds.Add(appointment.Id);

// Send the updated items to the server.

// This method call results in an UpdateItem call to EWS.

ServiceResponseCollection<UpdateItemResponse> response =
service.UpdateItems(calendarItems,

WellKnownFolderName.Calendar,

ConflictResolutionMode.AutoResolve,

MessageDisposition.SendAndSaveCopy,

SendInvitationsOrCancellationsMode.SendToChangedAndSaveCopy);

// Display the result of the UpdateItems method call.

if (response.OverallResult == ServiceResult.Success)

Console.WriteLine("Calendar items successfully updated.\r\n");

else

Console.WriteLine("Not all items were successfully updated on the


server.\r\n");

i = 1;

foreach (ServiceResponse srvResponse in response)

Console.WriteLine("Result for message {0}: {1}", i,


srvResponse.Result);

Console.WriteLine("Error code: {0}", srvResponse.ErrorCode);

Console.WriteLine("ErrorMessage: {0}\r\n",
srvResponse.ErrorMessage);

i++;

return itemIds;

Update calendar items in batches by using EWS


You can update multiple calendar items by using the UpdateItem EWS operation, as
shown in following code example. This is also the XML request that the EWS Managed
API sends when you use the EWS Managed API to update calendar items in batches.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Pacific Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:UpdateItem MessageDisposition="SendAndSaveCopy"
ConflictResolution="AutoResolve"

SendMeetingInvitationsOrCancellations="SendToChangedAndSaveCopy">

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="calendar" />

</m:SavedItemFolderId>

<m:ItemChanges>

<t:ItemChange>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

<t:Updates>

<t:SetItemField>

<t:FieldURI FieldURI="item:Subject" />

<t:CalendarItem>

<t:Subject>Company headquarters are moving down the street


to 1234 Contoso Drive!: Review current quarterly deliverables

</t:Subject>

</t:CalendarItem>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

<t:ItemChange>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

<t:Updates>

<t:SetItemField>

<t:FieldURI FieldURI="item:Subject" />

<t:CalendarItem>

<t:Subject>Company headquarters are moving down the street


to 1234 Contoso Drive!: Food bank delivery</t:Subject>

</t:CalendarItem>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

<t:ItemChange>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

<t:Updates>

<t:SetItemField>

<t:FieldURI FieldURI="item:Subject" />

<t:CalendarItem>

<t:Subject>Company headquarters are moving down the street


to 1234 Contoso Drive!: Code Blast</t:Subject>

</t:CalendarItem>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

</m:ItemChanges>

</m:UpdateItem>

</soap:Body>

</soap:Envelope>

The server responds to the UpdateItem request with an UpdateItemResponse


message that includes a ResponseCode value of NoError, which indicates that each of
the updates was saved successfully on the server. Any conflicts are reported in the
ConflictResult element.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="859" MinorBuildNumber="13"

Version="V2_8"
xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:UpdateItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:UpdateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

</t:CalendarItem>

</m:Items>

<m:ConflictResults>

<t:Count>1</t:Count>

</m:ConflictResults>

</m:UpdateItemResponseMessage>

<m:UpdateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

</t:CalendarItem>

</m:Items>

<m:ConflictResults>

<t:Count>1</t:Count>

</m:ConflictResults>

</m:UpdateItemResponseMessage>

<m:UpdateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

</t:CalendarItem>

</m:Items>

<m:ConflictResults>

<t:Count>1</t:Count>

</m:ConflictResults>

</m:UpdateItemResponseMessage>

</m:ResponseMessages>

</m:UpdateItemResponse>

</s:Body>

</s:Envelope>

Delete calendar items in batches by using the


EWS Managed API
You can delete calendar items in batches by using the DeleteItems EWS Managed API
method, as shown in the following example. This example makes the deletion request a
second time to show that no exceptions are thrown but that the server will return an
ErrorItemNotFound error to indicate that the items to delete weren't in the store when
the call was made. This error is returned if the item has already been deleted, or if a bad
item ID is passed to the server.
This example assumes that you have authenticated to an Exchange server and have
acquired an ExchangeService object named service.

C#

public static void BatchDeleteCalendarItemsTwice(ExchangeService service,


Collection<ItemId> itemIds)

// Delete the batch of appointment objects

// This method call results in a DeleteItem call to EWS.

ServiceResponseCollection<ServiceResponse> response =
service.DeleteItems(itemIds,

DeleteMode.MoveToDeletedItems,

SendCancellationsMode.SendToAllAndSaveCopy,

AffectedTaskOccurrence.AllOccurrences);

int counter = 1;

// Show the IDs and errors for each message.

foreach (ServiceResponse resp in response)

// Because item IDs are long, show only five characters.

Console.WriteLine("Result (message {0}), id {1}: {2}", counter,


itemIds[counter - 1].ToString().Substring(0, 5), resp.Result);

Console.WriteLine("Error Code: {0}", resp.ErrorCode);

Console.WriteLine("ErrorMessage: {0}\r\n", resp.ErrorMessage);

counter++;

// Now attempt to delete the same items again.

response = service.DeleteItems(itemIds,

DeleteMode.MoveToDeletedItems,

SendCancellationsMode.SendToAllAndSaveCopy,

AffectedTaskOccurrence.AllOccurrences);

counter = 1;

// Show the IDs and errors for each message.

foreach (ServiceResponse resp in response)

// Because item IDs are long, show only five characters.

Console.WriteLine("Result (message {0}), id {1}: {2}", counter,


itemIds[counter - 1].ToString().Substring(0, 5), resp.Result);

Console.WriteLine("Error Code: {0}", resp.ErrorCode);

Console.WriteLine("ErrorMessage: {0}\r\n", resp.ErrorMessage);

counter++;

When the DeleteItems method is called the second time, no exception is thrown, but
the server returns an ErrorItemNotFound error in the result.
Delete calendar items in batches by using EWS
You can delete calendar items in batches by using the DeleteItem EWS operation, as
shown in the following code example. This is also the XML request that the EWS
Managed API sends when you use the EWS Managed API to delete calendar items in
batches.

The ItemId and ChangeKey attributes are shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Pacific Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:DeleteItem DeleteType="MoveToDeletedItems"

AffectedTaskOccurrences="AllOccurrences"

SendMeetingCancellations="SendToAllAndSaveCopy">

<m:ItemIds>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

</m:ItemIds>

</m:DeleteItem>

</soap:Body>

</soap:Envelope>

The server responds to the DeleteItem request with a DeleteItemResponse message


that includes a ResponseCode value of NoError for each item that was removed.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="859" MinorBuildNumber="13" Version="V2_8"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:DeleteItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:DeleteItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

</m:DeleteItemResponseMessage>

<m:DeleteItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

</m:DeleteItemResponseMessage>

<m:DeleteItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

</m:DeleteItemResponseMessage>

</m:ResponseMessages>

</m:DeleteItemResponse>

</s:Body>

</s:Envelope>

Note that if the DeleteItem request is made when the associated items have already
been deleted, no exception will be thrown, but the server will return an
ErrorItemNotFound error in the result. The following example shows the server
response to a DeleteItem request when the associated items have already been deleted.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="859" MinorBuildNumber="13" Version="V2_8"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:DeleteItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:DeleteItemResponseMessage ResponseClass="Error">

<m:MessageText>The specified object was not found in the store.


</m:MessageText>

<m:ResponseCode>ErrorItemNotFound</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:DeleteItemResponseMessage>

<m:DeleteItemResponseMessage ResponseClass="Error">

<m:MessageText>The specified object was not found in the store.


</m:MessageText>

<m:ResponseCode>ErrorItemNotFound</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:DeleteItemResponseMessage>

<m:DeleteItemResponseMessage ResponseClass="Error">

<m:MessageText>The specified object was not found in the store.


</m:MessageText>

<m:ResponseCode>ErrorItemNotFound</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:DeleteItemResponseMessage>

</m:ResponseMessages>

</m:DeleteItemResponse>

</s:Body>

</s:Envelope>

Verifying that a batch process completed


successfully
When one or more calendar items in a batched request can't be processed as requested,
an error is returned for each calendar item that failed, and the rest of the calendar items
in the batch are processed as expected. Failures in batch processing can occur if the
item was deleted, and therefore can't be sent, retrieved, or updated, or if the item
moved to a different folder, and therefore has a new item ID, and cannot be modified
with the item ID sent. The information in this section shows how to get error details
about failures in batch processing of calendar items.

To verify the success of a batch process by using the EWS Managed API, you can check
that the OverallResult property of the ServiceResponseCollection is equal to
ServiceResult.Success . If so, all the calendar items were processed successfully. If the
OverallResult is not equal to ServiceResult.Success, one or more of the calendar items
were not processed successfully. Each of the objects returned in the
ServiceResponseCollection contains the following properties:

ErrorCode
ErrorDetails

ErrorMessage

ErrorProperties

Result

These properties contain information about why the calendar items could not be
processed as requested. The examples in this article print out the Result, ErrorCode, and
ErrorMessage for each failed item. You can use these results to investigate the issue.

For EWS, to verify the success of a batched process, check the ResponseClass attribute
for each item being processed. The following is the basic structure of the
ResponseMessageType, the base type from which all response messages are derived.

XML

<ResponseMessage ResponseClass="Success | Warning | Error">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</ResponseMessage>

The ResponseClass attribute is set to Success if the calendar item was processed
successfully, or Error if it was not processed successfully. For calendar items, you will not
encounter a Warning during batch processing. If the ResponseClass is Success, the
ResponseCode element that follows is also always set to NoError. If the
ResponseClass is Error, you need to check the values of the MessageText ,
ResponseCode, and MessageXml elements to determine what caused the problem.
DescriptiveLinkKey is currently unused.

See also
Calendars and EWS in Exchange

Get appointments and meetings by using EWS in Exchange

Update appointments and meetings by using EWS in Exchange

Delete appointments and cancel meetings by using EWS in Exchange

Process calendar items in batches in Exchange

Throttling implications for EWS batch requests


Recurrence patterns and EWS
Article • 09/15/2021 • 7 minutes to read

Learn about recurrence patterns and recurring series in Exchange.

A recurring series is an appointment or meeting that repeats according to a defined


pattern. A recurring series can either have a specific number of occurrences or can
repeat indefinitely. Additionally, a recurring series can have exceptions that don't follow
the pattern of the rest of the occurrences, and can have occurrences that have been
deleted from the pattern. You can use the EWS Managed API and EWS to work with
recurring series and their associated calendar items.

Recurring calendar items


All calendar items fall into one of the following four categories:

Non-recurring calendar items

Recurring masters

Occurrences in a series

Modified occurrences in a series, known as exceptions

In this article, we'll look at the three types of calendar items that are part of a recurring
series.

It's helpful to understand how recurring series are implemented on the Exchange server.
Instead of creating a separate distinct item for each occurrence in a recurring series, the
server creates only one actual item in the calendar, known as the recurring master. The
format of a recurring master is very similar to a non-recurring appointment, with the
addition of recurrence pattern information. The server then generates occurrences
based on the recurrence pattern in response to client requests for appointment
information, using a process called expansion. These generated occurrences are not
permanently stored on the server. This is important to understand because the way that
you search for calendar items determines what information you receive and whether
expansion occurs.

Recurrence patterns
The key piece to a recurring series that makes expansion possible is the recurrence
pattern. The recurrence pattern is found on the recurring master, and describes a set of
criteria for calculating occurrences based on the date and time of the recurring master.

Table 1. Available recurrence patterns

EWS Managed API class EWS element Examples

Recurrence.DailyPattern
DailyRecurrence
Repeat every day.
Repeat every other day.

Recurrence.MonthlyPattern
AbsoluteMonthlyRecurrence Repeat every month on
the tenth day of the
month.
Repeat every other
month on the twenty-
first day of the month.

Recurrence.RelativeMonthlyPattern RelativeMonthlyRecurrence
Repeat on the second
Tuesday of every month.
Repeat on the third
Thursday of the month
every three months.

Recurrence.RelativeYearlyPattern
RelativeYearlyRecurrence
Repeat on the first
Monday of August every
year.

Recurrence.WeeklyPattern
WeeklyRecurrence
Repeat every Monday.
Repeat every Tuesday
and Thursday every
other week.

Recurrence.YearlyPattern
AbsoluteYearlyRecurrence
Repeat on September
1st every year.

The other important piece of information for a recurrence pattern is when the
recurrence ends. This can be expressed as either a set number of occurrences, as an end
date, or as having no end.

Table 2. Options for the end of a recurring series

EWS Managed API EWS element Description


method/property

Recurrence.NumberOfOccurrences NumberedRecurrence The value of this property or


element specifies the number
of occurrences.
EWS Managed API EWS element Description
method/property

Recurrence.EndDate
EndDateRecurrence
The last occurrence in the
series falls on or before the
date specified by this property
or element.

Recurrence.HasEnd
NoEndRecurrence
The series has no end.
Recurrence.NeverEnds

Expanded vs. non-expanded views


Using the FindAppointments method in the EWS Managed API (or the FindItem
operation with a CalendarView element in EWS) invokes the expansion process. This
hides recurring master appointments from the result set, and instead presents an
expanded view of that recurring series. Occurrences of and exceptions to the recurring
master that fall within the parameters of the calendar view are included in the result set.
Conversely, using the FindItems method in the EWS Managed API (or the FindItem
operation with a IndexedPageItemView or FractionalPageItemView element in EWS),
does not invoke the expansion process, and occurrences and exceptions are not
included. Let's look at an example comparing the two methods.

Table 3. Methods and operations for finding appointments

EWS Managed API method EWS operation Expands Items included in


series? results

ExchangeService.FindAppointments FindItem operation Yes Non-recurring


with a CalendarView appointments,
element single
occurrences of
recurring series,
and exceptions
to recurring
series

ExchangeService.FindItems
FindItem operation No Non-recurring
with an appointments
IndexedPageItemView and recurring
element or master
FractionalPageItemView appointments
element
Sadie has just signed her son up for swim team. The team has practice every Wednesday
morning at 8:30 AM, starting July 2, with the last practice being on August 6. Not
wanting to forget about practice, Sadie adds a recurring appointment to her calendar to
remind her.

Table 4. Sadie's recurring appointment

Appointment field Value

Subject Swim Team Practice

Start July 2, 2014 8:30 AM

End July 2, 2014 10:00 AM

Recurs Every Wednesday

Last occurrence August 6, 2014 8:30 AM

A quick look at a calendar shows that the team will have a total of six practices.
However, there aren't six distinct appointment items in the calendar. Instead, there is
just one recurring master appointment representing the series.

Now let's look at finding appointments on Sadie's calendar that occur within the month
of July. The following code example uses the FindItems method in the Exchange
Managed API to produce a non-expanded view of Sadie's calendar.

C#

PropertySet propSet = new PropertySet(AppointmentSchema.Subject,

AppointmentSchema.Location,

AppointmentSchema.Start,

AppointmentSchema.End,

AppointmentSchema.AppointmentType);

#region FindItems + ItemView method

ItemView itemView = new ItemView(100);

itemView.PropertySet = propSet;

List<SearchFilter> filterList = new List<SearchFilter>();

// Find appointments that start after midnight on July 1, 2014.

SearchFilter.IsGreaterThan startFilter = new


SearchFilter.IsGreaterThan(AppointmentSchema.Start,

new DateTime(2014, 7, 1));

// Find appointments that end before midnight on July 31, 2014

SearchFilter.IsLessThan endFilter = new


SearchFilter.IsLessThan(AppointmentSchema.End,

new DateTime(2014, 7, 31));

filterList.Add(startFilter);

filterList.Add(endFilter);

SearchFilter.SearchFilterCollection calendarFilter = new


SearchFilter.SearchFilterCollection(LogicalOperator.And, filterList);

// This results in a call to EWS.


FindItemsResults<Item> results =
service.FindItems(WellKnownFolderName.Calendar, calendarFilter, itemView);

foreach(Item appt in results.Items)

Console.WriteLine(appt.Subject);

That code results in the following FindItem operation request with an


IndexedPageItemView element.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Pacific Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:FindItem Traversal="Shallow">

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

<t:FieldURI FieldURI="calendar:Location" />

<t:FieldURI FieldURI="calendar:Start" />

<t:FieldURI FieldURI="calendar:End" />

<t:FieldURI FieldURI="calendar:CalendarItemType" />

</t:AdditionalProperties>

</m:ItemShape>

<m:IndexedPageItemView MaxEntriesReturned="100" Offset="0"


BasePoint="Beginning" />

<m:Restriction>

<t:And>

<t:IsGreaterThan>

<t:FieldURI FieldURI="calendar:Start" />

<t:FieldURIOrConstant>

<t:Constant Value="2014-07-01T07:00:00.000Z" />

</t:FieldURIOrConstant>

</t:IsGreaterThan>

<t:IsLessThan>

<t:FieldURI FieldURI="calendar:End" />

<t:FieldURIOrConstant>

<t:Constant Value="2014-07-31T07:00:00.000Z" />

</t:FieldURIOrConstant>

</t:IsLessThan>

</t:And>

</m:Restriction>

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="calendar" />

</m:ParentFolderIds>

</m:FindItem>

</soap:Body>

</soap:Envelope>

The server's response includes only a single item, the recurring master, indicated by the
CalendarItemType element value of RecurringMaster. The value of the ItemId
element has been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="939" MinorBuildNumber="16" Version="V2_11"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:FindItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder IndexedPagingOffset="1" TotalItemsInView="1"


IncludesLastItemInRange="true">

<t:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkADA5..." ChangeKey="DwAAABYA..." />

<t:Subject>Swim Team Practice</t:Subject>

<t:Start>2014-07-02T15:30:00Z</t:Start>

<t:End>2014-07-02T17:00:00Z</t:End>

<t:Location>Neighborhood Swimming Pool</t:Location>

<t:CalendarItemType>RecurringMaster</t:CalendarItemType>

</t:CalendarItem>

</t:Items>

</m:RootFolder>

</m:FindItemResponseMessage>

</m:ResponseMessages>

</m:FindItemResponse>

</s:Body>

</s:Envelope>

Now let's compare with an expanded view. The following code example uses the
FindAppointments method in the EWS Managed API to create an expanded view of
Sadie's calendar.

C#

PropertySet propSet = new PropertySet(AppointmentSchema.Subject,

AppointmentSchema.Location,

AppointmentSchema.Start,

AppointmentSchema.End,

AppointmentSchema.AppointmentType);

CalendarView calView = new CalendarView(new DateTime(2014, 7, 1),

new DateTime(2014, 7, 31));

calView.PropertySet = propSet;

FindItemsResults<Appointment> results =
service.FindAppointments(WellKnownFolderName.Calendar, calView);

foreach(Appointment appt in results.Items)

Console.WriteLine(appt.Subject);

This code results in the following FindItem operation request with a CalendarView
element.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Pacific Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:FindItem Traversal="Shallow">

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

<t:FieldURI FieldURI="calendar:Location" />

<t:FieldURI FieldURI="calendar:Start" />

<t:FieldURI FieldURI="calendar:End" />

<t:FieldURI FieldURI="calendar:CalendarItemType" />

</t:AdditionalProperties>

</m:ItemShape>

<m:CalendarView StartDate="2014-07-01T07:00:00.000Z" EndDate="2014-07-


31T07:00:00.000Z" />

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="calendar" />

</m:ParentFolderIds>

</m:FindItem>

</soap:Body>

</soap:Envelope>

This time, the server response includes five occurrences, one for each Wednesday in July.
The CalendarItemType elements on these items all have a value of Occurrence. Note
that the recurring master is not present in the response. The values of the ItemId
elements have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="939" MinorBuildNumber="16" Version="V2_11"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:FindItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder TotalItemsInView="5" IncludesLastItemInRange="true">

<t:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkADA6..." ChangeKey="DwAAABYA..." />

<t:Subject>Swim Team Practice</t:Subject>

<t:Start>2014-07-02T15:30:00Z</t:Start>

<t:End>2014-07-02T17:00:00Z</t:End>

<t:Location>Neighborhood Swimming Pool</t:Location>

<t:CalendarItemType>Occurrence</t:CalendarItemType>

</t:CalendarItem>

<t:CalendarItem>

<t:ItemId Id="AAMkADA7..." ChangeKey="DwAAABYA..." />

<t:Subject>Swim Team Practice</t:Subject>

<t:Start>2014-07-09T15:30:00Z</t:Start>

<t:End>2014-07-09T17:00:00Z</t:End>

<t:Location>Neighborhood Swimming Pool</t:Location>

<t:CalendarItemType>Occurrence</t:CalendarItemType>

</t:CalendarItem>

<t:CalendarItem>

<t:ItemId Id="AAMkADA8..." ChangeKey="DwAAABYA..." />

<t:Subject>Swim Team Practice</t:Subject>

<t:Start>2014-07-16T15:30:00Z</t:Start>

<t:End>2014-07-16T17:00:00Z</t:End>

<t:Location>Neighborhood Swimming Pool</t:Location>

<t:CalendarItemType>Occurrence</t:CalendarItemType>

</t:CalendarItem>

<t:CalendarItem>

<t:ItemId Id="AAMkADA9..." ChangeKey="DwAAABYA..." />

<t:Subject>Swim Team Practice</t:Subject>

<t:Start>2014-07-23T15:30:00Z</t:Start>

<t:End>2014-07-23T17:00:00Z</t:End>

<t:Location>Neighborhood Swimming Pool</t:Location>

<t:CalendarItemType>Occurrence</t:CalendarItemType>

</t:CalendarItem>

<t:CalendarItem>

<t:ItemId Id="AAMkADAA..." ChangeKey="DwAAABYA..." />

<t:Subject>Swim Team Practice</t:Subject>

<t:Start>2014-07-30T15:30:00Z</t:Start>

<t:End>2014-07-30T17:00:00Z</t:End>

<t:Location>Neighborhood Swimming Pool</t:Location>

<t:CalendarItemType>Occurrence</t:CalendarItemType>

</t:CalendarItem>

</t:Items>

</m:RootFolder>

</m:FindItemResponseMessage>

</m:ResponseMessages>

</m:FindItemResponse>

</s:Body>

</s:Envelope>

After you have a recurring master, an occurrence, or an exception, you can always
retrieve the other related items. Given an occurrence or exception, you can retrieve the
recurring master, and vice versa.

Working with recurring calendar items


You use all the same methods and operations to work with recurring series as you use to
work with non-recurring calendar items. The difference is that, depending on the item
you use to invoke those methods or operations, the actions you take can apply to the
entire series, or just a single occurrence. Actions taken on the recurring master will apply
to all occurrences in the series, while actions taken to a single occurrence or exception
will only apply to that occurrence or exception.

In this section
Access a recurring series by using EWS in Exchange
Create a recurring series by using EWS in Exchange

Delete appointments in a recurring series by using EWS in Exchange

Update a recurring series by using EWS

Update a recurring series by using EWS in Exchange

See also
Calendars and EWS in Exchange

Develop web service clients for Exchange

Get appointments and meetings by using EWS in Exchange


Access a recurring series by using EWS
in Exchange
Article • 09/15/2021 • 6 minutes to read

Learn how to access calendar items in a recurring series by using the EWS Managed API
or EWS in Exchange.

A recurring series of appointments or meetings is made up of a recurring master, a


number of occurrences in a series that repeat according to a set pattern, and, optionally,
sets of occurrences that were changed and that were deleted. You can use the EWS
Managed API or EWS to access calendar items in a recurring series. This enables you to:

Check to see if a calendar item associated with an item ID is a recurring master, an


occurrence in a series, or an exception to a series.

Search your calendar folder for recurrence appointments.

Get related recurrence calendar items

Iterate through occurrences in a series, occurrence exceptions, or occurrence


deletions.

Get a collection of recurring calendar items by


using the EWS Managed API
If you want to retrieve a collection of appointments, you can use the
ExchangeService.FindAppointments method to retrieve all appointments between a
given start and end date, and then add all calendar items with an appointment type of
Occurrence or Exception to a collection, as shown in the following example.

This example assumes that you have authenticated to an Exchange server and have
acquired an ExchangeService object named service.

C#

public static Collection<Appointment>


FindRecurringCalendarItems(ExchangeService service,

DateTime
startSearchDate,

DateTime
endSearchDate)

// Instantiate a collection to hold occurrences and exception calendar


items.

Collection<Appointment> foundAppointments = new Collection<Appointment>


();

// Create a calendar view to search the calendar folder and specify the
properties to return.

CalendarView calView = new CalendarView(startSearchDate, endSearchDate);

calView.PropertySet = new PropertySet(BasePropertySet.IdOnly,


AppointmentSchema.Subject,

AppointmentSchema.Start,

AppointmentSchema.IsRecurring,

AppointmentSchema.AppointmentType);

// Retrieve a collection of calendar items.

FindItemsResults<Appointment> findResults =
service.FindAppointments(WellKnownFolderName.Calendar, calView);

// Add all calendar items in your view that are occurrences or


exceptions to your collection.

foreach (Appointment appt in findResults.Items)

if (appt.AppointmentType == AppointmentType.Occurrence ||
appt.AppointmentType == AppointmentType.Exception)

foundAppointments.Add(appt);

else

Console.WriteLine("Discarding calendar item of type {0}.",


appt.AppointmentType);

return foundAppointments;

Note that recurring master calendar items aren't returned in a call to


FindAppointments. If you want to retrieve recurring masters, or you want a more
general approach to retrieving calendar items, you need to use
ExchangeService.FindItems . You can then use a search filter to retrieve only items with
a start date greater than or equal to a date you choose, and an item view to limit the
number of items to return. Note that a recurring master with a start date earlier than the
start date in your search will not be found, even if occurrences occur in this range.

This example assumes that you have authenticated to an Exchange server and have
acquired an ExchangeService object named service.

C#

public static Collection<Appointment>


FindCalendarItemsByAppointmentType(ExchangeService service,

AppointmentType myAppointmentType,

DateTime startSearchDate)

Collection<Appointment> foundAppointments = new Collection<Appointment>


();

// Create a search filter based on the start search date.

SearchFilter.SearchFilterCollection searchFilter = new


SearchFilter.SearchFilterCollection();

searchFilter.Add(new
SearchFilter.IsGreaterThanOrEqualTo(AppointmentSchema.Start,
startSearchDate));

// Create an item view to specify which properties to return.

ItemView view = new ItemView(20);

view.PropertySet = new PropertySet(BasePropertySet.IdOnly,

AppointmentSchema.Subject,

AppointmentSchema.Start,

AppointmentSchema.AppointmentType,

AppointmentSchema.IsRecurring);

// Get the appointment items from the server with the properties we
specified.

FindItemsResults<Item> findResults =
service.FindItems(WellKnownFolderName.Calendar, searchFilter, view);

// Add each of the appointments of the type you want to the collection.

foreach (Item item in findResults.Items)

Appointment appt = item as Appointment;

if (appt.AppointmentType == myAppointmentType)

foundAppointments.Add(appt);

return foundAppointments;

Get related recurrence calendar items by using


the EWS Managed API
Sometimes you have one piece of the puzzle, but to solve it you need the rest of the
pieces. If you have the item ID for a recurrence calendar item, you can get the other
pieces you need by using one of several EWS Managed API properties or methods.

Table 1. EWS Managed API property or method to use to get related recurrence
calendar items

If you have the item ID You can get… By using the…


for…
If you have the item ID You can get… By using the…
for…

The recurring master The first occurrence in a Appointment.FirstOccurrence


calendar item series property
The last occurrence in a Appointment.LastOccurrence
series property
The exceptions to a series Appointment.ModifiedOccurrences
The deleted property
appointments in a series Appointment.DeletedOccurrences
Any occurrence (given its property
index) Appointment.BindToOccurrence
method

A single occurrence in a The recurring master Appointment.BindToRecurringMaster


series method

Any calendar item (an The appointment type Appointment.AppointmentType


Appointment object) enumeration value property

The following code example shows how to get a recurring master, the first or last
occurrence in a series, or an occurrence given its index.

This example assumes that you have authenticated to an Exchange server and have
acquired an ExchangeService object named service.

C#

public static void GetRelatedRecurrenceCalendarItems(ExchangeService


service, ItemId itemId)

Appointment calendarItem = Appointment.Bind(service, itemId, new


PropertySet(AppointmentSchema.AppointmentType));

Appointment recurrMaster = new Appointment(service);

PropertySet props = new PropertySet(AppointmentSchema.AppointmentType,

AppointmentSchema.Subject,

AppointmentSchema.FirstOccurrence,

AppointmentSchema.LastOccurrence,

AppointmentSchema.ModifiedOccurrences,

AppointmentSchema.DeletedOccurrences);

// If the item ID is not for a recurring master, retrieve the recurring


master for the series.

switch (calendarItem.AppointmentType)

// Calendar item is a recurring master so use Appointment.Bind

case AppointmentType.RecurringMaster:

recurrMaster = Appointment.Bind(service, itemId, props);

break;

// The calendar item is a single instance meeting, so there are no


instances to modify or delete.

case AppointmentType.Single:

Console.WriteLine("Item id must reference a calendar item that


is part of a recurring series.");
return;

// The calendar item is an occurrence in the series, so use


BindToRecurringMaster.

case AppointmentType.Occurrence:

recurrMaster = Appointment.BindToRecurringMaster(service,
itemId, props);

break;

// The calendar item is an exception to the series, so use


BindToRecurringMaster.

case AppointmentType.Exception:

recurrMaster = Appointment.BindToRecurringMaster(service,
itemId, props);

break;

// View the first occurrence, last occurrence, and number of modified


and deleted occurrences associated with the recurring master.

Console.WriteLine("Information for the {0} recurring series:",


recurrMaster.Subject);

Console.WriteLine("The start time for the first appointment with id


\t{0} was on \t{1}.",

recurrMaster.FirstOccurrence.ItemId.ToString().Substring(144),

recurrMaster.FirstOccurrence.Start.ToString());

Console.WriteLine("The start time for the last appointment with id \t{0}


will be on \t{1}.",

recurrMaster.LastOccurrence.ItemId.ToString().Substring(144),

recurrMaster.LastOccurrence.Start.ToString());

Console.WriteLine("There are {0} modified occurrences and {1} deleted


occurrences.",

recurrMaster.ModifiedOccurrences == null ? "no" :


recurrMaster.ModifiedOccurrences.Count.ToString(),

recurrMaster.DeletedOccurrences == null ? "no" :


recurrMaster.DeletedOccurrences.Count.ToString());

// Bind to the first occurrence of a series by using its index.

Appointment firstOccurrence = Appointment.BindToOccurrence(service,

recurrMaster.Id,

1, // Index
of first item is 1, not 0.

new
PropertySet(AppointmentSchema.AppointmentType,

AppointmentSchema.Start));

Console.WriteLine("Compare the start times for a recurring master's


first occurrence " +

"and the occurrence found at index 1 using the


BindToOccurrence method:");

Console.WriteLine("The appointment at index 1 has a start time


of\t\t\t\t {0}\n" +

"Which matches that of the first occurrence on the


recurring master: \t {1}",

firstOccurrence.Start.ToString(),

recurrMaster.FirstOccurrence.Start.ToString());

Access calendar items in a recurring series by


using EWS
Accessing calendar items in a recurring series is very similar to accessing single instances
of calendar items. You use a GetItem operation request, specifying the properties you
want, with the OccurrenceItemId of the appointment instance you need. The
OccurrenceItemId contains the ItemID of the occurrence's recurring master, as well as
its index value in the series.

The following XML shows the GetItem request used to return an occurrence in a series
specified by its index. Note that the ItemID of the recurring master has been shortened
for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:GetItem>

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="calendar:CalendarItemType" />

<t:FieldURI FieldURI="calendar:Start" />

</t:AdditionalProperties>

</m:ItemShape>

<m:ItemIds>

<t:OccurrenceItemId RecurringMasterId="AAMkA" InstanceIndex="1" />

</m:ItemIds>

</m:GetItem>

</soap:Body>

</soap:Envelope>

The server responds to the GetItem request with a GetItemResponse message that
includes a ResponseCode value of NoError, which indicates that the email was created
successfully, and the ItemId of the newly created message.

See also
Calendars and EWS in Exchange
Get appointments and meetings by using EWS in Exchange
Create a recurring series by using EWS
in Exchange
Article • 09/15/2021 • 6 minutes to read

Learn how to create recurring meetings by using the EWS Managed API or EWS in
Exchange.

Creating a recurring appointment or meeting isn't all that much different than creating a
single instance appointment or meeting. You just need to assign values to a few
additional recurrence-related properties. These are set on an
ExchangeService.Appointment object's Recurrence object (if you're using the EWS
Managed API), or the Recurrence child element of a CalendarItem element (if you're
using EWS). One thing to consider when you create a recurring, rather than a single-
instance meeting, is that the calendar item you create is the recurring master for a
series. A number of properties are set only on a recurring master; these properties can
help you find, modify, or delete individual instances in a series. For this reason, it might
be useful to keep track of the ID of the recurring master when you create a recurring
series.

Table 1. Properties set on recurring master calendar items

EWS Managed API class or property EWS XML element Description

Recurrence class
Recurrence Contains recurrence-related
The Recurrence class is the base class (RecurrenceType)
information, including the
for a derived pattern class, either recurrence pattern (daily,
IntervalPattern , weekly, monthly, and so on),
RelativeYearlyPattern , or start and end date, number of
YearlyPattern . occurrences, and so on.

FirstOccurrence property
FirstOccurrence
Contains the start and end
times and the item ID for the
first meeting in a series.

LastOccurrence property
LastOccurrence
Contains the start and end
times and the item ID for the
last meeting in a series.

ModifiedOccurrences property
ModifiedOccurrences Contains the set of all
meetings in the series that
have been modified from the
original recurrence pattern.
EWS Managed API class or property EWS XML element Description

DeletedOccurrences property
DeletedOccurrences
Contains the set of all
meetings in the series that
have been deleted from the
original recurrence pattern.

Because meetings are essentially appointments that include attendees, the code
examples in this article show how to create recurring meetings. If you want to create a
recurring appointment, you can modify the examples by removing code related to
attendees.

Create a recurring meeting by using the EWS


Managed API
The following code example shows how to create a recurring meeting. First, assign
values to the properties of an Appointment object used to create a meeting, then use
the Save method to save the recurring series to your calendar folder, and send
meeting requests to your attendees. Finally, use the Appointment.Bind method to
look at the values set on the recurring master for the recurring series you just created.

This example assumes that you have authenticated to an Exchange server and have
acquired an ExchangeService object named service. The method in this example
returns the item ID of the recurring series' recurring master.

C#

public static ItemId CreateARecurringMeeting(ExchangeService service)

{ Appointment recurrMeeting = new Appointment(service);

// Set the properties you need to create a meeting.

recurrMeeting.Subject = "Weekly Update Meeting";

recurrMeeting.Body = "Come hear about how the project is coming


along!";

recurrMeeting.Start = DateTime.Now.AddDays(1);

recurrMeeting.End = recurrMeeting.Start.AddHours(1);

recurrMeeting.Location = "Contoso Main Gallery";

recurrMeeting.RequiredAttendees.Add("[email protected]");

recurrMeeting.RequiredAttendees.Add("[email protected]");

recurrMeeting.RequiredAttendees.Add("[email protected]");
recurrMeeting.ReminderMinutesBeforeStart = 30;

DayOfTheWeek[] dow = new DayOfTheWeek[] {


(DayOfTheWeek)recurrMeeting.Start.DayOfWeek };

// The following are the recurrence-specific properties for the


meeting.

recurrMeeting.Recurrence = new
Recurrence.WeeklyPattern(recurrMeeting.Start.Date, 1, dow);

recurrMeeting.Recurrence.StartDate = recurrMeeting.Start.Date;

recurrMeeting.Recurrence.NumberOfOccurrences = 10;

// This method results in in a CreateItem call to EWS.

recurrMeeting.Save(SendInvitationsMode.SendToAllAndSaveCopy);

// Retrieve the meeting subject and the properties that are set on a
recurring master when a recurring series is created.

recurrMeeting = Appointment.Bind(service, recurrMeeting.Id, new


PropertySet(AppointmentSchema.Subject,

AppointmentSchema.AppointmentType,

AppointmentSchema.Recurrence,

AppointmentSchema.FirstOccurrence,

AppointmentSchema.LastOccurrence,

AppointmentSchema.ModifiedOccurrences,

AppointmentSchema.DeletedOccurrences));

// Print out the recurring master properties.

Console.WriteLine("\nAppointment created: " +


recurrMeeting.Subject);

Console.WriteLine("Appointment Type: {0}\n",


recurrMeeting.AppointmentType);

Console.WriteLine("These property values are always null unless the


item is a recurring master:\n");

Console.WriteLine("\tRecurrence pattern: {0}",


recurrMeeting.Recurrence.ToString());

Console.WriteLine("\tRecurring series start Date: {0}",


recurrMeeting.Recurrence.StartDate.ToString());

Console.WriteLine("\tRecurring series end Date: {0}",

recurrMeeting.Recurrence.EndDate == null ? "Null" :


recurrMeeting.Recurrence.EndDate.ToString());

Console.WriteLine("\tHas end: {0}",


recurrMeeting.Recurrence.HasEnd.ToString());

Console.WriteLine("\tNumber of occurrances: {0}",


recurrMeeting.Recurrence.NumberOfOccurrences);

Console.WriteLine("\tLast 24 characters of the first occurrence's


item ID:\t {0}",

recurrMeeting.FirstOccurrence.ItemId.ToString().Substring(144));

Console.WriteLine("\tLast 24 characters of the last occurrence's


item ID:\t {0}",

recurrMeeting.LastOccurrence.ItemId.ToString().Substring(144));

Console.WriteLine("\tModified Occurrences: {0}",

(recurrMeeting.ModifiedOccurrences == null ? "Null"


: recurrMeeting.ModifiedOccurrences.Count.ToString()));

Console.WriteLine("\tDeleted Occurrences: {0}",

recurrMeeting.DeletedOccurrences == null ? "Null" :


recurrMeeting.ModifiedOccurrences.Count.ToString());

// Return the ID of the recurring master.

return recurrMeeting.Id;

Create a recurring meeting by using EWS


The request and response XML in the following examples correspond to calls made to
create a recurring meeting by using the EWS Managed API. Note that other than setting
recurrence-specific values on the Recurrence element, the request is essentially the
same as one you would use to create a single-instance appointment. The following
example shows the request XML when you use the CreateItem operation to create a
meeting.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Name="(UTC-08:00) Pacific Time (US &amp;amp;
Canada)" Id="Pacific Standard Time">

<t:Periods>

<t:Period Bias="P0DT8H0M0.0S" Name="Standard" Id="Std" />

<t:Period Bias="P0DT7H0M0.0S" Name="Daylight" Id="Dlt/1" />

<t:Period Bias="P0DT7H0M0.0S" Name="Daylight" Id="Dlt/2007" />

</t:Periods>

<t:TransitionsGroups>

<t:TransitionsGroup Id="0">

<t:RecurringDayTransition>

<t:To Kind="Period">Dlt/1</t:To>

<t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>

<t:Month>4</t:Month>

<t:DayOfWeek>Sunday</t:DayOfWeek>

<t:Occurrence>1</t:Occurrence>

</t:RecurringDayTransition>

<t:RecurringDayTransition>

<t:To Kind="Period">Std</t:To>

<t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>

<t:Month>10</t:Month>

<t:DayOfWeek>Sunday</t:DayOfWeek>

<t:Occurrence>-1</t:Occurrence>

</t:RecurringDayTransition>

</t:TransitionsGroup>

<t:TransitionsGroup Id="1">

<t:RecurringDayTransition>

<t:To Kind="Period">Dlt/2007</t:To>

<t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>

<t:Month>3</t:Month>

<t:DayOfWeek>Sunday</t:DayOfWeek>

<t:Occurrence>2</t:Occurrence>

</t:RecurringDayTransition>

<t:RecurringDayTransition>

<t:To Kind="Period">Std</t:To>

<t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>

<t:Month>11</t:Month>

<t:DayOfWeek>Sunday</t:DayOfWeek>

<t:Occurrence>1</t:Occurrence>

</t:RecurringDayTransition>

</t:TransitionsGroup>

</t:TransitionsGroups>

<t:Transitions>

<t:Transition>

<t:To Kind="Group">0</t:To>

</t:Transition>

<t:AbsoluteDateTransition>

<t:To Kind="Group">1</t:To>

<t:DateTime>2007-01-01T08:00:00.000Z</t:DateTime>

</t:AbsoluteDateTransition>

</t:Transitions>

</t:TimeZoneDefinition>

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:CreateItem SendMeetingInvitations="SendToAllAndSaveCopy">

<m:Items>

<t:CalendarItem>

<t:Subject>Weekly Update Meeting</t:Subject>

<t:Body BodyType="HTML">Come hear about how the Organized


Observational Paradigm SkyNet project is coming along!</t:Body>

<t:ReminderMinutesBeforeStart>30</t:ReminderMinutesBeforeStart>

<t:Start>2014-03-08T13:21:32.868-08:00</t:Start>

<t:End>2014-03-08T14:21:32.868-08:00</t:End>

<t:Location>Contoso Main Gallery</t:Location>

<t:RequiredAttendees>

<t:Attendee>

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:Attendee>

<t:Attendee>

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:Attendee>

<t:Attendee>

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:Attendee>

</t:RequiredAttendees>

<t:Recurrence>

<t:WeeklyRecurrence>

<t:Interval>1</t:Interval>

<t:DaysOfWeek>Saturday</t:DaysOfWeek>

</t:WeeklyRecurrence>

<t:NumberedRecurrence>

<t:StartDate>2014-03-08-08:00</t:StartDate>

<t:NumberOfOccurrences>10</t:NumberOfOccurrences>

</t:NumberedRecurrence>

</t:Recurrence>

</t:CalendarItem>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The following example shows the response XML that is returned by the CreateItem
operation.

The ItemId and ChangeKey attributes are shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="893" MinorBuildNumber="10"

Version="V2_10"
xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:CreateItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkAD" ChangeKey="DwAAAB" />

</t:CalendarItem>

</m:Items>

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</m:CreateItemResponse>

</s:Body>

</s:Envelope>

The following example shows the request XML that is generated when you use the
GetItem operation and the ItemId for the series you created, and request properties
only set on a recurring master to confirm that the ItemId returned by the server when
creating a recurring series is for a recurring master.

The ItemId and ChangeKey attributes are shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:GetItem>

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

<t:FieldURI FieldURI="calendar:CalendarItemType" />

<t:FieldURI FieldURI="calendar:Recurrence" />

<t:FieldURI FieldURI="calendar:FirstOccurrence" />

<t:FieldURI FieldURI="calendar:LastOccurrence" />

<t:FieldURI FieldURI="calendar:ModifiedOccurrences" />

<t:FieldURI FieldURI="calendar:DeletedOccurrences" />

</t:AdditionalProperties>

</m:ItemShape>

<m:ItemIds>

<t:ItemId Id="AAMkAD" ChangeKey="DwAAAB" />

</m:ItemIds>

</m:GetItem>

</soap:Body>

</soap:Envelope>

The following example shows the response XML that is returned by the GetItem
operation.

The ItemId and ChangeKey attributes are shortened for readability.


XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="893" MinorBuildNumber="10"

Version="V2_10"
xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkAD" ChangeKey="DwAAAB" />

<t:Subject>Weekly Update Meeting</t:Subject>

<t:CalendarItemType>RecurringMaster</t:CalendarItemType>

<t:Recurrence>

<t:WeeklyRecurrence>

<t:Interval>1</t:Interval>

<t:DaysOfWeek>Saturday</t:DaysOfWeek>

</t:WeeklyRecurrence>

<t:NumberedRecurrence>

<t:StartDate>2014-03-08-08:00</t:StartDate>

<t:NumberOfOccurrences>10</t:NumberOfOccurrences>

</t:NumberedRecurrence>

</t:Recurrence>

<t:FirstOccurrence>

<t:ItemId Id="AAMkAD" ChangeKey="DwAAABY" />

<t:Start>2014-03-08T21:21:00Z</t:Start>

<t:End>2014-03-08T22:21:00Z</t:End>

<t:OriginalStart>2014-03-08T21:21:00Z</t:OriginalStart>

</t:FirstOccurrence>

<t:LastOccurrence>

<t:ItemId Id="AAMkAD" ChangeKey="DwAAABY" />

<t:Start>2014-05-10T20:21:00Z</t:Start>

<t:End>2014-05-10T21:21:00Z</t:End>

<t:OriginalStart>2014-05-10T20:21:00Z</t:OriginalStart>

</t:LastOccurrence>

</t:CalendarItem>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</m:GetItemResponse>

</s:Body>

</s:Envelope>

See also
Calendars and EWS in Exchange

Create appointments and meetings by using EWS in Exchange 2013

Recurrence patterns and EWS

Access a recurring series by using EWS in Exchange

Delete appointments in a recurring series by using EWS in Exchange

Update a recurring series by using EWS

Update a recurring series by using EWS in Exchange


Delete appointments in a recurring
series by using EWS in Exchange
Article • 02/11/2022 • 5 minutes to read

Learn how to delete appointments in a recurring series by using the EWS Managed API
or EWS in Exchange.

You can use the EWS Managed API or EWS to delete a series of appointments or
meetings, or just one instance in the series. The process you use to delete an entire
series is essentially the same as the process you use to delete just a single occurrence.
You use the same EWS Managed API methods or EWS operations that you use to delete
a single instance appointment or meeting. The difference is in the item ID that is
included in the method or operation. Let's start by looking at how both scenarios are
the same.

In order to delete a recurring series or a single occurrence in a recurring series, you need
to find the occurrence or series that you want to delete, and then call the appropriate
method or operation to remove it. While you can simply delete any type of
appointment, we recommend that you keep any attendees or the organizer up to date
and cancel meetings that the user has organized and decline meetings that the user did
not organize.

So how are the scenarios different? It's all about the Appointment object used to
invoke the method (for the EWS Managed API) or the item ID included in the operation
request (for EWS). To delete an entire series, you need the Appointment object or item
ID for the recurring master. To delete a single occurrence, you need the Appointment
object or item ID for the occurrence.

Delete a recurring appointment by using the


EWS Managed API
This example assumes that you have authenticated to an Exchange server and have
acquired an ExchangeService object named service. The recurringItem parameter is an
Appointment object for either the recurring master or a single occurrence. The
deleteEntireSeries parameter indicates whether to delete the entire series that the
recurringItem is a part of.

C#
public static bool DeleteRecurringItem(ExchangeService service, Appointment
recurringItem, bool deleteEntireSeries)

Appointment appointmentToDelete = null;

// If the item is a single appointment, fail.

if (recurringItem.AppointmentType == AppointmentType.Single)

Console.WriteLine("ERROR: The item to delete is not part of a


recurring series.");

return false;

// Check the Appointment that was passed. Is it

// an occurrence or the recurring master?

if (recurringItem.AppointmentType == AppointmentType.RecurringMaster)

if (!deleteEntireSeries)

// The item is the recurring master, so deleting it will delete

// the entire series. The caller indicated that the entire


series

// should not be deleted, so fail.

Console.WriteLine("ERROR: The item to delete is the recurring


master of the series. Deleting it will delete the entire series.");

return false;

else

appointmentToDelete = recurringItem;

else

if (deleteEntireSeries)

// The item passed is not the recurring master, but the caller

// wants to delete the entire series. Bind to the recurring

// master to delete it.

try

appointmentToDelete =
Appointment.BindToRecurringMaster(service, recurringItem.Id);

catch (Exception ex)

Console.WriteLine("ERROR: {0}", ex.Message);

return false;

else

// The item passed is not the recurring master, but the caller

// only wants to delete the occurrence, so just

// delete the passed item.

appointmentToDelete = recurringItem;

if (appointmentToDelete != null)

// Remove the item, depending on the scenario.

if (appointmentToDelete.IsMeeting)

CalendarActionResults results;

// If it's a meeting and the user is the organizer, cancel it.

// Determine this by testing the AppointmentState bitmask for

// the presence of the second bit. This bit indicates that the
appointment

// was received, which means that someone sent it to the user.


Therefore,

// they're not the organizer.

int isReceived = 2;

if ((appointmentToDelete.AppointmentState &amp; isReceived) ==


0)

results = appointmentToDelete.CancelMeeting("Cancelling this


meeting.");

return true;

// If it's a meeting and the user is not the organizer, decline


it.

else

results = appointmentToDelete.Decline(true);

return true;

else

// The item isn't a meeting, so just delete it.

appointmentToDelete.Delete(DeleteMode.MoveToDeletedItems);

return true;

return false;

In order to use this example, you need to bind to either an occurrence or the recurring
master, and pass the resulting Appointment object to the method. Keep in mind that if
you access appointments by using a CalendarView class, the resulting items are all
single occurrences. Conversely, if you use the ItemView class, the resulting items are
all recurring masters.

Delete a recurring appointment by using EWS


Deleting a recurring series by using EWS is the same as deleting a single-instance
meeting. In fact, the SOAP requests take the same format. Again, the key is the item ID
used in the request. If the item ID corresponds to the recurring master, the entire series
will be deleted. If the item ID corresponds to a single occurrence, only that occurrence
will be deleted.

7 Note

In the code examples that follow, the ItemId, ChangeKey, and RecurringMasterId
attributes are shortened for readability.

This example uses the CreateItem operation with a CancelCalendarItem element to


cancel a meeting for which the user is the organizer. The value of the ReferenceItemId
element indicates the item to cancel, and can be the item ID of a recurring master or a
single occurrence.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Eastern Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:CreateItem MessageDisposition="SendAndSaveCopy">

<m:Items>

<t:CancelCalendarItem>

<t:ReferenceItemId Id="AAMkADA5..." ChangeKey="DwAAABYA..." />

<t:NewBodyContent BodyType="HTML">Cancelling this meeting.


</t:NewBodyContent>

</t:CancelCalendarItem>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

This example uses the CreateItem operation with a DeclineItem element to decline a
meeting for which the user is not the organizer. As in the previous example, the value of
the ReferenceItemId element indicates the item to decline, and can be the item ID of a
recurring master or a single occurrence.
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Eastern Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:CreateItem MessageDisposition="SendAndSaveCopy">

<m:Items>

<t:DeclineItem>

<t:ReferenceItemId Id="AAMkADA6..." ChangeKey="DwAAABYA..." />

</t:DeclineItem>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

This example uses the DeleteItem operation to delete a single occurrence of an


appointment with no attendees. The occurrence to delete is specified by the
OccurrenceItemId element, which is constructed from the item ID of the recurring
master and the index of the occurrence.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Eastern Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:DeleteItem DeleteType="MoveToDeletedItems"
SendMeetingCancellations="SendToAllAndSaveCopy">

<m:ItemIds>

<t:OccurrenceItemId RecurringMasterId="AAMkADA8..."
InstanceIndex="3" />

</m:ItemIds>

</m:DeleteItem>

</soap:Body>

</soap:Envelope>

Note that you can get the same result by replacing the OccurrenceItemId element with
an ItemId element that contains the item ID of the occurrence, as shown.

XML

<m:ItemIds>

<t:ItemId Id="AAMkADA7..." ChangeKey="DwAAABYA..." />

</m:ItemIds>

See also
Recurrence patterns and EWS
Access a recurring series by using EWS in Exchange
Create a recurring series by using EWS in Exchange
Update a recurring series by using EWS
Update a recurring series by using EWS in Exchange
Calendars and EWS in Exchange
Create appointments and meetings by using EWS in Exchange 2013
Delete appointments and cancel meetings by using EWS in Exchange
Update a recurring series by using EWS
Article • 03/04/2022 • 4 minutes to read

Learn how to modify appointments in a recurring series by using the EWS Managed API
or EWS in Exchange.

You can use the EWS Managed API or EWS to update a recurring series by either
updating the entire series, or by updating a single occurrence. In this article we'll discuss
how to update a single occurrence.

Modifying a single appointment in a series is very similar to modifying a single instance


appointment. You use the same methods and operations, but you use the item ID of the
occurrence you want to change.

When you change a single occurrence in a series, that occurrence is added to an array of
modified appointments associated with the recurring master for the series. You can use
the Appointment.ModifiedOccurrences EWS Managed API property or the
ModifiedOccurrences EWS element to access all the appointments in a series that
have been modified.

Modify a single occurrence in a series by using


the EWS Managed API
1. Bind to the occurrence you want to modify by using either the
Appointment.BindToOccurrence method with the item's index value, or the
Appointment.Bind method with the occurrence's ID. You obtain this ID from
either the Id property of an Appointment object that corresponds to the
occurrence, or from the ItemId property of the OccurrenceInfo object that
corresponds to the occurrence.

2. Update the properties on the occurrence's Appointment object.

3. Save the changes to the occurrence's appointment object by using the


Appointment.Save method.

The following example updates an appointment in a recurring series and verifies that
the modified appointment is updated on the recurring master. This example assumes
that you have authenticated to an Exchange server and have acquired an
ExchangeService object named service. The recurrenceMasterId parameter is an
identifier associated with the recurring master for the occurrence to modify.
C#

public static ItemId ModifyARecurringSeries(ExchangeService service, ItemId


recurrenceMasterId)

Appointment calendarItem = Appointment.Bind(service, recurrenceMasterId,


new PropertySet(AppointmentSchema.AppointmentType));

Appointment recurrMaster = new Appointment(service);

if (calendarItem.AppointmentType == AppointmentType.RecurringMaster)

// Get the recurring master from an occurrence in a recurring series


with the properties you need.

recurrMaster = Appointment.Bind(service,

recurrenceMasterId,

new
PropertySet(AppointmentSchema.AppointmentType,

AppointmentSchema.Subject,

AppointmentSchema.FirstOccurrence,

AppointmentSchema.LastOccurrence,

AppointmentSchema.ModifiedOccurrences,

AppointmentSchema.DeletedOccurrences));

else

Console.WriteLine("Item id was not for a recurring master.");

return recurrenceMasterId;

// Bind to the second occurrence in the series with the properties to


modify.

Appointment occurrenceToModify = Appointment.BindToOccurrence(service,

recurrMaster.Id,

2,

new
PropertySet(AppointmentSchema.Location,

AppointmentSchema.Start,

AppointmentSchema.End,

AppointmentSchema.RequiredAttendees,

AppointmentSchema.Subject));

// Update the properties you want to change.

occurrenceToModify.Location = "Helipad of Contoso Bldg 1";

occurrenceToModify.Start = occurrenceToModify.Start.AddDays(1);

occurrenceToModify.End = occurrenceToModify.End.AddDays(1);

occurrenceToModify.RequiredAttendees.Add("Contoso CEO",
"sadie@contoso");

occurrenceToModify.RequiredAttendees.Add("Contoso Head of Research",


"[email protected]");

occurrenceToModify.RequiredAttendees.Add("Contoso Head of Security",


"[email protected]");

occurrenceToModify.Subject = occurrenceToModify.Subject.ToString() +
":Mandatory";

// Update the occurrence in your calendar folder and send meeting update
requests to attendees.

// This method call results in an UpdateItem request to EWS.

occurrenceToModify.Update(ConflictResolutionMode.AlwaysOverwrite,
SendInvitationsOrCancellationsMode.SendToAllAndSaveCopy);

// View updated and deleted occurrences on the recurring master prior to


retrieving updated information.

Console.WriteLine("Modified Occurrences prior to updating recurring


master: {0}",

(recurrMaster.ModifiedOccurrences == null ? "None" :


recurrMaster.ModifiedOccurrences.Count.ToString()));

// Update the recurring master to view the modified and deleted


occurrences.

recurrMaster = Appointment.Bind(service, recurrenceMasterId, new


PropertySet(AppointmentSchema.ModifiedOccurrences,

AppointmentSchema.DeletedOccurrences));

// View updated and deleted occurrences on the recurring master after


retrieving updated information.

Console.WriteLine("Modified Occurrences after updating recurring


master:\t {0}",

(recurrMaster.ModifiedOccurrences == null ? "None" :


recurrMaster.ModifiedOccurrences.Count.ToString()));

return recurrMaster.Id;

Modify a single occurrence in a series by using


EWS
Modifying a single instance in a series is essentially the same as modifying a single
instance appointment. You can specify the occurrence to change by using either an
ItemId or an OccurrenceItemId element.

The following example shows the request XML when you use the UpdateItem
operation to update an occurrence in a recurring series of appointments. The ItemId
and ChangeKey are shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:UpdateItem ConflictResolution="AlwaysOverwrite"
SendMeetingInvitationsOrCancellations="SendToAllAndSaveCopy">

<m:ItemChanges>

<t:ItemChange>

<t:ItemId Id="AAMkA" ChangeKey="DwAAAB" />

<t:Updates>

<t:SetItemField>

<t:FieldURI FieldURI="calendar:Location" />

<t:CalendarItem>

<t:Location>Helipad of Contoso Bldg 1</t:Location>

</t:CalendarItem>

</t:SetItemField>

<t:SetItemField>

<t:FieldURI FieldURI="calendar:Start" />

<t:CalendarItem>

<t:Start>2014-03-27T19:33:00.000-07:00</t:Start>

</t:CalendarItem>

</t:SetItemField>

<t:SetItemField>

<t:FieldURI FieldURI="calendar:End" />

<t:CalendarItem>

<t:End>2014-03-27T20:33:00.000-07:00</t:End>

</t:CalendarItem>

</t:SetItemField>

<t:SetItemField>

<t:FieldURI FieldURI="calendar:RequiredAttendees" />

<t:CalendarItem>

<t:RequiredAttendees>

<t:Attendee>

<t:Mailbox>

<t:Name>[email protected]</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Mailbox>

</t:Attendee>

<t:Attendee>

<t:Mailbox>

<t:Name>[email protected]</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Mailbox>

</t:Attendee>

<t:Attendee>

<t:Mailbox>

<t:Name>[email protected]</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Mailbox>

</t:Attendee>

<t:Attendee>

<t:Mailbox>

<t:Name>Contoso CEO</t:Name>

<t:EmailAddress>sadie@contoso</t:EmailAddress>

</t:Mailbox>

</t:Attendee>

<t:Attendee>

<t:Mailbox>

<t:Name>Contoso Head of Research</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:Attendee>

<t:Attendee>

<t:Mailbox>

<t:Name>Contoso Head of Security</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:Attendee>

</t:RequiredAttendees>

</t:CalendarItem>

</t:SetItemField>

<t:SetItemField>

<t:FieldURI FieldURI="item:Subject" />

<t:CalendarItem>

<t:Subject>Weekly Update Meeting:Mandatory</t:Subject>

</t:CalendarItem>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

</m:ItemChanges>

</m:UpdateItem>

</soap:Body>

</soap:Envelope>

The server responds to the UpdateItem request with an UpdateItemResponse


message that includes a ResponseCode value of NoError, which indicates that the
occurrence was updated successfully, and the ItemId of the updated appointment.

See also
Calendars and EWS in Exchange

Update appointments and meetings by using EWS in Exchange

Recurrence patterns and EWS

Access a recurring series by using EWS in Exchange


Create a recurring series by using EWS in Exchange

Delete appointments in a recurring series by using EWS in Exchange

Update a recurring series by using EWS in Exchange


Update a recurring series by using EWS
in Exchange
Article • 02/11/2022 • 4 minutes to read

Learn how to update an entire recurring series at once by using the EWS Managed API
or EWS in Exchange.

You can use the EWS Managed API or EWS to update a recurring series by either
updating the entire series, or by updating a single occurrence. In this article we'll discuss
how to update the entire series at once.

In general, updating a recurring series is very similar to modifying a single appointment.


You use the same methods and operations, but you use the item ID of the series'
recurring master. In some cases you might not start with the recurring master, and you
might need to find the item ID for the recurring master.

However, there is one key difference to consider when updating a recurring series:
updating the recurrence pattern. Updating the recurrence pattern is only possible with
the recurring master, and changes to the pattern can add or remove occurrences. For
example, if you modify the Recurrence.EndDate property to a date later than its
current value, the recurrence pattern is reevaluated, and additional occurrences might
be added.

Modify all occurrences in a series by using the


EWS Managed API
To modify all occurrences in a series you:

1. Bind to the recurring master for the series by using the


Appointment.BindToRecurringMaster or Appointment.Bind method on a
recurring master.
2. Update the properties on the recurring master Appointment object.
3. Save the changes to the recurring master by using the Appointment.Save
method.

The following example updates a recurring series to change the location, add an
attendee, and modify the recurrence pattern. This example assumes that the
ExchangeService object passed in the service parameter has been initialized with valid
values in the Credentials and Url properties. The recurringAppointment parameter is
an Appointment object bound to either an occurrence or the recurring master for the
series to be updated.

C#

using Microsoft.Exchange.WebServices.Data;

public static bool UpdateRecurringSeries(ExchangeService service,


Appointment recurringAppointment)
{

Appointment recurringMaster = null;

// If the item is a single appointment, fail.

if (recurringAppointment.AppointmentType == AppointmentType.Single)

Console.WriteLine("ERROR: The item to delete is not part of a


recurring series.");

return false;

// Check the Appointment that was passed. Is it

// an occurrence or the recurring master?

if (recurringAppointment.AppointmentType !=
AppointmentType.RecurringMaster)

// If an occurrence was passed in, bind to the master.

try

// This method results in a call to EWS.

recurringMaster = Appointment.BindToRecurringMaster(service,
recurringAppointment.Id);

catch (Exception ex)

Console.WriteLine("Couldn't bind to master: {0}", ex.Message);

return false;

else

// Bind to the appointment to load all properties.

// This method results in a call to EWS.

recurringMaster = Appointment.Bind(service,
recurringAppointment.Id);

// Basic updates. These kinds of updates are the same

// as if you were updating a single appointment.

// Update the location. All occurrences will update to this new


location.

recurringMaster.Location = "Conference Room 2";

// Add an attendee.

Attendee newAttendee = new Attendee("[email protected]");

recurringMaster.RequiredAttendees.Add(newAttendee);

// Changes to the recurrence. This is only applicable to a recurring

// master.

// If the series has an end date, extend the series to add two more
occurrences.

if (recurringMaster.Recurrence.HasEnd)

// NumberOfOccurrences is only set if the user created the

// appointment with a set number of occurrences.

// Otherwise, there's a start and end date.

if (recurringMaster.Recurrence.NumberOfOccurrences != null)

recurringMaster.Recurrence.NumberOfOccurrences += 2;

else

// This is a bit more complicated if you want to add two more

// occurrences. You need to calculate a new end date.

Type recurrenceType = recurringMaster.Recurrence.GetType();

switch (recurrenceType.Name)

case "DailyPattern":

recurringMaster.Recurrence.EndDate =

recurringMaster.Recurrence.EndDate.Value.AddDays(2);

break;

case "WeeklyPattern":

recurringMaster.Recurrence.EndDate =

recurringMaster.Recurrence.EndDate.Value.AddDays(14);

break;

case "YearlyPattern":

recurringMaster.Recurrence.EndDate =

recurringMaster.Recurrence.EndDate.Value.AddYears(2);

break;

default:

// Do nothing here. There are other recurrence


// types but for simplicity, these aren't covered.

break;

else

// If it has no end, set an end date to 2 weeks from today.

recurringMaster.Recurrence.EndDate = DateTime.Now.AddDays(14);

// Update the series.

try

// This method results in a call to EWS.

recurringMaster.Update(ConflictResolutionMode.AutoResolve);

catch (Exception ex)

Console.WriteLine("Error updating series: {0}", ex.Message);

return false;

return true;

Modify all occurrences in a series by using EWS


To modify all occurrences in a series, you need to use the UpdateItem operation with
the item ID of the recurring master in the ItemId element in the request. The structure
of the request is the same as a request to update a single appointment.

The following example updates the recurring series in the following ways:

Updates the location of the series by setting the Location element.


Updates the attendees by setting the RequiredAttendees element.
Updates the recurrence by setting the Recurrence (RecurrenceType) element.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Eastern Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:UpdateItem MessageDisposition="SaveOnly"
ConflictResolution="AutoResolve"
SendMeetingInvitationsOrCancellations="SendToAllAndSaveCopy">

<m:ItemChanges>

<t:ItemChange>

<t:ItemId Id="AAMkADA5..." ChangeKey="DwAAABYA..." />

<t:Updates>

<t:SetItemField>

<t:FieldURI FieldURI="calendar:Location" />

<t:CalendarItem>

<t:Location>Conference Room 2</t:Location>

</t:CalendarItem>

</t:SetItemField>

<t:SetItemField>

<t:FieldURI FieldURI="calendar:RequiredAttendees" />

<t:CalendarItem>

<t:RequiredAttendees>

<t:Attendee>

<t:Mailbox>

<t:Name>Mack Chaves</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Mailbox>

</t:Attendee>

<t:Attendee>

<t:Mailbox>

<t:Name>Sadie Daniels</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Mailbox>

</t:Attendee>

</t:RequiredAttendees>

</t:CalendarItem>

</t:SetItemField>

<t:SetItemField>

<t:FieldURI FieldURI="calendar:Recurrence" />

<t:CalendarItem>

<t:Recurrence>

<t:WeeklyRecurrence>

<t:Interval>1</t:Interval>

<t:DaysOfWeek>Tuesday</t:DaysOfWeek>

</t:WeeklyRecurrence>

<t:EndDateRecurrence>

<t:StartDate>2014-05-06</t:StartDate>

<t:EndDate>2014-06-22-04:00</t:EndDate>

</t:EndDateRecurrence>

</t:Recurrence>

</t:CalendarItem>

</t:SetItemField>

<t:SetItemField>

<t:FieldURI FieldURI="calendar:MeetingTimeZone" />

<t:CalendarItem>

<t:MeetingTimeZone TimeZoneName="Pacific Standard Time" />

</t:CalendarItem>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

</m:ItemChanges>

</m:UpdateItem>

</soap:Body>

</soap:Envelope>

The server responds with an UpdateItemResponse element that includes a


ResponseCode element with a value of NoError, which indicates that the update was
successful.

See also
Calendars and EWS in Exchange
Recurrence patterns and EWS
Update appointments and meetings by using EWS in Exchange
Update a recurring series by using EWS
Access a recurring series by using EWS in Exchange
Delegate access and EWS in Exchange
Article • 06/14/2022 • 9 minutes to read

Find out how to use the EWS Managed API and EWS in Exchange to provide delegate
access to users' mailboxes.

You can enable users to access other users' mailboxes in one of three ways:

By adding delegates and specifying permissions for each delegate.

By modifying folder permissions directly.

By using impersonation.

Delegation and folder permissions are best when you're only granting access to a few
users, because you have to add permissions individually to each mailbox. Impersonation
is the best choice when you're dealing with quantities of mailboxes, because you can
easily enable one service account to access every mailbox in a database. Figure 1 shows
some of the differences between each type of access.

Figure 1. Ways to access other users' mailboxes


When it comes to sending mail or scheduling meetings, delegates can be given "send
on behalf of" permissions, so the recipient of an email or a meeting request that was
sent by a delegate will see " delegate on behalf of mailbox owner " when they receive the
email or meeting request in Outlook. Including the "send on behalf of" text is a client
implementation detail - and can be created by using the "from" and "sender" values.
The "from" value indicates the mailbox owner, and the "sender" value indicates the
delegate that sent the mail. If a service account impersonating a user sends an email or
schedules a meeting for the mailbox owner, the message is "sent as" the mailbox owner.
There is no way for the recipient to know the mail was sent by the service account. Users
who are granted folder permissions and not delegate access are not able to "send as" or
"send on behalf of" of a mailbox owner. They have access to the mailbox folders, and
might be able to create items in the folders, but they cannot send the items.

When is it appropriate to modify folder permissions directly? Generally, when you want
to provide a user access to a folder, but do not want to grant the user "send on behalf
of" permissions, when your permissions requirements do not map to the
DelegateFolderPermissionLevel EWS Managed API enumeration values or the
PermissionLevel EWS element values, or when you want to provide a user access to a
single custom folder.

If you only need to modify folder permissions to achieve your goal, and do not need to
add a delegate (that is, you don't need "send on behalf of" permissions), see Set folder
permissions for another user by using EWS in Exchange.

Note that you can also use Outlook or the Exchange Server PowerShell (Exchange
Management Shell) to set up delegate access.

How does delegate access work?


Delegate access enables users to access some or all of the mailbox owner's folders and
act on behalf of the mailbox owner. The mailbox owner can be a user, or a resource, like
a conference room. For example, a receptionist can be granted delegate permissions to
a conference room's calendar folder, to handle booking requests. You can use the EWS
Managed API or EWS to enable the mailbox owner or an administrator to add a
delegate, specify what folders the delegate can access, and then specify permissions for
that folder. Delegates can be granted access to the following folders:

Calendar

Tasks

Inbox
Contacts

Notes

Journal

When a user has delegate access to one or more of these folders, they can create, get,
update, delete, copy, and search for items in that folder and any child folders,
depending on the permissions set on the folder. The way in which the application
performs these actions depends on whether explicit or implicit access is required.

Delegate permissions
When an administrator or mailbox owner adds a delegate to a mailbox, they can also set
the permission level for one or more folders. If a permission level is not set for a folder,
the permission value defaults to None. Multiple users can have the same permission
level on a folder, and users can have different permission levels for different folders. If
you're using the EWS Managed API, you use the DelegateUser.Permissions property,
which contains one of the DelegateFolderPermissionLevel enumeration values for
each folder, to set delegate permissions on folders. If you're using EWS, you use the
DelegatePermissions element to set delegate permissions, and the PermissionLevel
element to define the permission level.

Table 2. Delegate permission levels

Permission Description
level

None This is the default value for all folders.

Author A delegate can read and create items, and modify and delete items they create. For
example, a delegate can create task requests and meeting requests directly in the
mailbox owner's Task or Calendar folder, and then send either item on the mailbox
owner's behalf.

Editor A delegate can do everything an Author can do, and also modify and delete the
items the mailbox owner created.

Reviewer A delegate can read items; for example a delegate with Reviewer permission can
read messages in another person's Inbox.

Custom The mailbox owner has granted a custom set of permissions to the delegate.

The DelgateUser.ViewPrivateItems EWS Managed API property and the


ViewPrivateItems EWS element is a global setting that affects all the mailbox owner's
folders, including all Mail, Contacts, Calendar, Tasks, Notes, and Journal folders. You
cannot allow access to private items in only one folder.

Explicit access
Simply put, explicit access is the entry way for delegates to perform actions on a
mailbox owner's folders or items. Explicit access is granted to a delegate when they
include the well-known folder name for a mailbox owner's folder along with the mailbox
owner's SMTP address in a request to the server. The access is explicit because the
delegate's request explicitly states that the context for the method or operation is the
mailbox owner's mailbox, and not the delegate's mailbox.

Explicit access defines the context for all methods or operations performed on the
folders or items moving forward. All item and folder IDs returned when the explicit
access is set uniquely identify themselves as belonging to the mailbox owner (although
not in any human readable format). This way, the application doesn't need to specify the
mailbox owner's SMTP address again and again; the context is hidden in the identifiers.
After an item or folder is identified, a delegate actually uses implicit access to modify the
item. The following figure shows the process of getting explicit and implicit access.

Figure 2. Requesting explicit and implicit access to an item or folder

You can set explicit access in many different scenarios. Essentially, any time you're
sending a folder ID in a method or operation, you can set explicit access. This can
include finding folders, finding appointments, getting items, finding conversations, and
so on.

Explicit access and the EWS Managed API


You can initiate explicit delegate access by using any of the following overloaded
methods that take a FolderId input parameter to identify the target folder:
Folder.Bind

ExchangeService.FindItems

ExchangeService.FindAppointments

ExchangeService.FindFolders

And more!

You can use the FolderId parameter in each of these methods to identify the mailbox
owner's target folder, as follows.

C#

new FolderId(WellKnownFolderName.Calendar, "[email protected]");

For example, to bind to the Calendar folder, the FolderId in this Bind method specifies
the well-known folder name, and the mailbox owner's SMTP address.

C#

CalendarFolder calendar = CalendarFolder.Bind(service, new


FolderId(WellKnownFolderName.Calendar, "[email protected]"), new
PropertySet());

By specifying the well-known folder name and the SMTP address, the delegate can bind
to the mailbox owner's Calendar folder — thereby gaining explicit access to the folder.
All subsequent requests for implicit access to items in the folder then rely on the context
returned in the item IDs and folder IDs. Essentially, the identifiers contain the context for
the implied delegate access calls. Or, to retrieve the item ID of an item that meets
specific criteria, use the following.

C#

FindItemsResults<Item> results = service.FindItems(new


FolderId(WellKnownFolderName.Calendar, "[email protected]"), filter,
view);

In this case the item ID is returned, and then the delegate can then use implicit access to
make changes to the item by using the item ID.

You don't have to initiate explicit access again until you require an item ID or a folder ID
that you didn't access via the existing explicit access.
Explicit access and EWS
You can initiate explicit access by using the GetFolder , FindItem , or FindFolder
operations. These operations provide the option to use the DistinguishedFolderId
element to identify the target folder. The DistinguishedFolderId element has a single
optional child element, the Mailbox element. The Mailbox element, when used as a
child of the DistinguishedFolderId element, specifies the mailbox for the delegate to
access. If the calling user has permission to access the mailbox owner's folder, the
response will contain a collection of identifiers to items or folders in that mailbox. The
item and folder identifiers that are returned in the response can be used for implicit
delegate access.

Implicit access
Implicit access is used after a delegate has retrieved the ID for an item or folder in the
mailbox owner's mailbox and the delegate wants to update, delete, or copy the item.
When the delegate uses that item or folder ID in a request, the changes are made to the
item in the mailbox owner's mailbox. The delegate does not have to include the mailbox
owner's SMTP address.

For example, when a delegate has the ID of one of the mailbox owner's folders, the
delegate can perform a FindItem operation on that folder by using the folder ID,
without explicitly identifying the mailbox owner's mailbox. At that point, the delegate
can perform actions on the mailbox owner's folder by using the IDs that are returned in
the responses.

Implicit access and the EWS Managed API


If an item ID was retrieved by the FindItems method, that item ID can be used in a
subsequent Item.Bind method call to bind to the item. You can then call the
Item.Update , Item.Delete , or Item.Copy method — or any method call that
requires an item ID — as needed to complete your task. As long as the delegate has
appropriate permissions to the folder that contains the item (and, if applicable, the
folder the item is moving to), the delegate can make changes according to their
permission levels.

Implicit access and EWS


If an item ID was retrieved by the FindItem operation, that item ID can be used in
subsequent GetItem operations to bind to the item. You can then call the
UpdateItem , DeleteItem, or CopyItem operation — or any operation that requires
an item ID — as needed to complete your task. As long as the delegate has appropriate
permissions to the folder that contains the item (and, if applicable, the folder the item is
moving to), the delegate can make changes according to their permission levels.

In this section
Add and remove delegates by using EWS in Exchange

Access a calendar as a delegate by using EWS in Exchange

Access contacts as a delegate by using EWS in Exchange

Access email as a delegate by using EWS in Exchange

Set folder permissions for another user by using EWS in Exchange

Handling delegation-related errors in EWS in Exchange

See also
Develop web service clients for Exchange

Allow someone else to manage your mail and calendar

Add- MailboxPermission
Add and remove delegates by using
EWS in Exchange
Article • 09/15/2021 • 6 minutes to read

Learn how to add delegates to or remove delegates from users' mailboxes by using the
EWS Managed API or EWS in Exchange.

You can use the EWS Managed API or EWS to enable delegates to act on behalf of a
mailbox owner or remove a delegate's access to a mailbox. Users who are added as a
delegate, and are given permissions, can perform tasks on behalf of the mailbox owner.
For example, they can create and send meeting invitations, send emails, and respond to
meeting requests on the mailbox owner's behalf.

Table 1. EWS Managed API methods and EWS operations for adding and removing
delegates

Task EWS Managed API method EWS operation

Add delegates ExchangeService.AddDelegates


AddDelegate

Remove delegates ExchangeService.RemoveDelegates


RemoveDelegate

After a delegate is granted permissions to a folder, they can act on items in the folder
and any subfolders, according to their delegate permissions. Permissions for delegates
only apply to subfolders that are created after the delegate access was granted. To
update folder permissions for pre-existing folders, or other folders, see Set folder
permissions for another user by using EWS in Exchange.

Note that delegates can only be added to mailbox-enabled accounts, including mail-
enabled security groups. By default, a single EWS delegate access call can access a
maximum of 255 different mailboxes.

Add delegates by using the EWS Managed API


You can add delegates to a mailbox by using the AddDelegates EWS Managed API
method. In this example, a new calendar, contact, and email DelegateUser object is
created, and each delegate is given Editor permissions for their respective folder. You
can modify the example to add a delegate to any of the folders specified by the
DelegatePermissions properties , and you can set the permissions to any of the values
specified by the DelegateFolderPermissionLevel enumeration.
This example assumes that service is a valid ExchangeService object for the mailbox
owner, and that the user has been authenticated to an Exchange server.

C#

public static Collection<DelegateUserResponse> AddDelegates(ExchangeService


service)

// Create a list to hold the new delegates to add.

List<DelegateUser> newDelegates = new


System.Collections.Generic.List<DelegateUser>();

// Create a new delegate that has editor access to the mailbox owner's
Calendar folder.

DelegateUser calendarDelegate = new


DelegateUser("[email protected]");

calendarDelegate.Permissions.CalendarFolderPermissionLevel =
DelegateFolderPermissionLevel.Editor;

// Add the delegate to the list of new delegates.

newDelegates.Add(calendarDelegate);

// Create a new delegate that has editor access to the mailbox owner's
Contacts folder.

DelegateUser contactDelegate = new


DelegateUser("[email protected]");

contactDelegate.Permissions.ContactsFolderPermissionLevel =
DelegateFolderPermissionLevel.Editor;

// Add the delegate to the list of new delegates.

newDelegates.Add(contactDelegate);

// Create a new delegate that has editor access to the mailbox owner's
Inbox folder.

DelegateUser emailDelegate = new


DelegateUser("[email protected]");

emailDelegate.Permissions.InboxFolderPermissionLevel =
DelegateFolderPermissionLevel.Editor;

// Add the delegate to the list of new delegates.

newDelegates.Add(emailDelegate);

// Create a mailbox object that represents the mailbox owner.

Mailbox mailbox = new Mailbox("[email protected]");

// Call the AddDelegates method to add the delegates to the target


mailbox.

Collection<DelegateUserResponse> response =
service.AddDelegates(mailbox,
MeetingRequestsDeliveryScope.DelegatesAndSendInformationToMe, newDelegates);

foreach (DelegateUserResponse resp in response)

// Print out the result and the last eight characters of the item
ID.

Console.WriteLine("For delegate " +


resp.DelegateUser.UserId.PrimarySmtpAddress.ToString());

Console.WriteLine("Result: {0}", resp.Result);

Console.WriteLine("Error Code: {0}", resp.ErrorCode);

Console.WriteLine("ErrorMessage: {0}\r\n", resp.ErrorMessage);

Console.WriteLine("\r\n");

return response;

Add delegates by using EWS


The following code example shows how to add separate calendar, contact, and email
delegates by using the AddDelegate EWS operation. The mailbox to modify is
specified by the Mailbox element, and the permission settings for each delegate are
contained in the DelegateUser element. Each of the delegates has been granted
Editor permissions to their target folder.

This is also the XML request that the EWS Managed API sends when you use the
AddDelegates method to add delegates.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:AddDelegate>

<m:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</m:Mailbox>

<m:DelegateUsers>
<t:DelegateUser>

<t:UserId>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

</t:UserId>

<t:DelegatePermissions>

<t:CalendarFolderPermissionLevel>Editor</t:CalendarFolderPermissionLevel>

<t:TasksFolderPermissionLevel>None</t:TasksFolderPermissionLevel>

<t:InboxFolderPermissionLevel>None</t:InboxFolderPermissionLevel>

<t:ContactsFolderPermissionLevel>None</t:ContactsFolderPermissionLevel>

<t:NotesFolderPermissionLevel>None</t:NotesFolderPermissionLevel>

<t:JournalFolderPermissionLevel>None</t:JournalFolderPermissionLevel>

</t:DelegatePermissions>

<t:ReceiveCopiesOfMeetingMessages>false</t:ReceiveCopiesOfMeetingMessages>

<t:ViewPrivateItems>false</t:ViewPrivateItems>
</t:DelegateUser>

<t:DelegateUser>

<t:UserId>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

</t:UserId>

<t:DelegatePermissions>

<t:CalendarFolderPermissionLevel>None</t:CalendarFolderPermissionLevel>

<t:TasksFolderPermissionLevel>None</t:TasksFolderPermissionLevel>

<t:InboxFolderPermissionLevel>None</t:InboxFolderPermissionLevel>

<t:ContactsFolderPermissionLevel>Editor</t:ContactsFolderPermissionLevel>

<t:NotesFolderPermissionLevel>None</t:NotesFolderPermissionLevel>

<t:JournalFolderPermissionLevel>None</t:JournalFolderPermissionLevel>

</t:DelegatePermissions>

<t:ReceiveCopiesOfMeetingMessages>false</t:ReceiveCopiesOfMeetingMessages>

<t:ViewPrivateItems>false</t:ViewPrivateItems>
</t:DelegateUser>

<t:DelegateUser>

<t:UserId>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

</t:UserId>

<t:DelegatePermissions>

<t:CalendarFolderPermissionLevel>None</t:CalendarFolderPermissionLevel>

<t:TasksFolderPermissionLevel>None</t:TasksFolderPermissionLevel>

<t:InboxFolderPermissionLevel>Editor</t:InboxFolderPermissionLevel>

<t:ContactsFolderPermissionLevel>None</t:ContactsFolderPermissionLevel>

<t:NotesFolderPermissionLevel>None</t:NotesFolderPermissionLevel>

<t:JournalFolderPermissionLevel>None</t:JournalFolderPermissionLevel>

</t:DelegatePermissions>

<t:ReceiveCopiesOfMeetingMessages>false</t:ReceiveCopiesOfMeetingMessages>

<t:ViewPrivateItems>false</t:ViewPrivateItems>
</t:DelegateUser>

</m:DelegateUsers>

<m:DeliverMeetingRequests>DelegatesAndSendInformationToMe</m:DeliverMeetingR
equests>

</m:AddDelegate>

</soap:Body>

</soap:Envelope>

The server responds to the AddDelegate request with an AddDelegateResponse


message that includes a ResponseCode element value of NoError, which indicates
that the delegates were successfully created.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="888"

MinorBuildNumber="9"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:AddDelegateResponse ResponseClass="Success"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseCode>NoError</m:ResponseCode>
<m:ResponseMessages>

<m:DelegateUserResponseMessageType ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:DelegateUser>

<t:UserId>

<t:SID>S-1-5-21-1337771579-694202782-848329751-1535221</t:SID>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

<t:DisplayName>calendardelegate</t:DisplayName>

</t:UserId>

<t:ReceiveCopiesOfMeetingMessages>false</t:ReceiveCopiesOfMeetingMessages>

<t:ViewPrivateItems>false</t:ViewPrivateItems>

</m:DelegateUser>

</m:DelegateUserResponseMessageType>

<m:DelegateUserResponseMessageType ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:DelegateUser>

<t:UserId>

<t:SID>S-1-5-21-1337771579-694202782-848329751-1535264</t:SID>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

<t:DisplayName>contactdelegate</t:DisplayName>

</t:UserId>

<t:ReceiveCopiesOfMeetingMessages>false</t:ReceiveCopiesOfMeetingMessages>

<t:ViewPrivateItems>false</t:ViewPrivateItems>

</m:DelegateUser>

</m:DelegateUserResponseMessageType>

<m:DelegateUserResponseMessageType ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:DelegateUser>

<t:UserId>

<t:SID>S-1-5-21-1337771579-694202782-848329751-1535223</t:SID>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

<t:DisplayName>emaildelegate</t:DisplayName>

</t:UserId>

<t:ReceiveCopiesOfMeetingMessages>false</t:ReceiveCopiesOfMeetingMessages>

<t:ViewPrivateItems>false</t:ViewPrivateItems>

</m:DelegateUser>

</m:DelegateUserResponseMessageType>

</m:ResponseMessages>

</m:AddDelegateResponse>

</s:Body>

</s:Envelope>

Remove delegates by using the EWS Managed


API
You can remove delegates from a target mailbox by using the
ExchangeService.RemoveDelegates EWS Managed API method. In this example, the
delegate permissions set in the add a delegate example are removed.

This example assumes that service is a valid ExchangeService object for the mailbox
owner, and that the user has been authenticated to an Exchange server.

C#

public static Collection<DelegateUserResponse>


RemoveDelegates(ExchangeService service)

// Create a list to hold the delegates to delete.

List<UserId> deletedDelegates = new


System.Collections.Generic.List<UserId>();

// Add the delegate to the list of new delegates.

deletedDelegates.Add("[email protected]");

// Add the delegate to the list of new delegates.

deletedDelegates.Add("[email protected]");

// Add the delegate to the list of new delegates.

deletedDelegates.Add("[email protected]");

// Create a mailbox object that represents the mailbox owner.

Mailbox mailbox = new Mailbox("[email protected]");

// Call the AddDelegates method to add the delegates to the target


mailbox.

Collection<DelegateUserResponse> response =
service.RemoveDelegates(mailbox, deletedDelegates);

foreach (DelegateUserResponse resp in response)

// Print out the result and the last eight characters of the item
ID.

Console.WriteLine("Result: {0}", resp.Result);

Console.WriteLine("Error Code: {0}", resp.ErrorCode);

Console.WriteLine("ErrorMessage: {0}\r\n", resp.ErrorMessage);

return response;

Remove delegates by using EWS


You can remove delegates from a mailbox by using the RemoveDelegate EWS
operation. In this example, the delegate permissions set in the add a delegate example
are removed.

This is also the XML request that the EWS Managed API sends when you use the
RemoveDelegates method to remove delegates.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:RemoveDelegate>

<m:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</m:Mailbox>

<m:UserIds>

<t:UserId>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

</t:UserId>

<t:UserId>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

</t:UserId>

<t:UserId>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

</t:UserId>

</m:UserIds>

</m:RemoveDelegate>

</soap:Body>

</soap:Envelope>

The server responds to the RemoveDelegate request with a AddDelegateResponse


message that includes a ResponseCode element value of NoError, which indicates
that the delegates were successfully removed.

Next steps
After you add delegates to calendar, email, and task folders, the delegate can access the
items in the folders. To learn more, see the following articles:

Access email as a delegate by using EWS in Exchange

Access a calendar as a delegate by using EWS in Exchange

Access contacts as a delegate by using EWS in Exchange

If the folders for which you added delegates include child folders that were created
before you granted the delegate access, the delegate will not be able to access those
folders without additional permissions. To add these permissions, or modify permissions
for any other folders, see Set folder permissions for another user by using EWS in
Exchange.

See also
Delegate access and EWS in Exchange
Exchange 2013: Add delegate users to an email account programmatically
Exchange 2013: Update delegates associated with email accounts
programmatically
Exchange 2013: Remove delegates associated with email accounts
programmatically
Access a calendar as a delegate by using
EWS in Exchange
Article • 03/15/2022 • 9 minutes to read

Learn how to access a calendar as a delegate by using the EWS Managed API or EWS in
Exchange.

You can use the EWS Managed API or EWS to give a user delegate access to a mailbox
owner's Calendar folder. The delegate can then create meeting requests on behalf of the
mailbox owner, create appointments, respond to meeting requests, and retrieve, update,
and delete meetings from the mailbox owner's Calendar folder, depending on their
permissions.

As a delegate, you use the same methods and operations to access a mailbox owner's
Calendar folder that you use to access your own Calendar folder. The main difference is
that you have to use explicit access to find or create a calendar item or calendar
subfolder, and then after you identify the item ID or folder ID, you can use implicit
access to get, update, or delete the item.

Table 1. EWS Managed API methods and EWS operations for accessing a calendar as a
delegate

If you want to… Use this EWS Managed API method… Use this EWS operation…

Create a meeting Appointment.Save where the CreateItem where the


or appointment as FolderId parameter provides explicit Mailbox element specifies
a delegate access to the mailbox owner's Calendar the EmailAddress of the
folder mailbox owner

Create multiple ExchangeService.CreateItems where the CreateItem where the


meetings or FolderId parameter provides explicit Mailbox element specifies
appointments as a access to the mailbox owner's Calendar the EmailAddress of the
delegate folder mailbox owner

Search for or find ExchangeService.FindItems where the FindItem where the


an appointment or FolderId parameter provides explicit Mailbox element specifies
meeting as a access to the mailbox owner's Calendar the EmailAddress of the
delegate folder mailbox owner

Get an Appointment.Bind
GetItem

appointment or
meeting as a
delegate
If you want to… Use this EWS Managed API method… Use this EWS operation…

Update an Appointment.Bind followed by GetItem followed by


appointment or Appointment.Update
UpdateItem

meeting as a
delegate

Delete an Appointment.Bind followed by GetItem followed by


appointment or Appointment.Delete
DeleteItem

meeting as a
delegate

7 Note

In the code examples in this article, [email protected] is the mailbox owner.

Prerequisite tasks
Before a user can access a mailbox owner's Calendar folder as a delegate, the user must
be added as a delegate with permissions to the mailbox owner's Calendar folder.

A delegate must have a mailbox attached to their account to update the calendar of a
mailbox owner.

If a delegate needs to work with meeting requests and responses only, you can add the
delegate to the Calendar folder, and use the default
MeetingRequestsDeliveryScope.DelegatesAndSendInformationToMe EWS Managed
API enumeration value or the DeliverMeetingRequests EWS element value of
DelegatesAndSendInformationToMe to send the requests to the delegate and
informational messages to the mailbox owner. The delegate then does not need to be
given access to the mailbox owner's Inbox folder.

Create a meeting or appointment as a delegate


by using the EWS Managed API
The EWS Managed API enables you to use the service object for the delegate user to
create calendar items for the mailbox owner. This example shows how to use the Save
method to create a meeting and send meeting requests to the attendees.

This example assumes that service is a valid ExchangeService object for the delegate
and that the delegate has been granted the appropriate permissions for the mailbox
owner's Calendar folder.

C#

private static void DelegateAccessCreateMeeting(ExchangeService service)

Appointment meeting = new Appointment(service);

// Set the properties on the meeting object to create the meeting.

meeting.Subject = "Team building exercise";

meeting.Body = "Let's learn to really work as a team and then have


lunch!";

meeting.Start = DateTime.Now.AddDays(2);

meeting.End = meeting.Start.AddHours(4);

meeting.Location = "Conference Room 12";

meeting.RequiredAttendees.Add("[email protected]");

meeting.ReminderMinutesBeforeStart = 60;

// Save the meeting to the Calendar folder for

// the mailbox owner and send the meeting request.

// This method call results in a CreateItem call to EWS.

meeting.Save(new FolderId(WellKnownFolderName.Calendar,

"[email protected]"),

SendInvitationsMode.SendToAllAndSaveCopy);

// Verify that the meeting was created.

Item item = Item.Bind(service, meeting.Id, new


PropertySet(ItemSchema.Subject));
Console.WriteLine("\nMeeting created: " + item.Subject + "\n");

Note that when you save the item, the Save method call must identify the mailbox
owner's Calendar folder. If the mailbox owner's Calendar folder is not specified, the
meeting request gets saved to the delegate's calendar and not the mailbox owner's
Calendar folder. You can include the mailbox owner's Calendar folder in the Save
method call in two ways. We recommend that you instantiate a new instance of the
FolderId object by using the WellKnownFolderName and the SMTP address of the
mailbox owner.

C#

meeting.Save(new FolderId(WellKnownFolderName.Calendar,

"[email protected]"), SendInvitationsMode.SendToAllAndSaveCopy);

However, you can also Bind to the Calendar folder first, and then use the ID of the
folder in the Save method call. Be aware, however, that this creates an extra EWS call.

C#

// Identify the mailbox owner's SMTP address

// and bind to their Calendar folder.

Mailbox primary = new Mailbox("[email protected]");

Folder primaryCalendar = Folder.Bind(service,

new FolderId(WellKnownFolderName.Calendar, primary));

// Save the meeting to the Calendar folder for the mailbox owner and
send the meeting request.

meeting.Save(primaryCalendar.Id,

SendInvitationsMode.SendToAllAndSaveCopy);

Create a meeting or appointment as a delegate


by using EWS
EWS enables you to use the service object for the delegate user to create calendar items
for the mailbox owner. This example shows how to use the CreateItem operation to
create a meeting and send meeting requests to the attendees.

This is also the XML request that the EWS Managed API sends when you use the Save
method to create a meeting or appointment as a delegate.

The SOAP header has been removed from the following example for brevity.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<m:CreateItem SendMeetingInvitations="SendToAllAndSaveCopy">

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="calendar">

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:DistinguishedFolderId>

</m:SavedItemFolderId>

<m:Items>

<t:CalendarItem>

<t:Subject>Team building exercise</t:Subject>

<t:Body BodyType="HTML">Let's learn to really work as a

team and then have lunch!</t:Body>

<t:ReminderMinutesBeforeStart>60</t:ReminderMinutesBeforeStart>

<t:Start>2014-03-09T23:26:33.756-05:00</t:Start>

<t:End>2014-03-10T03:26:33.756-05:00</t:End>

<t:Location>Conference Room 12</t:Location>

<t:RequiredAttendees>

<t:Attendee>

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:Attendee>

</t:RequiredAttendees>

</t:CalendarItem>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The server responds to the CreateItem request with a CreateItemResponse message


that includes a ResponseCode element value of NoError, which indicates that the
meeting was created successfully. The response also contains the item ID of the newly
created meeting.

Search for a meeting or appointment as a


delegate by using the EWS Managed API
To search for a meeting, you must use one of the ExchangeService.FindItems methods
that includes a FolderId parameter, so that you can specify the mailbox owner's
Calendar folder.

C#

static void DelegateAccessSearchWithFilter

(ExchangeService service, SearchFilter filter)

// Limit the result set to 10 items.

ItemView view = new ItemView(10);

view.PropertySet = new PropertySet(ItemSchema.Subject,

ItemSchema.DateTimeReceived,

EmailMessageSchema.IsRead);

// Item searches do not support deep traversal.

view.Traversal = ItemTraversal.Shallow;

// Define the sort order.

view.OrderBy.Add(ItemSchema.DateTimeReceived, SortDirection.Descending);

try

// Call FindItems to find matching calendar items.

// The FindItems parameters must denote the mailbox owner,

// mailbox, and Calendar folder.

// This method call results in a FindItem call to EWS.

FindItemsResults<Item> results = service.FindItems(

new FolderId(WellKnownFolderName.Calendar,

"[email protected]"),

filter,

view);

foreach (Item item in results.Items)

Console.WriteLine("Subject: {0}", item.Subject);

Console.WriteLine("Id: {0}", item.Id.ToString());

catch (Exception ex)

Console.WriteLine("Exception while

enumerating results: {0}", ex.Message);

After the FindItems call returns a response with an ID, you can get, update or delete that
meeting by using the ID and implicit access — and you do not need to specify the
mailbox owner's SMTP address.

Search for a meeting or appointment as a


delegate by using EWS
EWS enables you to use the service object for the delegate user to search for
appointments and meetings that meet a set of search criteria. This example shows how
to use the FindItem operation to find meetings in the mailbox owner's Calendar folder
that contain the word "building" in the subject.

This is also the XML request that the EWS Managed API sends when you use the
FindItem method to search for a meeting or appointment as a delegate.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:FindItem Traversal="Shallow">

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

<t:FieldURI FieldURI="item:DateTimeReceived" />

<t:FieldURI FieldURI="message:IsRead" />

</t:AdditionalProperties>

</m:ItemShape>

<m:IndexedPageItemView MaxEntriesReturned="10"

Offset="0"

BasePoint="Beginning" />

<m:Restriction>

<t:Contains ContainmentMode="Substring"

ContainmentComparison="IgnoreCase">

<t:FieldURI FieldURI="item:Subject" />

<t:Constant Value="building" />

</t:Contains>

</m:Restriction>

<m:SortOrder>

<t:FieldOrder Order="Descending">

<t:FieldURI FieldURI="item:DateTimeReceived" />

</t:FieldOrder>

</m:SortOrder>

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="calendar">

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:DistinguishedFolderId>

</m:ParentFolderIds>

</m:FindItem>

</soap:Body>

</soap:Envelope>

The server responds to the FindItem request with a FindItemResponse message that
includes a ResponseCode element value of NoError, which indicates that the search
completed successfully. The response contains a CalendarItem for any appointments
or meetings that met the search criteria. In this case, only one meeting is found.

The value of the ItemId element has been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="893"

MinorBuildNumber="10"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body>

<m:FindItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder IndexedPagingOffset="1"

TotalItemsInView="1"

IncludesLastItemInRange="true">

<t:Items>

<t:CalendarItem>

<t:ItemId Id="IJpUAAA="

ChangeKey="DwAAABYAAADOilbYa8KaT7ZgMoTz2P+hAAAAIKhS" />

<t:Subject>Team building exercise</t:Subject>

<t:DateTimeReceived>2014-03-
04T21:27:22Z</t:DateTimeReceived>

</t:CalendarItem>

</t:Items>

</m:RootFolder>

</m:FindItemResponseMessage>

</m:ResponseMessages>

</m:FindItemResponse>

</s:Body>

</s:Envelope>

Now that you have the ItemId for the meeting that meets your criteria, you can get,
update, or delete that meeting by using the ItemId and implicit access — and you do
not need to specify the mailbox owner's SMTP address.

Get, update, or delete calendar items as a


delegate by using the EWS Managed API
You can use the EWS Managed API to get, update, or delete a meeting or appointment
in the same way that you perform these actions when you're not using delegate access.
The only difference is that the service object is for the delegate user. The item ID
included in the Bind method call uniquely identifies the item in the mailbox store, in the
mailbox owner's Calendar folder.

Table 2. EWS Managed API methods for working with appointments and meetings as
a delegate
Task EWS Managed API Code example
method

Get an appointment or Bind


Get an item by using the EWS Managed
meeting API

Update an appointment or Bind followed by Update a meeting by using the EWS


meeting Update
Managed API

Delete an appointment or Bind followed by Delete a meeting by using the EWS


meeting Delete
Managed API

Get, update, or delete calendar items as a


delegate by using EWS
You can use EWS to get, update, or delete a meeting or appointment in the same way
that you perform these actions when you're not using delegate access. The only
difference is that the service object is for the delegate user. The item ID included in the
GetItem method call uniquely identifies the item in the mailbox store, in the mailbox
owner's Calendar folder.

Table 3. EWS operations for working with appointments and meetings as a delegate

Task EWS operation Code example

Get an appointment or GetItem


Get an item by using EWS

meeting

Update an appointment or GetItem followed by Update a meeting by using


meeting UpdateItem
EWS

Delete an appointment or GetItem followed by Delete a meeting by using


meeting DeleteItem
EWS

See also
Delegate access and EWS in Exchange
Add and remove delegates by using EWS in Exchange
Set folder permissions for another user by using EWS in Exchange
Calendars and EWS in Exchange
Access contacts as a delegate by using
EWS in Exchange
Article • 09/15/2021 • 8 minutes to read

Learn how to access contacts as a delegate by using the EWS Managed API or EWS in
Exchange.

You can use the EWS Managed API or EWS to give a user access to a mailbox owner's
Contacts folder. The delegate can then create contacts on behalf of the mailbox owner,
and retrieve, update, and delete contacts from the mailbox owner's Contacts folder,
depending on their permissions.

As a delegate, you use the same methods and operations to access a mailbox owner's
Contacts folder that you use to access your own Contacts folder. The main difference is
that you have to use explicit access to find or create a contact item, and then after you
identify the item ID, you can use implicit access to get, update, or delete the item.

Table 1. EWS Managed API methods and EWS operations for accessing a contact as a
delegate

If you want Use this EWS Managed API method… Use this EWS operation…
to…

Create a Item.Save where the FolderId parameter CreateItem where the


contact as a provides explicit access to the mailbox Mailbox element specifies the
delegate owner's Contacts folder EmailAddress of the mailbox
owner

Create ExchangeService.CreateItems where the CreateItem where the


multiple FolderId parameter provides explicit access Mailbox element specifies the
contacts as a to the mailbox owner's Contacts folder EmailAddress of the mailbox
delegate owner

Resolve a ExchangeService.ResolveName where the ResolveNames where the


contact as a FolderId parameter provides explicit Mailbox element specifies the
delegate access to the mailbox owner's Contacts EmailAddress of the mailbox
folder owner

Search for or ExchangeService.FindItems where the FindItem where the Mailbox


find a FolderId parameter provides explicit access element specifies the
contact as a to the mailbox owner's Contacts folder EmailAddress of the mailbox
delegate owner
If you want Use this EWS Managed API method… Use this EWS operation…
to…

Get a Contact.Bind
GetItem

contact as a
delegate

Update a Contact.Bind followed by GetItem followed by


contact as a Contact.Update
UpdateItem

delegate

Delete a Contact.Bind followed by Contact.Delete GetItem followed by DeleteItem


contact as a
delegate

7 Note

In the code examples in this article, [email protected] is the mailbox owner.

Prerequisite tasks
Before a user can access the mailbox owner's Contacts folder as a delegate, the user
must be added as a delegate with permissions to the mailbox owner's Contacts folder.

Create a contact as a delegate by using the


EWS Managed API
The EWS Managed API enables you to use the service object for the delegate user to
create contacts for the mailbox owner. This example shows how to use the Save
method to create a meeting and send meeting requests to the attendees.

This example assumes that service is a valid ExchangeService object for the delegate
and that the delegate has been granted the appropriate permissions for the mailbox
owner's Contacts folder.

C#

public static void DelegateAccessCreateContact(ExchangeService service)

// Create the contact.

Contact contact = new Contact(service);

// Specify the name and how the contact should be filed.

contact.GivenName = "Brian";

contact.MiddleName = "David";

contact.Surname = "Johnson";

contact.FileAsMapping = FileAsMapping.SurnameCommaGivenName;

// Specify the company name.

contact.CompanyName = "Contoso";

// Specify the business, home, and car phone numbers.

contact.PhoneNumbers[PhoneNumberKey.BusinessPhone] = "425-555-0110";

contact.PhoneNumbers[PhoneNumberKey.HomePhone] = "425-555-0120";

contact.PhoneNumbers[PhoneNumberKey.CarPhone] = "425-555-0130";

// Specify two email addresses.

contact.EmailAddresses[EmailAddressKey.EmailAddress1] =

new EmailAddress("[email protected]");

contact.EmailAddresses[EmailAddressKey.EmailAddress2] =

new EmailAddress("[email protected]");

// Save the contact in the mailbox owner's Contacts folder.

// This method call results in a CreateItem call to EWS.

// The contact identifier contains the context for the mailbox owner's

// Contact folder. Any additional actions take on this contact will

// be performed in the mailbox owner's mailbox.

contact.Save(new FolderId(WellKnownFolderName.Contacts,

"[email protected]"));

// Verify that the contact was created.

// This method call results in a GetItem call to EWS

// to load the display name property on the contact.

contact.Load(new PropertySet (ContactSchema.DisplayName));

Console.WriteLine("\nContact created: " + contact.DisplayName + "\n");

Note that when you save the item, the Save method call must identify the mailbox
owner's Contacts folder. If the mailbox owner's Contacts folder is not specified, the
meeting request gets saved to the delegate's Contacts folder and not the mailbox
owner's Contacts folder. You can include the mailbox owner's Contacts folder in the
Save method call in two way. We recommend that you instantiate a new instance of the
FolderId object by using the WellKnownFolderName and the SMTP address of the
mailbox owner.

C#

contact.Save(new FolderId(WellKnownFolderName.Contacts,
"[email protected]"));

However, you can also Bind to the Contacts folder first, and then use the ID of the
folder in the Save method call. Be aware, however, that this creates an extra EWS call.

C#

// Identify the mailbox owner's SMTP address

// and bind to their Contacts folder.

Mailbox primary = new Mailbox("[email protected]");

Folder primaryContacts = Folder.Bind(service, new


FolderId(WellKnownFolderName.Contacts, primary));

// Save the contact to the mailbox owner's Contacts folder.

meeting.Save(primaryContacts.Id);

Create a contact as a delegate by using EWS


EWS enables you to use the service object for the delegate user to create contact items
for the mailbox owner. This example shows how to use the CreateItem operation to
create a contact.

This is also the XML request that the EWS Managed API sends when you use the Save
method to create a contact.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:CreateItem MessageDisposition="SaveOnly">

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="contacts">

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:DistinguishedFolderId>

</m:SavedItemFolderId>

<m:Items>

<t:Contact>

<t:FileAsMapping>LastCommaFirst</t:FileAsMapping>

<t:GivenName>Brian</t:GivenName>

<t:MiddleName>David</t:MiddleName>

<t:CompanyName>Contoso</t:CompanyName>

<t:EmailAddresses>

<t:Entry Key="EmailAddress1">[email protected]</t:Entry>

<t:Entry Key="EmailAddress2">[email protected]</t:Entry>

</t:EmailAddresses>

<t:PhoneNumbers>

<t:Entry Key="BusinessPhone">425-555-0110</t:Entry>

<t:Entry Key="HomePhone">425-555-0120</t:Entry>

<t:Entry Key="CarPhone">425-555-0130</t:Entry>

</t:PhoneNumbers>

<t:Surname>Johnson</t:Surname>

</t:Contact>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The server responds to the CreateItem request with a CreateItemResponse message


that includes a ResponseCode element value of NoError, which indicates that the
contact was created successfully. The response also contains the item ID of the newly
created contact.

Resolve a contact as a delegate by using the


EWS Managed API
To find a contact based on a possibly ambiguous name or term, you must use one of the
ExchangeService.ResolveName methods that includes a FolderId parameter, so that
you can specify the mailbox owner's Contacts folder.

C#

private static void DelegateAccessResolveContacts(ExchangeService service)

// Create a list to store folders to search.

List<FolderId> folders = new List<FolderId>();

// Add the mailbox owner's folder to the list.

folders.Add(new FolderId(WellKnownFolderName.Contacts,

"[email protected]"));

// Resolve the ambiguous name "Johnson".

// This method call results in a ResolveNames call to EWS.

NameResolutionCollection resolvedNames = service.ResolveName(

"johnson", folders, ResolveNameSearchLocation.ContactsOnly, true);

// Output the list of candidate email addresses and contact names.

foreach (NameResolution nameRes in resolvedNames)

Console.WriteLine("Contact e-mail address: " +


nameRes.Mailbox.Address);

Console.WriteLine("Contact ID: " + nameRes.Mailbox.Id);

After the ResolveNames method call returns a response with an ID, you can get, update
or delete the contact using the ID and implicit access—and you do not need to specify
the mailbox owner's SMTP address.
Resolve a contact as a delegate by using EWS
EWS enables you to use the service object for the delegate user to resolve partial names
in the mailbox owner's Contacts folder. This example shows how to use the
ResolveNames operation to find meetings in the mailbox owner's Contacts folder that
contain the word "johnson".

This is also the XML request that the EWS Managed API sends when you use the
ResolveName method to resolve a contact.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:ResolveNames ReturnFullContactData="true"

SearchScope="Contacts">

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="contacts">

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:DistinguishedFolderId>

</m:ParentFolderIds>

<m:UnresolvedEntry>johnson</m:UnresolvedEntry>

</m:ResolveNames>

</soap:Body>

</soap:Envelope>

The server responds to the ResolveNames request with a ResolveNamesResponse


message that includes a ResponseCode element value of NoError, which indicates
that the operation completed successfully and found only one result, or
ErrorNameResolutionMultipleResults if multiple results were found - which is what's
shown in third code example based on the contact Create a contact as a delegate by
using the EWS Managed API. The response also contains the ItemId of each result.

The value of the ItemId element has been shortened for readability.

XML
<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="893"

MinorBuildNumber="17"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body>

<m:ResolveNamesResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:ResolveNamesResponseMessage ResponseClass="Warning">

<m:MessageText>Multiple results were found.</m:MessageText>

<m:ResponseCode>ErrorNameResolutionMultipleResults</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:ResolutionSet TotalItemsInView="2"

IncludesLastItemInRange="true">

<t:Resolution>

<t:Mailbox>

<t:Name>[email protected]</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Contact</t:MailboxType>

<t:ItemId Id="iMihAAA="

ChangeKey="EQAAABYAAADOilbYa8KaT7ZgMoTz2P+hAAABiPQo" />

</t:Mailbox>

</t:Resolution>

<t:Resolution>

<t:Mailbox>

<t:Name>[email protected]</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Contact</t:MailboxType>

<t:ItemId Id="iMihAAA="

ChangeKey="EQAAABYAAADOilbYa8KaT7ZgMoTz2P+hAAABiPQo" />

</t:Mailbox>

</t:Resolution>

</m:ResolutionSet>

</m:ResolveNamesResponseMessage>

</m:ResponseMessages>

</m:ResolveNamesResponse>

</s:Body>

</s:Envelope>

Now that you have the ItemId for the contacts that match the ambiguous name, you
can Get, update, or delete contact items as a delegate by using EWS by using the ItemId
and implicit access—and you do not need to specify the mailbox owner's SMTP address.

Get, update, or delete contact items as a


delegate by using the EWS Managed API
You can use the EWS Managed API to get, update, or delete a contact in the same way
that you perform these actions when you're not using delegate access. The only
difference is that the service object is for the delegate user. The item ID included in the
Bind method call uniquely identifies the item in the mailbox store, in the mailbox
owner's Contacts folder.

Table 2. EWS Managed API methods working with a contact as a delegate

Task EWS Managed API method Code example

Get a contact Bind


Get an item by using the EWS Managed API

Update a contact Bind followed by Update an item by using the EWS Managed
Update
API

Delete a contact Bind followed by Delete Delete an item by using the EWS Managed API

Get, update, or delete contact items as a


delegate by using EWS
You can use EWS to get, update, or delete a meeting or appointment contact in the
same way that you perform these actions when you're not using delegate access. The
only difference is that the service object is for the delegate user. The item ID included in
the GetItem request uniquely identifies the item in the mailbox store, in the mailbox
owner's Contacts folder.

Table 3. EWS operations for working with a contact as a delegate

Task EWS operation Sample

Get a contact GetItem


Get an item by using EWS

Task EWS operation Sample

Update a contact GetItem followed by UpdateItem


Update an item by using EWS

Delete a contact GetItem followed by DeleteItem


Delete an item by using EWS

See also
Delegate access and EWS in Exchange
Add and remove delegates by using EWS in Exchange
Set folder permissions for another user by using EWS in Exchange
People and contacts in EWS in Exchange
Resolve ambiguous names by using EWS in Exchange 2013
Access email as a delegate by using
EWS in Exchange
Article • 09/15/2021 • 9 minutes to read

Learn how to access email as a delegate by using the EWS Managed API or EWS in
Exchange.

You can use the EWS Managed API or EWS to give a user delegate access to a mailbox
owner's Inbox folder. The delegate can then create meeting requests on behalf of the
mailbox owner, search for email, and retrieve, update, and delete email from the
mailbox owner's Inbox folder, depending on their permissions.

As a delegate, you use the same methods and operations to access a mailbox owner's
Inbox folder that you use to access an Inbox folder without delegate access. The main
difference is that you have to use explicit access to find or create an email item, and
then after you identify the item ID, you can use implicit access to get, update, or delete
the item.

Table 1. EWS Managed API methods and EWS operations for accessing email as a
delegate

If you want Use this EWS Managed API method… Use this EWS operation…
to…

Create and EmailMessage.Save where the FolderId CreateItem where the


send an email parameter provides explicit access to the Mailbox element specifies the
as a delegate mailbox owner's Drafts folder EmailAddress of the mailbox
EmailMessage.SendAndSaveCopy where owner
the FolderId parameter provides explicit SendItem where the
access to the mailbox owner's Sent Items Mailbox element specifies the
folder EmailAddress of the mailbox
owner

Create ExchangeService.CreateItems where the CreateItem where the


multiple email FolderId parameter provides explicit access to Mailbox element specifies the
messages as a the mailbox owner's Inbox folder EmailAddress of the mailbox
delegate owner

Search for or ExchangeService.FindItems where the FindItem where the


find an email FolderId parameter provides explicit access to Mailbox element specifies the
as a delegate the mailbox owner's Inbox folder EmailAddress of the mailbox
owner

Get an email EmailMessage.Bind


GetItem

as a delegate
If you want Use this EWS Managed API method… Use this EWS operation…
to…

Update an EmailMessage.Bind followed by GetItem followed by


email as a EmailMessage.Update
UpdateItem

delegate

Delete an EmailMessage.Bind followed by GetItem followed by


email as a EmailMessage.Delete
DeleteItem

delegate

Keep the following things in mind when working with emails as a delegate:

If a delegate only needs to work with meeting requests and responses, the
delegate does not need access to the Inbox folder. For more information, see
prerequisite tasks for accessing calendars as a delegate.

When a recipient receives a message that was sent on behalf of a mailbox owner,
the sender appears as " Delegate on behalf of mailbox owner ."

7 Note

In the code examples in this article, [email protected] is the mailbox owner.

Prerequisite tasks
Before a user can access the mailbox owner's Inbox folder as a delegate, the user must
be added as a delegate with permissions to the mailbox owner's Inbox folder.

Create and send an email as a delegate by


using the EWS Managed API
The EWS Managed API enables you to use the service object for the delegate user to
create and send email on behalf of the mailbox owner. This example shows how to use
the Save method to save the message in the mailbox owner's Drafts folder, and then
the SendAndSaveCopy method to send the mail and save the message in the mailbox
owner's Sent Items folder.

This example assumes that service is a valid ExchangeService object for the delegate
and that the delegate has been granted the appropriate permissions for the mailbox
owner's Inbox, Drafts, and Sent Items folder.
C#

public static void DelegateAccessCreateEmail(ExchangeService service)

// Create an email message and provide it with connection

// configuration information by using an ExchangeService

// object named service.

EmailMessage message = new EmailMessage(service);

// Set properties on the email message.

message.Subject = "Company Soccer Team";

message.Body = "Are you interested in joining?";

message.ToRecipients.Add("[email protected]");

// Save the email to the mailbox owner's Drafts folder.

// This method call results in a CreateItem call to EWS.

// The FolderId parameter contains the context for the

// mailbox owner's Inbox folder. Any additional actions

// taken on this message will be performed in the mailbox

// owner's mailbox.

message.Save(new FolderId(WellKnownFolderName.Drafts, new


Mailbox("[email protected]")));
// Send the email and save the message in the mailbox owner's
// Sent Items folder.

// This method call results in a SendItem call to EWS.

message.SendAndSaveCopy(new FolderId(WellKnownFolderName.SentItems, new


Mailbox("[email protected]")));
Console.WriteLine("An email with the subject '" + message.Subject + "'
has been sent to '"

+ message.ToRecipients[0] + "' and saved in the Sent Items folder of the


mailbox owner.");

Create and send an email as a delegate by


using EWS
EWS enables you to use the service object for the delegate user to create and send
email on behalf of the mailbox owner. This example shows how to use the CreateItem
operation to create an email and the SendItem operation to send the time and save it
in the mailbox owner's Sent Items folder.

This is also the first XML request that the EWS Managed API sends when you use the
Save method to create and send an email.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version=" Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:CreateItem MessageDisposition="SaveOnly">

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="drafts">

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:DistinguishedFolderId>

</m:SavedItemFolderId>

<m:Items>

<t:Message>

<t:Subject>Company Soccer Team</t:Subject>

<t:Body BodyType="HTML">Are you interested in joining?</t:Body>

<t:ToRecipients>

<t:Mailbox>
<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:ToRecipients>

</t:Message>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The server responds to the CreateItem request with a CreateItemResponse message


that includes a ResponseCode element value of NoError, which indicates that the
email was created and saved successfully. The response also contains the item ID of the
newly created email.

The ItemId value has been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="893"

MinorBuildNumber="17"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body>

<m:CreateItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Message>
<t:ItemId Id="iNRaAAA="

ChangeKey="CQAAABYAAADOilbYa8KaT7ZgMoTz2P+hAAABiQPU"
/>

</t:Message>

</m:Items>

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</m:CreateItemResponse>

</s:Body>

</s:Envelope>

Next, use the SendItem operation to send the message on behalf of the mailbox owner
and save it in the mailbox owner's Sent Items folder.

The ItemId value has been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version=" Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:SendItem SaveItemToFolder="true">

<m:ItemIds>

<t:ItemId Id="iNRaAAA="

ChangeKey="CQAAABYAAADOilbYa8KaT7ZgMoTz2P+hAAABiQPU" />

</m:ItemIds>

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="sentitems">

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:DistinguishedFolderId>

</m:SavedItemFolderId>

</m:SendItem>

</soap:Body>

</soap:Envelope>

The server responds to the SendItem request with a SendItemResponse message that
includes a ResponseCode element value of NoError, which indicates that the email
was sent and saved to the mailbox owner's Sent Items folder successfully.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="893"

MinorBuildNumber="17"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body>

<m:SendItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:SendItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

</m:SendItemResponseMessage>

</m:ResponseMessages>

</m:SendItemResponse>

</s:Body>

</s:Envelope>

Search for an email as a delegate by using the


EWS Managed API
To search for an email, you must use one of the ExchangeService.FindItems methods
that includes a FolderId parameter, so that you can specify the mailbox owner's Inbox
folder.

C#
static void DelegateAccessSearchEmailWithFilter(ExchangeService service)

// Limit the result set to 10 items.

ItemView view = new ItemView(10);

// Define the search filter.

SearchFilter.ContainsSubstring filter = new


SearchFilter.ContainsSubstring(ItemSchema.Subject,

"soccer", ContainmentMode.Substring, ComparisonMode.IgnoreCase);

view.PropertySet = new PropertySet(ItemSchema.Subject,

ItemSchema.DateTimeReceived,

EmailMessageSchema.IsRead);

// Item searches do not support deep traversal.

view.Traversal = ItemTraversal.Shallow;

// Sorting.

view.OrderBy.Add(ItemSchema.DateTimeReceived, SortDirection.Descending);

try

// Call FindItems to find matching Inbox items.

// The parameters of FindItems must denote the mailbox owner,

// mailbox, and Inbox folder.

// This call results in a FindItem call to EWS.

FindItemsResults<Item> results = service.FindItems(new

FolderId(WellKnownFolderName.Inbox, "[email protected]"),

filter, view);

foreach (Item item in results.Items)

Console.WriteLine("Subject: {0}", item.Subject);

Console.WriteLine("Id: {0}", item.Id.ToString());

if (item is EmailMessage)

EmailMessage message = item as EmailMessage;

Console.WriteLine("Read: {0}", message.IsRead.ToString());

catch (Exception ex)

Console.WriteLine("Exception while enumerating results: {0}",


ex.Message);

After the FindItems call returns a response with an ID, you can get, update or delete that
email by using the ID and implicit access - and you do not need to specify the mailbox
owner's SMTP address.

Search for an email as a delegate by using EWS


EWS enables you to use the service object for the delegate user to search for emails that
meet a set of search criteria. This example shows how to use the FindItem operation
to find messages in the owner's Inbox folder that contain the word "soccer" in the
subject.

This is also the XML request that the EWS Managed API sends when you search for an
email.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version=" Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:FindItem Traversal="Shallow">

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

<t:FieldURI FieldURI="item:DateTimeReceived" />

<t:FieldURI FieldURI="message:IsRead" />

</t:AdditionalProperties>

</m:ItemShape>

<m:IndexedPageItemView MaxEntriesReturned="10"

Offset="0"

BasePoint="Beginning" />

<m:Restriction>

<t:Contains ContainmentMode="Substring"

ContainmentComparison="IgnoreCase">

<t:FieldURI FieldURI="item:Subject" />

<t:Constant Value="soccer" />

</t:Contains>

</m:Restriction>

<m:SortOrder>

<t:FieldOrder Order="Descending">

<t:FieldURI FieldURI="item:DateTimeReceived" />

</t:FieldOrder>

</m:SortOrder>

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="inbox">

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:DistinguishedFolderId>

</m:ParentFolderIds>

</m:FindItem>

</soap:Body>

</soap:Envelope>

The server responds to the FindItem request with a FindItemResponse message that
includes a ResponseCode element value of NoError, which indicates that the search
completed successfully. The response contains a Message element for any emails that
met the search criteria. In this case, only one email is found.

The value of the ItemId element has been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="893"

MinorBuildNumber="17"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body>

<m:FindItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder IndexedPagingOffset="1"

TotalItemsInView="1"

IncludesLastItemInRange="true">

<t:Items>

<t:Message>

<t:ItemId Id="iNwoAAA="

ChangeKey="CQAAABYAAADOilbYa8KaT7ZgMoTz2P+hAAABiQuu" />

<t:Subject>Soccer team</t:Subject>

<t:DateTimeReceived>2014-03-
10T06:16:55Z</t:DateTimeReceived>

<t:IsRead>false</t:IsRead>

</t:Message>

</t:Items>

</m:RootFolder>

</m:FindItemResponseMessage>

</m:ResponseMessages>

</m:FindItemResponse>

</s:Body>

</s:Envelope>

Now that you have the ItemId for the email that meets your criteria, you can get,
update, or delete that email by using the ItemId and implicit access - and you do not
need to specify the mailbox owner's SMTP address.

Get, update, or delete email items as a delegate


by using the EWS Managed API
You can use the EWS Managed API to get, update, or delete an email in the same way
that you perform these actions when you're not using delegate access. The only
difference is that the ExchangeService object is for the delegate user. The item ID
included in the Bind method call uniquely identifies the item in the mailbox store, in the
mailbox owner's Inbox folder.

Table 2. EWS Managed API methods working with email as a delegate

Task EWS Managed API method Code example

Get an email Bind


Get an item by using the EWS Managed API

Update an email Bind followed by Update an item by using the EWS Managed
Update
API

Delete an email Bind followed by Delete


Delete an item by using the EWS Managed API

Get, update, or delete email items as a delegate


by using EWS
You can use the EWS Managed API to get, update, or delete an email in the same way
that you perform these actions when you're not using delegate access. The only
difference is that the service object is for the delegate user. The item ID included in the
GetItem request uniquely identifies the item in the mailbox store, in the mailbox owner's
Inbox folder.

Table 3. EWS operations for working with email as a delegate

Task EWS operation Code example

Get an email GetItem


Get an item by using EWS

Task EWS operation Code example

Update an email GetItem followed by UpdateItem


Update an item by using EWS

Delete an email GetItem followed by DeleteItem


Delete an item by using EWS

See also
Delegate access and EWS in Exchange
Add and remove delegates by using EWS in Exchange
Set folder permissions for another user by using EWS in Exchange
Calendars and EWS in Exchange
Set folder permissions for another user
by using EWS in Exchange
Article • 09/15/2021 • 12 minutes to read

Learn how to set permission levels on a folder by using the EWS Managed API or EWS in
Exchange.

Folder-level permissions enable users to access one or more folders in another user's
mailbox. Folder permissions are similar to delegate access, but they differ in the
following ways:

Folder permissions do not enable a user to "send on behalf of" or "send as"
another user. They only enable access to folders. Users can create items in those
folders, but they can't send them.

You can set folder permissions on any folder in the mailbox, but you can only add
a delegate to the Calendar, Contacts, Inbox, Journal, Notes, and Tasks folders.

You can set a number of permissions on a specific folder. When you add a
delegate, you can assign one of only five permission levels.

You can set folder permissions for anonymous and default users. You can only
grant delegate access to a mail-enabled account.

If you're familiar with Access Control Entries (ACEs) and Discretionary Access Control
Lists (DACLs), you know that a user can only have one set of permissions for each folder.
If you try to add a set of permissions for a user and they already have a set of
permissions, you'll get an error. When you add, remove, or update permissions on a
folder, you get the current DACL, add or remove any ACEs, and then send the updated
DACL. You cannot add multiple ACEs for the same user. When you update permissions
by using the EWS Managed API, you need to remove the user's current ACE and then
add their new ACE to the collection. If you're using EWS, you just replace the previous
set of ACEs with the new ones.

If you're making multiple permission changes to a single folder, you can batch additions,
removals, or updates —just note that you cannot batch user updates on multiple
folders. One call is required to get the permissions on a single folder, and a second call
is required to update the permissions on that folder. When you add, remove, or update
user permissions, you use the same two method calls or operations for each task.

Table 1. EWS Managed API methods and EWS operations for setting folder
permissions
If you want to… Use this EWS Managed API Use this EWS operation…
method…

Enable, remove, or update Folder.Bind followed by GetFolder followed by


folder permissions Folder.Update UpdateFolder

Create a folder and define Folder.Save


CreateFolder

folder permissions

Folder permissions
You have quite a few options when it comes to setting folder permissions on a specific
folder. You can set a permission level on a folder for each user, which adds a set of
predefined individual permissions to the DACL, or you can set individual permissions on
a folder — but you can't mix and match.

The following individual permissions are available:

Can create
Can create subfolders
Is folder owner
Is folder visible
Is folder contact
Edit items
Delete items
Read items

In addition, the following permission levels are available, which define a subset of
individual permissions and values, as shown in Table 2:

None
Owner
PublishingEditor
Editor
PublishingAuthor
Author
NoneditingAuthor
Reviewer
Contributor
Custom - This value cannot be set by the application. The server sets this value if
the application includes a custom collection of individual permissions.
FreeBusyTimeOnly - This can only be set on Calendar folders.
FreeBusyTimeAndSubjectAndLocation - This can only be set on Calendar folders.
The following table shows which individual permissions are applied by default based on
permission level.

Table 2. Individual permissions by permission level

Permission level Can Can Is Is Is Edit Delete Can read


create create folder folder folder items items items
items sub owner visible contact
folders

None False False False False False None None None

Owner True True True True True All All FullDetails

PublishingEditor True True False True False All All FullDetails

Editor True False False True False All All FullDetails

PublishingAuthor True True False True False Owned Owned FullDetails

Author True False False True False Owned Owned FullDetails

NoneditingAuthor True False False True False None Owned FullDetails

Reviewer False False False True False None None FullDetails

Contributor True False False True False None None None

If you specify a non-custom permission level in the folder-level permissions request, you
don't need to specify the individual permission settings. If you do specify an individual
permission when you set a permission level, an ErrorInvalidPermissionSettings error will
be returned in the response.

Adding folder permissions by using the EWS


Managed API
The following code example shows how to use the EWS Managed API to:

Create a new FolderPermission object for the new user.

Get the current permissions for a folder by using the Bind method.

Add the new FolderPermissions to the Folder.Permissions property.

Call the Update method to save the new permissions to the server.
This example assumes that service is a valid ExchangeService object for the mailbox
owner and that the user has been authenticated to an Exchange server.

C#

static void EnableFolderPermissions(ExchangeService service)

// Create a property set to use for folder binding.

PropertySet propSet = new PropertySet(BasePropertySet.IdOnly,


FolderSchema.Permissions);

// Specify the SMTP address of the new user and the folder permissions
level.

FolderPermission fldperm = new FolderPermission("[email protected]",


FolderPermissionLevel.Editor);

// Bind to the folder and get the current permissions.

// This call results in a GetFolder call to EWS.

Folder sentItemsFolder = Folder.Bind(service,


WellKnownFolderName.SentItems, propSet);

// Add the permissions for the new user to the Sent Items DACL.

sentItemsFolder.Permissions.Add(fldperm);

// This call results in a UpdateFolder call to EWS.

sentItemsFolder.Update();

The following line of code specifies the permission level.

C#

FolderPermission fldperm = new FolderPermission("[email protected]",


FolderPermissionLevel.Editor);

If you want to use the custom permission level, use this code instead.

C#

FolderPermission fldperm = new FolderPermission();

fldperm.UserId = "[email protected]";

fldperm.CanCreateItems = true;

fldperm.CanCreateSubFolders = true;

You can set any or all of the writable FolderPermission properties when you create a
FolderPermission object with a custom permission level. Note, however, that the
FolderPermissionLevel is never explicitly set to Custom by the application. The
FolderPermissionLevel is set to Custom only when you create a FolderPermission object
and set individual permissions.
Adding folder permissions by using EWS
The following EWS code examples show how to add permissions to a specific folder by
retrieving the current permissions and then submitting a list of new permissions.

The first step is to send a GetFolder request, where the DistinguishedFolderId value
specifies the folder in which to add permissions (the Sent Items folder in this example)
and the FieldURI value includes folder:PermissionSet. This request will retrieve the
permission settings for the folder specified.

This is also the XML request that the EWS Managed API sends when you call the Bind
method to add folder permissions.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:GetFolder>

<m:FolderShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="folder:PermissionSet" />

</t:AdditionalProperties>

</m:FolderShape>

<m:FolderIds>

<t:DistinguishedFolderId Id="sentitems" />

</m:FolderIds>

</m:GetFolder>

</soap:Body>

</soap:Envelope>

The server responds to the GetFolder request with a GetFolderResponse message that
includes a ResponseCode element value of NoError, which indicates that the folder
was retrieved successfully. The FolderId and ParentFolderId values have been
shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="893"

MinorBuildNumber="17"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Folders>

<t:Folder>

<t:FolderId Id="CgAAAA=="

ChangeKey="AQAAABYAAADOilbYa8KaT7ZgMoTz2P+hAAABiRd1" />

<t:PermissionSet>

<t:Permissions>

<t:Permission>

<t:UserId>

<t:DistinguishedUser>Default</t:DistinguishedUser>

</t:UserId>

<t:CanCreateItems>false</t:CanCreateItems>

<t:CanCreateSubFolders>false</t:CanCreateSubFolders>

<t:IsFolderOwner>false</t:IsFolderOwner>

<t:IsFolderVisible>false</t:IsFolderVisible>

<t:IsFolderContact>false</t:IsFolderContact>

<t:EditItems>None</t:EditItems>

<t:DeleteItems>None</t:DeleteItems>

<t:ReadItems>None</t:ReadItems>

<t:PermissionLevel>None</t:PermissionLevel>

</t:Permission>

<t:Permission>

<t:UserId>

<t:DistinguishedUser>Anonymous</t:DistinguishedUser>

</t:UserId>

<t:CanCreateItems>false</t:CanCreateItems>

<t:CanCreateSubFolders>false</t:CanCreateSubFolders>

<t:IsFolderOwner>false</t:IsFolderOwner>

<t:IsFolderVisible>false</t:IsFolderVisible>

<t:IsFolderContact>false</t:IsFolderContact>

<t:EditItems>None</t:EditItems>

<t:DeleteItems>None</t:DeleteItems>

<t:ReadItems>None</t:ReadItems>

<t:PermissionLevel>None</t:PermissionLevel>

</t:Permission>

</t:Permissions>

</t:PermissionSet>

</t:Folder>

</m:Folders>

</m:GetFolderResponseMessage>

</m:ResponseMessages>

</m:GetFolderResponse>

</s:Body>

</s:Envelope>

Next, use the UpdateFolder operation to send the updated PermissionSet , which
includes the Permission for the new user. Note that including the SetFolderField
element for the respective folder in the UpdateFolder operation will overwrite all the
permission settings on the folder. Likewise, including the DeleteFolderField option of
the UpdateFolder operation will also delete all the permission settings on the folder.

This is also the XML request that the EWS Managed API sends when you call the Update
method to add folder permissions.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:UpdateFolder>

<m:FolderChanges>
<t:FolderChange>

<t:FolderId Id="CgAAAA=="

ChangeKey="AQAAABYAAADOilbYa8KaT7ZgMoTz2P+hAAABiRd1"
/>

<t:Updates>

<t:SetFolderField>

<t:FieldURI FieldURI="folder:PermissionSet" />

<t:Folder>

<t:PermissionSet>

<t:Permissions>

<t:Permission>

<t:UserId>

<t:DistinguishedUser>Default</t:DistinguishedUser>

</t:UserId>

<t:PermissionLevel>None</t:PermissionLevel>

</t:Permission>

<t:Permission>

<t:UserId>

<t:DistinguishedUser>Anonymous</t:DistinguishedUser>

</t:UserId>

<t:PermissionLevel>None</t:PermissionLevel>

</t:Permission>

<t:Permission>

<t:UserId>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

</t:UserId>

<t:PermissionLevel>Editor</t:PermissionLevel>

</t:Permission>

</t:Permissions>

</t:PermissionSet>

</t:Folder>

</t:SetFolderField>

</t:Updates>

</t:FolderChange>

</m:FolderChanges>

</m:UpdateFolder>

</soap:Body>

</soap:Envelope>

The following line of code specifies the permission level.

XML

<t:Permission>

<t:UserId>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

</t:UserId>

<t:PermissionLevel>Editor</t:PermissionLevel>

</t:Permission>

If you want to use the custom permission level, use this code instead.

XML

<t:Permission>

<t:UserId>

<t:PrimarySmtpAddress> [email protected] </t:PrimarySmtpAddress>

</t:UserId>

<t:CanCreateItems>true</t:CanCreateItems>

<t:CanCreateSubFolders>true</t:CanCreateSubFolders>

<t:IsFolderOwner>false</t:IsFolderOwner>

<t:IsFolderVisible>false</t:IsFolderVisible>

<t:IsFolderContact>false</t:IsFolderContact>

<t:EditItems>None</t:EditItems>

<t:DeleteItems>None</t:DeleteItems>

<t:ReadItems>None</t:ReadItems>

<t:PermissionLevel>Custom</t:PermissionLevel>

</t:Permission>

The server responds to the UpdateFolder request with an UpdateFolderResponse


message that includes a ResponseCode element value of NoError, which indicates
that the folder was updated successfully.

Removing folder permissions by using the EWS


Managed API
The following code example shows how to use the EWS Managed API to remove all user
permissions on a specific folder, except for the default and anonymous permissions, by:

1. Getting the current permissions for a folder by using the Bind method.

2. Iterating through the Permissions collection and removing permissions for


individual users.

3. Calling the Update method to save the changes.

This example removes all user permissions on a folder. If you want to modify this
example to remove permissions only for a specific user, change the following line of
code to identify either the display name or SMTP address of the user.

C#

if (sentItemsFolder.Permissions[t].UserId.DisplayName != null ||
sentItemsFolder.Permissions[t].UserId.PrimarySmtpAddress != null)

This example assumes that service is a valid ExchangeService object for the mailbox
owner and that the user has been authenticated to an Exchange server.

C#

static void RemoveFolderPermissions(ExchangeService service)

// Create a property set to use for folder binding.

PropertySet propSet = new


PropertySet(BasePropertySet.FirstClassProperties, FolderSchema.Permissions);

// Bind to the folder and get the current permissions.

// This call results in a GetFolder call to EWS.

Folder sentItemsFolder = Folder.Bind(service, new


FolderId(WellKnownFolderName.SentItems, "[email protected]"), propSet);

// Iterate through the collection of permissions and remove permissions


for any

// user with a display name or SMTP address. This leaves the anonymous
and

// default user permissions unchanged.

if (sentItemsFolder.Permissions.Count != 0)

for (int t = 0; t < sentItemsFolder.Permissions.Count; t++)

// Find any permissions associated with the specified user and


remove them from the DACL

if (sentItemsFolder.Permissions[t].UserId.DisplayName != null ||
sentItemsFolder.Permissions[t].UserId.PrimarySmtpAddress != null)

sentItemsFolder.Permissions.Remove(sentItemsFolder.Permissions[t]);

// This call results in an UpdateFolder call to EWS.

sentItemsFolder.Update();

Removing folder permissions by using EWS


The following EWS code examples show how to remove all user permissions on a
specific folder, except for the default and anonymous permissions.

First, send a GetFolder request where the DistinguishedFolderId value specifies the
folder in which to remove permissions (the Sent Items folder in this example) and the
FieldURI value includes folder:PermissionSet. This request will retrieve the
PermissionSet for the folder specified.

This is also the XML request that the EWS Managed API sends when you call the Bind
method to remove folder permissions.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:GetFolder>

<m:FolderShape>

<t:BaseShape>AllProperties</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="folder:PermissionSet" />

</t:AdditionalProperties>

</m:FolderShape>

<m:FolderIds>

<t:DistinguishedFolderId Id="drafts">

<t:Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:DistinguishedFolderId>

</m:FolderIds>

</m:GetFolder>

</soap:Body>

</soap:Envelope>

The server responds to the GetFolder request with a GetFolderResponse message that
includes a ResponseCode element value of NoError, which indicates that the folder
was retrieved successfully. The values of the FolderId and ParentFolderId elements have
been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="893"

MinorBuildNumber="17"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Folders>

<t:Folder>

<t:FolderId Id="EAAAAA=="

ChangeKey="AQAAABYAAADOilbYa8KaT7ZgMoTz2P+hAAABiRd5" />

<t:ParentFolderId Id="CQAAAA=="

ChangeKey="AQAAAA==" />

<t:FolderClass>IPF.Note</t:FolderClass>

<t:DisplayName>Drafts</t:DisplayName>

<t:TotalCount>0</t:TotalCount>

<t:ChildFolderCount>0</t:ChildFolderCount>

<t:EffectiveRights>

<t:CreateAssociated>true</t:CreateAssociated>

<t:CreateContents>true</t:CreateContents>

<t:CreateHierarchy>true</t:CreateHierarchy>

<t:Delete>true</t:Delete>

<t:Modify>true</t:Modify>

<t:Read>true</t:Read>

<t:ViewPrivateItems>true</t:ViewPrivateItems>

</t:EffectiveRights>

<t:PermissionSet>

<t:Permissions>

<t:Permission>

<t:UserId>

<t:DistinguishedUser>Default</t:DistinguishedUser>

</t:UserId>

<t:CanCreateItems>false</t:CanCreateItems>

<t:CanCreateSubFolders>false</t:CanCreateSubFolders>

<t:IsFolderOwner>false</t:IsFolderOwner>

<t:IsFolderVisible>false</t:IsFolderVisible>

<t:IsFolderContact>false</t:IsFolderContact>

<t:EditItems>None</t:EditItems>

<t:DeleteItems>None</t:DeleteItems>

<t:ReadItems>None</t:ReadItems>

<t:PermissionLevel>None</t:PermissionLevel>

</t:Permission>

<t:Permission>

<t:UserId>

<t:DistinguishedUser>Anonymous</t:DistinguishedUser>

</t:UserId>

<t:CanCreateItems>false</t:CanCreateItems>

<t:CanCreateSubFolders>false</t:CanCreateSubFolders>

<t:IsFolderOwner>false</t:IsFolderOwner>

<t:IsFolderVisible>false</t:IsFolderVisible>

<t:IsFolderContact>false</t:IsFolderContact>

<t:EditItems>None</t:EditItems>

<t:DeleteItems>None</t:DeleteItems>

<t:ReadItems>None</t:ReadItems>

<t:PermissionLevel>None</t:PermissionLevel>

</t:Permission>

<t:Permission>

<t:UserId>

<t:SID>S-1-5-21-1337771579-694202782-848329751-
1535223</t:SID>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

<t:DisplayName>Sadie Daniels</t:DisplayName>

</t:UserId>

<t:CanCreateItems>true</t:CanCreateItems>

<t:CanCreateSubFolders>false</t:CanCreateSubFolders>

<t:IsFolderOwner>false</t:IsFolderOwner>

<t:IsFolderVisible>true</t:IsFolderVisible>

<t:IsFolderContact>false</t:IsFolderContact>

<t:EditItems>All</t:EditItems>

<t:DeleteItems>All</t:DeleteItems>

<t:ReadItems>FullDetails</t:ReadItems>

<t:PermissionLevel>Editor</t:PermissionLevel>

</t:Permission>

</t:Permissions>

</t:PermissionSet>

<t:UnreadCount>0</t:UnreadCount>

</t:Folder>

</m:Folders>

</m:GetFolderResponseMessage>

</m:ResponseMessages>

</m:GetFolderResponse>

</s:Body>

</s:Envelope>

Next, use the UpdateFolder operation to send the updated PermissionSet, which does
not include the Permission for the removed user.

This is also the XML request that the EWS Managed API sends when you call the Update
method to remove folder permissions.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:UpdateFolder>

<m:FolderChanges>
<t:FolderChange>

<t:FolderId Id="EAAAAA=="

ChangeKey="AQAAABYAAADOilbYa8KaT7ZgMoTz2P+hAAABiRd5"
/>

<t:Updates>

<t:SetFolderField>

<t:FieldURI FieldURI="folder:PermissionSet" />

<t:Folder>

<t:PermissionSet>

<t:Permissions>

<t:Permission>

<t:UserId>

<t:DistinguishedUser>Default</t:DistinguishedUser>

</t:UserId>

<t:PermissionLevel>None</t:PermissionLevel>

</t:Permission>

<t:Permission>

<t:UserId>

<t:DistinguishedUser>Anonymous</t:DistinguishedUser>

</t:UserId>

<t:PermissionLevel>None</t:PermissionLevel>

</t:Permission>

</t:Permissions>

</t:PermissionSet>

</t:Folder>

</t:SetFolderField>

</t:Updates>

</t:FolderChange>

</m:FolderChanges>

</m:UpdateFolder>

</soap:Body>

</soap:Envelope>

The server responds to the UpdateFolder request with an UpdateFolderResponse


message that includes a ResponseCode element value of NoError, which indicates
that the update was successful.

Updating folder permissions by using the EWS


Managed API
You can also update folder permissions for a specific folder by using the EWS Managed
API. To update the permissions:

1. Remove the folder permissions for the outdated permissions, but do not call the
Update method (yet).

2. Add folder permissions for the new or changed users.

3. Call the Update method to save the changes.

If you try to add two sets of permissions for the same user, you will receive a
ServiceResponseException error with the following description: "The specified
permission set contains duplicate UserIds". In that case, remove the current permissions
from the Permission collection, then add the new permissions to the Permission
collection.

Updating folder permissions by using EWS


You can also update folder permissions for specific folders by using EWS by combining
the removal and addition process. To update the permissions:

1. Retrieve the folder's current permissions by using the GetFolder operation.

2. Send an updated list of permissions by using the UpdateFolder operation.

These are the same two operations you use to enable or remove access by using EWS.
The only difference is that when you receive the GetFolder response, it will contain a
Permission set for user. Simply replace that existing Permission element with the new
Permission element, and then send the UpdateFolder operation with the new
Permission value or values.

If you try to add two sets of permissions for the same user, you will receive a
ResponseCode value of ErrorDuplicateUserIdsSpecified. In that case, remove the
outdated Permission value for the user from the request and then retry the request.

Next steps
After you give a user permission to a specific folder, the user can access the folder as a
delegate. For more information, see:

Access email as a delegate by using EWS in Exchange

Access a calendar as a delegate by using EWS in Exchange

Access contacts as a delegate by using EWS in Exchange

See also
Delegate access and EWS in Exchange
Add and remove delegates by using EWS in Exchange
Folders and items in EWS in Exchange
Handling delegation-related errors in
EWS in Exchange
Article • 09/15/2021 • 2 minutes to read

Find out how to handle delegation-related errors in applications that you develop by
using the EWS Managed API or EWS in Exchange.

If your application uses delegation or adds or removes delegates, you might have to
handle delegation-related errors. You can handle these errors at runtime, or while you
are developing your EWS application. These errors are defined by the EWS Managed API
ServiceError enumeration and the EWS ResponseCode element.

Delegation-related errors
Error Occurs when Handle it by…
you try to…

ErrorItemNotFound Perform an Updating the delegate's


ErrorFolderNotFound operation on permissions to enable them to
a mailbox, access the folder or item by
folder, or calling the UpdateDelegates
item that you EWS Managed API method or
do not have the UpdateDelegate EWS
access to. operation, and then retrying the
request.

ErrorAccessDenied Modify an Updating your delegate


item that you permissions by calling the
do not have UpdateDelegate EWS Managed
sufficient API method or the
privileges to UpdateDelegate EWS
modify. operation, and then retrying the
request.

ErrorDelegateCannotAddOwner Attempt to Adding a different user as a


add the delegate, not the mailbox
mailbox owner.
owner as a
delegate to
their own
mailbox.
Error Occurs when Handle it by…
you try to…

ErrorDelegateAlreadyExists Add the Doing nothing, because the


delegate delegate already exists for the
when the mailbox owner. Or, if you're
delegate trying to change the
already permissions of an existing
exists. delegate, then use the
UpdateDelegates method or
the UpdateDelegate operation.

ErrorNotDelegate Modify Adding the user as a delegate


delegate for the mailbox before
permissions attempting to update or
for a user remove their permissions.
who has no
delegate
permissions
for the
mailbox.

ErrorDelegateNoUser Modify Creating the user in AD DS, or


delegate correcting the delegate
permissions information in the request.
for a user
who is not in
Active
Directory
Domain
Service (AD
DS).

ErrorSubscriptionDelegateAccessNotSupported Use a Subscribing to notifications as


delegate to the mailbox owner.
subscribe to
notifications
on behalf of
the mailbox
owner.
Error Occurs when Handle it by…
you try to…

ErrorWrongServerVersionDelegate Make a Using a delegate or adding a


request from delegate whose mailbox has
a delegate the same server version as the
that has a mailbox owner.
different
server
version than
the
principal's
mailbox
server.

ErrorMissingEmailAddress Make a Adding a mailbox to the


request using delegate's account.
a delegate
account that
does not
have a
mailbox.

See also
Delegate access and EWS in Exchange

Tools and resources for troubleshooting EWS applications for Exchange


Distribution groups and EWS in
Exchange
Article • 09/15/2021 • 5 minutes to read

Learn about the different types of distribution groups that are available in Exchange and
how you can manage them in your EWS Managed API or EWS application.

A distribution group is a collection of email addresses that are associated with a single
alias or email address. Distribution groups (also sometimes called distribution lists)
enable a user to send email to multiple people by using a single recipient address.
Because distribution group membership, and therefore the message recipients, can be
managed outside of individual email threads, distribution groups provide an excellent
way to enable the distribution of mail to a group of users. You can programmatically
create and manage distribution groups by using the EWS Managed API, EWS, and the
Exchange Management Shell. Before you start programming, let's explore the different
types of distribution groups that are available and your options for managing them.

Types of distribution groups


Exchange supports three types of distribution groups:

Universal distribution groups — Active Directory universal distribution group


objects that are mail-enabled. Universal distribution groups are used to distribute
messages to a group of recipients.

Security groups — Active Directory objects that are mail-enabled; also known as
universal security groups. Security groups are used to assign access permissions to
resources in Active Directory Domain Services (AD DS) as well as to distribute
messages.

Contact groups — Private distribution groups that are located in a user's mailbox.

The type of distribution group that you choose will depend on where you plan to store
the distribution group, who will use it, and what it will be used for.

Universal distribution groups


You can use universal distribution groups to consolidate groups of recipients into a
single alias or email address. Because universal distribution groups are stored in AD DS,
anyone can use them to send email, including users outside your organization. You can
use the EWS Managed API or EWS to expand a distribution group, but to create and
manage distribution groups, you'll need to use Exchange Management Shell cmdlets.

You can also use universal distribution groups to contain a collection of rooms; for
example, to make it easier for users to find a conference room for a meeting. Users can
add a room list — a universal distribution group that contains room resource mailboxes
— to a meeting request to find an available room without having to add each room
individually.

You can create a static universal distribution group that stays the same until you to
update the membership, or you can create a dynamic universal distribution group. A
dynamic universal distribution group queries Active Directory mail-enabled objects and
builds the group membership based on the results. The group membership is
recalculated whenever an email message is sent to the group.

Security groups
Universal distribution groups and security groups are identical in most ways. However,
unlike universal distribution groups, you can use security groups to assign permissions
to network resources in AD DS. You cannot use the EWS Managed API or EWS to create
and manage security groups; instead, you use Exchange Management Shell cmdlets.
But, just like universal distribution groups, you can use the EWS Managed API or EWS to
expand security groups.

Contact groups
If you don't want to give every user administrative access to the server to create
distribution groups, but you want to enable them to send a single message to a large
collection of people, you can do this by using contact groups. A contact group does not
have an email address associated with it, and it exists only in one user's mailbox; other
users won't have access to it. You can use the EWS Managed API or EWS to create
contact groups.

Managing distribution groups by using the


EWS Managed API or EWS
You can use the EWS Managed API or EWS to expand a universal distribution group or
security group and to control the creation and management of a contact group;
however, you cannot use these technologies to create or edit the members of those
groups.
Table 1. EWS Managed API methods and EWS operations for managing distribution
groups

EWS Managed EWS operation Use to…


API method

ContactGroup CreateItem
Create a contact group in the Exchange store.

class
methods NOTE: You cannot create a universal distribution group or
security group by using EWS Managed API or EWS.

ExpandGroup ExpandDL
Expand a universal distribution group, security group, or
contact group by retrieving a list of its members.

FindItems FindItem
Search for contact groups in the mailbox.

GetRooms
GetRooms
Retrieve a collection of all rooms in a specified room list in
an organization. A room list is a distribution group that only
contains room resource mailboxes.

ResolveName ResolveNames Search for and return possible candidates to match an


ambiguous name. The candidates can be distribution
groups.

You can use the information returned by the ExpandGroup method or the
ExpandDL operation to determine what types of members are in the group. The
member types are defined by the MailboxType EWS Managed API enumeration and
the MailboxType EWS element.

Table 2. Distribution group member types

MailboxType MailboxType Description


enumeration element
value value

Mailbox Mailbox A mail-enabled Active Directory object.

PublicGroup PublicDL A distribution group contained within the group you just
expanded. To get a full list of members, expand this group as
well.

ContactGroup PrivateDL A group of contacts that is located in the mailbox and is only
available to users of that mailbox.

Contact Contact An Exchange database contact or Active Directory mail contact.


Managing distribution groups by using the
Exchange Management Shell
You can use Exchange Management Shell cmdlets to create and manage universal
distribution groups and security groups in your code.

7 Note

You cannot use Exchange Management Shell cmdlets to manage contact groups.

Table 3. Exchange Management Shell cmdlets for working with distribution groups

Cmdlet Use to…

Disable-DistributionGroup Remove mail capabilities from a mail-enabled distribution group.

Enable-DistributionGroup
Mail-enable an existing universal group.

Get-DistributionGroup
Query for existing distribution groups.

New-DistributionGroup
Create a distribution group.

Remove- Delete an existing distribution group from AD DS.


DistributionGroup

Set-DistributionGroup
Modify the settings of an existing distribution group.

Add- Add a recipient to a distribution group.


DistributionGroupMember

Get- Find existing distribution group members.


DistributionGroupMember

Remove- Remove an existing recipient from a distribution group.


DistributionGroupMember

Update- Update a member of a specified distribution group.


DistributionGroupMember

Get- Retrieve the settings on an existing dynamic distribution group.


DynamicDistributionGroup

New- Create a dynamic distribution group.


DynamicDistributionGroup

Remove- Delete an existing dynamic distribution group. This cmdlet


DynamicDistributionGroup removes the dynamic distribution group from AD DS.
Cmdlet Use to…

Set- Modify the settings of an existing dynamic distribution group.


DynamicDistributionGroup

In this section
Create contact groups by using EWS in Exchange
Expand distribution groups by using EWS in Exchange 2013

See also
Develop web service clients for Exchange
Calling Exchange Management Shell Cmdlets from Managed Code
Create contact groups by using EWS in
Exchange
Article • 09/15/2021 • 2 minutes to read

Learn how to create a contact group by using the EWS Managed API or EWS in
Exchange.

You can create a contact group, which is a private distribution group, by using the EWS
Managed API or EWS. To create contact groups, use the methods in the ContactGroup
EWS Managed API class, or use the CreateItem EWS operation.

Note that you can't use the EWS Managed API or EWS to create a universal distribution
group or security group. To create a universal distribution group or security group, you
can use the New-DistributionGroup Exchange Management Shell cmdlet .

Create a contact group by using the EWS


Managed API
To create a contact group, you just need a couple pieces of information: a name for the
group, and the members to add to the group. The following example shows how to
create a simple contact group that contains a couple of group members.

C#

// Create a new contact group object.

ContactGroup myContactGroup = new ContactGroup(service);

// Give the group a name.

myContactGroup.DisplayName = "My Contact Group";

// Add some members to the group.


myContactGroup.Members.Add(new GroupMember("[email protected]"));

myContactGroup.Members.Add(new GroupMember("[email protected]"));

// Save the group.

myContactGroup.Save();

Create a contact group by using EWS


It might take a few more lines of code, but you can create a contact group by using the
CreateItem EWS operation. The following XML request example shows how you can
create a contact group. This is also the XML request that is sent when you use the EWS
Managed API to create a contact group.
XML

<?xml version="1.0" encoding="utf-8"?>

<CreateItem
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

MessageDisposition="SaveOnly">

<Items
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<DistributionList
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<DisplayName
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

My Contact Group

</DisplayName>

<Members
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Member
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Mailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<EmailAddress
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

[email protected]

</EmailAddress>

</Mailbox>

</Member>

<Member
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Mailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<EmailAddress
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

[email protected]

</EmailAddress>

</Mailbox>

</Member>

</Members>

</DistributionList>

</Items>

</CreateItem>

The following is an example of a successful XML response to the request. Notice that the
values returned include an item ID for the new contact group and a change key that you
can use in other code to modify the contact group or expand the group to see the
members. The item ID is shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<CreateItemResponse
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseMessages
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<CreateItemResponseMessage ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

NoError

</ResponseCode>

<Items
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<DistributionList
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<ItemId
xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

Id="AAMkADBlY…"

ChangeKey="EgAAABYAAAAD7hO1SJPWTbICFWZ4U3NMAABXzQiK" />

</DistributionList>

</Items>

</CreateItemResponseMessage>

</ResponseMessages>

</CreateItemResponse>

See also
Distribution groups and EWS in Exchange

Expand distribution groups by using EWS in Exchange 2013


Expand distribution groups by using
EWS in Exchange 2013
Article • 09/15/2021 • 4 minutes to read

Learn how to expand a distribution group by using the EWS Managed API or EWS in
Exchange.

You can use the ExchangeService.ExpandGroup EWS Managed API method or the
ExpandDL EWS operation to expand a distribution group to identify all recipients.

Because the ExpandGroup method is overloaded, you can call it in several ways:

ExpandGroup(String) - Expands a group identified by an SMTP address.

ExpandGroup(EmailAddress) - Expands a group identified by an email address.

ExpandGroup(ItemId) - Expands a group identified by a group ID.

ExpanGroup(String, String) - Expands a group identified by an SMTP address and


the routing type of that address.

Expand a universal distribution group or


security group by using EWS Managed API
The following example shows how to expand a universal distribution group or security
group by using an email address, which is the simplest approach. This example assumes
that service is a valid ExchangeService object and that the user has been
authenticated to an Exchange server.

C#

// Return the expanded group.

ExpandGroupResults myGroupMembers =
service.ExpandGroup("[email protected]");

// Display the group members.

foreach (EmailAddress address in myGroupMembers.Members)

Console.WriteLine("Email Address: {0}", address);

That's not a lot of code, but it's also pretty basic and might not give you what you are
looking for. So let's take it a step further. Distribution groups can also contain other
distribution groups. Simply expanding it will output the email address of the contained
distribution groups but not expand them. By adding a few more lines of code, you can
recursively expand the groups to output every contact.

C#

private static void ExpandDistributionLists(ExchangeService service, string


Mailbox)

// Return the expanded group.

ExpandGroupResults myGroupMembers = service.ExpandGroup(Mailbox);

// Display the group members.

foreach (EmailAddress address in myGroupMembers.Members)

// Check to see if the mailbox is a public group

if (address.MailboxType == MailboxType.PublicGroup)

// Call the function again to expand the contained

// distribution group.

ExpandDistributionLists(service, address.Address);

else

// Output the address of the mailbox.

Console.WriteLine("Email Address: {0}", address);

And now you can call this new function in the your code and expand all the public
distribution groups contained within the first one.

C#

ExpandDistributionLists(service, "[email protected]");

Expand a contact group by using EWS


Managed API
Because contact groups do not have an associated email address, you need to expand
the group based on the ItemId by using the ExpandGroup(ItemId) method. You can
create a function, as shown in the previous example, and change the second parameter
type from a string to an ItemId .
C#

private static void ExpandContactGroup(ExchangeService service, ItemId


groupID)

// Return the expanded group.

ExpandGroupResults myGroupMembers = service.ExpandGroup(groupID);

// Display the group members.

foreach (EmailAddress address in myGroupMembers.Members)

if (address.MailboxType == MailboxType.PublicGroup)

ExpandDistributionLists(service, address.Address);

else

Console.WriteLine("Email Address: {0}", address);

Now you can call this function by using the Exchange service object and the ItemId of
the contact group. Note that the ItemId in the example is shortened for readability.

C#

ExpandContactGroup(service, new ItemId("AAMkADBlY…");

Expand a universal distribution group or


security group by using EWS
The following example shows the XML request message that is sent from the client to
the server when you use the ExpandDL operation. This is also the XML request that
the EWS Managed API sends when you use the EWS Managed API to expand a universal
distribution group.

XML

<?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>

<ExpandDL
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</Mailbox>

</ExpandDL>

</soap:Body>

</soap:Envelope>

The following example shows the XML response message that is sent from the server to
the client. Notice that both mailboxes and universal distribution groups are returned.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<ExpandDLResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<ResponseMessages
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ExpandDLResponseMessage ResponseClass="Success">

<ResponseCode>NoError</ResponseCode>

<DLExpansion IncludesLastItemInRange="true" TotalItemsInView="4">

<Mailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Name>Sadie Daniels</Name>

<EmailAddress>[email protected]</EmailAddress>

<RoutingType>SMTP</RoutingType>

<MailboxType>Mailbox</MailboxType>

</Mailbox>

<Mailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Name>Alfred Welker</Name>

<EmailAddress>[email protected]</EmailAddress>

<RoutingType>SMTP</RoutingType>

<MailboxType>Mailbox</MailboxType>

</Mailbox>

<Mailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Name>Contoso Sales</Name>

<EmailAddress>[email protected]</EmailAddress>

<RoutingType>SMTP</RoutingType>

<MailboxType>PublicDL</MailboxType>

</Mailbox>

<Mailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Name>Contoso Support</Name>

<EmailAddress>[email protected]</EmailAddress>

<RoutingType>SMTP</RoutingType>

<MailboxType>PublicDL</MailboxType>

</Mailbox>

</DLExpansion>

</ExpandDLResponseMessage>

</ResponseMessages>

</ExpandDLResponse>

</s:Body>

</s:Envelope>

Unlike when you use the EWS Managed API, when you use EWS to expand a universal
distribution group, you can't recursively expand the distribution groups that are
returned. You will need to send an additional request to expand each of the distribution
groups included in the response.

Expand a contact group by using EWS


The XML request to expand a contact group is similar to a request to expand a
distribution group. Instead of an email address, you use the ItemId of the contact
group. The ItemId in this example is shortened for readability.

XML

<?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>

<ExpandDL
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<Mailbox>

<ItemId
xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
Id="AAMkADBlY…" />

</Mailbox>

</ExpandDL>

</soap:Body>

</soap:Envelope>

The structure of the XML response to a request to expand a contact group is the same
as the response to a request to expand a universal distribution group.

See also
Distribution groups and EWS in Exchange

Create contact groups by using EWS in Exchange


eDiscovery in EWS in Exchange
Article • 09/15/2021 • 2 minutes to read

Learn about eDiscovery in EWS in Exchange.

eDiscovery is a federated query web service that enables external applications to


perform queries of Exchange data.

Discovery consists of several phases, including identifying and preserving key data,
culling down and reviewing the data, and producing data in court. eDiscovery queries
facilitate the discovery process by providing a single discovery workflow across
Exchange and SharePoint.

eDiscovery operations
The eDiscovery functionality that is exposed by EWS is available via operations
introduced in Exchange Online, Exchange Online as part of Office 365, and versions of
Exchange starting with Exchange 2013.

Table 1. New operations for eDiscovery

Operation name Description

GetDiscoverySearchConfiguration Gets configuration information for in-place holds, saved


discovery searches, and the mailboxes that are enabled for
discovery search.

GetHoldOnMailboxes
Gets the status of a query-based hold, which is set by using
the SetHoldOnMailboxes operation .

GetNonIndexableItemDetails
Retrieves details about items that cannot be indexed. This
includes, but is not limited to, the item identifier, an error
code, an error description, when an attempt was made to
index the item, and additional information about the file.

GetNonIndexableItemStatistics
Retrieves the count of items that cannot be indexed in a
mailbox.

GetSearchableMailboxes
Gets a list of mailboxes that the client has permission to
search or perform eDiscovery on.

SearchMailboxes
Searches for items in specific mailboxes that match query
keywords.

SetHoldOnMailboxes
Sets a query-based hold on items.
See also
Develop web service clients for Exchange

Start using web services in Exchange

EWS client design overview for Exchange


Email and EWS in Exchange
Article • 09/14/2022 • 4 minutes to read

Find out how to work with email messages, including how to create an email and how to
perform other email-related tasks by using the EWS Managed API or EWS in Exchange.

At its core, Exchange is about email. But what makes an email an email? Well, email
messages are one of the strongly typed items in Exchange, which means that they
contain a particular set of properties, even before they're sent. Email messages are
represented by the EmailMessage class in the EWS Managed API and by the
Message element and its child elements in EWS.

In the EWS Managed API, the EmailMessage object derives from the Item object. The
EmailMessage class extends the Item class by providing additional properties like
EmailMessage.Sender and EmailMessage.IsRead , which are now common to nearly
all messaging scenarios. When you get, update, or delete an email message, in most
cases you can do that by using the EmailMessage object or the base Item object,
depending on whether the properties you're working with are in the
EmailMessageSchema or the ItemSchema class. Item creation is different because
the Item class does not have a constructor, so when you're creating an email, you'll use
the EmailMessage constructor to create it and the EmailMessage.Save or
EmailMessage.SendAndSaveCopy methods to save it, or send it and save it.

Similarly, in EWS, use the CreateItem operation with the Message element to create
an email message. To get, update, or delete emails by using EWS, the fact that the item
being modified is an email message is not important, aside from the fact that additional
properties are available on email messages. The same operations that are used for other
strongly typed items are also used for email messages.

Task EWS Managed API method EWS operation

Create EmailMessage.Save
CreateItem

Get EmailMessage.Bind
GetItem

Update Item.Update
UpdateItem

Delete Item.Delete
DeleteItem

Because email messages are simply strongly typed items, in some cases you work with
them in the same way that you work with generic items.
Create an email message by using the EWS
Managed API
You can create an email message by using the EWS Managed API Save method, as
shown in the code in the following example. Note that the example only saves the
message in the Drafts folder, it does not send the message. For information about how
to send the message or create and send the message in one step, see Send email
messages by using EWS in Exchange.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server.

C#

// Create a new email message.

EmailMessage message = new EmailMessage(service);

// Set properties on the email message.

message.ToRecipients.Add("[email protected]");

message.Subject = "Project priorities";

message.Body = "(1) Buy pizza, (2) Eat pizza";

// Save the email message to the Drafts folder (where it can be retrieved,
updated, and sent at a later time).

// This method call results in a CreateItem call to EWS.

message.Save(WellKnownFolderName.Drafts);

Console.WriteLine("A draft email message with the subject '" +


message.Subject + "' has been saved to the Drafts folder.");

Create an email message by using EWS


You can create an email message by using the EWS CreateItem operation, as shown in
the following example. This is also the XML request that the EWS Managed API sends
when you create an email message. Note that the following example only saves the
message in the Drafts folder, it does not send the message. For information about how
to send the message or create and send the message in one ste, see Send email
messages by using EWS in Exchange.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010_SP2" />

</soap:Header>

<soap:Body>

<m:CreateItem MessageDisposition="SaveOnly">

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="drafts" />

</m:SavedItemFolderId>

<m:Items>

<t:Message>

<t:Subject>Project priorities</t:Subject>

<t:Body BodyType="HTML">(1) Buy pizza, (2) Eat pizza</t:Body>

<t:ToRecipients>

<t:Mailbox>
<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:ToRecipients>

</t:Message>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The server responds to the CreateItem request with a CreateItemResponse message


that includes a ResponseCode value of NoError, which indicates that the email was
created successfully, and the ItemId of the newly created message.

Get, update, and delete an email message by


using the EWS Managed API
You can use the EWS Managed API to get, update, or delete an email message in the
same way that you perform these actions on any generic item from the Exchange store.
For more information, see Work with Exchange mailbox items by using EWS in
Exchange.

If you're updating an email message, see Email properties and elements in EWS in
Exchange for a list of writable email message properties. To send a draft message after
you've updated it, see Send a draft email message by using the EWS Managed API.

Get, update, and delete an email message by


using EWS
You can use EWS to get, update, and delete an email message in the same way that you
perform these actions on any generic item from the Exchange store. For more
information, see Work with Exchange mailbox items by using EWS in Exchange.

If you're updating an email message, see Email properties and elements in EWS in
Exchange for a list of writable email message properties. To send a draft message after
you've updated it, see Send a draft email message by using EWS.

In this section
Email properties and elements in EWS in Exchange

Send email messages by using EWS in Exchange

Respond to email messages by using EWS in Exchange

Move and copy email messages by using EWS in Exchange

Work with conversations by using EWS in Exchange

Extract an entity from an email message by using EWS in Exchange

Process email messages in batches by using EWS in Exchange

See also
Develop web service clients for Exchange
Folders and items in EWS in Exchange
Email properties and elements in EWS in
Exchange
Article • 01/15/2020 • 4 minutes to read

Learn about the first-class and other properties and elements that you can get on email
messages by using the EWS Managed API or EWS in Exchange.

Email messages have more than 50 properties, and getting the ones you want, when
you want them, can be confusing if you don't know where to look. The most important
thing to know about working with email properties and elements is which are included
in the set of first-class properties and elements that is returned by each of the main
retrieval methods and operations. The set of first-class properties that is returned varies
based on the retrieval method that you use. It's also important not to be fooled by the
AllProperties value of the BaseShape EWS element, which corresponds to the
BasePropertySet.FirstClassMessageProperties enumeration value in the EWS Managed
API. This value doesn't actually include all properties, it only includes the first-class
properties.

First-class properties and elements for email


messages
The set of first-class properties and elements that are returned by the EWS Managed API
EmailMessage.Bind method and the EWS GetItem operation is slightly different
than the set of first-class properties and elements that is returned by the EWS Managed
API ExchangeService.FindItems method and the EWS FindItem operation. The first-
class properties returned by the FindItems method and FindItem operation are a subset
of the properties returned by the Bind method and GetItem operation. Table 1 lists all
the first-class properties returned by the Bind method and the GetItem operation, and
specifies which of those are not returned by the FindItems method or FindItem
operation. Note that you cannot extend the FindItems method or the FindItem
operation to retrieve additional properties and elements such as ToRecipients,
CcRecipients, and BccRecipients. If you need to retrieve those values, use the FindItems
method or the FindItem operation to get the item IDs of the emails, and then use the
Bind method or the GetItem operation, to retrieve the required properties. For code
examples that show how to retrieve items by using the Bind or the FindItems method,
see Get an item by using the EWS Managed API. For code examples that show how to
retrieve items by using the GetItem or FindItem operations, see Get an item by using
EWS.
The first-class properties and elements are listed in the following table in the order in
which they appear in a response.

Table 1. First-class email properties and elements

EWS Managed API property EWS element First-class Read-


property for write
the FindItems or
method or read-
the FindItem only
operation?

Id
ItemId
Yes Read-
only

ParentFolderId ParentFolderId Yes Read-


only

ItemClass
ItemClass
Yes Read-
write

Subject
Subject
Yes Read-
write

Sensitivity
Sensitivity
Yes Read-
only

Body
Body
No Read-
write

Attachments
Attachments
No Read-
write

DateTimeReceived
DateTimeReceived
Yes Read-
only

Size
Size
Yes Read-
only

Categories
Categories
No Read-
write

Importance
Importance
Yes Read-
write

InReplyTo
InReplyTo
Yes Read-
write

IsSubmitted
IsSubmitted
Yes Read-
only
EWS Managed API property EWS element First-class Read-
property for write
the FindItems or
method or read-
the FindItem only
operation?

IsDraft
IsDraft
Yes Read-
only

IsFromMe
IsFromMe
Yes Read-
only

IsResend
IsResend
Yes Read-
only

IsUnmodified
IsUnmodified
Yes Read-
only

InternetMessageHeaders
InternetMessageHeaders
No Read-
only

DateTimeSent
DateTimeSent
Yes Read-
only

DateTimeCreated
DateTimeCreated
Yes Read-
only

AllowedResponseActions
ResponseObjects
No Read-
only

ReminderDueBy
ReminderDueBy
Yes Read-
write

IsReminderSet
ReminderIsSet
Yes Read-
write

ReminderMinutesBeforeStart
ReminderMinutesBeforeStart
Yes Read-
write

DisplayCc
DisplayCc
Yes Read-
only

DisplayTo
DisplayTo
Yes Read-
only

HasAttachments
HasAttachments
Yes Read-
only

Culture
Culture
Yes Read-
write
EWS Managed API property EWS element First-class Read-
property for write
the FindItems or
method or read-
the FindItem only
operation?

EffectiveRights
EffectiveRights
Yes Read-
only

LastModifiedName
LastModifiedName
Yes Read-
only

LastModifiedTime
LastModifiedTime
Yes Read-
only

IsAssociated
IsAssociated
Yes Read-
write

WebClientReadFormQueryString WebClientReadFormQueryString Yes Read-


only

WebClientEditFormQueryString
WebClientEditFormQueryString
Yes Read-
only

ConversationId
ConversationId
Yes Read-
only

Flag
Flag
Yes Read-
write

InstanceKey
InstanceKey
Yes Read-
only

EntityExtractionResult
EntityExtractionResult
No Read-
only

Sender
Sender
Yes Read-
write

ToRecipients
ToRecipients
No Read-
only

CcRecipients
CcRecipients
No Read-
only

BccRecipients
BccRecipients
No Read-
only

IsReadReceiptRequested
IsReadReceiptRequested
Yes Read-
write
EWS Managed API property EWS element First-class Read-
property for write
the FindItems or
method or read-
the FindItem only
operation?

IsDeliveryReceiptRequested
IsDeliveryReceiptRequested
Yes Read-
write

ConversationIndex
ConversationIndex
Yes Read-
only

ConversationTopic
ConversationTopic
Yes Read-
only

From
From
Yes Read-
write

InternetMessageId
InternetMessageId
Yes Read-
only

IsRead
IsRead
Yes Read-
write

IsResponseRequested
IsResponseRequested
Yes Read-
write

ReplyTo
ReplyTo
No Read-
only

References
References
Yes Read-
write

ReceivedBy
ReceivedBy
Yes Read-
only

ReceivedRepresenting
ReceivedRepresenting
Yes Read-
only

Other properties and elements for email


messages
Not all important email properties and elements are first-class properties and elements.
To get the other properties or elements, you need to add them to your PropertySet if
you're using the EWS Managed API, or use a property path to add them to your EWS
operation call. For example, to retrieve the text body and the MIME content of a
message, create your PropertySet as shown for the Bind or Load method.
C#

PropertySet(BasePropertySet.IdOnly, ItemSchema.TextBody,
ItemSchema.MimeContent);

Or if you're using EWS, add the elements to the AdditionalProperties element in your
GetItem operation request, as shown.

XML

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:TextBody" />

<t:FieldURI FieldURI="item:MimeContent" />

</t:AdditionalProperties>

EmailMessage properties inherited from the EWS Managed API ServiceObject object
cannot be included in a property set for the Bind method; however, all the
ServiceObject properties are readable on the EmailMessage object and are retrieved by
the Bind method.

Table 2. Other email properties and elements

EWS Managed API property EWS element Read-write or read-only

ArchiveTag
ArchiveTag
Read-write

ExtendedProperties
ExtendedProperty
Read-only

IconIndex
IconIndex
Read-only

IsAttachment
Not available Read-only

IsDirty
Not available Read-only

IsNew
Not available Read-only

Item
Item
Read-only

MimeContent
MimeContent
Read-only

Not available MimeContentUTF8


Read-only

NormalizedBody
NormalizedBody
Read-only

PolicyTag
PolicyTag
Read-write

Preview
Preview
Read-write

RetentionDate
RetentionDate
Read-only
EWS Managed API property EWS element Read-write or read-only

Schema
Not available Read-only

Service
Not available Read-only

StoreEntryId
StoreEntryId
Read-only

TextBody
TextBody
Read-only

UniqueBody
UniqueBody
Read-only

See also
Email and EWS in Exchange

Properties and extended properties in EWS in Exchange

Property sets and response shapes in EWS in Exchange

Work with Exchange mailbox items by using EWS in Exchange


Send email messages by using EWS in
Exchange
Article • 01/15/2020 • 7 minutes to read

Learn how to send new or draft email messages, or to send a delayed email message by
using the EWS Managed API or EWS in Exchange.

Whether you are using the EWS Managed API or EWS, you can send email messages in
two ways. You can either send an existing message, such as a message stored in your
Drafts folder, or you can create and send an email in one step. The methods and
operations that you use to send the message are the same whether you're sending a
message immediately, or sending a delayed message.

Table 1. EWS Managed API methods and EWS operations for sending email messages

Task EWS Managed API method EWS operation

Send a new email message EmailMessage.SendAndSaveCopy


CreateItem

Send an existing email message EmailMessage.Send


SendItem

Send a new email message by using the EWS


Managed API
The following code example shows how to use the EmailMessage object to create an
email message and the SendAndSaveCopy method to send the message to the
recipient and save the message in the Sent Items folder.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server.

C#

// Create an email message and provide it with connection

// configuration information by using an ExchangeService object named


service.

EmailMessage message = new EmailMessage(service);

// Set properties on the email message.

message.Subject = "Company Soccer Team";

message.Body = "Are you interested in joining?";

message.ToRecipients.Add("[email protected]");

// Send the email message and save a copy.

// This method call results in a CreateItem call to EWS.

message.SendAndSaveCopy();

Console.WriteLine("An email with the subject '" + message.Subject + "' has


been sent to '" + message.ToRecipients[0] + "' and saved in the SendItems
folder.");

Send a new email message by using EWS


The following code example shows how to use the CreateItem operation with a
MessageDisposition value of SendAndSaveCopy to create an email message, send the
message to the recipient, and save the message in the Sent Items folder. This is also the
XML request that the EWS Managed API sends when you send a new email message.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:CreateItem MessageDisposition="SendAndSaveCopy">

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="sentitems" />

</m:SavedItemFolderId>

<m:Items>

<t:Message>

<t:Subject>Company Soccer Team</t:Subject>

<t:Body BodyType="HTML">Are you interested in joining?</t:Body>

<t:ToRecipients>

<t:Mailbox>
<t:EmailAddress>[email protected] </t:EmailAddress>

</t:Mailbox>

</t:ToRecipients>

</t:Message>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The server responds to the CreateItem request with a CreateItemResponse message


that includes a ResponseCode value of NoError, which indicates that the email was
created successfully, and the ItemId of the newly created message.
Send a draft email message by using the EWS
Managed API
The following code example shows how to send a message that was stored in the Drafts
folder, as shown in Create an email message by using the EWS Managed API. First, use
the Bind method to retrieve the message, and then use the Send method to send
the email message, as shown in the following code example. Note that this method
does not save the sent message in the Sent Items folder.

In this case, the EmailMessageSchema.Subject and


EmailMessageSchema.ToRecipients properties are added to the PropertySet so that
the values can be included in the console output.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server.

C#

// As a best practice, create a property set that limits the properties


returned by the Bind method to only those that are required.

PropertySet propSet = new PropertySet(BasePropertySet.IdOnly,


EmailMessageSchema.Subject, EmailMessageSchema.ToRecipients);

// This method call results in a GetItem call to EWS.

EmailMessage message = EmailMessage.Bind(service, ItemId, propSet);

// Send the email message.

// This method call results in a SendItem call to EWS.

message.Send();

Console.WriteLine("An email with the subject '" + message.Subject + "' has


been sent to '" + message.ToRecipients[0] + "'.");

Send a draft email message by using EWS


The following code examples show how to send a message that was previously stored in
the Drafts folder, as shown in Create an email message by using EWS. First use the
GetItem operation to retrieve the email message to send. Then use the SendItem
operation to send the email message to recipients and save it in the Sent Items folder.

The first message, the GetItem request message, specifies the ItemId of the draft
email message to bind to, and elements in the ItemShape element limit the results to
include in the GetItem response. The ItemShape element has a BaseShape of IdOnly,
and the AdditionalProperties element includes the FieldURI values for the Subject
property from the Item schema and the ToRecipients property from the Message
schema, which means that only the ItemId, Subject , and ToRecipients elements will
be returned to the client in the response. For more information about limiting the values
returned in calls and the meaning of the BaseShape element, see Property sets and
response shapes in EWS in Exchange.

This is also the XML request that is sent by the EWS Managed API when calling the
Bind method. The values of some attributes and elements have been shortened for
readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:GetItem>

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

<t:FieldURI FieldURI="message:ToRecipients" />

</t:AdditionalProperties>

</m:ItemShape>

<m:ItemIds>

<t:ItemId Id="AAMkADE4=" />

</m:ItemIds>

</m:GetItem>

</soap:Body>

</soap:Envelope>

The following example shows the XML response that the server returns after it processes
the GetItem operation. The response indicates that the email message was retrieved
successfully, and includes the Subject and ToRecipient elements as requested. The
values of some attributes and elements have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="842"

MinorBuildNumber="10"

Version="V2_8"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Message>
<t:ItemId Id="AAMkADE4="

ChangeKey="CQAAABYA" />

<t:Subject>Project priorities</t:Subject>

<t:ToRecipients>

<t:Mailbox>

<t:Name>[email protected]</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>OneOff</t:MailboxType>

</t:Mailbox>

</t:ToRecipients>

</t:Message>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</m:GetItemResponse>

</s:Body>

</s:Envelope>

The second message, the SendItem request message, specifies the ItemId of the email
message to send, as well as the SavedItemFolderId , which specifies the folder in which
to save the sent item.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:SendItem SaveItemToFolder="true">

<m:ItemIds>

<t:ItemId Id="AAMkADE4="

ChangeKey="CQAAABYA" />

</m:ItemIds>

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="sentitems" />

</m:SavedItemFolderId>

</m:SendItem>

</soap:Body>

</soap:Envelope>

The server responds to the SendItem request with a SendItemResponse message that
includes a ResponseCode value of NoError, which indicates that the email was sent
successfully.

Send a delayed email message by using the


EWS Managed API
The following code example shows how to use the EmailMessage object to create an
email message, the ExtendedPropertyDefinition class to create a property definition
for the PidTagDeferredSendTime (0x3FEF0040) property, and the SendAndSaveCopy
method to send a delayed message and save the message in the Sent Items folder.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server.

C#

// Create a new email message.

EmailMessage message = new EmailMessage(service);

// Specify the email recipient and subject.

message.ToRecipients.Add("[email protected]");

message.Subject = "Delayed email";

// Identify the extended property that can be used to specify when to send
the email.

ExtendedPropertyDefinition PidTagDeferredSendTime = new


ExtendedPropertyDefinition(16367, MapiPropertyType.SystemTime);

// Set the time that will be used to specify when the email is sent.

// In this example, the email will be sent one minute after the next line
executes,

// provided that the message.SendAndSaveCopy request is processed by the


server within one minute.

string sendTime = DateTime.Now.AddMinutes(1).ToUniversalTime().ToString();

// Specify when to send the email by setting the value of the extended
property.

message.SetExtendedProperty(PidTagDeferredSendTime, sendTime);

// Specify the email body.

StringBuilder str = new StringBuilder();

str.AppendLine("The client submitted the SendAndSaveCopy request at: " +


DateTime.Now.ToUniversalTime().ToString() + ".");

str.AppendLine("The email message will be sent at: " + sendTime + ".");

message.Body = str.ToString();

Console.WriteLine("");

Console.WriteLine("The client submitted the SendAndSaveCopy request at: " +


DateTime.Now.ToUniversalTime().ToString() + ".");

Console.WriteLine("The email message will be sent at: " + sendTime + ".");

// Submit the request to send the email message.

message.SendAndSaveCopy();

Send a delayed email message by using EWS


The following code example shows how to use the CreateItem operation with a
MessageDisposition value of SendAndSaveCopy to create an email message, the
ExtendedProperty element to create a property definition for the
PidTagDeferredSendTime (0x3FEF0040) property to set a time to send the message,
and the SavedItemFolderId element to save the sent message in the Sent Items folder.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange207_SP1" />

</soap:Header>

<soap:Body>

<m:CreateItem MessageDisposition="SendAndSaveCopy">

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="sentitems" />

</m:SavedItemFolderId>

<m:Items>

<t:Message>

<t:Subject>Delayed email</t:Subject>

<t:Body BodyType="HTML">

The client submitted the SendAndSaveCopy request at: 1/2/2014


9:08:52 PM.

The email message will be sent at: 1/2/2014 9:09:52 PM.

</t:Body>

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertyTag="16367"

PropertyType="SystemTime" />

<t:Value>2014-01-02T21:09:52.000</t:Value>

</t:ExtendedProperty>

<t:ToRecipients>

<t:Mailbox>
<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:ToRecipients>

</t:Message>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The server responds to the CreateItem request with a CreateItemResponse message


that includes a ResponseCode value of NoError, which indicates that the email was
created successfully, and the ItemId of the newly created message.

See also
Email and EWS in Exchange

Respond to email messages by using EWS in Exchange


Respond to email messages by using
EWS in Exchange
Article • 09/15/2021 • 7 minutes to read

Learn how to respond to email messages by using the EWS Managed API or EWS in
Exchange.

You can use the EWS Managed API or EWS to respond to messages by replying to them
or forwarding them to recipients.

Table 1. EWS Managed API methods and EWS operations for responding to email
messages

Task EWS Managed API method EWS operation

Reply to an EmailMessage.Reply
CreateItem , where the Items element has
email EmailMessage.CreateReply
a child element of either ReplyToItem or
message ReplyAllToItem .

Forward an EmailMessage.Forward
CreateItem , where the Items element has
email EmailMessage.CreateForward a child element of ForwardItem .
message

Reply to an email message by using the EWS


Managed API
The EWS Managed API provides two methods that you can use to respond to messages:
Reply and CreateReply . The Reply method only takes two parameters: the response
message to prepend to the existing body, and a Boolean value that indicates whether
the response should go to all recipients (true) or just the sender (false). If you need to
add additional recipients to a message, set additional properties on a response, or add
an attachment, use the CreateReply method, which enables you to set all the first-class
properties that are available on an EmailMessage object.

The following code example shows how to use the Reply method to respond to an
email message.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server. The local variable ItemId is the Id of
the item to respond to. The example calls the FindRecentlySent method to verify that
the message was marked as replied to.
C#

// As a best practice, limit the properties returned by the Bind method to


only those that are required.

PropertySet propSet = new PropertySet(BasePropertySet.IdOnly,


ItemSchema.LastModifiedTime);

// Bind to the email message to reply to by using the ItemId.

// This method call results in a GetItem call to EWS.

EmailMessage message = EmailMessage.Bind(service, ItemId, propSet);

string myReply = "This is the message body of the email reply.";

bool replyToAll = false;

// Send the response message.

// This method call results in a CreateItem call to EWS.

message.Reply(myReply, replyToAll);

// Verify that the response was sent by calling FindRecentlySent.

FindRecentlySent(message);

The following code example shows how to use the CreateReply method to respond to
an email message.

C#

// Bind to the email message to reply to by using the ItemId.

// This method call results in a GetItem call to EWS.

EmailMessage message = EmailMessage.Bind(service, ItemId,


BasePropertySet.IdOnly);

// Create the reply response message from the original email message.

// Indicate whether the message is a reply or reply all type of reply.

bool replyToAll = true;


ResponseMessage responseMessage = message.CreateReply(replyToAll);

// Prepend the reply to the message body.

string myReply = "This is the message body of the email reply.";

responseMessage.BodyPrefix = myReply;

// Send the response message.

// This method call results in a CreateItem call to EWS.

responseMessage.SendAndSaveCopy();

// Check that the response was sent by calling FindRecentlySent.

FindRecentlySent(message);

If you need to add an attachment to the response message, replace the call to the
SendAndSaveCopy method with the following code.

C#

EmailMessage reply = responseMessage.Save();

reply.Attachments.AddFileAttachment("attachmentname.txt");

reply.Update(ConflictResolutionMode.AutoResolve);

reply.SendAndSaveCopy();

Reply to an email message by using EWS


The following code example shows how to reply to a message by using EWS. Use the
CreateItem operation with the MessageDisposition attribute set to
SendAndSaveCopy to send the message and save the response in the Sent Items folder.
Include either the ReplyAllToItem element as a child of the Items element to reply
to everyone on the message thread, or include the ReplyToItem element to reply only
to the sender.

This is also the XML request that the EWS Managed API sends when calling either the
Reply or the CreateReply method.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version=" Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:CreateItem MessageDisposition="SendAndSaveCopy">

<m:Items>

<t:ReplyAllToItem>

<t:ReferenceItemId Id="AAMkADE4="

ChangeKey="CQAAABYA" />

<t:NewBodyContent BodyType="HTML">This is the message body of the


email reply.</t:NewBodyContent>

</t:ReplyAllToItem>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The server responds to the CreateItem request with a CreateItemResponse message


that includes a ResponseCode element value of NoError, which indicates that the
reply was created and sent successfully.

If you need to add an attachment to your response message, call the CreateItem
operation as specified above, but change the MessageDisposition to SaveOnly. Then
call the CreateAttachment operation, followed by the SendItem operation.
Forward an email message by using the EWS
Managed API
The EWS Managed API provides two methods that you can use to forward messages:
Forward and CreateForward . The Forward method only takes two parameters: the
message to prepend to the existing body, and an array or collection of recipients,
depending on the overload you choose to use. If you need to add an attachment to the
message you're forwarding, or set additional properties on the new message, use the
CreateForward method, which enables you to set all the properties that are available on
an EmailMessage object.

The following code example shows how to use the Forward method to forward an email
message to one recipient.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server. The local variable ItemId is the Id of
the item to forward. The example calls the FindRecentlySent method to verify that the
message was marked as forwarded.

C#

// Bind to the email message to reply to by using the ItemId.

// This method call results in a GetItem call to EWS.

EmailMessage message = EmailMessage.Bind(service, ItemId,


BasePropertySet.IdOnly);

string myForward = "This is the message body of the forwarded email.";

// Send the response message.

// This method call results in a CreateItem call to EWS.

message.Forward(myForward, "[email protected]");

// Verify that the forwarded response was sent by calling FindRecentlySent.

FindRecentlySent(message);

The following code example shows how to use the CreateForward method to forward
an email message to one recipient.

C#

// Bind to the email message to reply to by using the ItemId.

// This method call results in a GetItem call to EWS.

EmailMessage message = EmailMessage.Bind(service, ItemId,


BasePropertySet.IdOnly);

// Create the reply response message from the original email message.

// Indicate whether the message is a reply or reply all type of reply.

ResponseMessage forwardMessage = message.CreateForward();

// Set properties on the email message.

forwardMessage.ToRecipients.Add("[email protected]");

forwardMessage.Body = "Sadie,<br><br>I thought you'd be interested in this


thread.<br><br>-Mack";

// Send and save a copy of the replied email message in the default Sent
Items folder.

forwardMessage.SendAndSaveCopy();
// Verify that the forwarded message was sent by calling FindRecentlySent.

FindRecentlySent(message);

If you need to add an attachment to the forwarded message, replace the call to the
SendAndSaveCopy method with the following code.

C#

EmailMessage forward = forwardMessage.Save();

forward.Attachments.AddFileAttachment("attachmentname.txt");

forward.Update(ConflictResolutionMode.AutoResolve);

forward.SendAndSaveCopy();

Forward an email message by using EWS


The following code example shows how to forward a message by using EWS. Use the
CreateItem operation with the MessageDisposition attribute set to
SendAndSaveCopy to send the message and save the response in the Sent Items folder.
The ForwardItem element indicates that the item is a forwarded message.

This is also the XML request that the EWS Managed API sends when calling either the
Forward or the CreateForward method.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:CreateItem MessageDisposition="SendAndSaveCopy">

<m:Items>

<t:ForwardItem>

<t:ToRecipients>

<t:Mailbox>
<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:ToRecipients>

<t:ReferenceItemId Id="AAAMkADE="

ChangeKey="CQAAABYA" />

<t:NewBodyContent BodyType="HTML">This is the message body of the


forwarded email.</t:NewBodyContent>

</t:ForwardItem>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The server responds to the CreateItem request with a CreateItemResponse message


that includes a ResponseCode element value of NoError, which indicates that the
forwarded message was created and sent successfully.

If you need to add an attachment to your response message, call the CreateItem
operation, but change the MessageDisposition to SaveOnly. Then call the
CreateAttachment operation, followed by the SendItem operation.

Find the message last replied to or forwarded


by using the EWS Managed API
The following code example shows how to find the last verb executed and the time the
last verb was executed on the item specified. This method is called from other EWS
Managed API code examples in this topic to verify that the items you replied to or
forwarded were marked as replied to or forwarded in your Inbox.

The example uses the PidTagLastVerbExecuted (0x10820003) extended property to


determine whether the message was a reply, a reply all, or a forward, and the
PidTagLastVerbExecutionTime (0x10820040) extended property to determine when
the reply or forward was sent.

C#

public static void FindRecentlySent(EmailMessage messageToCheck)

// Create extended property definitions for PidTagLastVerbExecuted and


PidTagLastVerbExecutionTime.

ExtendedPropertyDefinition PidTagLastVerbExecuted = new


ExtendedPropertyDefinition(0x1081, MapiPropertyType.Integer);

ExtendedPropertyDefinition PidTagLastVerbExecutionTime = new


ExtendedPropertyDefinition(0x1082, MapiPropertyType.SystemTime);

PropertySet propSet = new PropertySet(BasePropertySet.IdOnly,


EmailMessageSchema.Subject, PidTagLastVerbExecutionTime,
PidTagLastVerbExecuted);

messageToCheck = EmailMessage.Bind(service, messageToCheck.Id, propSet);

// Determine the last verb executed on the message and display output.

object responseType;

if (messageToCheck.TryGetProperty(PidTagLastVerbExecuted, out
responseType))

object ReplyTime = null;

switch (((Int32)responseType))

case 102: Console.WriteLine("A reply was sent to the '" +


messageToCheck.Subject.ToString() + "' email message at");

break;

case 103: Console.WriteLine("A reply all was sent to the '" +


messageToCheck.Subject.ToString() + "' email message at");

break;

case 104: Console.WriteLine("The '" +


messageToCheck.Subject.ToString() + "' email message was forwarded at");

break;

if (messageToCheck.TryGetProperty(PidTagLastVerbExecutionTime, out
ReplyTime))

Console.WriteLine(((DateTime)ReplyTime).ToString() + ".");

else

Console.WriteLine("No changes were made to '" +


messageToCheck.Subject.ToString() + "'.");

See also
Email and EWS in Exchange

Send email messages by using EWS in Exchange


Move and copy email messages by
using EWS in Exchange
Article • 01/15/2020 • 5 minutes to read

Learn how to move and copy email messages by using the EWS Managed API or EWS in
Exchange.

You can use the EWS Managed API or EWS to move and copy email messages in a
mailbox.

Table 1. EWS Managed API methods and EWS operations for moving and copying
email messages

Task EWS Managed API method EWS operation

Move an email message EmailMessage.Move


MoveItem

Copy an email message EmailMessage.Copy


CopyItem

It's important to note that when you move or copy an email message into a different
folder, a new item is created in the new folder with a unique item ID, and the original
message is deleted. If you're moving or copying an email message between two folders
in the same mailbox, the new item is returned in the response, which gives you access to
the new item ID. However, if you're moving or copying an email message between two
mailboxes or between a mailbox and a public folder, the new item is not returned in the
response. To access the moved message in that scenario, use the EWS Managed API
FindItems method or EWS FindItem operation, create an extended property
definition for the PidTagSearchKey (0x300B0102) property, or create and set a custom
extended property and then search for the custom extended property in the new folder.

Deleting an email message is different than moving an item to the Deleted Items folder.
If you use the EWS Managed API Item.Delete method or the EWS DeleteItem
operation, the item specified in the request is removed from the original folder, and a
copy is placed in the Deleted Items folder with a new item ID. Unlike when you move or
copy any item, the new item is not returned in the Delete method or the DeleteItem
operation response. The steps involved in deleting an email by using the EWS Managed
API or EWS are the same as those for deleting any generic item from the Exchange
store.
Move an email message by using the EWS
Managed API
The following code example shows how to use the EmailMessage.Move method to
move an existing email message from one folder to another.

This example assumes that service is a valid ExchangeService object, and that ItemId
is the Id of the email message to move or copy.

C#

// As a best practice, limit the properties returned by the Bind method to


only those that are required.

PropertySet propSet = new PropertySet(BasePropertySet.IdOnly,


EmailMessageSchema.Subject, EmailMessageSchema.ParentFolderId);

// Bind to the existing item by using the ItemId.

// This method call results in a GetItem call to EWS.

EmailMessage beforeMessage = EmailMessage.Bind(service, ItemId, propSet);

// Move the specified mail to the JunkEmail folder and store the returned
item.

Item item = beforeMessage.Move(WellKnownFolderName.JunkEmail);

// Check that the item was moved by binding to the moved email message

// and retrieving the new ParentFolderId.

// This method call results in a GetItem call to EWS.

EmailMessage movedMessage = EmailMessage.Bind(service, item.Id, propSet);

Console.WriteLine("An email message with the subject '" +


beforeMessage.Subject + "' has been moved from the '" +
beforeMessage.ParentFolderId + "' folder to the '" +
movedMessage.ParentFolderId + "' folder.");

Move an email message by using EWS


The following code example shows how to use the MoveItem operation to move an
email message to the Junk Email folder.

This is also the XML request that is sent by the EWS Managed API when calling the
Move method. The values of some attributes and elements have been shortened for
readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:MoveItem>

<m:ToFolderId>

<t:DistinguishedFolderId Id="junkemail" />

</m:ToFolderId>

<m:ItemIds>

<t:ItemId Id="AfwDoAAA="

ChangeKey="CQAAABYAAAApjGm7TnMWQ5TzjbhziLL0AAF25sM1" />

</m:ItemIds>

</m:MoveItem>

</soap:Body>

</soap:Envelope>

The server responds to the MoveItem request with a MoveItemResponse message


that includes a ResponseCode value of NoError, which indicates that the email
message was moved successfully. The response also includes the ItemId for the email
message in the new folder, which is important to store because the ItemId is different in
the new folder.

Copy an email message by using the EWS


Managed API
The following code example shows how to use the EmailMessage.Copy method to
copy an existing email message from one folder to another.

This example assumes that service is a valid ExchangeService object, and that ItemId
is the Id of the email message to copy. The values of some parameters have been
shortened for readability.

C#

// As a best practice, limit the properties returned by the Bind method to


only those that are required.

PropertySet propSet = new PropertySet(BasePropertySet.IdOnly,


EmailMessageSchema.Subject, EmailMessageSchema.ParentFolderId);

// Bind to the existing item by using the ItemId.

// This method call results in a GetItem call to EWS.

EmailMessage originalMessage = EmailMessage.Bind(service, ItemId, propSet);

// Copy the orignal message into another folder in the mailbox and store the
returned item.

Item item = originalMessage.Copy("epQ/3AAA=");

// Check that the item was copied by binding to the copied email message

// and retrieving the new ParentFolderId.

// This method call results in a GetItem call to EWS.

EmailMessage copiedMessage = EmailMessage.Bind(service, item.Id, propSet);

Console.WriteLine("An email message with the subject '" +


originalMessage.Subject + "' has been copied from the '" +
originalMessage.ParentFolderId + "' folder to the '" +
copiedMessage.ParentFolderId + "' folder.");

Copy an email message by using EWS


The following code example shows how to use the CopyItem operation to copy an
email message to different folder in the same mailbox by sending the ItemId of the
email message to move, and specifying the destination folder in the ToFolderId
element.

This is also the XML request that is sent by the EWS Managed API when calling the
Copy method. The values of some attributes and elements have been shortened for
readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:CopyItem>

<m:ToFolderId>

<t:FolderId Id="pQ/3AAA=" />

</m:ToFolderId>

<m:ItemIds>

<t:ItemId Id="2TSeSAAA="

ChangeKey="CQAAABYAAAApjGm7TnMWQ5TzjbhziLL0AAF2d+3+" />

</m:ItemIds>

</m:CopyItem>

</soap:Body>

</soap:Envelope>

The server responds to the CopyItem request with a CopyItemResponse message that
includes a ResponseCode value of NoError, which indicates that the email message
was copied successfully. The response also includes the ItemId for the email message in
the new folder, which is important to store because the ItemId is different in the new
folder.
See also
Email and EWS in Exchange

Send email messages by using EWS in Exchange


Work with conversations by using EWS in
Exchange
Article • 09/15/2021 • 12 minutes to read

Learn about how to find conversations, apply actions to conversations, and get items in
conversations by using the EWS Managed API or EWS in Exchange.

In the context of Exchange, conversations are a way to group and manage a related set of
email messages. They can also provide a way to view related messages. Exchange defines
conversations based on the Message-ID value of the first email message in a thread. All
replies and related messages reference the original message's Message-ID header in their
References and In-Reply-To headers.

Additionally, inside the SOAP envelope, for each message received in a mailbox, Exchange
sets specific properties and elements.

Table 1. Conversation properties and elements set on all email messages

EWS Managed API EWS element Description


property

ConversationTopic ConversationTopic Contains a normalized form of the subject value that was
set on the original message. This is the same as the
Thread-Topic message header. This value is read-only.

ConversationIndex ConversationIndex Represents the position of the item in the conversation.


This is the same as the Thread-Index message header.
This value is read-only.

Exchange applies the same ConversationTopic value to replies to the first message and then
updates the ConversationIndex value to represent the message's position relative to the
original message. If the subject of the email thread changes, Exchange applies a new
ConversationTopic value and new ConversationIndex values to the new conversation.

Table 2. EWS Managed API methods and EWS operations for working with conversations

In order to… Use this EWS Managed API method or methods Use this EWS operation

Find ExchangeService.FindConversation
FindConversation

conversations
In order to… Use this EWS Managed API method or methods Use this EWS operation

Apply Conversation.EnableAlwaysCategorizeItems
ApplyConversationAction
conversation Conversation.EnableAlwaysDeleteItems

actions Conversation.EnableAlwaysMoveItems

ExchangeService.CopyItemsInConversations

ExchangeService.DeleteItemsInConversations

ExchangeService.DisableAlwaysCategorizeItemsInConversations
ExchangeService.DisableAlwaysDeleteItemsInConversations

ExchangeService.DisableAlwaysMoveItemsInConversations

ExchangeService.EnableAlwaysCategorizeItemsInConversations

ExchangeService.EnableAlwaysDeleteItemsInConversations

ExchangeService.EnableAlwaysMoveItemsInConversations

ExchangeService.MoveItemsInConversations

ExchangeService.SetFlagStatusForItemsInConversations

ExchangeService.SetReadStateForItemsInConversations

ExchangeService.SetRetentionPolicyForItemsInConversations

Get items in ExchangeService.GetConversationItems


GetConversationItems

one or more
conversations

Find a conversation by using the EWS Managed


API
You can find conversations by using the ExchangeService.FindConversation EWS Managed
API method, as shown in the following example. This example gets the first 10 conversations
in the Inbox folder that have a subject that contains the word "news". The example then writes
the conversation topic, last delivery time, and global unique recipient list to the console
window.

This example assumes that service is a valid ExchangeService object and that the user has
been authenticated to an Exchange server.

C#

static void FindConversation(ExchangeService service)

// Create the view of conversations returned in the response. This view will
return at most 10 results.

ConversationIndexedItemView view = new ConversationIndexedItemView(10);

// Create the query string to search for.

String queryString = "subject:news";

// Search the Inbox for conversations and return a results set with the
specified view.

// This method call results in a FindConversation call to EWS.

ICollection<Conversation> conversations = service.FindConversation(view,


WellKnownFolderName.Inbox, queryString);

// Examine properties on each conversation returned in the response.

foreach (Conversation conversation in conversations)

Console.WriteLine("Conversation Topic: " + conversation.Topic);

Console.WriteLine("Last Delivered: " +


conversation.LastDeliveryTime.ToString());

ApplyConversationActions(service, conversation);

foreach (string GlUniqRec in conversation.GlobalUniqueRecipients)

Console.WriteLine("Global Unique Recipient: " + GlUniqRec);

Console.WriteLine("");

Find a conversation by using EWS


You can find conversations by using the FindConversation EWS operation, as shown in the
following example. This example gets the first ten conversations in the Inbox folder that have
a subject that contains the word "news". This is also the XML request that the EWS Managed
API sends when you use the EWS Managed API to find a conversation.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:FindConversation>

<m:IndexedPageItemView MaxEntriesReturned="10"

Offset="0"

BasePoint="Beginning" />

<m:ParentFolderId>

<t:DistinguishedFolderId Id="inbox" />

</m:ParentFolderId>

<m:QueryString>subject:news</m:QueryString>

</m:FindConversation>

</soap:Body>

</soap:Envelope>

The server responds to the FindConversation request with a FindConversationResponse


message that includes a ResponseCode value of NoError to indicate that the operation
completed successfully. The response also includes the only conversation in the mailbox that
has a subject that contains the word "news".
The ItemId, ChangeKey, and ConversationId elements have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="883"

MinorBuildNumber="10"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<FindConversationResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<Conversations>

<Conversation
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<ConversationId Id="aO2NM+Q=" />

<ConversationTopic>Today's top news headlines</ConversationTopic>

<UniqueRecipients>

<String>Sadie Daniels</String>

</UniqueRecipients>

<GlobalUniqueRecipients>

<String>Sadie Daniels</String>

</GlobalUniqueRecipients>

<UniqueUnreadSenders>

<String>Ronnie Sturgis</String>

</UniqueUnreadSenders>

<GlobalUniqueUnreadSenders>

<String>Ronnie Sturgis</String>

</GlobalUniqueUnreadSenders>

<UniqueSenders>

<String>Ronnie Sturgis</String>

</UniqueSenders>

<GlobalUniqueSenders>

<String>Ronnie Sturgis</String>

</GlobalUniqueSenders>

<LastDeliveryTime>2014-02-18T20:42:26Z</LastDeliveryTime>

<GlobalLastDeliveryTime>2014-02-18T20:42:26Z</GlobalLastDeliveryTime>

<HasAttachments>false</HasAttachments>

<GlobalHasAttachments>false</GlobalHasAttachments>

<MessageCount>1</MessageCount>

<GlobalMessageCount>1</GlobalMessageCount>

<UnreadCount>1</UnreadCount>

<GlobalUnreadCount>1</GlobalUnreadCount>

<Size>9330</Size>

<GlobalSize>9330</GlobalSize>

<ItemClasses>
<ItemClass>IPM.Note</ItemClass>

</ItemClasses>

<GlobalItemClasses>

<ItemClass>IPM.Note</ItemClass>

</GlobalItemClasses>

<Importance>Normal</Importance>

<GlobalImportance>Normal</GlobalImportance>

<ItemIds>

<ItemId Id="sVCyAAA="

ChangeKey="CQAAAA==" />

</ItemIds>

<GlobalItemIds>

<ItemId Id="sVCyAAA="

ChangeKey="CQAAAA==" />

</GlobalItemIds>

<LastModifiedTime>2014-02-18T20:42:26Z</LastModifiedTime>

<InstanceKey>AQAAAAAAAQABAAAACbFYggAAAAA=</InstanceKey>

<HasIrm>false</HasIrm>

<GlobalHasIrm>false</GlobalHasIrm>

</Conversation>

</Conversations>

<TotalConversationsInView>1</TotalConversationsInView>

<IndexedOffset>1</IndexedOffset>

</FindConversationResponse>

</s:Body>

</s:Envelope>

Apply conversation actions by using the EWS


Managed API
You can apply conversation actions to a conversation by using a number of EWS Managed API
methods, as shown in the following example. This example adds categories to existing items
in a conversation and applies the same categories to future items in the conversation. It also
shows how to enable the automatic moving of items in the conversation to a folder. In this
example, items are moved to the Drafts folder.

This example assumes that service is a valid ExchangeService object and that the user has
been authenticated to an Exchange server.

For a complete list of methods that apply conversation actions, see Table 2.

C#

static void ApplyConversationActions(ExchangeService service, Conversation


conversation)

// Create a list of categories to apply to a conversation.

List<string> categories = new List<string>();

categories.Add("Customer");

categories.Add("System Integrator");

// Apply categorization to all items in the conversation and process the


request

// synchronously after enabling this rule and after all item categorization
has been applied.

// This method call results in an ApplyConversationAction call to EWS.

conversation.EnableAlwaysCategorizeItems(categories, true);

// Apply an always move rule to all items in the conversation and move the
items

// to the Drafts folder. Process the request asynchronously and return the
response.

// immediately. This method call results in an ApplyConversationAction call to


EWS.

conversation.EnableAlwaysMoveItems(WellKnownFolderName.Drafts, false);

Apply conversation actions by using EWS


You can apply conversation actions, such as categorize, delete, and move, by using the
ApplyConversationAction operation, as shown in the following example. This example adds
categories to existing items in a conversation and applies the same categories to future items
in the conversation. It also shows how to enable the automatic moving of items in the
conversation to a folder; in this example, items are moved to the Drafts folder. This is also the
XML request that the EWS Managed API sends when you use the EWS Managed API to apply
conversation actions.

The ConversationId element has been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:ApplyConversationAction>

<m:ConversationActions>

<t:ConversationAction>

<t:Action>AlwaysMove</t:Action>

<t:ConversationId Id="jG6WVpg=" />

<t:ProcessRightAway>false</t:ProcessRightAway>
<t:DestinationFolderId>

<t:DistinguishedFolderId Id="drafts" />

</t:DestinationFolderId>

</t:ConversationAction>

</m:ConversationActions>

</m:ApplyConversationAction>

</soap:Body>

</soap:Envelope>

The server responds to the ApplyConversationAction request with a


ApplyConversationActionResponse message that includes a ResponseCode value of
NoError to indicate that the operation completed successfully.

Get items in a single conversation by using the


conversation identifier in the EWS Managed API
You can get items in a conversation by using the ExchangeService.GetConversationItems
EWS Managed API method. This example provides the set of conversation nodes for the first
conversation in the Inbox. The item identifier, subject, and received time for each item are
returned in the response, along with the conversation index and parent conversation index
properties. You can use the conversation index properties to reconstruct the node hierarchy.

In this example, all conversation items in the default Deleted Items and Drafts folders are
ignored.

This example assumes that service is a valid ExchangeService object and that the user has
been authenticated to an Exchange server.

C#

static void GetConversationItemsSingleConversation(ExchangeService service)

try

// Find the first item in the mailbox.

// This method call results in an FindItem call to EWS.

FindItemsResults<Item> results =
service.FindItems(WellKnownFolderName.Inbox,

new ItemView(1));

// Get the conversation identifier of the item.

ConversationId convId = results.Items[0].ConversationId;

// Specify the properties that will be

// returned for the items in the conversation.

PropertySet properties = new PropertySet(BasePropertySet.IdOnly,

ItemSchema.Subject,

ItemSchema.DateTimeReceived);

// Identify the folders to ignore.

Collection<FolderId> foldersToIgnore = new Collection<FolderId>()

{ WellKnownFolderName.DeletedItems, WellKnownFolderName.Drafts };

// Request the conversation items.

// This method call results in an GetConversationItems call to EWS.

ConversationResponse response = service.GetConversationItems(convId,

properties,

null,

foldersToIgnore,

ConversationSortOrder.TreeOrderDescending);

// Get the synchronization state of the conversation.

Console.WriteLine("SyncState: " + response.SyncState);

Collection<Item> items = new Collection<Item>();

// Process each node of conversation items.

foreach (ConversationNode node in response.ConversationNodes)

Console.WriteLine("Parent conversation index: " +


node.ParentConversationIndex);

Console.WriteLine("Conversation index: " + node.ConversationIndex);

Console.WriteLine("Conversation node items:");

// Process each item in the conversation node.

foreach (Item item in node.Items)

Console.WriteLine(" Item ID: " + item.Id.UniqueId);

Console.WriteLine(" Subject: " + item.Subject);

Console.WriteLine(" Received: " + item.DateTimeReceived);

items.Add(item);

// This exception occurs if there is an error with the service.


catch (ServiceResponseException srException)

Console.WriteLine(srException);

We recommend that you cache the SyncState property for subsequent requests to get items
in the conversation.

Get items in many conversations by using the


ConversationRequest object in the EWS Managed
API
You can use the ConversationRequest object and the
ExchangeService.GetConversationItems EWS Managed API method to get items from two
or more conversations. This example provides a set of conversation nodes for the first two
conversations in the Inbox. The item identifier, subject, and the received time for each item
will be returned in the response, along with the conversation index and parent conversation
index properties. You can use the conversation index properties to reconstruct the node
hierarchy. This example assumes that the first two items in the Inbox are from different
conversations.

In this example, all conversation items in the default Deleted Items and Drafts folders are
ignored.
This example assumes that service is a valid ExchangeService object and that the user has
been authenticated to an Exchange server.

C#

static void GetConversationItemsManyConversations(ExchangeService service)

try

// Find the first two items in the Inbox. This item will be used to call
the GetConversationItems operation.

// This method call results in an FindItem call to EWS.

FindItemsResults<Item> results =
service.FindItems(WellKnownFolderName.Inbox, new ItemView(2));

// Get the conversation identifier of the first two items in the Inbox.

ConversationId convId1 = results.Items[0].ConversationId;

ConversationId convId2 = results.Items[1].ConversationId;

// Identify two conversation requests.

ConversationRequest convR1 = new ConversationRequest();

convR1.ConversationId = convId1;

ConversationRequest convR2 = new ConversationRequest();

convR2.ConversationId = convId2;

// Create a collection of conversations to fetch.

Collection<ConversationRequest> conversations = new


Collection<ConversationRequest>();

conversations.Add(convR1);

conversations.Add(convR2);

// Specify the properties that will be returned for the items in the
conversation.

PropertySet properties = new PropertySet(BasePropertySet.IdOnly,

ItemSchema.Subject,

ItemSchema.DateTimeReceived);

// Identify the folders to ignore.

Collection<FolderId> foldersToIgnore = new Collection<FolderId>()

{ WellKnownFolderName.DeletedItems, WellKnownFolderName.Drafts };

// Request the conversation items.

// This method call results in an GetConversationItems call to EWS.

ServiceResponseCollection<GetConversationItemsResponse> responses =

service.GetConversationItems(conversations, properties,
foldersToIgnore,

ConversationSortOrder.TreeOrderDescending);

// Process each conversation.

foreach (GetConversationItemsResponse resp in responses)

// Identify the synchronization state of the conversation.

Console.WriteLine("Sync State: " + resp.Conversation.SyncState);

// Process each node in the conversation.

foreach (ConversationNode node in resp.Conversation.ConversationNodes)

Console.WriteLine("Parent conversation index: " +


node.ParentConversationIndex);

Console.WriteLine("Conversation index: " + node.ConversationIndex);

Console.WriteLine("Conversation node items:");

// Process each item in the conversation node.

foreach (Item item in node.Items)

Console.WriteLine(" Item ID: " + item.Id.UniqueId);

Console.WriteLine(" Subject: " + item.Subject);

Console.WriteLine(" Received: " + item.DateTimeReceived);

// This exception occurs if there is an error with the service.


catch (ServiceResponseException srException)

Console.WriteLine(srException);

As a best practice, we recommend that you return only the properties that the client
application requires, rather than using the FirstClassProperties option for the
BasePropertySet class. We recommend that you cache the SyncState property for subsequent
requests to get items in the conversation.

Get items in conversations by using the


conversation identifier in EWS
You can get items in a conversation by using the GetConversationItems EWS operation. This
example provides a set of conversation nodes for the first conversation in the Inbox. The item
identifier, subject, and received time for each item are returned in the response, along with
the conversation index and parent conversation index properties. You can use the
conversation index properties to reconstruct the node hierarchy.

In this example, all conversation items in the default Deleted Items and Drafts folders are
ignored.

The ConversationId element has been shortened for readability.

To get items from more than one conversation, include additional Conversation elements.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m=https://schemas.microsoft.com/exchange/services/2006/messages

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:GetConversationItems>

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

<t:FieldURI FieldURI="item:DateTimeReceived" />

</t:AdditionalProperties>

</m:ItemShape>

<m:FoldersToIgnore>

<t:DistinguishedFolderId Id="deleteditems" />

<t:DistinguishedFolderId Id="drafts" />

</m:FoldersToIgnore>

<m:SortOrder>TreeOrderDescending</m:SortOrder>

<m:Conversations>
<t:Conversation>

<t:ConversationId Id="LUQFH6Q=" />

</t:Conversation>

</m:Conversations>

</m:GetConversationItems>

</soap:Body>

</soap:Envelope>

The server responds to the GetConversationItems request with a


GetConversationItemsResponse message that includes a ResponseCode value of NoError
to indicate that the operation completed successfully. The response also includes the
ConversationNodes in the conversation.

The ItemId, SyncState, and ConversationId elements have been shortened for readability.

XML

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="873"

MinorBuildNumber="9"

Version="V2_9"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetConversationItemsResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetConversationItemsResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Conversation>

<t:ConversationId Id="LUQFH6Q=" />

<t:SyncState>AAAAYAm1</t:SyncState>

<t:ConversationNodes>

<t:ConversationNode>

<t:InternetMessageId>&amp;lt;994051d7c1a346efbfce8dec2cbad509

@SN2SR01MB006.com&amp;gt;</t:InternetMessageId>

<t:ParentInternetMessageId>&amp;lt;faa2b1df30074380abe3527b0cd18ca5

@SN2SR01MB001.com&amp;gt;</t:ParentInternetMessageId>

<t:Items>

<t:Message>

<t:ItemId Id="AYB1NAAA="

ChangeKey="CQAAABYAAAD/oydcA+SPQZGbKWNyvNIZAAAAYCHq" />

<t:Subject>RE: Review Proposal for Tailspin Toys</t:Subject>

<t:DateTimeReceived>2014-01-02T13:15:00Z</t:DateTimeReceived>

</t:Message>

</t:Items>

</t:ConversationNode>

<t:ConversationNode>

<t:InternetMessageId>&amp;lt;faa2b1df30074380abe3527b0cd18ca5

@SN2SR01MB001.com&amp;gt;</t:InternetMessageId>

<t:ParentInternetMessageId>&amp;lt;6a8e7658524b41cda7cdc3f23c1074a5

@SN2SR01MB001.com&amp;gt;</t:ParentInternetMessageId>

<t:Items>

<t:Message>

<t:ItemId Id="lQAAAA=="

ChangeKey="CQAAABYAAAD/oydcA+SPQZGbKWNyvNIZAAAAYAu8" />

<t:Subject>RE: Review Proposal for Tailspin Toys</t:Subject>

<t:DateTimeReceived>2014-01-02T10:02:08Z</t:DateTimeReceived>

</t:Message>

</t:Items>

</t:ConversationNode>

<t:ConversationNode>

<t:InternetMessageId>&amp;lt;bcdb185495834370a874a1e7ebedbb96

@SN2SR01MB005.com&amp;gt;</t:InternetMessageId>

<t:ParentInternetMessageId>&amp;lt;e52a4de6b98d484887e141da094a2ce6

@SN2SR01MB006.com&amp;gt;</t:ParentInternetMessageId>

<t:Items>

<t:Message>

<t:ItemId Id="igAAAA=="

ChangeKey="CQAAABYAAAD/oydcA+SPQZGbKWNyvNIZAAAAYAuj" />

<t:Subject>RE: Review Proposal for Tailspin Toys</t:Subject>

<t:DateTimeReceived>2014-01-02T16:20:10Z</t:DateTimeReceived>

</t:Message>

</t:Items>

</t:ConversationNode>

<t:ConversationNode>

<t:InternetMessageId>&amp;lt;e52a4de6b98d484887e141da094a2ce6

@SN2SR01MB006.com&amp;gt;</t:InternetMessageId>

<t:ParentInternetMessageId>&amp;lt;f0db3ead01db4fe087d98022149aa16f

@SN2SR01MB001.com&amp;gt;</t:ParentInternetMessageId>

<t:Items>

<t:Message>

<t:ItemId Id="iwAAAA=="

ChangeKey="CQAAABYAAAD/oydcA+SPQZGbKWNyvNIZAAAAYAul" />

<t:Subject>RE: Review Proposal for Tailspin Toys</t:Subject>

<t:DateTimeReceived>2014-01-02T15:30:10Z</t:DateTimeReceived>

</t:Message>

</t:Items>

</t:ConversationNode>

<t:ConversationNode>

<t:InternetMessageId>&amp;lt;f0db3ead01db4fe087d98022149aa16f

@SN2SR01MB001.com&amp;gt;</t:InternetMessageId>

<t:ParentInternetMessageId>&amp;lt;88b1884ecaaa4f68b081c009d827e8c6

@SN2SR01MB003.com&amp;gt;</t:ParentInternetMessageId>

<t:Items>

<t:Message>

<t:ItemId Id="jQAAAA=="

ChangeKey="CQAAABYAAAD/oydcA+SPQZGbKWNyvNIZAAAAYAuq" />

<t:Subject>RE: Review Proposal for Tailspin Toys</t:Subject>

<t:DateTimeReceived>2014-01-02T14:20:10Z</t:DateTimeReceived>

</t:Message>

</t:Items>

</t:ConversationNode>

<t:ConversationNode>

<t:InternetMessageId>&amp;lt;88b1884ecaaa4f68b081c009d827e8c6

@SN2SR01MB003.com&amp;gt;</t:InternetMessageId>

<t:ParentInternetMessageId>&amp;lt;faa2b1df30074380abe3527b0cd18ca5

@SN2SR01MB001.com&amp;gt;</t:ParentInternetMessageId>

<t:Items>

<t:Message>

<t:ItemId Id="kAAAAA=="

ChangeKey="CQAAABYAAAD/oydcA+SPQZGbKWNyvNIZAAAAYAux" />

<t:Subject>RE: Review Proposal for Tailspin Toys</t:Subject>

<t:DateTimeReceived>2014-01-02T12:52:09Z</t:DateTimeReceived>

</t:Message>

</t:Items>

</t:ConversationNode>

</t:ConversationNodes>

</m:Conversation>

</m:GetConversationItemsResponseMessage>

</m:ResponseMessages>

</m:GetConversationItemsResponse>

</s:Body>

</s:Envelope>

Version differences
When you are using Exchange Server 2010 Service Pack 1 (SP1), the FindConversation
method has fewer options available, and the FindConversation operation has fewer
elements in the request.
Table 3. Exchange 2010 SP1 version support for FindConversation

EWS Managed API method EWS elements

FindConversation (ViewBase, FolderId)


IndexedPageItemView

SortOrder

ParentFolderId

The GetConversationItems EWS Managed API method and the GetConversationItems


EWS operation were introduced in Exchange Server 2013. Applications that target earlier
versions of Exchange can only apply conversation actions to conversations, as listed in Table 2.

The FindConversation EWS Managed API method and the FindConversation EWS method are
not available in the initial release version of Exchange 2010 or in Exchange 2007.

See also
Email and EWS in Exchange
Use search filters with EWS in Exchange
Exchange 2013: Find conversations in mailboxes programmatically
Exchange 2013: Apply actions to manage conversations in a mailbox
Extract an entity from an email message
by using EWS in Exchange
Article • 01/15/2020 • 7 minutes to read

Learn how to extract information from the body of an email message by using the EWS
Managed API or EWS in Exchange.

You can use the EWS Managed API or EWS to access the addresses, contacts, email
addresses, meeting suggestions, phone numbers, tasks, and URLs that an Exchange
server extracts from email messages. You can then use this information for new
applications or to suggest follow up actions in existing applications. For example, if a
contact entity, meeting suggestion, or task suggestion is identified in an email, your
application can suggest that a new item with prepopulated information be created. By
using extracted entities, you can capitalize on the intent behind the data — and help
users seamlessly integrate their email message content into actionable results.

Entity extraction for addresses, contacts, email addresses, meeting suggestions, phone
numbers, tasks, and URLs is already built in to every item in the Exchange store. If you're
using the EWS Managed API, the Item.EntityExtractionResult property retrieves the
entities for you in an Item.Bind method call. If you're using EWS, the
EntityExtractionResult element gets all the extracted entities for you in a GetItem
operation call. After you retrieve the results of the extracted entities, you can walk
through each entity collection to gather pertinent information. For example, if a meeting
suggestion was extracted, you can retrieve the suggested meeting subject, attendee list,
start time, and end time.

Table 1. EWS Managed API properties and EWS elements that contain extracted
entities

Extracted entity EWS Managed API property EWS element

Addresses EntityExtractionResult.Addresses
Addresses

Contacts EntityExtractionResult.Contacts
Contacts

Email addresses EntityExtractionResult.EmailAddresses


EmailAddresses

Meeting suggestions EntityExtractionResult.MeetingSuggestions


MeetingSuggestions

Phone numbers EntityExtractionResult.PhoneNumbers


PhoneNumbers

Task suggestions EntityExtractionResult.TaskSuggestions


TaskSuggestions

Extracted entity EWS Managed API property EWS element

URLs EntityExtractionResult.Urls
Urls

Because entity extraction relies on natural language recognition, the recognition of


entities can be non-deterministic and success sometimes relies on the context. To
demonstrate how natural language recognition works, the examples in this article use
the following email as input.

From: Ronnie Sturgis

To: Sadie Daniels

Subject: Dinner party

Hi Sadie

Are you free this Friday at 7 to join us for a dinner party at our house?

We're at 789 International Blvd, St Paul MN 55104.

Our number is 612-555-0158 if you have trouble finding it.

Please RSVP to either myself or Mara ([email protected]) before Friday morning. Best
for you organics (http://www.bestforyouorganics.com) will be catering so we can

fully enjoy ourselves!

Also, can you forward this to Magdalena? I don't have her contact information.

See you then!

Ronnie

Extract all entities from an email by using the


EWS Managed API
The following code example shows how to display all the entities extracted by the
server, by using the Item.Bind method, and then enumerating through each of the
extracted entities and their properties.

This example assumes that service is a valid ExchangeService object, and that ItemId
is the Id of the email message to move or copy.

C#
public static void ExtractEntities(ExchangeService service, ItemId ItemId)

// Create a property set that limits the properties returned

// by the Bind method to only those that are required.

PropertySet propSet = new PropertySet(BasePropertySet.IdOnly,


ItemSchema.EntityExtractionResult);

// Get the item from the server.

// This method call results in an GetItem call to EWS.

Item item = Item.Bind(service, ItemId, propSet);

Console.WriteLine("The following entities have been extracted from the


message:");

Console.WriteLine(" ");

// If address entities are extracted from the message, print the


results.

if (item.EntityExtractionResult != null)

if (item.EntityExtractionResult.Addresses != null)

Console.WriteLine("--------------------Addresses----------------
-----------");

foreach (AddressEntity address in


item.EntityExtractionResult.Addresses)

Console.WriteLine("Address: {0}", address.Address);

Console.WriteLine(" ");

// If contact entities are extracted from the message, print the


results.

if (item.EntityExtractionResult.Contacts != null)

Console.WriteLine("--------------------Contacts-----------------
-----------");

foreach (ContactEntity contact in


item.EntityExtractionResult.Contacts)

Console.WriteLine("Addresses: {0}",
contact.Addresses);

Console.WriteLine("Business name: {0}",


contact.BusinessName);

Console.WriteLine("Contact string: {0}",


contact.ContactString);

Console.WriteLine("Email addresses: {0}",


contact.EmailAddresses);

Console.WriteLine("Person name: {0}",


contact.PersonName);

Console.WriteLine("Phone numbers: {0}",


contact.PhoneNumbers);

Console.WriteLine("URLs: {0}", contact.Urls);

Console.WriteLine(" ");

// If email address entities are extracted from the message, print


the results.

if (item.EntityExtractionResult.EmailAddresses != null)

Console.WriteLine("--------------------Email addresses----------
-----------");

foreach (EmailAddressEntity email in


item.EntityExtractionResult.EmailAddresses)

Console.WriteLine("Email addresses: {0}",


email.EmailAddress);

Console.WriteLine(" ");

// If meeting suggestion entities are extracted from the message,


print the results.

if (item.EntityExtractionResult.MeetingSuggestions != null)

Console.WriteLine("--------------------Meeting suggestions------
-----------");

foreach (MeetingSuggestion meetingSuggestion in


item.EntityExtractionResult.MeetingSuggestions)

Console.WriteLine("Meeting subject: {0}",


meetingSuggestion.Subject);

Console.WriteLine("Meeting string: {0}",


meetingSuggestion.MeetingString);
foreach (EmailUserEntity attendee in
meetingSuggestion.Attendees)

Console.WriteLine("Attendee name: {0}",


attendee.Name);

Console.WriteLine("Attendee user ID: {0}",


attendee.UserId);

Console.WriteLine("Start time: {0}",


meetingSuggestion.StartTime);

Console.WriteLine("End time: {0}",


meetingSuggestion.EndTime);

Console.WriteLine("Location: {0}",
meetingSuggestion.Location);

Console.WriteLine(" ");

// If phone number entities are extracted from the message, print


the results.

if (item.EntityExtractionResult.PhoneNumbers != null)

Console.WriteLine("--------------------Phone numbers------------
-----------");

foreach (PhoneEntity phone in


item.EntityExtractionResult.PhoneNumbers)

Console.WriteLine("Original phone string: {0}",


phone.OriginalPhoneString);

Console.WriteLine("Phone string: {0}",


phone.PhoneString);

Console.WriteLine("Type: {0}",
phone.Type);

Console.WriteLine(" ");

// If task suggestion entities are extracted from the message, print


the results.

if (item.EntityExtractionResult.TaskSuggestions != null)

Console.WriteLine("--------------------Task suggestions---------
-----------");

foreach (TaskSuggestion task in


item.EntityExtractionResult.TaskSuggestions)

foreach (EmailUserEntity assignee in task.Assignees)

Console.WriteLine("Assignee name: {0}",


assignee.Name);

Console.WriteLine("Assignee user ID: {0}",


assignee.UserId);

Console.WriteLine("Task string: {0}", task.TaskString);

Console.WriteLine(" ");

// If URL entities are extracted from the message, print the


results.

if (item.EntityExtractionResult.Urls != null)

Console.WriteLine("--------------------URLs---------------------
-----------");

foreach (UrlEntity url in item.EntityExtractionResult.Urls)

Console.WriteLine("URL: {0}", url.Url);

Console.WriteLine(" ");

// If no entities are extracted from the message, print the result.

else if (item.EntityExtractionResult == null)

Console.WriteLine("No entities extracted");

The following output is displayed on the console.

text

The following entities have been extracted from the message:

--------------------Addresses---------------------------

Address: 789 International Blvd, St Paul MN 55104

--------------------Contacts----------------------------

Addresses:

Business name:

Contact string: Mara ([email protected])

Email addresses: [email protected]


Person name: Mara

Phone numbers:

URLs:

--------------------Email addresses---------------------

Email addresses: [email protected]


--------------------Meeting suggestions-----------------

Meeting subject: dinner party

Meeting string: Are you free this Friday at 7 to join us for a dinner
party at our house?

Attendee name: Ronnie Sturgis

Attendee user ID: [email protected]

Attendee name: Sadie Daniels

Attendee user ID: [email protected]

Start time: 10/1/0104 2:00:00 PM

End time: 10/1/0104 2:30:00 PM

Location:

--------------------Phone numbers-----------------------

Original phone string: 612-555-0158

Phone string: 6125550158

Type: Unspecified

--------------------Task suggestions--------------------

Assignee name: Sadie Daniels

Assignee user ID: [email protected]

Task string: Also, can you forward this to Magdalena?

--------------------URLs--------------------------------

URL: http://www.bestforyouorganics.com

Notice that all addresses, contacts, email addresses, phone numbers, tasks, and URLs
were extracted as expected. The meeting suggestion, however, is a bit more complex.
Notice the start time and end time of the meeting suggestion are not what you might
expect. The start time in the email is "this Friday at 7", but the extracted value for the
start time is 10/1/0104 2:00:00 PM. This is because the start time and end time extracted
by the server are encoded dates. For more information about how to interpret dateTime
values in meeting suggestions, see [MS-OXCEXT]: Client Extension Message Object
Protocol .

Extract all entities from an email by using EWS


The following code example shows how to use the GetItem operation and the
EntityExtractionResult element to retrieve the extracted entities from an item.

This is also the XML request that is sent by the EWS Managed API when you use the
Bind method to Extract all entities from an email by using the EWS Managed API.

The value of the ItemId element is shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:GetItem>

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:EntityExtractionResult" />

</t:AdditionalProperties>

</m:ItemShape>

<m:ItemIds>

<t:ItemId Id="sVC5AAA=" />

</m:ItemIds>

</m:GetItem>

</soap:Body>

</soap:Envelope>

The server responds to the GetItem request with a GetItemResponse message that
includes a ResponseCode value of NoError, which indicates that the email message
was retrieved successfully. The response also includes the EntityExtractionResult for
each extracted entity.

The value of the ItemId element is shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="883"

MinorBuildNumber="10"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Message>
<t:ItemId Id="sVC5AAA="

ChangeKey="CQAAABYAAAD32nSTjepyT63rYH17n9THAAAOOqJN"
/>

<t:EntityExtractionResult>

<t:Addresses>

<t:AddressEntity>

<t:Position>LatestReply</t:Position>

<t:Address>789 International Blvd, St Paul MN


55104</t:Address>

</t:AddressEntity>

</t:Addresses>

<t:MeetingSuggestions>

<t:MeetingSuggestion>

<t:Position>LatestReply</t:Position>

<t:Attendees>

<t:EmailUser>

<t:Name>Ronnie Sturgis</t:Name>

<t:UserId>[email protected]</t:UserId>

</t:EmailUser>

<t:EmailUser>

<t:Name>Sadie Daniels</t:Name>

<t:UserId>[email protected]</t:UserId>

</t:EmailUser>

</t:Attendees>

<t:Subject>dinner party</t:Subject>

<t:MeetingString>Are you free this Friday at 7 to join


us for a dinner party at our house?</t:MeetingString>

<t:StartTime>0104-10-01T19:00:00Z</t:StartTime>

<t:EndTime>0104-10-01T19:30:00Z</t:EndTime>

</t:MeetingSuggestion>

</t:MeetingSuggestions>

<t:TaskSuggestions>

<t:TaskSuggestion>

<t:Position>LatestReply</t:Position>

<t:TaskString>Also, can you forward this to Magdalena?


</t:TaskString>

<t:Assignees>

<t:EmailUser>

<t:Name>Sadie Daniels</t:Name>

<t:UserId>[email protected]</t:UserId>

</t:EmailUser>

</t:Assignees>

</t:TaskSuggestion>

</t:TaskSuggestions>

<t:EmailAddresses>

<t:EmailAddressEntity>

<t:Position>LatestReply</t:Position>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:EmailAddressEntity>

</t:EmailAddresses>

<t:Contacts>

<t:Contact>

<t:Position>LatestReply</t:Position>

<t:PersonName>Mara</t:PersonName>

<t:EmailAddresses>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:EmailAddresses>

<t:ContactString>Mara
([email protected]</t:ContactString>

</t:Contact>

</t:Contacts>

<t:Urls>

<t:UrlEntity>

<t:Position>LatestReply</t:Position>

<t:Url>http://www.bestforyouorganics.com</t:Url>

</t:UrlEntity>

</t:Urls>

<t:PhoneNumbers>

<t:Phone>

<t:Position>LatestReply</t:Position>

<t:OriginalPhoneString>612-555-
0158</t:OriginalPhoneString>

<t:PhoneString>6125550158</t:PhoneString>

<t:Type>Unspecified</t:Type>

</t:Phone>

</t:PhoneNumbers>

</t:EntityExtractionResult>

</t:Message>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</m:GetItemResponse>

</s:Body>

</s:Envelope>

Notice that all addresses, contacts, email addresses, phone numbers, tasks, and URLs
were extracted as expected. The meeting suggestion, however, is a bit more complex.
Notice the start time and end time of the meeting suggestion are not what you might
expect. The start time in the email was "this Friday at 7", but the extracted value for the
start time is 10/1/0104 2:00:00 PM. This is because the start time and end time extracted
by the server are encoded dates. For more information about interpreting dateTime
values in meeting suggestions, see [MS-OXCEXT]: Client Extension Message Object
Protocol .

See also
Email and EWS in Exchange
Item.EntityExtractionResult
EntityExtractionResult
Process email messages in batches by
using EWS in Exchange
Article • 01/15/2020 • 12 minutes to read

Learn how to create, get, update, and delete batches of email messages in a single call
by using the EWS Managed API or EWS in Exchange.

You can use the EWS Managed API or EWS to work with batches of email messages to
reduce the number of calls a client makes to an Exchange server. When you use the EWS
Managed API to create, get, update, delete, and send messages in batches, you use
ExchangeService object methods, whereas when you work with single email messages,
you use EmailMessage object methods. If you are using EWS, you use the same
operations to work with both single and batches of email messages.

Table 1. EWS Managed API methods and EWS operations for working with batches of
email messages

In order to… Use this EWS Managed API Use this EWS
method operation

Create email messages in batches ExchangeService.CreateItems


CreateItem

Get email messages in batches ExchangeService.BindToItems


GetItem

Update email messages in ExchangeService.UpdateItems


UpdateItem

batches

Delete email messages in batches ExchangeService.DeleteItems


DeleteItem

In this article, you'll learn how to complete basic tasks for batches of email messages by
using the EWS Managed API or EWS.

Create email messages in batches by using the


EWS Managed API
You can create messages in batches by using the EWS Managed API CreateItems
method, as shown in the following example. This example creates three EmailMessage
objects locally, adds each message to a collection, then calls the CreateItems method on
the collection of messages.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server.
C#

public static Collection<ItemId> CreateDraftEmailInBatch(ExchangeService


service)

// These are unsaved local instances of an EmailMessage object.

// Despite the required parameter of an ExchangeService object


(service), no call

// to an Exchange server is made when the objects are instantiated.

// A call to the Exchange server is made when the service.CreateItems()


method is called.

EmailMessage message1 = new EmailMessage(service);

EmailMessage message2 = new EmailMessage(service);

EmailMessage message3 = new EmailMessage(service);

// Set the properties on the first message.

message1.Subject = "Project priorities";

message1.Body = "(1) Buy pizza, (2) Eat pizza";

message1.ToRecipients.Add("[email protected]");

// Set the properties on the second message.

message2.Subject = "Company Soccer Team";

message2.Body = "Are you interested in joining?";

message2.ToRecipients.Add("[email protected]");

// Set the properties on the third message.

message3.Subject = "Code Blast";

message3.Body = "Are you interested in getting together to finish the


methods for the ContosoLive project?";

message3.ToRecipients.Add("[email protected]");

// Add the EmailMessage objects to a collection.

Collection<EmailMessage> messageItems = new Collection<EmailMessage>() {


message1, message2, message3 };

// Create the batch of email messages on the server.

// This method call results in an CreateItem call to EWS.

ServiceResponseCollection<ServiceResponse> response =
service.CreateItems(messageItems, WellKnownFolderName.Drafts,
MessageDisposition.SaveOnly, null);

// Instantiate a collection of item IDs to populate from the values that


are returned by the Exchange server.

Collection<ItemId> itemIds = new Collection<ItemId>();

// Collect the item IDs from the created email messages.

foreach (EmailMessage message in messageItems)

try

itemIds.Add(message.Id);

Console.WriteLine("Email message '{0}' created successfully.",


message.Subject);

catch (Exception ex)

// Print out the exception and the last eight characters of the
item ID.

Console.WriteLine("Exception while creating message {0}: {1}",


message.Id.ToString().Substring(144), ex.Message);

// Check for success of the CreateItems method call.

if (response.OverallResult == ServiceResult.Success)

Console.WriteLine("All locally created messages were


successfully saved to the Drafts folder.");

Console.WriteLine("\r\n");

// If the method did not return success, print the result message for
each email.

else

int counter = 1;

foreach (ServiceResponse resp in response)

// Print out the result and the last eight characters of the
item ID.

Console.WriteLine("Result (message {0}), id {1}: {2}", counter,


itemIds[counter - 1].ToString().Substring(144), resp.Result);

Console.WriteLine("Error Code: {0}", resp.ErrorCode);

Console.WriteLine("ErrorMessage: {0}\r\n", resp.ErrorMessage);

Console.WriteLine("\r\n");

counter++;

return itemIds;

Note that the example only saves the messages in the Drafts folder; it does not send the
messages. For more about how to send the messages, see Send email messages in
batches by using the EWS Managed API.

Create email messages in batches by using EWS


You can create email messages in batches by using the CreateItem EWS operation, as
shown in the following code example. This is also the XML request that the EWS
Managed API sends when you use the EWS Managed API to create email messages in
batches.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:CreateItem MessageDisposition="SaveOnly">

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="drafts" />

</m:SavedItemFolderId>

<m:Items>

<t:Message>

<t:Subject>Project priorities</t:Subject>

<t:Body BodyType="HTML">(1) Buy pizza, (2) Eat pizza</t:Body>

<t:ToRecipients>

<t:Mailbox>
<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:ToRecipients>

</t:Message>

<t:Message>

<t:Subject>Company Soccer Team</t:Subject>

<t:Body BodyType="HTML">Are you interested in joining?</t:Body>

<t:ToRecipients>

<t:Mailbox>
<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:ToRecipients>

</t:Message>

<t:Message>

<t:Subject>Code Blast</t:Subject>

<t:Body BodyType="HTML">Are you interested in getting together to


finish the methods for the ContosoLive project?</t:Body>

<t:ToRecipients>

<t:Mailbox>
<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:ToRecipients>

</t:Message>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The server responds to the CreateItem request with a CreateItemResponse message


that includes a ResponseCode value of NoError for each of the new messages, which
indicates that each email was created and saved successfully.

Note that the example only saves the messages in the Drafts folder; it does not send the
messages. For more about how to send the messages, see Send email messages in
batches by using EWS.
Send email messages in batches by using the
EWS Managed API
You use the same code to send email messages in batches that you use to create email
messages in batches, except that a few of the CreateItems method parameters
change. So, to send email messages by using the EWS Managed API, use the code you
use to create email messages in batches, and replace the call to the CreateItems
method with the call in the following example. In this example, the messages are created
in the Sent Items folder, and the message disposition is changed to
MessageDisposition.SendAndSaveCopy , so that the message is sent, and not just
saved locally.

C#

// Create and send the batch of email messages on the server.

// This method call results in an CreateItem call to EWS.

ServiceResponseCollection<ServiceResponse> response =
service.CreateItems(messageItems, WellKnownFolderName.SentItems,
MessageDisposition.SendAndSaveCopy, null);

Send email messages in batches by using EWS


You use the same code to send email messages in batches that you use to create email
messages in batches, except that a few of the attribute values change for the CreateItem
operation. So, to send email messages by using EWS, use the code you use to create
email message in batches, and change the MessageDisposition value to
"SendAndSaveCopy", and change the DistinguishedFolderId to "sentitems", as shown
in the following code example.

XML

<m:CreateItem MessageDisposition="SendAndSaveCopy">

<m:SavedItemFolderId>
<t:DistinguishedFolderId Id="sentitems" />
</m:SavedItemFolderId>

The server responds to the CreateItem request with a CreateItemResponse message


that includes a ResponseCode value of NoError for each of the new messages, which
indicates that each email was created and sent successfully.
Get email messages in batches by using the
EWS Managed API
You can get email messages in batches by using the EWS Managed API BindToItems
method, as shown in the following example.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server.

C#

public static Collection<EmailMessage> BatchGetEmailItems(ExchangeService


service, Collection<ItemId> itemIds)

// Create a property set that limits the properties returned by the Bind
method to only those that are required.

PropertySet propSet = new PropertySet(BasePropertySet.IdOnly,


EmailMessageSchema.Subject, EmailMessageSchema.ToRecipients);

// Get the items from the server.

// This method call results in a GetItem call to EWS.

ServiceResponseCollection<GetItemResponse> response =
service.BindToItems(itemIds, propSet);

// Instantiate a collection of EmailMessage objects to populate from the


values that are returned by the Exchange server.

Collection<EmailMessage> messageItems = new Collection<EmailMessage>();

foreach (GetItemResponse getItemResponse in response)

try

Item item = getItemResponse.Item;

EmailMessage message = (EmailMessage)item;

messageItems.Add(message);

// Print out confirmation and the last eight characters of the


item ID.

Console.WriteLine("Found item {0}.",


message.Id.ToString().Substring(144));

catch (Exception ex)

Console.WriteLine("Exception while getting a message: {0}",


ex.Message);

// Check for success of the BindToItems method call.

if (response.OverallResult == ServiceResult.Success)

Console.WriteLine("All email messages retrieved successfully.");

Console.WriteLine("\r\n");

return messageItems;

Get email messages in batches by using EWS


You can get email messages in batches by using the GetItem EWS operation and the
code in the following example. This is also the XML request that the EWS Managed API
sends when you use the EWS Managed API to get email messages in batches.

The ItemId and ChangeKey attributes have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:GetItem>

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

<t:FieldURI FieldURI="message:ToRecipients" />

</t:AdditionalProperties>

</m:ItemShape>

<m:ItemIds>

<t:ItemId Id="m4NxAAA="

ChangeKey="CQAAABYAAAApjGm7TnMWQ5TzjbhziLL0AAF/yKB0" />

<t:ItemId Id="m4NyAAA="

ChangeKey="CQAAABYAAAApjGm7TnMWQ5TzjbhziLL0AAF/yKB1" />

<t:ItemId Id="m4NzAAA="

ChangeKey="CQAAABYAAAApjGm7TnMWQ5TzjbhziLL0AAF/yKB2" />

</m:ItemIds>

</m:GetItem>

</soap:Body>

</soap:Envelope>

The server responds to the GetItem request with a GetItemResponse message that
includes the first class properties for each of the requested messages.
Update email messages in batches by using the
EWS Managed API
You can get email messages in batches by using the EWS Managed API UpdateItems
method, as shown in the following example.

For a list of writable email message properties, see Email properties and elements in
EWS in Exchange.

For details about how to send a draft message after it's been updated, see Sending
email messages by using the EWS Managed API.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server.

C#

public static Collection<EmailMessage> BatchUpdateEmailItems(ExchangeService


service, Collection<EmailMessage> messageItems)

// Update the subject of each message locally.

foreach (EmailMessage message in messageItems)

// Update the Subject of the email.

message.Subject = "Updated subject at " + DateTime.Now;

// Print out confirmation with the last eight characters of the item
ID and the email subject.

Console.WriteLine("Updated local email message {0} with the subject


'{1}'.", message.Id.ToString().Substring(144), message.Subject);

// Send the item updates to the server.

// This method call results in an UpdateItem call to EWS.

ServiceResponseCollection<UpdateItemResponse> response =
service.UpdateItems(messageItems, WellKnownFolderName.Drafts,
ConflictResolutionMode.AutoResolve, MessageDisposition.SaveOnly, null);

// Check for success of the UpdateItems method call.

if (response.OverallResult == ServiceResult.Success)

Console.WriteLine("All email messages updated successfully.\r\n");

// If the method did not return success, print the result message for
each email.

else

Console.WriteLine("All emails were not successfully saved on the


server.\r\n");

int counter = 1;

foreach (ServiceResponse resp in response)

Console.WriteLine("Result for (message {0}): {1}", counter,


resp.Result);

Console.WriteLine("Error Code: {0}", resp.ErrorCode);

Console.WriteLine("ErrorMessage: {0}\r\n", resp.ErrorMessage);

counter++;

return messageItems;

Update email messages in batches by using


EWS
You can update email messages in batches by using the GetItem EWS operation, as
shown in following code example. This is also the XML request that the EWS Managed
API sends when you use the EWS Managed API to update email messages in batches.

For a list of writable email message elements, see Email properties and elements in EWS
in Exchange.

For details about how to send a draft message after it's been updated, see Send a draft
email message by using EWS.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:UpdateItem MessageDisposition="SaveOnly"

ConflictResolution="AutoResolve">

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="drafts" />

</m:SavedItemFolderId>

<m:ItemChanges>

<t:ItemChange>

<t:ItemId Id="m4OVAAA="

ChangeKey="CQAAABYAAAApjGm7TnMWQ5TzjbhziLL0AAF/yKCy" />

<t:Updates>

<t:SetItemField>

<t:FieldURI FieldURI="item:Subject" />

<t:Message>

<t:Subject>Updated subject at 1/17/2014 2:58:09


PM</t:Subject>

</t:Message>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

<t:ItemChange>

<t:ItemId Id="m4OWAAA="

ChangeKey="CQAAABYAAAApjGm7TnMWQ5TzjbhziLL0AAF/yKCz" />

<t:Updates>

<t:SetItemField>

<t:FieldURI FieldURI="item:Subject" />

<t:Message>

<t:Subject>Updated subject at 1/17/2014 2:58:09


PM</t:Subject>

</t:Message>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

<t:ItemChange>

<t:ItemId Id="m4OXAAA="

ChangeKey="CQAAABYAAAApjGm7TnMWQ5TzjbhziLL0AAF/yKC0" />

<t:Updates>

<t:SetItemField>

<t:FieldURI FieldURI="item:Subject" />

<t:Message>

<t:Subject>Updated subject at 1/17/2014 2:58:09


PM</t:Subject>

</t:Message>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

</m:ItemChanges>

</m:UpdateItem>

</soap:Body>

</soap:Envelope>

The server responds to the UpdateItem request with an UpdateItemResponse


message that includes a ResponseCode value of NoError, which indicates that each of
the updates was saved successfully on the server. Any conflicts are reported in the
ConflictResult element.

Delete email messages in batches by using the


EWS Managed API
You can delete messages in batches by using the EWS Managed API DeleteItems
method, as shown in the following example.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server.
C#

public static void BatchDeleteEmailItems(ExchangeService service,


Collection<ItemId> itemIds)

// Delete the batch of email message objects.

// This method call results in an DeleteItem call to EWS.

ServiceResponseCollection<ServiceResponse> response =
service.DeleteItems(itemIds, DeleteMode.SoftDelete, null,
AffectedTaskOccurrence.AllOccurrences);

// Check for success of the DeleteItems method call.

// DeleteItems returns success even if it does not find all the item
IDs.

if (response.OverallResult == ServiceResult.Success)

Console.WriteLine("Email messages deleted successfully.\r\n");

// If the method did not return success, print a message.

else

Console.WriteLine("Not all email messages deleted


successfully.\r\n");

Delete email messages in batches by using EWS


You can delete email messages in batches by using the DeleteItem EWS operation, as
shown in the following code example. This is also the XML request that the EWS
Managed API sends when you use the EWS Managed API to delete email messages in
batches.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:DeleteItem DeleteType="SoftDelete"

AffectedTaskOccurrences="AllOccurrences">

<m:ItemIds>

<t:ItemId Id="m4OkAAA="

ChangeKey="CQAAABYAAAApjGm7TnMWQ5TzjbhziLL0AAF/yKDE" />

<t:ItemId Id="m4OlAAA="

ChangeKey="CQAAABYAAAApjGm7TnMWQ5TzjbhziLL0AAF/yKDF" />

<t:ItemId Id="m4OmAAA="

ChangeKey="CQAAABYAAAApjGm7TnMWQ5TzjbhziLL0AAF/yKDG" />

</m:ItemIds>

</m:DeleteItem>

</soap:Body>

</soap:Envelope>

The server responds to the DeleteItem request with a DeleteItemResponse message


that includes a ResponseCode value of NoError for each item that was removed. Note
that the operation also returns success if the item ID could not be found.

Verifying that a batch process completed


successfully
When one or more email messages in a batched request can't be processed as
requested, an error is returned for each email message that failed, and the rest of the
emails in the batch are processed as expected. Failures in batch processing can occur if
the item was deleted, and therefore can't be sent, retrieved, or updated, or if the item
moved to a different folder, and therefore has a new item ID, and cannot be modified
with the item ID sent. The information in this section shows how to get error details
about failures in batch processing of email message.

To verify the success of a batch process by using the EWS Managed API, you can check
that the OverallResult property of the ServiceResponseCollection is equal to
ServiceResult.Success . If so, all the emails were processed successfully. If the
OverallResult is not equal to ServiceResult.Success, one or more of the emails were not
processed successfully. Each of the objects returned in the ServiceResponseCollection
contains the following properties:

ErrorCode

ErrorDetails

ErrorMessage

ErrorProperties

Result

These properties contain information about why the email messages could not be
processed as requested. The examples in this article print out the Result, ErrorCode, and
ErrorMessage for each failed message. You can use these results to investigate the issue.

For EWS, to verify the success of a batched process, check the ResponseClass attribute
for each item being processed. The following is the basic structure of the
ResponseMessageType, the base type from which all response messages are derived.

XML

<ResponseMessage ResponseClass="Success | Warning | Error">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</ResponseMessage>

The ResponseClass attribute is set to Success if the email was processed successfully, or
Error if the email was not processed successfully. For email messages, you will not
encounter a Warning during batch processing. If the ResponseClass is Success, the
ResponseCode element that follows is also always set to NoError. If the
ResponseClass is Error, you need to check the values of the MessageText ,
ResponseCode, and MessageXml elements to determine what caused the problem.
DescriptiveLinkKey is currently unused.

See also
Email and EWS in Exchange

Send email messages by using EWS in Exchange

Respond to email messages by using EWS in Exchange

Move and copy email messages by using EWS in Exchange

Throttling implications for EWS batch requests


Folders and items in EWS in Exchange
Article • 01/15/2020 • 9 minutes to read

Learn about folders and mailbox items and how your EWS Managed API or EWS client represents
them.

Folders are the organizing element of an Exchange mailbox. Folders can contain mailbox items,
such as email messages, contacts, appointments, meetings, and tasks, or they can contain other
folders. Exchange includes different types of folders, but the folder types are similar to each other.
The main difference between them is the type of item they contain.

Items, however, have unique types. Each item type has a different set of properties or schema to
define it. In this article, we'll discuss the types of folders and items that are available and the
differences between them.

Folders
Folders all derive from the same base class or base type, the Folder class in the EWS Managed
API, or the Folder type in EWS. The following figure shows the EWS Managed API classes and
EWS types.

Figure 1. EWS Managed API folder classes and EWS folder types

The primary difference between each of the folder classes and folder types is that you can only
create a certain type of item in each type of folder. One other difference is in how the client
displays information in a folder. For example, Exchange allows you to create appointments in the
Calendar folder. You can move other types of items into the Calendar folder after you create
them, but Outlook won't display them. Outlook only displays calendar items such as
appointments and meetings in the Calendar folder, even if another type of item exists in the
folder.

Table 1. EWS Managed API folder classes and EWS folder types
EWS Managed EWS type FolderClass Contains Notes
API class value

Folder
Folder
IPF.Note Email This is the generic folder class or type
messages or for the following EWS Managed API
folders. WellKnownFolderName folders and
EWS DistinguishedFolderId folders:

Root (IPM subtree)


NonIpmSubtree
Inbox
Deleted Items
Drafts
Journal
Notes
Outbox
Sent Items
Message Folder
Junk Email
Voice Mail

CalendarFolder CalendarFolder IPF.Appointment Appointments When a user responds to a meeting


and meetings. request, the appointment is added to
the EWS Managed API
WellKnownFolderName.Calendar or
the EWS
DistinguishedFolderId.CalendarFolder
only. These are the only folders that
support automatic interaction with
meeting requests and responses.

This folder class or folder type supports


the use of calendar views to return
appointments and meetings based on a
start date and an end date by using the
EWS Managed API Folder.FindItem
method and the CalendarView class,
or the EWS FindItem operation and
the CalendarView element.

ContactsFolder ContactsFolder IPF.Contact Contacts and None.


distribution
lists.

SearchFolder
SearchFolder
IPF.Note Contents are The items that meet the search criteria
determined are not actually contained in the search
by a folder; instead, they are located
restriction or elsewhere in the mailbox.
filter. Search To ensure that Search folders are
folders do not available in Outlook, create them in the
have Finder folder.
subfolders.
EWS Managed EWS type FolderClass Contains Notes
API class value

TasksFolder
TasksFolder
IPF.Task Contains work None.
items to
complete.

Folder structure
Folders provide a mailbox structure. This includes the IPM Subtree, known as the Top of
Information Store in EWS, where most users interact with their mailbox, as well as system folders
that most users never see, which are in the Non-IPM Subtree or Root in EWS. The following figure
shows the folder structure for a user and indicates which folders are for the user's items and
which are system folders.

Figure 2. Item and system folders in a mailbox

Well-known folders
Of the folders in a mailbox, some are special folders. These equate to well-known folders in the
EWS Managed API, or distinguished folders in EWS. Some of these folders have restrictions on the
folder name, where they are located in the folder structure, and whether they can be deleted.
Other "generic" (non-special) folders do not have the same restrictions. It is important for you to
be familiar with the following well-known or distinguished folders because they are the root
system, user, and search folders, and are applicable to most implementations.

Table 2. Primary well-known and distinguished folders

Friendly EWS Managed API EWS DistinguishedFolderId values Description


name WellKnownFolderName values
Friendly EWS Managed API EWS DistinguishedFolderId values Description
name WellKnownFolderName values

Root (Non- WellKnownFolderName.Root DistinguishedFolderId.root Contains the


IPM root folder
Subtree) of a mailbox,
also known
as the Non-
IPM Subtree.
This folder
has no
parent, and
you cannot
move, copy,
rename, or
delete it.
Each
message
store
contains only
one root
folder.

Top of WellKnownFolderName.MsgFolderRoot DistinguishedFolderId.msgfolderroot Contains the


Information Inbox and
Store (IPM other user
Subtree) folders.

Finder WellKnownFolderName.SearchFolders DistinguishedFolderId.searchfolders. Contains


(Search search
folders) folders that
are visible in
Outlook.

For a complete list of the EWS Managed API WellKnownFolderName property values, see the
WellKnownFolderName enumeration. For a complete list of the EWS DistinguishedFolderId
values, see DistinguishedFolderId .

Folder properties
In the EWS Managed API, the folder properties are all derived from the base Folder class. And
in EWS, all folders use the folder elements that are available on the Folder type. Most of the
folder-related properties and elements are straightforward (parent folder ID, display name, and so
on), but a few require a little more explanation.

The following caveats apply to the EWS Managed API Folder.FolderClass property or the EWS
FolderClass element:

If set, the value of the property or element must agree with the derived class or type of the
folder. For example, the FolderClass property or element can't indicate that the folder is a
Contacts folder while the class or type of the folder indicates the folder is a Calendar folder.
You can either create folders of a specific type without setting the FolderClass property or
element, or you can create a folder with the generic folder type and specify the FolderClass
property or element. Both options create the same result.

After you set the FolderClass value by creating a specific type of folder or by setting the
FolderClass property or element itself, you cannot change it. For example, you cannot
change an IPF.Note folder to an IPF.Contact folder. You can, however, change it to an
IPF.Note.Contoso folder.

Any FolderClass value that does not use one of the predefined prefixes is treated as an
IPF.Note folder. For example, a FolderClass value of IAmAFolderClass is treated as an
IPF.Note folder.

The folder class value is extensible. This means that the default FolderClass values listed in Table 1
are treated as prefixes and you can add custom values. For example, you can create a folder with
a FolderClass value of IPF.Contact.Contoso, and it is treated as a Contacts folder.

You can determine what permissions the client has on the folders, such as delete, read, and
modify, by using the EWS Managed API Folder.EffectiveRights property or the EWS
EffectiveRights element.

Public folders
Public folders are designed for shared access and provide an easy and effective way to collect,
organize, and share information with other people in your workgroup or organization. You can
also use public folders to archive distribution group content. For in-depth information about
public folders, see Public folder access with EWS in Exchange.

Hidden folders
All the folders that Exchange creates at the root of the mailbox are hidden, and you can use the
EWS Managed API or EWS to hide additional folders under the Top of Information Store. For more
information about hidden folders, see Work with hidden folders by using EWS in Exchange.

Search folders
Search folders are just like regular folders, except that they have a property or element that
defines the search filter. You can create search folders in any folder in an Exchange mailbox, and
you create them in the same way that you create any other folder. However, for a search folder to
appear in Outlook, Outlook Web App, or Outlook Live, SearchFolder objects that you create by
using the EWS Managed API must be located in the WellKnownFolderName.SearchFolders
folder, and SearchFolder types that you create by using EWS must be located in the
DistinguishedFolderId.SearchFolders folder. If the search folder is created in a different location,
it is still available and you can view it in custom client applications.
Items
EWS in Exchange uses Items to represent individual email messages, appointments, meetings,
contacts, distribution lists, tasks, posts, and other items, in a mailbox. Items are either strongly
typed, which means that they have a specific associated class or schema, or not strongly typed,
also known as generic items. Generic items are Item objects in the EWS Managed API and
Item types in EWS. Common items like email messages, contacts, distribution lists, posts, and
tasks are strongly typed, and you can set specific schematized properties or elements on them.

Table 3. Strongly typed items

EWS Managed API item type EWS item element

Appointment
CalendarItem

Contact
Contact

ContactGroup
DistributionList

EmailMessage
Message

PostItem
PostItem

Task
Task

EWS Managed API strongly typed items derive from the base Item class. However, you usually
work with one of the derived types listed in Table 3, and not with the Item class directly. When
you work with the ItemCollection class, however, you might work directly with instances of the
Item class. In that case, you should implement logic that determines the type of item in the store
that the instance of the Item class represents. To work with that item, you should bind to the item
by using an instance of the class that represents the item.

Items in folders
Some folders have restrictions about the types of items that they can contain. These are
restrictions that the Exchange mailbox database applies to folders, not client view limitations.

Table 4. Item restrictions for folders

EWS Managed EWS Folder type Restriction


API Folder class

Base Folder Folder


You can only create new EWS Managed API EmailMessage objects
class
and PostItem objects, or EWS Message types or PostItem types,
in the generic folders. You can move other item types into generic
folders, but the client might not display them.
EWS Managed EWS Folder type Restriction
API Folder class

CalendarFolder CalendarFolder You can only create new EWS Managed API Appointment objects
and EWS CalendarItem types in the Calendar folder. You can
move other item types into the Calendar folder, but the client might
not display them.

ContactsFolder ContactsFolder You can only create new EWS Managed API Contact and
ContactGroup objects, or EWS Contact types or
DistributionList types in the Contacts folder. You can move other
item types into the Contacts folder, but the client might not display
them

SearchFolder
SearchFolder
No restrictions. Items are not actually located in the Search folder;
they are located elsewhere in the mailbox.

TasksFolder
TasksFolder
You can only create new EWS Managed API Task objects or EWS
Task types in the Tasks folder. You can move other item types into
the Tasks folder, but the client might not display them

Upgrading from earlier product versions


Folders have for the most part remained unchanged in earlier and current product versions. Note,
however, that earlier versions of Exchange use managed folders to perform messaging records
management (MRM). Exchange Online, Exchange Online as part of Office 365, and versions of
Exchange starting with Exchange 2013 use retention policies for MRM. You can upgrade managed
folders to use retention policies .

Items have not changed in earlier and current product versions.

In this section
Work with folders by using EWS in Exchange

Work with hidden folders by using EWS in Exchange

Work with Exchange mailbox items by using EWS in Exchange

Delete items by using EWS in Exchange

Export and import items by using EWS in Exchange

See also
Develop web service clients for Exchange
Start using web services in Exchange
EWS client design overview for Exchange
Work with folders by using EWS in
Exchange
Article • 02/11/2022 • 12 minutes to read

Learn how to create, get, update, and delete folders by using the EWS Managed API or
EWS in Exchange.

EWS in Exchange uses folders to structure and organize mailboxes. You can create new,
get, update, and delete folders by using the EWS Managed API or EWS. Each of the
methods or operations listed in the following table is performed on a Folder object, a
Folder type, or one of the derived folder classes or types.

Table 1. Methods and operations for creating, getting, updating and deleting folders

In order to… EWS Managed API method EWS operation

Create a folder Folder.Save CreateFolder

Create a folder hierarchy Not available CreateFolderPath

Get a folder Folder.Bind GetFolder

Get a folder hierarchy Folder.FindFolders FindFolder

Update a folder Folder.Update UpdateFolder

Delete a folder Folder.Delete DeleteFolder

Create a folder by using the EWS Managed API


The following code example shows how to use the Folder class to create a new
generic folder with a DisplayName of "Custom Folder" and a FolderClass property
value of IPF.Note. The Folder.Save method saves the folder as a child folder of the
Inbox folder.

These examples assume that service is a valid ExchangeService object and that the
user has been authenticated to an Exchange server.

C#

// Create a custom folder.

Folder folder = new Folder(service);

folder.DisplayName = "Custom Folder";

folder.FolderClass = "IPF.Note";

// Save the folder as a child folder of the Inbox.

folder.Save(WellKnownFolderName.Inbox);

To create a different type of folder, such as a CalendarFolder , ContactsFolder ,


SearchFolder , or TasksFolder , create a new instance of the specific class (instead of
the generic Folder class) and do not set the FolderClass property. For example, the
following code example shows how to create a new TasksFolder .

C#

// Create a custom Tasks folder.

TasksFolder folder = new TasksFolder(service);

folder.DisplayName = "Custom Tasks";

// Save the folder as a child folder in the Inbox folder.

// This method call results in a CreateFolder call to EWS.

folder.Save(WellKnownFolderName.Inbox);

If you try to create an instance of a specific class and also set the FolderClass property,
the ErrorNoFolderClassOverride error is thrown.

Note that you cannot batch the creation of multiple folders in a single method call by
using the EWS Managed API.

Create a folder by using EWS


You can create a single folder or multiple of folders by using EWS.

To create a single folder, send a CreateFolder operation request message. The


CreateFolder operation request indicates that the parent folder is the Inbox, the
DisplayName is "Custom Folder", and the FolderClass element value is IPF.Note.

This is also the XML request that the EWS Managed API sends when you create a new
folder and call the Folder.Save method.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:CreateFolder>

<m:ParentFolderId>

<t:DistinguishedFolderId Id="inbox" />

</m:ParentFolderId>

<m:Folders>

<t:Folder>

<t:FolderClass>IPF.Note</t:FolderClass>

<t:DisplayName>Custom Folder</t:DisplayName>

</t:Folder>

</m:Folders>

</m:CreateFolder>

</soap:Body>

</soap:Envelope>

The server responds to the CreateFolder request with a CreateFolderResponse


message that includes a ResponseCode value of NoError, which indicates that the
folder was created successfully, and the FolderId of the newly created message.

To create multiple folders, include multiple Folder elements in the CreateFolder


operation request message. All the new folders must be in the same parent folder.

Create a folder hierarchy by using EWS


You can create a folder hierarchy in a single call by using the EWS CreateFolderPath
operation. The same functionality is not available in the EWS Managed API. Instead, if
you are using the EWS Managed API, you can create folders one by one, as shown in
Create a folder by using EWS.

7 Note

The EWS Managed API does not implement this functionality.

Get a folder by using the EWS Managed API


The following code example shows how to use the Folder.Bind method to get the
Inbox folder. As a best practice, limit the properties returned to only those required for
your application. This example limits the return properties to only include the Id
property by creating a PropertySet object and applying the IdOnly value to the
BasePropertySet property.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server.
C#

// As a best practice, limit the properties returned to only those that are
required.

// In this scenario, you only need the FolderId.

PropertySet propSet = new PropertySet(BasePropertySet.IdOnly);

// Bind to an existing folder and get only the properties specified in the
PropertySet.

// This method call results in a GetFolder call to EWS.

Folder rootfolder = Folder.Bind(service, WellKnownFolderName.Inbox,


propSet);

If you need to return additional properties, add properties from the FolderSchema
class to the PropertySet, or use one of the overloaded Bind methods that returns all
first class properties.

Note that you cannot get multiple folders at one time by using the EWS Managed API.
You have to call the Bind method on each folder separately.

Get a folder by using EWS


You can get a single folder or multiple folders by using EWS.

To get a single folder, send a GetFolder operation request message to the server. In
the following example, the BaseShape is set to IdOnly, so only the FolderId of the
specified folder is returned. The FolderIds element indicates that the folder to retrieve
is the Inbox folder.

This is also the XML request that the EWS Managed API sends when you bind to a folder
by using the Folder.Bind method.

To get multiple folders, include multiple FolderIds elements in the GetFolder


operation request message.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:GetFolder>

<m:FolderShape>

<t:BaseShape>IdOnly</t:BaseShape>

</m:FolderShape>

<m:FolderIds>

<t:DistinguishedFolderId Id="inbox" />

</m:FolderIds>

</m:GetFolder>

</soap:Body>

</soap:Envelope>

The following XML example shows the GetFolderResponse message that is sent from
the server to the client in response to the GetFolder operation request. It only contains
the FolderId value of the Inbox folder. The values of some attributes and elements
have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="800"

MinorBuildNumber="16"

Version="V2_6"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Folders>

<t:Folder>

<t:FolderId Id="AAAENAAA="
ChangeKey="AQAAABYAAAAPxolXAHv3TaHUnjW8wWqXAAAEkbCr"/>

</t:Folder>

</m:Folders>

</m:GetFolderResponseMessage>

</m:ResponseMessages>

</m:GetFolderResponse>

</s:Body>

</s:Envelope>

Get a folder hierarchy by using the EWS


Managed API
The following code example shows how to retrieve the subfolders for a specified root
folder. This example retrieves the subfolders of the MsgFolderRoot folder, which is the
root of the IPM Subtree (where your mailbox folders and items are stored).

In this example, a FolderView class object is created to limit the results of the
Folder.FindFolders method response. This scenario limits the properties to return to
the following: Id , DisplayName , and the extended property that indicates whether
the folder is a hidden folder. Set the FolderView.Traversal value to Deep to perform a
recursive search so that the server retrieves the subfolders, and set the root folder to
MsgFolderRoot, so that the server returns all the user's folders (and the server does not
return system folders in the Non-IPM Subtree).

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server.

C#

// Create a new folder view, and pass in the maximum number of folders to
return.

FolderView view = new FolderView(folderViewSize);

// Create an extended property definition for the PR_ATTR_HIDDEN property,

// so that your results will indicate whether the folder is a hidden folder.

ExtendedPropertyDefinition isHiddenProp = new


ExtendedPropertyDefinition(0x10f4, MapiPropertyType.Boolean);

// As a best practice, limit the properties returned to only those required.

// In this case, return the folder ID, DisplayName, and the value of the
isHiddenProp

// extended property.

view.PropertySet = new PropertySet(BasePropertySet.IdOnly,


FolderSchema.DisplayName, isHiddenProp);

// Indicate a Traversal value of Deep, so that all subfolders are retrieved.

view.Traversal = FolderTraversal.Deep;

// Call FindFolders to retrieve the folder hierarchy, starting with the


MsgFolderRoot folder.

// This method call results in a FindFolder call to EWS.

FindFoldersResults findFolderResults =
service.FindFolders(WellKnownFolderName.MsgFolderRoot, view);

Get a folder hierarchy by using EWS


The following XML examples show how to use the FindFolder operation to retrieve a
folder hierarchy by using EWS. This example retrieves the msgfolderroot folder, which is
the root of the IPM Subtree, and all its subfolders. The Traversal attribute is set to Deep
so that the server performs a recursive search of the folder hierarchy and only returns
folders and subfolders under the specified root in the response. In this example, the
BaseShape element is set to IdOnly so that the server only returns the FolderId
element. To make the output easier to understand, include the DisplayName element in
your results by including it in the AdditionalProperties element in the request, along
with the ExtendedFieldURI value for the PR_ATTR_HIDDEN property, so that you know
whether the folders are hidden folders.

This is also the XML request that the EWS Managed API sends when you call the
FindFolders method.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:FindFolder Traversal="Deep">

<m:FolderShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="folder:DisplayName" />

<t:ExtendedFieldURI PropertyTag="4340"

PropertyType="Boolean" />

</t:AdditionalProperties>

</m:FolderShape>

<m:IndexedPageFolderView MaxEntriesReturned="100"

Offset="0"

BasePoint="Beginning" />

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="msgfolderroot" />

</m:ParentFolderIds>

</m:FindFolder>

</soap:Body>

</soap:Envelope>

The following XML example shows the FindFolderResponse message that is sent from
the server to the client in response to the FindFolder operation request. It contains only
the FolderId , the DisplayName , and the value of the PR_ATTR_HIDDEN extended
property for all the subfolders under the msgrootfolder folder. If the Value element is
set to true, the folder should be hidden in the client view.
This is also the XML response that the EWS Managed API sends when you get multiple
folders by using the FindFolder method. The values of some attributes and elements
have been shortened for readability, and some folders have not been included for
brevity.

XML

<?xml version="1.0" encoding="utf-8"?><s:Envelope


xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="815"

MinorBuildNumber="6"

Version="V2_7"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:FindFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder IndexedPagingOffset="16"

TotalItemsInView="16"

IncludesLastItemInRange="true">

<t:Folders>
<t:CalendarFolder>

<t:FolderId Id="AAAEOAAA="

ChangeKey="AgAAABYAAAAPxolXAHv3TaHUnjW8wWqXAAAAAAA3"/>

<t:DisplayName>Calendar</t:DisplayName>

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertyTag="0x10f4"

PropertyType="Boolean"/>

<t:Value>false</t:Value>

</t:ExtendedProperty>

</t:CalendarFolder>

<t:ContactsFolder>

<t:FolderId Id="AAAEPAAA="

ChangeKey="AwAAABYAAAAPxolXAHv3TaHUnjW8wWqXAAAAAAA4"/>

<t:DisplayName>Contacts</t:DisplayName>

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertyTag="0x10f4"

PropertyType="Boolean"/>

<t:Value>false</t:Value>

</t:ExtendedProperty>

</t:ContactsFolder>

<t:ContactsFolder>

<t:FolderId Id="AAAUKAAA="

ChangeKey="AwAAABYAAAAPxolXAHv3TaHUnjW8wWqXAAAAAAS5"/>

<t:DisplayName>Recipient Cache</t:DisplayName>

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertyTag="0x10f4"

PropertyType="Boolean"/>

<t:Value>true</t:Value>

</t:ExtendedProperty>

</t:ContactsFolder>

<t:Folder>

<t:FolderId Id="AAAUJAAA="

ChangeKey="AQAAABYAAAAPxolXAHv3TaHUnjW8wWqXAAAAAASx"/>

<t:DisplayName>Conversation Action Settings</t:DisplayName>

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertyTag="0x10f4"

PropertyType="Boolean"/>

<t:Value>true</t:Value>

</t:ExtendedProperty>

</t:Folder>

</t:Folders>

</m:RootFolder>

</m:FindFolderResponseMessage>

</m:ResponseMessages>

</m:FindFolderResponse>

</s:Body>

</s:Envelope>

Update a folder by using the EWS Managed


API
The following code example shows how to update the display name of a folder by using
the EWS Managed API.

First, create a PropertySet to limit the number of properties that the server returns in
the Folder.Bind response. We recommend that you use the IdOnly BasePropertySet
to reduce calls to the Exchange database. Next, use the Bind method to bind to the
folder to update. Then, update the DisplayName property, and use the
Folder.Update method to save the changes.
In this example, we assume that service is a valid ExchangeService object and that the
user has been authenticated to an Exchange server. The local variable folderId is the Id
of the folder to update.

C#

// As a best practice, only include the ID value in the PropertySet.

PropertySet propertySet = new PropertySet(BasePropertySet.IdOnly);


// Bind to an existing folder and get the FolderId.

// This method call results in a GetFolder call to EWS.

Folder folder = Folder.Bind(service, folderId, propertySet);

// Update the display name of the folder.

folder.DisplayName = "Updated folder name";

// Save the updates.

// This method call results in an UpdateFolder call to EWS.

folder.Update();

Update a folder by using EWS


The following XML examples show how to update the display name of a folder by using
EWS.

First, send a GetFolder operation request message to get the folder to update, as
shown in Get a folder hierarchy by using EWS.

Next, send an UpdateFolder operation request message to the server to update a


folder. The UpdateFolder operation request updates the DisplayName to "Updated
Custom Folder".

This is also the XML request that the EWS Managed API sends when you update a folder
by using the Folder.Update method. The values of some attributes and elements have
been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:UpdateFolder>

<m:FolderChanges>
<t:FolderChange>

<t:FolderId Id="OrV9ZAAA="
ChangeKey="AQAAABYAAABVzRdyy/cHS4XTC9itCRdUAAAOrXWb" />

<t:Updates>

<t:SetFolderField>

<t:FieldURI FieldURI="folder:DisplayName" />

<t:Folder>

<t:DisplayName>Updated Custom Folder</t:DisplayName>

</t:Folder>

</t:SetFolderField>

</t:Updates>

</t:FolderChange>

</m:FolderChanges>

</m:UpdateFolder>

</soap:Body>

</soap:Envelope>

The server responds to the UpdateFolder request with a UpdateFolderResponse


message that includes the a ResponseCode value of NoError, and the FolderId of
the folder that was updated with an updated ChangeKey attribute value.

Delete a folder by using the EWS Managed API


This article provides a basic example that shows you how to delete a folder by using the
EWS Managed API. For more details about deleting folders, see Deleting items by using
EWS in Exchange.

To delete a folder by using the EWS Managed API, first, use the Folder.Bind method to
bind to the service object to the folder to delete. Next, use the Folder.Delete method
to delete the folder by using the HardDelete deletion mode.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server. The local variable folderId is the Id of
the folder to delete.

C#

// Bind to an existing folder and get all its properties.

// This method call results in a GetFolder call to EWS.

Folder folder = Folder.Bind(service, folderId);

// HardDelete the folder.

// This method call results in a DeleteFolder call to EWS.

folder.Delete(DeleteMode.HardDelete);

Delete a folder by using EWS


This article provides a basic XML example that shows you how to delete a folder by
using EWS. For more details about deleting folders, see Deleting items by using EWS in
Exchange.

To delete a folder by using EWS, first, send a GetFolder operation request message to
get the folder to update as shown in Get a folder by using EWS.

Next, send a DeleteFolder operation request message to the server to delete the
folder. The DeleteFolder operation request indicates that the DeleteType is HardDelete
and it includes the FolderId of the folder to delete.

This is also the XML request that the EWS Managed API sends when you delete a folder
by using the Folder.Delete method. The values of some attributes and elements have
been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:DeleteFolder DeleteType="HardDelete">

<m:FolderIds>

<t:FolderId Id="OrV9ZAAA="
ChangeKey="AQAAABYAAABVzRdyy/cHS4XTC9itCRdUAAAOrXWf" />

</m:FolderIds>

</m:DeleteFolder>

</soap:Body>

</soap:Envelope>

The server responds to the DeleteFolder request with a DeleteFolderResponse


message that includes the a ResponseCode value of NoError, which indicates that the
folder deletion was successful.

Next steps
After you have retrieved the folders on the server, or made changes to folders, you
might want to synchronize your folder hierarchy or subscribe to notifications about
folder changes on the server.
See also
Folders and items in EWS in Exchange
Work with Exchange mailbox items by using EWS in Exchange
Deleting items by using EWS in Exchange
Develop web service clients for Exchange
Work with hidden folders by using EWS
in Exchange
Article • 03/15/2022 • 7 minutes to read

Learn how to make a folder hidden and find hidden folders by using the EWS Managed
API or EWS in Exchange.

With one exception, folders in the root of an Exchange mailbox (the non-IPM subtree)
are hidden from the user. Conversely, all folders in the MsgFolderRoot (the IPM subtree)
are visible to the user. So how do you hide a folder under the MsgFolderRoot? It's not
that tricky — it comes down to just one property, the PidTagAttributeHidden
(0x10F4000B) extended property. When this property is set to true, Outlook or another
client that uses the property to determine folder visibility will hide the folder from the
user's view. Because this is an extended property, it's more complex to use than your
average folder property, so this article will walk you through the main scenarios.

Table 1. EWS Managed API methods and EWS operations for working with hidden
folders

Task EWS Managed API method EWS operation

Hide a folder Folder.Bind followed by GetFolder followed by


Folder.Update UpdateFolder

Find hidden FindFolders


FindFolder

folders

Are you wondering what the one exception is — that is, what folder in the root IS visible
to users? It's the Finder folder (also known as the SearchFoldersWellKnownFolder
enumeration value, or the searchfoldersDistinguishedFolderId element value), which
contains users' search folders. Search folders created in the Finder folder are visible to
Outlook users. If you need to create a search folder that is not visible to users, move it
under the root folder to hide it. Unlike for other folders, setting the
PidTagAttributeHidden property to true will not hide a search folder in the Finder
folder.

Hide a folder by using the EWS Managed API


You can make an existing folder a hidden folder by changing the
PidTagAttributeHidden extended property to true. First, create an extended property
definition for the property. Next, use the Bind method to get to the folder, then
update the value of the PidTagAttributeHidden property to true, and use the Update
method to save the changes.

This example assumes that service is a valid ExchangeService object for the mailbox
owner, that the user has been authenticated to an Exchange server, and that folderId is
a valid Folder.Id that identifies the folder to hide.

C#

private static void MakeHidden(FolderId folderId, ExchangeService service)

// Create an extended property definition for the PidTagAttributeHidden


property.

ExtendedPropertyDefinition isHiddenProp = new


ExtendedPropertyDefinition(0x10f4, MapiPropertyType.Boolean);

PropertySet propSet = new PropertySet(isHiddenProp);

// Bind to a folder and retrieve the PidTagAttributeHidden property.

Folder folder = Folder.Bind(service, folderId, propSet);

// Set the PidTagAttributeHidden property to true.

folder.SetExtendedProperty(isHiddenProp, true);

// Save the changes.

folder.Update();

Hide a folder by using EWS


You can use EWS to make an existing folder a hidden folder by changing the
PidTagAttributeHidden extended property to true. First, use the GetFolder
operation to get to the folder, then retrieve the PidTagAttributeHidden property by
including the ExtendedFieldURI element, and setting the PropertyTag value to 4340
and the PropertyType value to Boolean.

This is also the XML request that the EWS Managed API sends when you use the Bind
method to get a folder before making it a hidden folder.

The FolderId value is shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:GetFolder>

<m:FolderShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:ExtendedFieldURI PropertyTag="4340"

PropertyType="Boolean" />

</t:AdditionalProperties>

</m:FolderShape>

<m:FolderIds>

<t:FolderId Id="IQywAAAA==" />

</m:FolderIds>

</m:GetFolder>

</soap:Body>

</soap:Envelope>

The server responds to the GetFolder request with a GetFolderResponse message that
includes a ResponseCode element value of NoError, which indicates that the folder
was retrieved successfully. The response also includes a Value for the
ExtendedProperty . In this example, the Value is set to false, which means that the
folder is currently not hidden.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="898"

MinorBuildNumber="23"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Folders>

<t:Folder>

<t:FolderId Id="IQywAAAA=="

ChangeKey="AQAAABYAAAD32nSTjepyT63rYH17n9THAAAAABED" />

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertyTag="0x10f4"
PropertyType="Boolean" />

<t:Value>false</t:Value>

</t:ExtendedProperty>

</t:Folder>

</m:Folders>

</m:GetFolderResponseMessage>

</m:ResponseMessages>

</m:GetFolderResponse>

</s:Body>

</s:Envelope>

To change the value of the ExtendedProperty to true, use the UpdateFolder


operation. Include the ExtendedProperty, ExtendedFieldURI, and Value elements for
the PidTagAttributeHidden extended property, and set the Value element to true to
hide the folder.

This is also the XML request that the EWS Managed API sends when you use the Update
method to update a folder to make it a hidden folder.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:UpdateFolder>

<m:FolderChanges>
<t:FolderChange>

<t:FolderId Id="IQywAAAA=="

ChangeKey="AQAAABYAAAD32nSTjepyT63rYH17n9THAAAAABED"
/>

<t:Updates>

<t:SetFolderField>

<t:ExtendedFieldURI PropertyTag="4340"

PropertyType="Boolean" />

<t:Folder>

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertyTag="4340"

PropertyType="Boolean" />

<t:Value>true</t:Value>

</t:ExtendedProperty>

</t:Folder>

</t:SetFolderField>

</t:Updates>

</t:FolderChange>

</m:FolderChanges>

</m:UpdateFolder>

</soap:Body>

</soap:Envelope>

The server responds to the UpdateFolder request with an UpdateFolderResponse


message that includes a ResponseCode element value of NoError, which indicates
that the folder was updated successfully, and is now hidden.

Find all hidden folders by using the EWS


Managed API
You can find all hidden folders under a parent folder by creating an extended property
definition for the PidTagAttributeHidden extended property, and then using the
FindFolders method to find folders with a PidTagAttributeHidden value that is set to
true. This example uses the MsgFolderRoot, also known as the Top of Information Store,
or IPM Subtree, as the parent folder to search under.

This example assumes that service is a valid ExchangeService object for the mailbox
owner, and that the user has been authenticated to an Exchange server.

C#

private static void FindHiddenFolders(ExchangeService service)

// Create an extended property definition for the PidTagAttributeHidden


property.

ExtendedPropertyDefinition isHiddenProp = new


ExtendedPropertyDefinition(0x10f4, MapiPropertyType.Boolean);

// Create a folder view to retrieve up to 100 folders and

// retrieve only the PidTagAttributeHidden and the display name.

FolderView folderView = new FolderView(100);

folderView.PropertySet = new PropertySet(isHiddenProp,


FolderSchema.DisplayName);

// Indicate a Traversal value of Deep, so that all subfolders are


retrieved.

folderView.Traversal = FolderTraversal.Deep;

// Find all hidden folders under the MsgFolderRoot.

// This call results in a FindFolder call to EWS.

FindFoldersResults findFolder =
service.FindFolders(WellKnownFolderName.MsgFolderRoot,

new SearchFilter.IsEqualTo(isHiddenProp, true), folderView);

// Display the folder ID and display name of each hidden folder.

foreach (Folder folder in findFolder)

Console.WriteLine("FolderId: {0}", folder.Id);

Console.WriteLine("DisplayName: {0}", folder.DisplayName);


Console.WriteLine("\r\n");

Find all hidden folders by using EWS


You can use EWS to find all hidden folders under an existing folder by calling the
FindFolder operation and searching for folders whose PidTagAttributeHidden
extended property is set to true. To do this, include an IsEqualTo Restriction that
searches for the ExtendedFieldURI element for the PidTagAttributeHidden property (
PropertyTag value to 4243 and the PropertyType value to Boolean), as shown in the
following request. This example uses the MsgFolderRoot, also known as the Top of
Information Store, or IPM Subtree, as the parent folder to search under.

This is also the XML request that the EWS Managed API sends when you use the
FindFolders method to find all hidden folders.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Central Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:FindFolder Traversal="Deep">

<m:FolderShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:ExtendedFieldURI PropertyTag="4340"

PropertyType="Boolean" />

<t:FieldURI FieldURI="folder:DisplayName" />

</t:AdditionalProperties>

</m:FolderShape>

<m:IndexedPageFolderView MaxEntriesReturned="100"

Offset="0"

BasePoint="Beginning" />

<m:Restriction>

<t:IsEqualTo>

<t:ExtendedFieldURI PropertyTag="4340"

PropertyType="Boolean" />

<t:FieldURIOrConstant>

<t:Constant Value="true" />

</t:FieldURIOrConstant>

</t:IsEqualTo>

</m:Restriction>

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="msgfolderroot" />

</m:ParentFolderIds>

</m:FindFolder>

</soap:Body>

</soap:Envelope>

The server responds to the FindFolder request with a FindFolderResponse message


that includes a ResponseCode element value of NoError, which indicates that the
folder search was successful, as well as all the hidden folders under the root message
folder.

The FolderId values are shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="898"

MinorBuildNumber="23"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:FindFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder IndexedPagingOffset="6"

TotalItemsInView="6"

IncludesLastItemInRange="true">

<t:Folders>
<t:ContactsFolder>

<t:FolderId Id="IBHgAAAA=="

ChangeKey="AwAAABYAAAD32nSTjepyT63rYH17n9THAAAAAACz" />

<t:DisplayName>{06967759-274D-40B2-A3EB-D7F9E73727D7}
</t:DisplayName>

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertyTag="0x10f4"

PropertyType="Boolean" />

<t:Value>true</t:Value>

</t:ExtendedProperty>

</t:ContactsFolder>

<t:ContactsFolder>

<t:FolderId Id="IBHwAAAA=="

ChangeKey="AwAAABYAAAD32nSTjepyT63rYH17n9THAAAAAAC7" />

<t:DisplayName>{A9E2BC46-B3A0-4243-B315-60D991004455}
</t:DisplayName>

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertyTag="0x10f4"

PropertyType="Boolean" />

<t:Value>true</t:Value>

</t:ExtendedProperty>

</t:ContactsFolder>

<t:ContactsFolder>

<t:FolderId Id="IBIQAAAA=="

ChangeKey="AwAAABYAAAD32nSTjepyT63rYH17n9THAAAAAADO" />

<t:DisplayName>GAL Contacts</t:DisplayName>

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertyTag="0x10f4"

PropertyType="Boolean" />

<t:Value>true</t:Value>

</t:ExtendedProperty>

</t:ContactsFolder>

<t:ContactsFolder>

<t:FolderId Id="IBHQAAAA=="

ChangeKey="AwAAABYAAAD32nSTjepyT63rYH17n9THAAAAAACa" />

<t:DisplayName>Recipient Cache</t:DisplayName>

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertyTag="0x10f4"

PropertyType="Boolean" />

<t:Value>true</t:Value>

</t:ExtendedProperty>

</t:ContactsFolder>

<t:Folder>

<t:FolderId Id="HAAAAA=="

ChangeKey="AQAAABYAAAD32nSTjepyT63rYH17n9THAAAAAACS" />

<t:DisplayName>Conversation Action Settings</t:DisplayName>

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertyTag="0x10f4"

PropertyType="Boolean" />

<t:Value>true</t:Value>

</t:ExtendedProperty>

</t:Folder>

<t:Folder>

<t:FolderId Id="IQywAAAA=="

ChangeKey="AQAAABYAAAD32nSTjepyT63rYH17n9THAAAeZIBf" />

<t:DisplayName>TestFolder</t:DisplayName>

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertyTag="0x10f4"

PropertyType="Boolean" />

<t:Value>true</t:Value>

</t:ExtendedProperty>

</t:Folder>

</t:Folders>

</m:RootFolder>

</m:FindFolderResponseMessage>

</m:ResponseMessages>

</m:FindFolderResponse>

</s:Body>

</s:Envelope>

After you have hidden or unhidden folders, you might want to get the folder hierarchy
or synchronize the folder hierarchy. The examples that show you how to get a folder
hierarchy by using the EWS Managed API or get a folder hierarchy by using EWS also
indicate which folders in the hierarchy are hidden.

See also
Folders and items in EWS in Exchange

Work with folders by using EWS in Exchange

Work with search folders by using EWS in Exchange


Work with Exchange mailbox items by
using EWS in Exchange
Article • 01/15/2020 • 14 minutes to read

Learn how to create, get, update, and delete items by using the EWS Managed API or
EWS in Exchange.

You can use the EWS Managed API or EWS to work with items in a mailbox. You can use
generic items — EWS Managed API Item objects or EWS Item types — to perform
some operations (getting an item or deleting an item by using the item's identifier);
however, most of the time you'll have to use a strongly typed item to perform a get or
update operation because you'll need access to the properties that are specific to the
strongly typed item.

For example, you can't use a generic item to retrieve an item that contains a start and
end date - you need an EWS Managed API Appointment object or an EWS
CalendarItem type to do that. And if you're using the EWS Managed API, you always
have to create strongly typed items, because the generic Item class does not have a
constructor. If you're working with an item that is not strongly typed, you can always use
the base Item class to work with the item.

Table 1. EWS Managed API methods and EWS operations for working with items

In order EWS Managed API method EWS


to… operation

Create a None. You can only create specific item types by using the EWS CreateItem

generic item Managed API; you cannot create generic items.

Get an item Item.Bind


GetItem

Update an Item.Update
UpdateItem
item

Delete an Item.Delete
DeleteItem

item

In this article, you'll learn when you can use the generic base class and when you need
to use a strongly typed item to complete your task. The code examples will show you
how to use the base class, and what to do when you can't use the base class or it
doesn't fit your needs.
Create an item by using the EWS Managed API
The EWS Managed API does not have a publicly available constructor for the Item
class, so you must use the constructor for the specific item type you want to create in
order to create an item. For example, use the EmailMessage class constructor to
create a new email message, and the Contact class constructor to create a new
contact. Likewise, the server never returns generic Item objects in responses; all generic
items are returned as EmailMessage objects.

When you know the type of item to create, you can complete the task in just a few
steps. The steps are similar for all item types:

1. Initialize a new instance of one of the Item classes with the ExchangeService
object as a parameter.

2. Set properties on the item. The schemas are different for each item type, so
different properties are available for different items.

3. Save the item, or save and send the item.

For example, you can create an EmailMessage object, set the Subject , Body , and
ToRecipients properties, and then send it by using the
EmailMessage.SendAndSaveCopy method.

C#

// Create an email message and provide it with connection

// configuration information by using an ExchangeService object named


service.

EmailMessage message = new EmailMessage(service);

// Set properties on the email message.

message.Subject = "Company Soccer Team";

message.Body = "Are you interested in joining?";

message.ToRecipients.Add("[email protected]");

// Send the email message and save a copy.

// This method call results in a CreateItem call to EWS.

message.SendAndSaveCopy();

To learn how to create a meeting or appointment item by using the EWS Managed API,
see Create appointments and meetings by using EWS in Exchange 2013.

Create an item by using EWS


You can create a generic item or a strongly typed item by using EWS. The steps are
similar for all item types:
1. Use the CreateItem operation to create an item in the Exchange store.

2. Use the Items element to contain one or more items to create.

3. Set properties on the item.

For example, you can create an email message and send it by using the code in the
following example. This is also the XML request that the EWS Managed API sends when
you call the SendAndSaveCopy method.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:CreateItem MessageDisposition="SendAndSaveCopy">

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="sentitems" />

</m:SavedItemFolderId>

<m:Items>

<t:Message>

<t:Subject>Company Soccer Team</t:Subject>

<t:Body BodyType="HTML">Are you interested in joining?</t:Body>

<t:ToRecipients>

<t:Mailbox>
<t:EmailAddress>[email protected] </t:EmailAddress>

</t:Mailbox>

</t:ToRecipients>

</t:Message>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The server responds to the CreateItem request with a CreateItemResponse message


that includes a ResponseCode value of NoError, which indicates that the email was
created successfully, and the ItemId of the newly created message.

To learn how to create a meeting or appointment item by using EWS, see Create
appointments and meetings by using EWS in Exchange 2013.
Get an item by using the EWS Managed API
To use the EWS Managed API to get an item if you know the Item.Id of the item to
retrieve, you simply call one of the Bind methods on the item, and the item is
retrieved. As a best practice, we recommend that you limit the properties returned to
only those that are required. This example returns the item Id property and the Subject
property.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server. The local variable itemId is the Id of
the item to update.

C#

// As a best practice, limit the properties returned to only those that are
required.

PropertySet propSet = new PropertySet(BasePropertySet.IdOnly,


ItemSchema.Subject);

// Bind to the existing item by using the ItemId.

// This method call results in a GetItem call to EWS.

Item item = Item.Bind(service, itemId, propSet);

If you're searching for an item that meets specific criteria, do the following:

1. Bind to the folder that contains the items to get.

2. Instantiate a SearchFilter.SearchFilterCollection or a PropertySet to filter the


items to return.

3. Instantiate an ItemView or CalendarView object to specify the number of items


to return.

4. Call the ExchangeService.FindItems or ExchangeService.FindAppointments


method.

For example, if you want to retrieve unread email messages in the Inbox, use the code in
the following example. This example uses a SearchFilterCollection to limit the results of
the FindItems method to unread messages, and limits the ItemView to limit results to
one item. This particular code only works on EmailMessage objects because the
EmailMessageSchema.IsRead value is part of the SearchFilter.

C#

// Bind the Inbox folder to the service object.

Folder inbox = Folder.Bind(service, WellKnownFolderName.Inbox);

// The search filter to get unread email.

SearchFilter sf = new
SearchFilter.SearchFilterCollection(LogicalOperator.And, new
SearchFilter.IsEqualTo(EmailMessageSchema.IsRead, false));

ItemView view = new ItemView(1);

// Fire the query for the unread items.

// This method call results in a FindItem call to EWS.

FindItemsResults<Item> findResults =
service.FindItems(WellKnownFolderName.Inbox, sf, view);

Alternatively, you can use a PropertySet to limit the results of the search as shown in
the following code example. This example uses the FindAppointments method to
retrieve up to five appointments that occur in the next 30 days. This code of course only
works on calendar items.

C#

// Initialize values for the start and end times, and the number of
appointments to retrieve.

DateTime startDate = DateTime.Now;

DateTime endDate = startDate.AddDays(30);

const int NUM_APPTS = 5;

// Bind the Calendar folder to the service object.

// This method call results in a GetFolder call to EWS.

CalendarFolder calendar = CalendarFolder.Bind(service,


WellKnownFolderName.Calendar, new PropertySet());

// Set the start and end time and number of appointments to retrieve.

CalendarView cView = new CalendarView(startDate, endDate, NUM_APPTS);

// Limit the properties returned to the appointment's subject, start time,


and end time.

cView.PropertySet = new PropertySet(AppointmentSchema.Subject,


AppointmentSchema.Start, AppointmentSchema.End);

// Retrieve a collection of appointments by using the calendar view.

// This method call results in a FindAppointments call to EWS.

FindItemsResults<Appointment> appointments =
calendar.FindAppointments(cView);

Note that the information the server returns in the Bind method response is different
than the information that the server returns for a FindItem or FindAppointment method
response. The Bind method can return all the schematized properties, whereas the
FindItem and FindAppointment methods do not return all the schematized properties.
So if you need full access to the item, you'll have to use the Bind method. If you don't
have the item Id of the item you'd like to retrieve, use the FindItem or
FindAppointment methods to retrieve the Id, and then use the Bind method to retrieve
the properties you need.

To learn how to get a meeting or appointment item by using the EWS Managed API, see
Get appointments and meetings by using EWS in Exchange.
Get an item by using EWS
If you know the ItemId of the item to retrieve, you can get the item by using the
GetItem operation.

The following example shows the XML request to get the Subject of an item with a
specific ItemId. This is also the XML request that the EWS Managed API sends when
calling the Bind method on an ItemId. The values of some attributes and elements
have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:GetItem>

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

</t:AdditionalProperties>

</m:ItemShape>

<m:ItemIds>

<t:ItemId Id="GJc/NAAA=" />

</m:ItemIds>

</m:GetItem>

</soap:Body>

</soap:Envelope>

The following example shows the XML response that the server returns after it processes
the GetItem operation. The response indicates the item was retrieved successfully. The
values of some attributes and elements have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="815"

MinorBuildNumber="6"

Version="V2_7"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Message>
<t:ItemId Id="GJc/NAAA="
ChangeKey="CQAAABYAAAAPxolXAHv3TaHUnjW8wWqXAAAGJd9Z"/>

<t:Subject>Company Soccer Team</t:Subject>

</t:Message>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</m:GetItemResponse>

</s:Body>

</s:Envelope>

If you do not know the ItemId of the item you want to retrieve, you can use the
FindItem operation to find the item. In order to use the FindItem operation, you must
first identify the folder that you're searching. You can identify the folder by using its
DistinguinguishedFolderName or by using the FolderId . You can use either the
FindFolder or SyncFolderHierarchy operations to get the FolderId you need. Then
use the FindItem operation to search that folder for results that match the search filter.
Unlike the EWS Managed API, EWS does not provide a separate find operation for
appointments. The FindItem operation retrieves items of all types.

The following example shows the XML FindItem operation request that is sent to the
server to find appointments in the Calendar folder that occur in the next 30 days. The
values of some attributes and elements have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:FindItem Traversal="Shallow">

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

<t:FieldURI FieldURI="calendar:Start" />

<t:FieldURI FieldURI="calendar:End" />

</t:AdditionalProperties>

</m:ItemShape>

<m:CalendarView MaxEntriesReturned="5" StartDate="2013-10-


16T17:04:28.722Z" EndDate="2013-11-15T18:04:28.722Z" />

<m:ParentFolderIds>

<t:FolderId Id="AAAEOAAA="
ChangeKey="AgAAABYAAAAqRr3mNdNMSasqx/o9J13UAAAAAAA3" />

</m:ParentFolderIds>

</m:FindItem>

</soap:Body>

</soap:Envelope>

The server responds to the FindItem request with a FindItemResponse message that
includes the ResponseCode value of NoError, which indicates that the operation
completed successfully. If any calendar items meet the filtering criteria, they are included
in the response.

Note that the information the server returns in the GetItem operation response is
different than the information the server returns in a FindItem or FindAppointment
operation response. The GetItem operation can return all the schematized properties,
whereas the FindItem and FindAppointment operations do not return all the
schematized properties. So if you need full access to the item, you'll have to use the
GetItem operation. If you don't have the ItemId of the item you'd like to retrieve, use
the FindItem or FindAppointment operations to retrieve the ItemId, and then use the
GetItem operation to retrieve the elements you need.

To learn how to get a meeting or appointment item by using EWS, see Get
appointments and meetings by using EWS in Exchange.

Update an item by using the EWS Managed API


The steps to update an item by using the EWS Managed API are similar for all item
types; however, the item properties are different for each item type, and the Update
method has many overloaded methods to choose from. To update an item:

1. Use the Bind method to get the latest version of the item, unless you already
have it. To update properties specific to a strongly typed item, you'll have to bind
to that item type. To update properties available on the generic item type, you can
bind to the Item object.

2. Update the properties on the item.

3. Call the Update method.

For example, you can update the subject of an email by using the generic item type, as
shown in the code in the following example.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server. The local variable itemId is the Id of
the item to update.

C#

// Bind to the existing item, using the ItemId.

// This method call results in a GetItem call to EWS.

Item item = Item.Bind(service, itemId);

// Update the Subject of the email.

item.Subject = "New subject";

// Save the updated email.

// This method call results in an UpdateItem call to EWS.

item.Update(ConflictResolutionMode.AlwaysOverwrite);

To learn how to update a meeting or appointment item by using the EWS Managed API,
see Update appointments and meetings by using EWS in Exchange.

Update an item by using EWS


To update an item by using EWS, do the following:

1. Use the GetItem operation to get the latest version of the item, unless you
already have it.

2. Use the UpdateItem operation to specify fields to update and assign new values
to those fields.
The following example shows the XML UpdateItem operation request that is sent to the
server to update the Subject value of the email message. The values of some
attributes and elements have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010_SP1" />

</soap:Header>

<soap:Body>

<m:UpdateItem MessageDisposition="SaveOnly"
ConflictResolution="AlwaysOverwrite">

<m:ItemChanges>

<t:ItemChange>

<t:ItemId Id="APdZjAAA="
ChangeKey="CQAAABYAAAAqRr3mNdNMSasqx/o9J13UAAAAPdgr" />

<t:Updates>

<t:SetItemField>

<t:FieldURI FieldURI="item:Subject" />

<t:Message>

<t:Subject>New subject</t:Subject>

</t:Message>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

</m:ItemChanges>

</m:UpdateItem>

</soap:Body>

</soap:Envelope>

The server responds to the UpdateItem request with a UpdateItemResponse message


that includes the a ResponseCode value of NoError, which indicates that the item
update was successful.

To learn how to update a meeting or appointment item by using EWS, see Update
appointments and meetings by using EWS in Exchange.

Delete an item by using the EWS Managed API


You can delete items by moving them to the Deleted Items folder or to the dumpster. If
you know the ItemId of the item to delete, just call the Delete method on the item.

If you need to find the item before deleting it, do the following:
1. Call the FindItems or FindAppointments method to find the item to delete.

2. Instantiate a PropertySet and limit it to the properties to return, or use a


SearchFilterCollection to find specific items.

3. Instantiate an ItemView or CalendarView to specify the number of items to


return.

4. Call the Delete method.

For example, the following code shows how to move an email message to the Deleted
Items folder.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server. The local variable itemId is the Id of
the item to update.

C#

// Bind to the existing item, using the ItemId.

// This method call results in a GetItem call to EWS.

Item item = Item.Bind(service, itemId);

// Delete the item by moving it to the Deleted Items folder.

// This method call results in a DeleteItem call to EWS.

item.Delete(DeleteMode.MoveToDeletedItems);

For more details about deleting items, see Deleting items by using EWS in Exchange. To
learn how to delete a meeting or appointment item by using the EWS Managed API, see
Delete appointments and cancel meetings by using EWS in Exchange.

Delete an item by using EWS


You can delete an item by using the DeleteItem operation.

The following example shows the XML request that is sent to the server to move the
email message to the Deleted Items folder. The values of some attributes and elements
have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010_SP1" />

</soap:Header>

<soap:Body>

<m:DeleteItem DeleteType="MoveToDeletedItems">

<m:ItemIds>

<t:ItemId Id="APdZjAAA="
ChangeKey="CQAAABYAAAAqRr3mNdNMSasqx/o9J13UAAANIFzC" />

</m:ItemIds>

</m:DeleteItem>

</soap:Body>

</soap:Envelope>

The server responds to the DeleteItem request with a DeleteItemResponse message


that includes the a ResponseCode value of NoError, which indicates that the item
deletion was successful.

For more details about deleting items, see Deleting items by using EWS in Exchange. To
learn how to delete a meeting or appointment item by using EWS, see Delete
appointments and cancel meetings by using EWS in Exchange.

Move or copy items to another mailbox


You can move or copy items between mailboxes by using the ExportItems and
UploadItems operations. To learn more, see Exporting and importing items by using
EWS in Exchange.

See also
Folders and items in EWS in Exchange
Work with folders by using EWS in Exchange
Deleting items by using EWS in Exchange
Deleting items by using EWS in
Exchange
Article • 09/14/2022 • 7 minutes to read

Find out how you can use the EWS Managed API or EWS in Exchange to delete items
either by moving them to the Deleted Items folder or to the dumpster.

Have you ever asked yourself what the difference is between moving items to the
Deleted Items folder, and moving them to the dumpster? You might be curious about
the different options for handling deleted items and how to implement those options in
your application. Exchange Web Services (EWS) includes three options for handling
deleted items. This article will hopefully clear up any confusion you might have about
the differences between them.

Deleting items - what are my options?


Before you can understand the overall landscape for deleting items, it's important to
recognize the difference between the following:

The Deleted Items folder - When you delete items in a mailbox, this is where they
go.

The dumpster (aka the Recoverable Items folder) - When you remove items from a
mailbox, this is where they go.

Figures 1 and 2 show what the deletion process looks like for items and folders in a
mailbox.

Figure 1. Process for deleting items from a mailbox


Figure 2. Process for deleting folders from a mailbox

You can delete items and folders three different ways, depending on how "permanent"
you would like the deletion to be.

Table 1: Options for deleting items by using EWS


Option What happens

Move This is the least permanent way to delete items.

to the
Deleted This is like putting a piece of paper in the recycle bin by your desk. You can easily grab
Items it if you need it again.

folder
You can use any deletion operation that implements the move to the Deleted Items
folder option to perform this action.

You can also use the MoveItem operation ( Item.Move() ) or the MoveFolder
operation ( Folder.Move() ) to move an item or folder to the Deleted Items folder.

Soft The item is moved to the Deletions folder in the dumpster.

delete
This is like emptying your recycle bin into your curbside container. You can still access
the item if you need to, it's just a little harder.

For more about the dumpster (also called the Recoverable Items folder) and scenarios
such as eDiscovery or litigation holds, see Recoverable Items Folder on TechNet.

Soft deletions aren't recommended for applications that target Exchange 2007. In
Exchange 2007, soft deletions are handled by setting a bit on the item to indicate that it
will be moved to the dumpster at an unspecified time.

Soft delete traversals, or searches of items that have been soft deleted via the FindItem
operation , are not supported in Exchange Online, Exchange Online as part of Office
365, and versions of Exchange starting with Exchange 2010.

NOTE: Folders cannot be soft deleted.

Hard The item or folder is permanently deleted.

delete
Hard-deleted items are placed in the Purges folder of the dumpster. This is like when
the recycling truck empties your curbside recycle container. The items cannot be
accessed from an email client like Outlook or Outlook Web App, and, unless there is a
hold set on the mailbox, the items will be permanently deleted after a set period of
time.

You can read more about item retention in the article Configure Deleted Item Retention
and Recoverable Items Quotas .

NOTE: Folders are not placed in the Purges folder when they are hard deleted. Hard-
deleted folders are removed from the mailbox.

The move to the Deleted Items folder and the hard delete options are transactional,
which means that by the time the web service call finishes, the item has been moved to
the Deleted Items folder or the dumpster.
To help you better understand the ecosystem of folders that are used to store deleted
items, the following figure shows the hierarchy of folders that can contain deleted items.
The folder names are as they appear in the DistinguishedFolderIdNameType schema
type, or the WellKnownFolderName enumeration in the EWS Managed API.

Figure 3. Hierarchy of folders that contain deleted items

Table 2: Folders that contain deleted items

Folder name Introduced Description


in

deleteditems Exchange The default Deleted Items folder. Items remain


2007 in this folder until they are soft- or hard-deleted
or until a retention period has been exceeded.
Then they are moved to a folder in the
dumpster. Deleted folders are placed in the
Deleted Items folder, and when they are soft- or
hard-deleted, they are permanently removed
from the mailbox and are not recoverable.

recoverableitemsroot Exchange The root of the dumpster, or the Recoverable


2010 Items folder. Dumpster access was implemented
in EWS in Exchange 2010. The display name for
this folder is "Recoverable Items".
Folder name Introduced Description
in

recoverableitemsdeletions Exchange The main dumpster folder for a mailbox. Soft-


2010 deleted items and items moved from the
Deleted Items folder by a retention policy are
placed in this folder. The display name for this
folder is "Deletions".

recoverableitemsversions Exchange Where older versions of an item are stored. Old


2010 versions of an item are created when an item is
updated. Draft item versions are not saved to
this folder. The display name of this folder is
"Versions".

recoverableitemspurges Exchange Where items that are removed from the


2010 Deletions folder are stored. All store hard-
deleted items are moved to this folder. The
display name for this folder is "Purges".

archiveddeletedtitems Exchange The default Deleted Items folder for an archive


2010 mailbox.

archiverecoverablesitemsroot Exchange The root dumpster folder for an archive


2010 mailbox. Archived items that are soft-deleted
are moved to a subfolder in this folder.

archiverecoverableitemsdeletions Exchange The main dumpster folder for an archive


2010 mailbox. Archived items moved to the dumpster
are placed here.

archiverecoverableitemsversions Exchange Where older versions of archived items are


2010 stored.

archiverecoverableitemspurges Exchange Where items that are hard-deleted from the


2010 archive Deletions folder in the dumpster are
stored. All store hard-deleted archived items are
moved to this folder.

How do I delete items?


Use one of the following to indicate whether to move an item to the Deleted Items
folder or perform a soft delete or a hard delete:

The DisposalType simple type, if you use EWS to access Exchange.

The DeleteMode enumeration , if you use the EWS Managed API.


You can use a number of different EWS operations or EWS Managed API methods to
delete items and folders from a mailbox.

Table 3: EWS operations and EWS Managed API methods for deleting items

EWS operation EWS Managed API method Introduced What it does


in

DeleteFolder Folder.Delete method


Exchange Deletes
operation
2007 folders from a
mailbox. With
EWS, you can
batch delete
folders. With
the EWS
Managed API,
you can only
delete a
single folder
per call.

DeleteItem operation
Item.Delete method
Exchange Deletes items
2007 from a
ExchangeService.DeleteItems mailbox.
method

EmptyFolder operation Folder.Empty method


Exchange Deletes all the
2010 items in a
folder, and,
optionally,
deletes all
subfolders in
a folder.

ApplyConversationAction Conversation.EnableAlwaysDeleteItems Exchange Sets a delete


operation
method
2010 processing
action on
Conversation.DeleteItems method
email
messages in a
conversation
so that they
are deleted.

DeleteUserConfiguration UserConfiguration.Delete method


Exchange Deletes a
operation
2010 folder
associated
item and
moves it to
the dumpster.
EWS operation EWS Managed API method Introduced What it does
in

CreateItem operation
Appointment.Accept method
Exchange Indirectly
2007 moves an
Appointment.AcceptTentatively item to the
method
Deleted Items
folder
Appointment.CancelMeeting whenever a
method
response to a
meeting
Appointment.Decline
request is
sent or the
MeetingRequest.Accept method
response is
set on the
MeetingRequest.AcceptTentatively appointment.

method

The deletion
MeetingRequest.Decline method
type is not set
on this
operation.
The meeting
messages are
moved to the
Deleted Items
folder when a
response
object is
successfully
processed by
the service.

You can also move items to the Deleted Items folder by using Inbox rules. For example,
you can create rules that have a delete action.

Some points to note about deleting items:

Deleting an occurrence of a recurring item does not trigger a move to the Deleted
Items folder or the dumpster. This results in an update to the recurring master item
of the recurring series.

You cannot delete default folders from the mailbox.

Avoid deleting meetings or meeting messages, such as meeting requests and or


meeting updates. Instead, respond to these items by using response objects. This
way, the associated calendar items are updated to reflect the responder's or
organizer's actions.
An item's change key is not updated when the item is moved to the Deleted Items
or Deletions folder.

If you perform a hard delete on an item and then call a SyncFolderHierarchy


operation or SyncFolderHierarchy EWS Managed API method, or a
SyncFolderItems operation or SyncFolderItems method, a Delete change entry
will be returned. If you move an item to the Deleted Items folder, an Update
change entry is returned. This is because the item or folder will have a new
ParentFolderId property value. Read more about synchronization if
synchronizing deleted items is part of your scenario.

Find out more about deleting items


Pull notifications for EWS deletion-related mailbox events in Exchange

Handling deletion-related errors in EWS in Exchange

See also
Folders and items in EWS in Exchange
Develop web service clients for Exchange
Recoverable Items Folder
Single Item Recovery in Exchange Server 2010
Exchange 2013: Delete a recurring series programmatically from Exchange
servers
Exchange 2013: Delete tasks from an account on Exchange servers
programmatically
Exchange 2013: Empty folders on Exchange servers programmatically
Exchange 2013: Delete folders programmatically from Exchange servers
Exchange 2013: Delete many items programmatically from Exchange servers
Exchange 2013: Delete contacts programmatically from Exchange servers
Delete appointments and cancel meetings by using EWS in Exchange
Manage persistent application settings by using EWS in Exchange
Pull notifications for EWS deletion-
related mailbox events in Exchange
Article • 09/15/2021 • 3 minutes to read

Discover which mailbox events are raised when you delete items by using EWS in
Exchange.

When you delete items and folders from a mailbox, this triggers a mailbox event.
Different versions of Exchange return different mailbox events in response to changes to
items and folders in a mailbox. The following table identifies the mailbox events that are
returned for deletions when you use pull notifications to subscribe to mailbox events.

Table 1: Deletion-related mailbox events for pull notifications

Type of Exchange 2010 Exchange 2010 Exchange Online and Exchange


deletion notification notification Exchange 2013 notification Online and
and the when you when you when you specify each Exchange 2013
EWS specify each specify all folder identifier when you
operation folder folders specify all
identifier folders

Soft delete DeletedEvent DeletedEvent MovedEvent for the item. DeletedEvent


via the for the item. for the item. This specifies both the old for the item.
DeleteItem ModifiedEvent ModifiedEvent and new parent folder DeletedEvent
operation
for the item's for the item's identifiers. The item is for the item
parent folder. parent folder. moved to the Deletions from the
folder in the dumpster. AllItems
ModifiedEvent for the item's default search
parent folder. folder.
ModifiedEvent
for the item's
parent folder.

Hard delete DeletedEvent DeletedEvent DeletedEvent for the item. DeletedEvent


via the for the item. for the item. ModifiedEvent for the item's for the item.
DeleteItem ModifiedEvent ModifiedEvent parent folder. DeletedEvent
operation
for the item's for the item's for the item
parent folder. parent folder. from the
AllItems
default search
folder.
ModifiedEvent
for the item's
parent folder.
Type of Exchange 2010 Exchange 2010 Exchange Online and Exchange
deletion notification notification Exchange 2013 notification Online and
and the when you when you when you specify each Exchange 2013
EWS specify each specify all folder identifier when you
operation folder folders specify all
identifier folders

Move to the MovedEvent MovedEvent MovedEvent for the item. DeletedEvent


Deleted for the item. for the item. This specifies both old and from the
Items folder This specifies This specifies new parent folder AllItems
via the both old and both old and identifiers. default search
DeleteItem new parent new parent ModifiedEvent for the item's folder.
operation
folder folder old parent folder. CreatedEvent
identifiers. identifiers. ModifiedEvent for the item's for the item in
ModifiedEvent ModifiedEvent new parent folder, which is the AllItems
for the item's for the item's the Deleted Items folder. folder.
old parent old parent ModifiedEvent
folder. folder. for the item's
ModifiedEvent ModifiedEvent original parent
for the item's for the item's folder.
new parent new parent ModifiedEvent
folder, which is folder, which is for the Deleted
the Deleted the Deleted Items folder.
Items folder. Items folder.

Soft delete DeletedEvent DeletedEvent DeletedEvent for the folder. DeletedEvent


via the for the folder. for the folder. ModifiedEvent for the for the folder.
DeleteFolder ModifiedEvent ModifiedEvent folder's parent folder. ModifiedEvent
operation
for the folder's for the folder's for the folder's
parent folder. parent folder. parent folder.

Hard delete DeletedEvent DeletedEvent DeletedEvent for the folder. DeletedEvent


via the for the folder. for the folder. ModifiedEvent for the for the folder.
DeleteFolder ModifiedEvent ModifiedEvent folder's parent folder. ModifiedEvent
operation
for the folder's for the folder's for the folder's
parent folder. parent folder. parent folder.
Type of Exchange 2010 Exchange 2010 Exchange Online and Exchange
deletion notification notification Exchange 2013 notification Online and
and the when you when you when you specify each Exchange 2013
EWS specify each specify all folder identifier when you
operation folder folders specify all
identifier folders

Move to the MovedEvent MovedEvent MovedEvent for the folder. ModifiedEvent


Deleted for the folder. for the folder. This specifies both old and for the folder's
Items folder This specifies This specifies new parent folder old parent
via the both old and both old and identifiers. folder.
DeleteFolder new parent new parent ModifiedEvent for the ModifiedEvent
operation
folder folder folder's old parent folder. for the folder's
identifiers. identifiers. ModifiedEvent for the new parent
ModifiedEvent ModifiedEvent folder's new parent folder, folder which is
for the folder's for the folder's which is the Deleted Items the Deleted
old parent old parent folder. Items folder.
folder. folder.
ModifiedEvent ModifiedEvent
for the folder's for the folder's
new parent new parent
folder, which is folder, which is
the Deleted the Deleted
Items folder. Items folder.

See also
Notification subscriptions, mailbox events, and EWS in Exchange

Deleting items by using EWS in Exchange

Handling deletion-related errors in EWS in Exchange


Handling deletion-related errors in EWS
in Exchange
Article • 09/15/2021 • 2 minutes to read

Find out how to handle deletion-related errors in applications that you develop by using
the EWS Managed API or EWS in Exchange.

If your application deletes items and folders, you might have to handle deletion-related
errors. You can handle these errors at runtime, or while you are developing your EWS
application.

Table 1: Deletion-related errors and how to handle them

Error Occurs when you try Handle it by…


to…

ErrorAffectedTaskOccurrencesRequired Delete an instance of a Setting the


recurring task, and the AffectedTaskOccurrence
AffectedTaskOccurrence property, and retrying
property is not set. the deletion.

ErrorCalendarCannotUpdateDeletedItem Update a calendar item Canceling the update or


located in the Deleted moving the calendar
Items folder when the item back to the default
update would result in Calendar folder and
sending a meeting invite updating the calendar
to attendees. item.

ErrorCalendarOccurrenceIsDeletedFromRecurrence Reference a deleted Removing a reference to


occurrence of a a deleted occurrence.
recurring appointment.

ErrorCannotDeleteObject Delete an item that Quitting attempts to


cannot be deleted. delete the item.

ErrorCannotDeleteTaskOccurrence Delete an occurrence of Deleting a nonrecurring


a nonrecurring task or task or quitting attempts
delete the last to delete the last
occurrence of a occurrence of a
recurring task. recurring task.

ErrorDeleteDistinguishedFolder Delete a distinguished Indicating that default


folder. folders cannot be
deleted.
Error Occurs when you try Handle it by…
to…

ErrorItemNotFound Access a permanently Removing references to


deleted item. an item when it is
deleted from the store.
If an item is recovered,
make sure that you
reinstate required
references to the client.

ErrorSendMeetingCancellationsRequired Delete a calendar item Specifying that meeting


without specifying cancellations should or
whether meeting should not be sent.
cancellations should be
sent.

See also
Deleting items by using EWS in Exchange

Pull notifications for EWS deletion-related mailbox events in Exchange

Delete appointments and cancel meetings by using EWS in Exchange


Exporting and importing items by using
EWS in Exchange
Article • 01/15/2020 • 6 minutes to read

Learn about exporting and importing appointments, emails, contacts, tasks, and other
mailbox items by using the EWS Managed API or EWS in Exchange.

Exchange is a gold mine of important information: email, contacts, tasks, and calendars
are core to an organization's functions. EWS enables you to export and import core item
types via three different approaches:

Exchange item types. We recommend this approach for importing and exporting
items to and from other systems and files.

Item-level capability (EWS only). We recommend this option for exporting or


copying from one Exchange server or mailbox and importing to another.

MIME streams in the form of common standard file formats such as iCalendar and
vCard. Because the property set is limited and MIME conversion is costly, we
recommend the approach only for importing or exporting a small amount of data.

) Important

EWS is not designed for mailbox backup and restore. To back up and restore
databases, use the backup and restore API. See also Backup, restore, and disaster
recovery on TechNet.

Table 1. Exporting and importing contact, email, and calendar items

Task EWS Managed API EWS Notes


method operation
Task EWS Managed API EWS Notes
method operation

Export a copy of a Contact.Bind


GetItem
We recommend this option if
contact, email, task, EmailMessage.Bind you're exporting mailbox items
or calendar item with Appointment.Bind
to another non-Exchange
a specified property Task.Bind
system or file (including vCard
set. and iCal file types).

Because you have control over


the exported property set, and
because performance is better
for the Exchange server, this is
generally the best option.

Depending on the properties


set on a mailbox item, and
whether your application is
aware of all of the non-
schematized property
identifiers (extended
properties) that might be set
on an item, this option might
not produce a full-fidelity copy.

These methods and operation


provide the schematized set of
properties for an item plus any
requested extended properties.

The Bind method or GetItem


operation can only provide full-
fidelity export of items if you
know the extended properties
that are set on an item.

You can request all the known


extended properties to enable
full fidelity.

TIP: You can use the tracing


feature in the EWS Managed
API to get the XML
representation of exported
items. For more information,
see Export an item into a
custom format.

Import a copy of a Contact.Save


CreateItem
We recommend this option for
contact, email, task, EmailMessage.Save importing mailbox items into
or calendar item with Appointment.Save
Exchange.

Task.Save
You might have to set special
Task EWS Managed API EWS Notes
method operation

a specified property properties on some item types


set. in order to maintain the state
of the imported item.

Because some properties are


only set by Exchange and not
by clients, it's not always
possible to have a full-fidelity
import.

For example, you cannot


import a meeting with
attendees into a mailbox
because Exchange sets the
relationships between the
organizer and attendees.

This relationship can only be


established by organizers
sending and attendees
receiving and responding to
the meeting request.

Appointment objects in
Exchange can have complex
relationships and settings.

Appointments that have


attendees (meetings) have
settings that tie together the
meeting organizer and
meeting attendees.

These settings are not


maintained when you export
and import appointments.

Programmatically
reestablishing meeting
organizer/attendee
relationships directly on the
appointments is not supported.

An option you do have for


reestablishing those
relationships is to perform
post-processing after an
import, then have an organizer
resend the meetings and have
the attendees accept the
meetings.

You can use Exchange


impersonation to make the
Task EWS Managed API EWS Notes
method operation

calls for both the organizer and


the attendees.

You should change the UID


property of the Appointment
object before you import to
avoid having meetings be
incorrectly related to other
meetings in a mailbox.

Export a copy of a Not applicable ExportItems


This is the best option for
contact, email, task, exporting mailbox items that
or calendar item in you want to import back into
full-fidelity. an Exchange mailbox.

You can also use this option to


copy items between mailboxes.

The ExportItems operation


provides an opaque stream
that represents the item that
you can use to move
information between
mailboxes.

You can use ExportItems with


the GetItem operation to
make an index for finding the
items in another system.

You cannot change the export


stream.
For more information, see
Export items with full fidelity.

Import a copy of a Not applicable UploadItems This is the only option for
contact, email, task, importing items that were
or calendar item in exported by the ExportItems
full-fidelity. operation.

Export a copy of a Contact.Bind


GetItem
You can use the
contact, email, or EmailMessage.Bind MimeContent property to
calendar item as a Appointment.Bind
get the MIME stream
MIME stream for a representation of an item.

common file type.


This will provide a basic subset
of all the properties on an item.

As a best practice, only use the


MIME stream for one-off
operations.

Do not rely on MIME for large


Task EWS Managed API EWS Notes
method operation

and frequent
importing/exporting of items,
because Exchange performs
content conversion for the
MIME and this can affect
performance.

The Contact MIME stream is a


vCard (.vcf) file.

Depending on the properties


set on a contact, this might not
produce a full-fidelity copy.

Note that you cannot import a


contact by using the vCard
MIME stream.

To learn more, see Export a


contact into a vCard file.

The EmailMessage MIME


stream is an .eml file.

The .eml format is convenient


because Outlook and other
email clients can identify it.

You can also use the MIME


stream to create an .mht file,
which is convenient because
many browsers can use that file
type.

EWS doesn't provide a .msg file


stream for exporting an email
to a .msg file.

Your options for exporting an


.msg file are to either construct
an .MSG file from the results
of an EmailMessage.Bind
method or GetItem operation
call, or use a third-party API
that calls EWS and constructs
the .msg file from the results.

For more information, see


Export an email as an .eml file.

The Appointment MIME


stream is an iCal (.ics) file.

The .ics format is convenient


because Outlook and other
email clients can identify it.

Task EWS Managed API EWS Notes


method operation

This is not a viable option for


exporting meetings because
attendee information is not
provided in the MIME stream.

Attachments and other


properties might not be
included in the MIME stream.

Consider constructing the iCal


format from either the
Appointment object or from
the XML returned by the
GetItem operation.

This way, you can capture more


of the Exchange properties
with extended properties ("X-'
properties) in the iCal file.

You can also export an


appointment in XML form.

Call the GetItem operation and


save the XML in your system.

You can also use the tracing


functionality in the EWS
Managed API to capture the
XML to put in an XML
database.

For more information, see


Exporting an appointment as
an iCal file.

Import a copy of an EmailMessage.Save CreateItem


You can import an .eml or .ics
email or calendar Appointment.Save
file by using the MimeContent
item as a MIME property on an EmailMessage
stream for a common or Appointment object.

file type. You will need to set the


PidTagMessageFlags
(0x0E07) extended property
if the email is not a draft.

You cannot use this approach


to import meetings.

Alternatives to exporting and importing items


by using EWS
Other options are available for exporing and importing items to and from an Exchange
mailbox. The following are some ideas to consider when you design your import and
export strategy:

Use PowerShell to call EWS and format the output into a .csv file.

Use third-party libraries that implement MAPI to export and import items. Third-
party libraries that convert EWS to .msg files are available too.

Use the Exchange Management Shell and the MailboxImportRequest and


MailboxExportRequest cmdlets to fulfill mailbox import and export requests .

Use Outlook's import options to import and export items.

In this section
Export items by using EWS in Exchange
Import items by using EWS in Exchange

See also
Backup, Restore, and Disaster Recovery
Journaling
Internet Calendaring and Scheduling Core Object Specification (RFC 5545)
Mailbox synchronization and EWS in Exchange
Export items by using EWS in Exchange
Article • 03/15/2022

Learn how to export appointments, emails, contacts, tasks, and other items by using the
EWS Managed API or EWS in Exchange.

You can export items from Exchange by using the EWS Managed API or EWS in a
number of different ways. The option you use depends on:

The item type that is exported.

The degree of fidelity that you want maintained between the item state in
Exchange and the exported item.

The format of the exported item.

Any post-processing requirements.

Whether you want to import the item back into Exchange.

This article shows you how to use each of the different options to export items. You can
use any option to batch export items out of Exchange.

Export an item into a custom format


You can use the results of an Item.Bind EWS Managed API method call or parse the
results of a GetItem EWS operation into a format that works with your application
requirements. Use this option when you are exporting items in order to import them
into a database, .csv file, or another format or system. You can even save the item in the
form of the item EWS XML, which can be useful because many systems have XML
parsing capability. We recommend that you use the Item.Bind method or the GetItem
operation (without the Item.MimeContent property) because this option gives you
control over which properties are exported.

Export items with full fidelity


If you want to export items with full fidelity, you can use the ExportItems EWS
operation. The ExportItems operation exports each item as a data stream. This data
stream is not for parsing, but can be used as an item-level backup that can be imported
back into an Exchange mailbox. You can include many items in each ExportItems
request, although we recommend that you include no more than 100 items in each call.
Because the EWS Managed API does not implement the ExportItems operation, if you
use the EWS Managed API, you'll need to write a routine to send the web requests. You
can optionally use the Item.Bind method to get metadata about the item so that you
can index and store information about the data stream.

We recommend that you use the ExportItems operation to export items that you plan
to import into an Exchange mailbox.

The following example shows how to use the ExportItems operation. In this example,
the item identifier is shortened for readability.

XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013"/>

</soap:Header>

<soap:Body>

<m:ExportItems>

<m:ItemIds>

<t:ItemId Id="AAMkAGYzZjZmRiUsidkC+NAAAAY89GAAA="/>

</m:ItemIds>

</m:ExportItems>

</soap:Body>

</soap:Envelope>

The server responds to the ExportItems request with an ExportItemsResponse


element that includes a ResponseCode element value of NoError, which indicates that
the item was successfully exported. The response also includes the item ID of the
exported item and the data stream that contains the exported content. The following
example shows the SOAP body that contains the exported item.

XML

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:ExportItemsResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:ExportItemsResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:ItemId Id="AAMkAGYzZjZmRiUsidkC+NAAAAY89GAAA="
ChangeKey="FwAAAA=="/>

<m:Data>

AQAAAAgAAAAAAAAALgBlAHgAdABlAHMAdAAuAG0AaQBjAHIAbwBzAG8AZgB0AC4A

cgAyAEAAYQB1AGoAaQBuAGcALQBkAG8AbQAuAGUAeAB0AGUAcwB0AC4AbQBpAGMAcgBvAHMA

bwBmAHQALgBjAG8AbQAAAAMAADkAAAAAAwD+DwYAAAADAARAAwACQAMADkA=

</m:Data>

</m:ExportItemsResponseMessage>

</m:ResponseMessages>

</m:ExportItemsResponse>

</s:Body>

Use the MIME stream to export into common


file formats
You can use the Item.Bind EWS Managed API method or the GetItem EWS
operation to get a MIME representation of an item. Because Exchange doesn't store the
MIME content of each item, it has to convert the database representation of each item
into the MIME stream. Because this conversion is costly, we do not recommend that you
request the MIME stream for items on a large scale. Also note that the MIME stream
contains a limited set of properties; you might have to consider other options if the
property set doesn't contain the properties you need.

Use the EWS Managed API to export an email into an


.eml and .mht file by using the MIME stream
Outlook and other common email applications can open the EML (.eml) file format. The
following example shows you how you can export an email by using the MIME stream,
and use the MIME stream to create an EML and a MIME HTML (.mht) file. Many web
browsers support the MIME HTML file format. This example assumes that service is a
valid ExchangeService object, and that the user can authenticate to an Exchange
server.

C#

private static void ExportMIMEEmail(ExchangeService service)

Folder inbox = Folder.Bind(service, WellKnownFolderName.Inbox);

ItemView view = new ItemView(1);

view.PropertySet = new PropertySet(BasePropertySet.IdOnly);

// This results in a FindItem call to EWS.

FindItemsResults<Item> results = inbox.FindItems(view);

foreach (var item in results)

PropertySet props = new PropertySet(EmailMessageSchema.MimeContent);

// This results in a GetItem call to EWS.

var email = EmailMessage.Bind(service, item.Id, props);

string emlFileName = @"C:\export\email.eml";

string mhtFileName = @"C:\export\email.mht";

// Save as .eml.

using (FileStream fs = new FileStream(emlFileName, FileMode.Create,


FileAccess.Write))

fs.Write(email.MimeContent.Content, 0,
email.MimeContent.Content.Length);

// Save as .mht.

using (FileStream fs = new FileStream(mhtFileName, FileMode.Create,


FileAccess.Write))

fs.Write(email.MimeContent.Content, 0,
email.MimeContent.Content.Length);

Use the EWS Managed API to export an appointment into


an iCal file by using the MIME stream
Outlook and other common calendar applications can open the iCal (.ics) file format.
The following example shows you how to export an appointment by using the MIME
stream, and use the MIME stream to create an iCal file. Note that many properties are
not exported with the MIME stream, including attendees and attachment-related
properties. You can capture other properties from EWS by requesting them and saving
them in the iCal file as private extensions. These private extensions are prefixed with "x-
".

This example assumes that service is a valid ExchangeService object, and that the user
can authenticate to an Exchange server. This example also assumes that you have an
appointment with the subject "2015 Financial Projections" in the calendar folder.

C#

private static void ExportMIMEAppointment(ExchangeService service)

Folder inbox = Folder.Bind(service, WellKnownFolderName.Calendar);

ItemView view = new ItemView(1);

view.PropertySet = new PropertySet(BasePropertySet.IdOnly);

// This results in a FindItem call to EWS.

FindItemsResults<Item> results = inbox.FindItems("subject:'2015


Financial Projections'", view);

foreach (var item in results)

PropertySet props = new PropertySet(AppointmentSchema.MimeContent);

// This results in a GetItem call to EWS.

var email = Appointment.Bind(service, item.Id, props);

string iCalFileName = @"C:\export\appointment.ics";

// Save as .ics.

using (FileStream fs = new FileStream(iCalFileName, FileMode.Create,


FileAccess.Write))

fs.Write(email.MimeContent.Content, 0,
email.MimeContent.Content.Length);

Use the EWS Managed API to export a contact into a


vCard file by using the MIME stream
Outlook and other common contact management applications can open the vCard (.vcf)
file format. The following example shows you how to export a contact by using the
MIME stream, and use the MIME stream to create a vCard. You can capture other
properties from EWS by requesting them and saving them in the . vCard as private
extensions. These extensions are prefixed with "x-".

This example assumes that service is a valid ExchangeService object, and that the user
can authenticate to an Exchange server.

C#

private static void ExportMIMEContact(ExchangeService service)

Folder inbox = Folder.Bind(service, WellKnownFolderName.Contacts);

ItemView view = new ItemView(1);

view.PropertySet = new PropertySet(BasePropertySet.IdOnly);

// This results in a FindItem call to EWS.

FindItemsResults<Item> results = inbox.FindItems(view);

foreach (var item in results)

PropertySet props = new PropertySet(ContactSchema.MimeContent);

// This results in a GetItem call to EWS.

var email = Contact.Bind(service, item.Id, props);

string vcfFileName = @"C:\export\contact.vcf";

// Save as .vcf.

using (FileStream fs = new FileStream(vcfFileName, FileMode.Create,


FileAccess.Write))

fs.Write(email.MimeContent.Content, 0,
email.MimeContent.Content.Length);

7 Note

You cannot import vCard files by using the MimeContent property. You can import
contacts by using the Contact.Save EWS Managed API method or the
CreateItem EWS operation.

Use EWS to export any item by using the MIME stream


Use the GetItem operation to get the MIME stream of an item. The following GetItem
request shows how to request the MIME content of an item.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:GetItem>

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:IncludeMimeContent>true</t:IncludeMimeContent>

</m:ItemShape>

<m:ItemIds>

<t:ItemId Id="AAMkADEzYjJkLTYxMwB8GqYicWAAA="
ChangeKey="CQAAABzXv"/>
</m:ItemIds>

</m:GetItem>

</soap:Body>

</soap:Envelope>

The following example shows the response to a request to get the MIME stream. The
MIME stream has been shortened for readability.

XML
<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="893"

MinorBuildNumber="17"

Version="V2_10"

xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetItemResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Message>
<t:MimeContent CharacterSet="UTF-
8">UmVjZ6IGZyb2b2suY29y5hMzgwZTA1YtDQo=</t:MimeContent>

<t:ItemId Id="AAMkADEzYjJkLTYxMwB8GqYicWAAA="
ChangeKey="CQAAABzXv"/>
</t:Message>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</m:GetItemResponse>

</s:Body>

</s:Envelope>

After exporting items, you might want to import items into Exchange.

See also
Exporting and importing items by using EWS in Exchange

Import items by using EWS in Exchange

Folders and items in EWS in Exchange

Mailbox synchronization and EWS in Exchange


Import items by using EWS in Exchange
Article • 09/15/2021 • 5 minutes to read

Learn how to import appointments, emails, contacts, tasks, and other items by using the
EWS Managed API or EWS in Exchange.

Many systems contain appointments, emails, contacts, and tasks, and you can import
those items into Exchange in a number of different ways. Importing items into Exchange
is simple when mailbox relationships aren't maintained on those items. You can use the
Item.Save EWS Managed API method or the CreateItem EWS operation to create
the items in an Exchange mailbox. The simple approach does not support all scenarios,
however; for example:

You cannot maintain the relationship between organizers and attendees when
importing appointments with attendees (meetings). This means that the meeting
organizer will need to resend meeting invites to attendees in order to reestablish
the relationship between the organizer and attendees. If the appointment was
imported into an attendee's calendar, the appointment will not be related to the
meeting organizer's appointment. The attendees will need to accept the resent
meeting invite from the organizer in order to reestablish the organizer-attendee
relationship.

Information about the assignees is not preserved when assigned tasks are
imported.

All the import options can be used to batch import items into Exchange.

Use EWS Managed API or EWS item types to


import an item
You can use the EWS Managed API or EWS to import emails, contacts, appointments, or
tasks from other systems. Just set the properties from your source format on any of the
following objects, depending on what you're importing.

Table 1. EWS Managed API objects and EWS elements

EWS Managed API object EWS element

EmailMessage
Message

Contact
Contact

EWS Managed API object EWS element

Appointment
CalendarItem

Task
Task

Use the Item.Save EWS Managed API method or the CreateItem EWS operation to
perform the import of items. We recommend this approach when you're importing
items from other systems because you have control over which properties get imported.
For more information about how to set properties on items and then save the item, see
Create an item by using the EWS Managed API or Create an item by using EWS.

Import items with full fidelity


You can use the UploadItems EWS operation to upload an item as a data stream. This
data stream representation of an item has to come from the results of an ExportItems
operation call. Because the EWS Managed API does not implement the UploadItems
operation, if you use the EWS Managed API, you'll need to write a routine to send the
web requests.

This is the easiest way to import items that have been exported from another Exchange
server.

In the following example, the identifiers and the Data element content are shortened for
readability.

XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013_SP1"/>

</soap:Header>

<soap:Body>

<m:UploadItems>

<m:Items>

<t:Item CreateAction="CreateNew">

<t:ParentFolderId Id="AAMkADEzOTE7kV0AAA=" ChangeKey="AQAAAA=="/>

<t:Data>AQAAAAgAAAAAAQAAAAADABZADQASDkANABMO</t:Data>

</t:Item>

</m:Items>

</m:UploadItems>

</soap:Body>

</soap:Envelope>

The server responds to the UploadItems request with an UploadItemsResponse


element that that includes a ResponseCode element value of NoError, which indicates
that the item was successfully uploaded. The response also includes the item ID of the
uploaded item.

Use the MIME stream to import from common


file formats
EWS can import EML (.eml) and iCal (.ics) files. You'll want to test your MIME content to
see how the Exchange MIME parser handles the content of your MIME stream. Although
using the MIME stream is convenient, it is typically better to Use EWS Managed API or
EWS item types to import an item. Here's an example of how to import a vCard .

Use the EWS Managed API to import an email from an


EML file by using the MIME stream
The following example shows how to set the MimeContent property with the contents
of an EML file and then import the email into a mailbox. This example also shows how to
set the PidTagMessageFlags (0x0E07) extended property on an imported email so that
it doesn't appear in the mailbox as a draft item. This example assumes that service is a
valid ExchangeService object, and that the user can authenticate to an Exchange
server.

C#

private static void UploadMIMEEmail(ExchangeService service)

EmailMessage email = new EmailMessage(service);

string emlFileName = @"C:\import\email.eml";

using (FileStream fs = new FileStream(emlFileName, FileMode.Open,


FileAccess.Read))

byte[] bytes = new byte[fs.Length];

int numBytesToRead = (int)fs.Length;

int numBytesRead = 0;

while (numBytesToRead > 0)

int n = fs.Read(bytes, numBytesRead, numBytesToRead);

if (n == 0)
break;

numBytesRead += n;

numBytesToRead -= n;

// Set the contents of the .eml file to the MimeContent property.

email.MimeContent = new MimeContent("UTF-8", bytes);

// Indicate that this email is not a draft. Otherwise, the email will
appear as a

// draft to clients.

ExtendedPropertyDefinition PR_MESSAGE_FLAGS_msgflag_read = new


ExtendedPropertyDefinition(3591, MapiPropertyType.Integer);

email.SetExtendedProperty(PR_MESSAGE_FLAGS_msgflag_read, 1);

// This results in a CreateItem call to EWS. The email will be saved in


the Inbox folder.

email.Save(WellKnownFolderName.Inbox);

Use the EWS Managed API to import an appointment


from an iCal file by using the MIME stream
You can import simple appointments in the form of iCalendar files by using the MIME
stream. You can't import meetings, which are appointments with attendees, because the
relationship between meeting organizers and attendees has to be set as part of the
Exchange calendaring workflow. Attendees cannot be captured in the MIME stream.

The following code example shows you how to import a simple .ics file into a user's
mailbox.

C#

private static void UploadMIMEAppointment(ExchangeService service)

Appointment appointment = new Appointment(service);

string iCalFileName = @"C:\import\appointment.ics";

using (FileStream fs = new FileStream(iCalFileName, FileMode.Open,


FileAccess.Read))

byte[] bytes = new byte[fs.Length];

int numBytesToRead = (int)fs.Length;

int numBytesRead = 0;

while (numBytesToRead > 0)

int n = fs.Read(bytes, numBytesRead, numBytesToRead);

if (n == 0)
break;

numBytesRead += n;

numBytesToRead -= n;

// Set the contents of the .ics file to the MimeContent property.

appointment.MimeContent = new MimeContent("UTF-8", bytes);

// This results in a CreateItem call to EWS.

appointment.Save(WellKnownFolderName.Calendar);

Use EWS to import an item by using the MIME stream


You can use the CreateItem EWS operation to import EML and iCal items by using
their MIME stream.

XML

<?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"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013_SP1" />

<t:MailboxCulture>en-US</t:MailboxCulture>

</soap:Header>

<soap:Body >

<m:CreateItem>

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="inbox"/>

</m:SavedItemFolderId>

<m:Items>

<t:Message>

<t:MimeContent CharacterSet="UTF-8">

<!-- Insert MIME content here-->

</t:MimeContent>

</t:Message>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

Next steps
After you import items into a mailbox, you might want to create a custom folder to store
your imported items, or synchronize your client and mailbox items.

See also
Exporting and importing items by using EWS in Exchange
Export items by using EWS in Exchange

Folders and items in EWS in Exchange

Mailbox synchronization and EWS in Exchange


EWS Identifiers in Exchange
Article • 01/15/2020 • 12 minutes to read

Find out about identifiers in Exchange and how you can use them in your EWS Managed API and EWS
applications.

Every object in the Exchange store has a unique identifier. You can use an object's identifier to reference
the object and to distinguish it from other objects. The two most common identifiers that you might work
with are folder and item identifiers.

In order to understand identifiers and how they're important to your application, it's helpful to understand
the relationship between objects in Exchange. When your EWS Managed API or EWS application
communicates with Exchange, you work with an object hierarchy that includes mailbox, folder, and item
objects. A store can be any one of these object types. Most commonly, it is a mailbox on the Exchange
server, but it can also be a public folder on the Exchange server. (Keep in mind that in Exchange Online,
Exchange Online as part of Office 365, and versions of Exchange starting with Exchange 2013, public
folders are just another type of mailbox and not a different kind of store.) The store contains folders and
the folders contain items, and each of these folders and items has an identifier, as shown in the following
figure.

Figure 1. Mailbox, folder, and item hierarchy

EWS identifiers
Identifiers that EWS uses for folders and items are called EWS identifiers, or EwsIds. EwsIds can be found in
many different objects within EWS, but are called something different for different objects. Because you
might use these objects in your application, you'll want to understand how the identifiers for these objects
relate to the EwsId.
The identifiers in EWS are applicable to the EWS Managed API as well. In the EWS Managed API, the
identifiers are properties of the objects and are internally managed to map to the EWS elements.

Table 1. Object identifiers in EWS

Object Identifier How does it relate to EwsId?

CalendarItem
The ItemId child element contains The ItemId child element is the same as the
the unique identifier of the calendar EwsId for this item.
item.

ConversationId
The Id attribute contains the The Id attribute is the same as the EwsId for
identifier for the conversation that this item.
this item is part of.

AttachmentId
Provides the unique identifier of the Attachments can be other items in the
attachment. The RootItemId Exchange store, in which case the
attribute contains the unique AttachmentId is the same as the EwsId. In
identifier of the root store item to all cases, the RootItemId is an EwsId
which the attachment is attached. because it references an item in the store.

PersonaId
The Id attribute returns a string that The Id attribute is the same as the EwsId for
contains the identifier of the persona. the persona.

ContactId
The Id attribute returns a string that The Id attribute is the same as the EwsId for
contains the identifier of the contact. the contact.

GroupId
The Id attribute returns a string that The Id attribute is the same as the EwsId for
contains the identifier of the group. the group.

AssociatedCalendarItemId
The Id attribute identifies the The Id attribute is the same as the EwsId for
calendar item that is associated with the calendar item.
a MeetingMessage ,
MeetingRequest ,
MeetingResponse , or
MeetingCancellation .

UserConfigurationProperties The Id value for this element specifies This identifier does not directly map to the
the identifier property. EwsId since it an property identifier and not
an item.

OccurrenceItemId
The RecurringMasterId attribute The OccurrenceItemId value does not map
identifies the master of a recurring directly to the EwsId, but the
item. RecurringMasterId does because it
references the top-level object of the
recurring item.

StoreEntryId
Contains the Exchange store The StoreEntryId value does not map to the
identifier of an item. EwsId, but it does give the identifier of the
store where the items are kept.

Working with identifiers


The Exchange server handles identifiers in a lot of different ways. Consider the following when you develop
your EWS Managed API or EWS application:

The ItemID element value for folders and items is case-sensitive. If you look at the item ID for a folder
or item that is returned by the FindItem operation (or the FindItems EWS Managed API method),
you might think that it is a duplicate of another item ID; however, one or more characters in the item
IDs for the two items will have a different case.

If you are going to store the item ID in a database to retrieve later, we recommend that the field size
be 512 bytes, so that it's large enough to hold the GUID.

Don't assume that your item ID will always be valid if you need to retrieve the item at a later time. If
an item is moved in the store, the ID can change because of the way a move is handled. An item is
actually copied, and a new ID is generated, and then the original item is deleted. Note that folder IDs
are immutable, and won't change when moved in the store.

Identifiers in Exchange are opaque. For example, the EwsId is created from several pieces of
information that are not important to you as the developer, but are important to Exchange.

When you work with items in Exchange, another value to keep in mind is the ChangeKey attribute.
This value, in addition to the item ID, is used to keep track of the state of an item. Any time an item is
changed, a new change key is generated. When you perform an UpdateItem operation , for
example, you can use the ChangeKey attribute to let the server know that your update is being
applied to the most current version of the item. If another application made a change to the item
you're updating, the change keys won't match and you will not be able to perform the update.

Distinguished folder IDs


Exchange includes a number of predefined mailbox folders, each of which is assigned an identifier, known
as the distinguished folder ID. These are defined by the WellKnownFolderName EWS Managed API
enumeration and the DistinguishedFolderId EWS element. You can use these distinguished folder IDs to
more easily reference one of the predefined folders. For example, for the Inbox folder, you can simply use
"inbox" for the identifier, rather than determining the folder identifier.

Other folders that you create to organize email items also have an ID that is unique to that folder. That ID
does not change even if you change other properties on the folder.

You can use distinguished folder IDs as an entry point for delegate access. When you initiate delegate
access, you search for items or folders and provide the distinguished folder ID to specify where to search.
When a delegate user accesses the server, a Mailbox element that is a child of the DistinguishedFolderId
element is used to explicitly specify the mailbox for the delegate to access.

Handling errors
Every program is bound to get an error every now and then, and EWS-based applications are no exception
(pun intended). You might receive some identifier-related errors in the ResponseCode EWS element or as
part of the of the ServiceError EWS Managed API enumeration.

The following errors can occur in your EWS Managed API or EWS application. If you're working with an
EWS Managed API application, the errors are typically issues with property values; for EWS applications,
the errors are associated with XML element values or operations.

Table 2. Identifier-related errors

Error Occurs when… Description


Error Occurs when… Description

ErrorCalendarCannotUseIdForOccurrenceId The value of the OccurenceID does not The value of the
correspond to a valid recurring calendar item. OccurenceId that was
specified in the request
might be valid in
structure, but the request
could not match it to an
existing recurring master.
The recurring item might
be removed from the
calendar. Verify that the
item still exists and that
you are using the correct
identifier.

ErrorCalendarCannotUseIdForRecurringMasterId The RecurringMasterId attribute does not The value of the


correspond to a valid occurrence of the RecurringMasterId that
OccurrenceId element. was specified in the
request might be valid in
structure, but the request
could not match it to an
existing occurrence of the
item. The occurrence of
the item might be
removed from the
calendar. Verify that the
item still exists and that
you are using the correct
identifier.

ErrorCannotUseFolderIdForItemId The ID that was passed represents a folder The identifier might be
instead of an item. valid in format, but not
what the server was
expecting for the
operation. Verify that you
are referencing the
correct identifier for the
operation.

ErrorCannotUseItemIdForFolderId The ID that was passed in represents an item The identifier might be
instead of a folder. valid in format, but not
what the server was
expecting for the
operation. Verify that you
are referencing the
correct ID for the
operation.

ErrorChangeKeyRequiredForWriteOperations A valid change key must be provided when you Either you omitted a
are performing certain update operations. ChangeKey value when
you requested an update,
or the change key was
incorrect. Verify that you
have the correct change
key when you perform
update operations.
Error Occurs when… Description

ErrorInvalidAttachmentId The attachment was not found within the You might receive this
attachments collection for the item. response code if you have
an attachment ID and
then the attachment is
deleted and you try to call
the GetAttachment
operation on the
attachment ID. Verify that
the attachment exists in
the attachment collection.

ErrorInvalidChangeKey An invalid change key was passed in. Note that many
operations and methods
do not require a change
key to be passed.
However, if you do
provide a change key, it
must be valid, although it
does not necessarily have
to be up-to-date.

ErrorInvalidFolderId The folder ID is corrupted. Make sure you have a


properly formatted and
valid identifier.

ErrorInvalidId The structure of the ID and/or change key is Exchange encountered a


internally inconsistent. problem with the ID after
it was parsed. There
might have been an error
in the conversion. This
can occur, for example, if
you have an
IdFormatType.HexEntryId
for an item in Outlook,
but you convert it to an
EwsId thinking it was an
IdFormatType.EntryId
format. Make sure you
use the correct
conversion type.

ErrorInvalidIdEmpty The application specified an ID that is empty. Your application passed in


an empty string for the
identifier. Make sure you
have a properly formatted
and valid identifier.

ErrorInvalidIdMalformed The structure of the ID is internally Exchange encountered a


inconsistent. problem with the ID after
it was parsed. The ID
might not have been
converted correctly. Make
sure you use the correct
conversion type.
Error Occurs when… Description

ErrorInvalidIdMalformedEwsLegacyIdFormat A folder or item ID that is using the Exchange You cannot use Exchange
2007 format was specified for a request with a 2007 IDs in Exchange
version of Exchange 2007 SP1 or later. 2007 SP1 or later
requests. You must use
the ConvertId EWS
operation or the
ConvertId EWS
Managed API method to
convert them first.

ErrorInvalidIdNotAnItemAttachmentId The AttachmentId property does not refer to The identifier might be
an item attachment. valid in format, but not
what the server was
expecting for the
operation. Verify that you
are referencing the
correct identifier for the
operation.

ErrorInvalidIdReturnedByResolveNames A contact in your mailbox is corrupt. The ResolveNames


EWS operation or the
ResolveName EWS
Managed API method
returned one or more
identifiers, but they are
not valid. You might need
to recreate the contact.

ErrorInvalidIdStoreObjectIdTooLong The structure of the ID is internally Exchange encountered a


inconsistent. problem with the ID after
it was parsed. The ID
might not have been
converted correctly. Make
sure you use the correct
conversion type.

ErrorInvalidIdTooManyAttachmentLevels The attachment hierarchies exceed the The value of the


maximum of 255 levels deep. AttachmentId property
that was specified in the
request might be valid in
structure, but the
requested attachment is
too deep in the hierarchy.
Your code might have
tried to attach an item
beyond the limit of 255
levels.

ErrorInvalidImContactId This error can be returned when the contact The value of the
cannot be found in the IM group when you use ContactId property that
the RemoveImContactFromGroup operation . was specified in the
This error applies to clients that target request might be valid in
Exchange Online and versions of Exchange structure, but no contacts
starting with Exchange 2013. in the mailbox match this
structure. The contact
might have been
removed already.
Error Occurs when… Description

ErrorInvalidImGroupId This error can be returned when the group The value of the GroupId
cannot be found in the mailbox when you use property that was
the RemoveImGroup operation . This error specified in the request
applies to clients that target Exchange Online might be valid in
and versions of Exchange starting with structure, but no groups
Exchange 2013. in the mailbox match this
structure. The group
might have been
removed already.

ErrorInvalidReferenceItem The referenced item identifier is not a The identifier might be


MessageType or valid in format, but not
ExchangeWebServices.CalendarItemTypeType, what the server was
or one of their descendants. The reference item expecting for the
identifier is for a CalendarItemType object and operation. Verify that you
the organizer is trying to Reply or ReplyAll. are referencing the
correct identifier for the
operation.

ErrorMissingManagedFolderId The policy IDs property, property tag 0x6732, The folder is corrupted.
for the folder is missing. Consider recreating it.

Converting identifiers
You might need to convert an identifier from one format to another. For example, you might need to
convert an identifier from outside EWS, such as an identifier that comes from a MAPI connection, to a
format that your application can use. To do this, you can use the ConvertId EWS operation, or the
ConvertId EWS Managed API method.

For example, an EntryID is a unique identifier generated by the MAPI message store that is assigned by the
store when the item is saved. To use an EntryID in your application, you first need to convert it to an EwsId.

Outlook Web App uses its own version of identifiers, called OwaId, in URLs to access folders and items. If
your application needs to access items in Outlook Web App, you need to convert the OwaId into an EwsId.

You can use the ConvertId operation or method to convert several different identifier formats.

Table 3. Convertible identifier formats in Exchange

Format Description

EwsLegacyId The EwsId that applies to Exchange 2007.

EwsId The EwsId that applies to Exchange Online and versions of Exchange starting with Exchange 2007 SP1.

StoreId The Exchange store identifier where the folders and items are stored.

OwaId The Outlook Web App identifier used with Outlook Web App in Exchange 2007 and Exchange 2010.

NOTE: Exchange Online and versions of Exchange starting with Exchange 2013 use the EwsId for
Outlook Web App.

EntryId A MAPI identifier that is commonly known as the PR_ENTRYID property of a MAPI message.
Format Description

HexEntryId A hexadecimal-encoded representation of the PR_ENTRYID property that is used for the availability
calendar event identifier. This is also the identifier format that Outlook uses.

See also
Develop web service clients for Exchange
ConvertId operation
ServiceError enumeration
Deleting items by using EWS in Exchange
Impersonation and EWS in Exchange
Article • 09/14/2022 • 3 minutes to read

Learn how and when to use impersonation in your Exchange service applications.

You can enable users to access other users' mailboxes in one of three ways:

By adding delegates and specifying permissions for each delegate.

By modifying folder permissions directly.

By using impersonation.

When should you choose impersonation over delegation or folder permissions? The
following guidelines will help you decide:

Use folder permissions when you want to provide a user access to a folder but do
not want the user to have "send on behalf of" permissions.

Use delegate access when you want to give one user permission to perform work
on behalf of another user. Typically, this is a one-to-one or one-to-a-few
permission - for example, a single administrative assistant managing the calendar
for an administrator, or a single room scheduler managing the calendars for a
group of meeting rooms.

Use impersonation when you have a service application that needs to access
multiple mailboxes and "act as" the mailbox owner.

Impersonation is the best choice when you're dealing with multiple mailboxes because
you can easily grant one service account access to every mailbox in a database.
Delegation and folder permissions are best when you're only granting access to a few
users, because you have to add permissions individually to each mailbox. Figure 1 shows
some of the differences between each type of access.

Figure 1. Ways to access other users' mailboxes


Impersonation is ideal for applications that connect to Exchange Online, Exchange
Online as part of Office 365, and on-premises versions of Exchange and perform
operations, such as archiving email, setting OOF automatically for users on vacation, or
any other task that requires that the application act as the owner of a mailbox. When an
application uses impersonation to send a message, the email appears to be sent from
the mailbox owner. There is no way for the recipient to know the mail was sent by the
service account. Delegation, on the other hand, gives another mailbox account
permission to act on behalf of a mailbox owner. When an email message is sent by a
delegate, the "from" value identifies the mailbox owner, and the "sender" value
identifies the delegate that sent the mail.

Security considerations for impersonation


Impersonation enables a caller to impersonate a given user account. This enables the
caller to perform operations by using the permissions that are associated with the
impersonated account, instead of the permissions that are associated with the caller's
account. For this reason, you should be aware of the following security considerations:

Only accounts that have been granted the ApplicationImpersonation role by an


Exchange server administrator can use impersonation.
For Exchange on-premises, you should create a management scope that limits
impersonation to a specified group of accounts. If you do not create a
management scope, the ApplicationImpersonation role is granted to all accounts
in an organization.

For Exchange Online, you should create application access policies to limit the
scope of the impersonation. Please see New-ApplicationAccessPolicy cmdlet. If you
do not create an application access policy, then the full_access_as_app permission
is granted to all accounts in a tenant.

Typically, the ApplicationImpersonation role is granted to a service account


dedicated to a particular application or group of applications, rather than a user
account. You can create as many or as few service accounts as you need.

You can read more about configuring impersonation, but you should work with your
Exchange administrator to ensure that the service accounts that you need are created
with the permissions and access that meet the security requirements of your
organization.

In this section
Configure impersonation

Identify the account to impersonate

Add appointments by using Exchange impersonation

Performance considerations for EWS


impersonation
When EWS Impersonation is used, the X-AnchorMailbox should always be correctly set.
Otherwise, you may get error messages 500 or 503 at times. It is critical for performance
and also for notifications with Exchange Online/Exchange 2013. Not setting it can
double or more the time it takes to complete the call. In some cases, you can also get
timeouts.

See also
Develop web service clients for Exchange

Delegate access and EWS in Exchange


Exchange 2013 Permissions
Configure impersonation
Article • 02/11/2022 • 2 minutes to read

Learn how to grant the impersonation role to a service account by using the Exchange
Management Shell.

Impersonation enables a caller, such as a service application, to impersonate a user


account. The caller can perform operations by using the permissions that are associated
with the impersonated account instead of the permissions associated with the caller's
account.

Exchange Online, Exchange Online as part of Office 365, and versions of Exchange
starting with Exchange 2013 use role-based access control (RBAC) to assign permissions
to accounts. Your Exchange server administrator will need to grant any service account
that will be impersonating other users the ApplicationImpersonation role by using the
New-ManagementRoleAssignment cmdlet.

Configuring the ApplicationImpersonation role


When you or your Exchanger server administrator assigns the
ApplicationImpersonation role, use the following parameters of the New-
ManagementRoleAssignment cmdlet:

Name – The friendly name of the role assignment. Each time that you assign a role,
an entry is made in the RBAC roles list. You can verify role assignments by using
the Get-ManagementRoleAssignment cmdlet.
Role – The RBAC role to assign. When you set up impersonation, you assign the
ApplicationImpersonation role.
User – The service account.
CustomRecipientScope – The scope of users that the service account can
impersonate. The service account will only be allowed to impersonate other users
within the specified scope. If no scope is specified, the service account is granted
the ApplicationImpersonation role over all users in an organization. You can
create custom management scopes by using the New-ManagementScope
cmdlet.

Before you can configure impersonation, you need:

Administrative credentials for the Exchange server.


Domain Administrator credentials, or other credentials with the permission to
create and assign roles and scopes.
Exchange management tools. These are installed on the computer from which you
will run the commands.

To configure impersonation for all users in an


organization
1. Open the Exchange Management Shell. From the Start menu, choose All Programs
> Microsoft Exchange Server 2013.

2. Run the New-ManagementRoleAssignment cmdlet to add the impersonation


permission to the specified user. The following example shows how to configure
impersonation to enable a service account to impersonate all other users in an
organization.

PowerShell

New-ManagementRoleAssignment -name:impersonationAssignmentName -
Role:ApplicationImpersonation -User:serviceAccount

To configure impersonation for specific users or groups


of users
1. Open the Exchange Management Shell. From the Start menu, choose All Programs
> Microsoft Exchange Server 2013.

2. Run the New-ManagementScope cmdlet to create a scope to which the


impersonation role can be assigned. If an existing scope is available, you can skip
this step. The following example shows how to create a management scope for a
specific group.

PowerShell

New-ManagementScope -Name:scopeName -
RecipientRestrictionFilter:recipientFilter

The RecipientRestrictionFilter parameter of the New-ManagementScope cmdlet


defines the members of the scope. You can use the properties of the Identity
object to create the filter. The following example is a filter that restricts the result
to a single user with the user name "john."

PowerShell
Name -eq "john"

3. Run the New-ManagementRoleAssignment cmdlet to add the permission to


impersonate the members of the specified scope. The following example shows
how to configure a service account to impersonate all users in a scope.

PowerShell

New-ManagementRoleAssignment -Name:impersonationAssignmentName -
Role:ApplicationImpersonation -User:serviceAccount -
CustomRecipientWriteScope:scopeName

After your administrator grants impersonation permissions, you can use the service
account to make calls against other users' accounts. You can verify role assignments by
using the Get-ManagementRoleAssignment cmdlet.

See also
Impersonation and EWS in Exchange
ApplicationImpersonation role
New-ManagementRoleAssignment
Get-ManagementRoleAssignment
Identify the account to impersonate
Article • 08/31/2021 • 2 minutes to read

Learn how your service application uses EWS to identify the user to impersonate.

Your service application identifies the user account to impersonate by using one of the
following three identifiers:

The primary SMTP address.

The user principal name (UPN).

The security identifier (SID).

The identifier that you use depends, of course, on the information that your application
has available.

Identifying the user account to impersonate


Your application can use either the EWS Managed API or EWS SOAP requests to identify
the user account that it is impersonating. The EWS Managed API uses the
ExchangeService.ImpersonatedUserId property to identify the impersonated user. EWS
uses the ExchangeImpersonation element, as shown in the following XML fragment.

XML

<soap:Header>

<t:ExchangeImpersonation>

<t:ConnectingSID>

Identifier

</t:ConnectingSID>

</t:ExchangeImpersonation>

</soap:Header>

Each of the following sections shows how to use one of the identifiers. For an example
that shows the impersonation identifier in action, see Add appointments by using
Exchange impersonation.

Use the SMTP email address to identify the user account


The SMTP email address is the primary email address that is associated with a user
account.
In an EWS Managed API application, you specify the SMTP email address along with the
ConnectingIdType.SMTP enumeration value.

C#

exchangeServiceInstance.ImpersonatedUserId = new
ImpersonatedUserId(ConnectingIdType.SMTP, "[email protected]");

In an EWS SOAP request, the PrimarySmtpAddress element contains the email


address for the user account.

XML

<soap:Header>

<t:ExchangeImpersonation>

<t:ConnectingSID>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

</t:ConnectingSID>

</t:ExchangeImpersonation>

</soap:Header>

Use the UPN to identify the user account


The UPN contains the fully qualified domain name (FQDN) for the location of the user
account. This is not necessarily the user's mailbox domain. The UserPrincipalName
attribute must be set correctly on the user account in Active Directory Domain Services
(AD DS) for the user lookup to succeed.

In an EWS Managed API application, you specify the UPN along with the
ConnectingIdType.PrincipalName enumeration value.

C#

exchangeServiceInstance.ImpersonatedUserId = new
ImpersonatedUserId(ConnectingIdType.PrincipalName,
"[email protected]");

In an EWS SOAP request, the PrincipalName element (ConnectingSIDType complexType)


(EWS) element contains the UPN for the user account.

XML

<soap:Header>

<t:ExchangeImpersonation>

<t:ConnectingSID>

<t:PrincipalName>[email protected]</t:PrincipalName>

</t:ConnectingSID>

</t:ExchangeImpersonation>

</soap:Header>

Use the SID to identify the user account


The SID is the identifier of the account to be impersonated in security descriptor
definition language (SDDL) form.

In an EWS Managed API application, you specify the SID along with the
ConnectingIdType.SID enumeration value.

C#

exchangeServiceInstance.ImpersonatedUserId = new
ImpersonatedUserId(ConnectingIdType.SID, "S-1-5-21-1493619105-1843311271-
3936346804-1118");

In an EWS SOAP request, the SID element contains the SID for the user account.

XML

<soap:Header>

<t:ExchangeImpersonation>

<t:ConnectingSID>

<t:SID>S-1-5-21-1493619105-1843311271-3936346804-1118</t:SID>

</t:ConnectingSID>

</t:ExchangeImpersonation>

</soap:Header>

See also
Impersonation and EWS in Exchange

Add appointments by using Exchange impersonation

ExchangeService class

ExchangeImpersonation
Add appointments by using Exchange
impersonation
Article • 06/14/2022 • 4 minutes to read

Learn how to use impersonation with the EWS Managed API or EWS in Exchange to add
appointments to users' calendars.

You can create a service application that inserts appointments directly into an Exchange
calendar by using a service account that has the ApplicationImpersonation role
enabled. When you use impersonation, the application is acting as the user; it's as if the
user added the appointment to the calendar by using a client such as Outlook.

When you are using impersonation, keep in mind the following:

Your ExchangeService object must be bound to the service account. You can use
the same ExchangeService object to impersonate multiple accounts by changing
the ImpersonatedUserId property for each account that you want to
impersonate.
Any item that you save to an impersonated account can only be used once. If you
want to save the same appointment in multiple accounts, for example, you have to
create an Appointment object for each account.

Prerequisites
Your application needs an account to use to connect to the Exchange server before it
can use impersonation. We suggest that you use a service account for the application
that has been granted the Application Impersonation role for the accounts that it will be
accessing. For more information, see Configure impersonation

Add appointments by using impersonation


with the EWS Managed API
The following example adds an appointment or meeting to the calendar of one or more
Exchange accounts. The method takes three parameters.

service — An ExchangeService object bound to the service application's account


on the Exchange server.
emailAddresses — A System.List object containing a list of SMTP email address
strings.
factory — An object that implements the IAppointmentFactory interface. This
interface has one method, GetAppointment that takes an ExchangeService object
as a parameter and returns an Appointment object. The IAppointmentFactory
interface is defined IAppointmentFactory interface.

C#

private static void CreateAppointments(ExchangeService service, List<string>


emailAddresses, IAppointmentFactory factory)

// Loop through the list of email addresses to add the appointment.

foreach (var emailAddress in emailAddresses)

Console.WriteLine(string.Format(" Placing appointment in calendar for


{0}.", emailAddress));

// Set the email address of the account to get the appointment.

service.ImpersonatedUserId = new
ImpersonatedUserId(ConnectingIdType.SmtpAddress, emailAddress);

// Get the appointment to add.

Appointment appointment = factory.GetAppointment(service);

// Save the appointment.

try

if (appointment.RequiredAttendees.Count > 0)

// The appointment has attendees so send them the meeting request.

appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);

else

// The appointment does not have attendees, so just save to


calendar.

appointment.Save(SendInvitationsMode.SendToNone);

catch (ServiceResponseException ex)

Console.WriteLine(string.Format("Could not create appointment for


{0}", emailAddress));

Console.WriteLine(ex.Message);

When saving the appointment, the code checks to determine whether any attendees
have been added to the RequiredAttendees property. If they have, the
Appointment.Save method is called with the SendToAllAndSaveCopy enumeration
value so that the attendees receive meeting requests; otherwise, the Appointment.Save
method is called with the SendToNone enumeration value so that the appointment is
saved into the impersonated user's calendar with the Appointment.IsMeeting
property set to false.

IAppointmentFactory interface
Because you need a new Appointment object each time that you want to save an
appointment on an impersonated user's calendar, the IAppointmentFactory interface
abstracts the object used to populate each Appointment object. This version is a simple
interface that contains only one method, GetAppointment, that takes an
ExchangeService object as a parameter and returns a new Appointment object bound
to that ExchangeService object.

C#

interface IAppointmentFactory

Appointment GetAppointment(ExchangeService service);

The following AppointmentFactory class example shows an implementation of the


IAppointmentFactory interface that returns a simple appointment that occurs three
days from now. If you uncomment the appointment.RequiredAttendees.Add line, the
GetAppointment method will return a meeting and the email address specified in that
line will receive a meeting request with the impersonated user listed as the organizer.

C#

class AppointmentFactory : IAppointmentFactory

public Appointment GetAppointment(ExchangeService service)

// First create the appointment to add.

Appointment appointment = new Appointment(service);

// Set the properties on the appointment.

appointment.Subject = "Tennis lesson";

appointment.Body = "Focus on backhand this week.";

appointment.Start = DateTime.Now.AddDays(3);

appointment.End = appointment.Start.AddHours(1);

appointment.Location = "Tennis club";

// appointment.RequiredAttendees.Add(new
Attendee("[email protected]"));

return appointment;

Add appointments by using impersonation


with EWS
EWS enables you application to use impersonation to add items to a calendar on behalf
the calendar's owner. This example shows how to use the CreateItem operation to
add an appointment to the calendar of an impersonated account.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Pacific Standard Time" />

</t:TimeZoneContext>

<t:ExchangeImpersonation>

<t:ConnectingSID>
<t:SmtpAddress>[email protected]</t:SmtpAddress>

</t:ConnectingSID>

</t:ExchangeImpersonation>

</soap:Header>

<soap:Body>

<m:CreateItem SendMeetingInvitations="SendToNone">

<m:Items>

<t:CalendarItem>

<t:Subject>Tennis lesson</t:Subject>

<t:Body BodyType="HTML">Focus on backhand this week.</t:Body>

<t:ReminderDueBy>2013-09-19T14:37:10.732-07:00</t:ReminderDueBy>

<t:Start>2013-09-21T19:00:00.000Z</t:Start>

<t:End>2013-09-21T20:00:00.000Z</t:End>

<t:Location>Tennis club</t:Location>

<t:MeetingTimeZone TimeZoneName="Pacific Standard Time" />

</t:CalendarItem>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

Note that other than the addition of the ExchangeImpersonation element in the SOAP
header to specify the account that we are impersonating, this is the same XML request
used to create an appointment without using impersonation.

The following example shows the response XML that is returned by the CreateItem
operation.
7 Note

The ItemId and ChangeKey attributes are shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="775" MinorBuildNumber="7" Version="V2_4"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:CreateItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAMkA" ChangeKey="DwAAA" />

</t:CalendarItem>

</m:Items>

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</m:CreateItemResponse>

</s:Body>

</s:Envelope>

Again, this is the same XML that is returned when you use the CreateItem operation
without using impersonation.

See also
Impersonation and EWS in Exchange
ApplicationImpersonation role
Configure impersonation
Identify the account to impersonate
Create appointments and meetings by using EWS in Exchange 2013
CreateItem operation (calendar item)
ExchangeService.ImpersonatedUserId property
Inbox management and EWS in
Exchange
Article • 09/15/2021 • 6 minutes to read

Find out how you can manage your Inbox in your EWS Managed API or EWS application
by using Inbox rules and the blocked senders list.

Exchange mailboxes come equipped with features to help users organize their incoming
mail automatically. These features all operate on the server without user intervention,
but they serve different needs. The EWS Managed API and EWS provide access to these
features, enabling your users to manage their Inboxes.

Table 1. Inbox management features

If you want to… Use…

Take action on incoming messages (such as moving them to another folder or Inbox
deleting them) based on specific criteria (such as sender, subject, or attachments) rules

Delete all incoming mail from a particular sender Blocked


Senders
List

Inbox rules
Let's face it: not every email message is created equal. For every email a user gets from
his or her manager, there's one from an Internet cat video distribution list he or she
joined years ago and never got around to leaving. While Internet cat videos are
entertaining, the amount of traffic that distribution list gets can get out of hand, and
important messages can easily be lost in the sea of distribution list mail in an Inbox.
Many users turn to Inbox rules to help pare down those messages, and make their Inbox
a much nicer place to be. With Exchange Web Services (EWS), your application can bring
the power of rules to bear.

The EWS Managed API provides the ExchangeService.GetInboxRules and


ExchangeService.UpdateInboxRules methods for working with rules. EWS provides the
GetInboxRules and UpdateInboxRules operations for working with rules. However,
note that the EWS Managed API and EWS have the following limitations when working
with Inbox rules:
EWS cannot access or create "client-only" rules or rules that are set in Outlook to
run "on this computer only".

To change the current set of rules by using EWS, you have to remove the Outlook
rules BLOB, if it is present. This means that using EWS to modify rules deletes any
rules that were previously turned off (disabled) by using Outlook.

How do rules work?


The rules engine acts as a gatekeeper to a user's mailbox. As a message arrives in the
user's mailbox, but before the message appears in the Inbox, that message is evaluated
against an ordered list of rules. Note that this only occurs at arrival time, and only in the
Inbox. These rules are comprised of three parts: Conditions, Actions, and Exceptions.

Starting with the rule at the top of the rule list, the rules engine performs the following
steps until it reaches the end of the list of rules:

1. Checks the message to determine whether it meets all the conditions specified in
the rule.

2. If it meets all the conditions, evaluation continues with step 2.

3. If it does not meet all the conditions, the rules engine loads the next rule in the
rule list and starts over at step 1.

4. Checks the message to determine whether it meets any of the exceptions specified
in the rule.

5. If it meets any of the exceptions, the rules engine loads the next rule in the rule list
and starts over at step 1.

6. If it does not meet any of the exceptions, evaluation continues with step 3.

7. Performs the actions specified in the rule on the message.

8. If the "stop processing more rules" action is specified, the rules engine performs all
the other actions on the message, then exits without evaluating any additional
rules against the message.

9. If the "stop processing more rules" action is not specified, the rules engine loads
the next rule in the rule list and starts over at step 1.

The following figure shows the process that the rules engine follows.

Figure 1: Rules engine overview


Putting the pieces together - parts of a rule
One way to visualize the parts of a rule is to imagine that you are giving instructions to
someone who is tasked with organizing your incoming email. You might say to this
person: "When a message arrives that <insert conditions here>, do <insert actions
here>, unless the message <insert exceptions here>. Let's take a closer look at each
part.

Conditions

Conditions describe when a rule should be applied. While you can omit the conditions
of a rule (resulting in a rule that applies to every message received), it is far more
common for rules to have conditions that apply to a subset of incoming messages.
Some examples are "when a message is from Sadie" or "when a message is sent to the
'Cat Video Lovers' distribution list". Rules can have multiple conditions. When rules have
more than one condition, all the conditions must be met in order for the rules engine to
take the specified action.
Actions
Actions describe what happens when a rule applies. Examples are "move the message
to the 'Cats' folder" or "mark the message with 'Low' importance". Rules can have
multiple actions. When you specify multiple actions for a rule, all the actions are
performed when the rule is applied.

Exceptions
Exceptions describe when a rule should not apply, even if the criteria specified in the
conditions are met. Examples are "except if the message is sent only to me" or "except if
the message is from Mom". A rule can have multiple exceptions. When rules have more
than one exception, and any of the exceptions are met, the rule is not applied.

Example: Herding those cats


Let's take a look at how your users can use rules to eliminate the traffic from that
Internet cat video distribution list. Let's assume the following:

These messages are sent to a distribution list called "Internet Cat Video
Enthusiasts".

Your users want to read these messages eventually, they just don't want them
cluttering their Inbox. They'd rather file them in a folder called "Cats".

Your users want to read messages sent to this distribution list by their mother right
away, because Mom sends the funniest videos.

This tells the rules engine the following: "When a message arrives that is sent to the
'Internet Cat Video Enthusiasts' distribution list, move it to the 'Cats' folder, unless the
message is from Mom."

Table 2. Rule definition

Rule part Value

Conditions Sent to the 'Internet Cat Video Enthusiasts' distribution list

Actions Move the message to the 'Cats' folder


AND stop processing more rules

Exceptions From 'Mom'

7 Note
Notice that "stop processing more rules" is one of the actions in the resulting rule.
In general it's a good idea to include this action to avoid confusion over which rules
act on any given message. However, by omitting this action and properly ordering
your rules, you can achieve more advanced processing of your incoming mail. In
this case, it's probably a safe bet that Internet cat video messages don't require
much in the way of advanced processing.

Shortly after creating this rule, a new message comes in. A coworker Hope sends a
message to the distribution list. If we mentally perform the work of the rules engine, the
message meets all the conditions (it is sent to 'Internet Cat Videos Enthusiasts'), and it
meets none of the exceptions (it isn't from 'Mom'), so the rule applies and the message
gets moved to the 'Cats' folder.

The following figure shows how the rule is applied to an incoming mail message.

Figure 2. Incoming message is processed by a rule


Blocking senders
Although you can create a rule that will move all mail from a specific sender to the Junk
Mail folder, you can also do this by using the Blocked Senders List in your Junk Email
options. Because there is a limit to how many rules a user can have, it makes sense to
use the Blocked Senders List. You can add or remove specific email addresses from the
Blocked Senders List by using the ExchangeService.MarkAsJunk EWS Managed API
method or the MarkAsJunk EWS operation. Note that in order for EWS to access the
Blocked Senders List, the user's mailbox must contain an email message from the email
address that you want to add or remove.

In this section
Manage Inbox rules by using EWS in Exchange

Add and remove email addresses from the Blocked Senders List by using EWS in
Exchange

See also
Develop web service clients for Exchange

GetInboxRules operation

UpdateInboxRules operation

MarkAsJunk operation
Manage Inbox rules by using EWS in
Exchange
Article • 10/11/2021 • 14 minutes to read

Find out how to get, create, update, and delete Inbox rules by using the EWS Managed
API or EWS in Exchange.

You can get, create, update, and delete Inbox rules by using the EWS Managed API or
EWS. Regardless of the technology you use, you get and modify Inbox rules as a
collection, rather than individually. You use the same method or operation to create new
rules, update existing rules, and delete rules.

Table 1. Methods and operations for getting and modifying Inbox rules

In order to… EWS Managed API method EWS operation

Get Inbox rules ExchangeService.GetInboxRules GetInboxRules

Create, update, or delete Inbox ExchangeService.UpdateInboxRules UpdateInboxRules


rules

In order to create, update, or delete Inbox rules by using the EWS Managed API or EWS,
you must remove the Outlook rule, if it exists. If you're using the EWS Managed API, you
do this by setting the removeOutlookRulesBlob parameter to true in the
ExchangeService.UpdateInboxRules method call. If you're using EWS, you set the value
of the RemoveOutlookRuleBlob element to true in the UpdateInboxRules operation.
We recommend that your application check the RuleCollection.OutlookRuleBlobExists
property (if you are using the EWS Managed API), or the OutlookRuleBlobExists
element (if you're using EWS) before updating Inbox rules. If this property or element
has a value of true, your application should alert the user that any disabled rules will be
lost as part of the update, and only proceed with their permission.

When you call the UpdateInboxRules method, EWS deletes client-side send rules.
Client-side send rules are stored on the client in the rule Folder Associated Information
(FAI) Message and nowhere else. EWS deletes this rule FAI message by default, based on
the expectation that Outlook will recreate it. However, Outlook can't recreate rules that
don't also exist as an extended rule, and client-side send rules don't exist as extended
rules. As a result, these rules are lost. We suggest you consider this when designing your
solution.

7 Note
The EWS Managed API code examples in this article use a common set of utility
methods. These methods are omitted from the code samples for brevity.

Get Inbox rules by using the EWS Managed API


To get the current Inbox rules, use the ExchangeService.GetInboxRules method. This
method returns a RuleCollection object that contains all the current Inbox rules.

In this example, each rule in the current Inbox is passed to a helper function (
ParseRuleDetails ) to display the details of the rule.

C#

using System;

using System.Collections.Generic;
using Microsoft.Exchange.WebServices.Data;

private static void GetInboxRules(ExchangeService service, string


emailAddress)

RuleCollection inboxRules = null;

Console.WriteLine("Retrieving inbox rules...");

// Get the rules from the user's Inbox.

try

inboxRules = service.GetInboxRules(emailAddress);

catch (ServiceResponseException ex)

Console.WriteLine("Error getting inbox rules: {0}",


ex.ErrorCode.ToString());

return;

// Loop through the rules and print out the details of each.

foreach (Rule rule in inboxRules)

Console.WriteLine("\n*******************************************************
********");

Console.WriteLine("Rule: {0}", rule.DisplayName);

Console.WriteLine("Rule ID: {0}", rule.Id);

Console.WriteLine("Priority: {0}", rule.Priority);

Console.WriteLine("Enabled: {0}", rule.IsEnabled.ToString());

Console.WriteLine("Error: {0}", rule.IsInError.ToString());

Console.WriteLine("Supported: {0}",
(!rule.IsNotSupported).ToString());

ParseRuleDetails(service, rule);

Get Inbox rules by using EWS


The following EWS SOAP request uses the GetInboxRules operation to retrieve the
Inbox rules for [email protected].

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:GetInboxRules>

<m:MailboxSmtpAddress>[email protected]</m:MailboxSmtpAddress>

</m:GetInboxRules>

</soap:Body>

</soap:Envelope>

The following EWS SOAP response contains the current Inbox rules for
[email protected].

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="712" MinorBuildNumber="22" Version="V2_3"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<GetInboxRulesResponse ResponseClass="Success"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<OutlookRuleBlobExists>false</OutlookRuleBlobExists>
<InboxRules>

<Rule
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<RuleId>AQAAAAAAASY=</RuleId>

<DisplayName>Alfred</DisplayName>

<Priority>1</Priority>

<IsEnabled>true</IsEnabled>

<Conditions>

<FromAddresses>

<Address>

<Name>Alfred Welker</Name>

<EmailAddress>/o=First Organization/ou=Exchange Administrative


Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=9a83e6380cae41918c71e7921d960b5a-
Alfre</EmailAddress>

<RoutingType>EX</RoutingType>

</Address>

</FromAddresses>

</Conditions>

<Actions>

<MoveToFolder>

<FolderId
Id="AAMkADg1OWUwODcyLTg4M2MtNDAyMS05YjI0LTI5ZGM5OTU4Njk3YwAuAAAAAADPriAxh444
TpHj2GoQxWQNAQAN+VjmVZl5Rq1ymCq5eFKOAAAAABSyAAA=" ChangeKey="AQAAAA==" />

</MoveToFolder>

<StopProcessingRules>true</StopProcessingRules>

</Actions>

</Rule>

<Rule
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<RuleId>AQAAAAAAASQ=</RuleId>

<DisplayName>Important</DisplayName>

<Priority>2</Priority>

<IsEnabled>true</IsEnabled>

<Conditions>

<ContainsSubjectStrings>

<String>Urgent</String>

</ContainsSubjectStrings>

<FromAddresses>

<Address>

<Name>Hope Gross</Name>

<EmailAddress>/o=First Organization/ou=Exchange Administrative


Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=9b55e4100c064d9d8c5f72ff36802ed3-
Hope</EmailAddress>

<RoutingType>EX</RoutingType>

</Address>

</FromAddresses>

</Conditions>

<Actions>

<MarkImportance>High</MarkImportance>

<StopProcessingRules>true</StopProcessingRules>

</Actions>

</Rule>

</InboxRules>

</GetInboxRulesResponse>

</s:Body>

</s:Envelope>

Create Inbox rules by using the EWS Managed


API
To create a rule, include a CreateRuleOperation object in the collection of
RuleOperation objects passed to the ExchangeService.UpdateInboxRules method.

In this example, a new rule is created to move mail sent to a distribution list called
"Sales" to a subfolder of the Inbox, also called "Sales".

C#

using System;

using System.Collections.Generic;
using Microsoft.Exchange.WebServices.Data;

private static void CreateInboxRule(ExchangeService service, string


emailAddress)

// Before modifying the rules on the server, determine

// whether an Outlook rules BLOB exists. Updating rules

// via EWS requires removal of the Outlook BLOB. This can

// result in any rules that the user has disabled via the Outlook

// UI to be lost.

RuleCollection currentRules = null;

try

currentRules = service.GetInboxRules(emailAddress);

catch (ServiceResponseException ex)

Console.WriteLine("Error getting inbox rules: {0}",


ex.ErrorCode.ToString());

if (currentRules != null && currentRules.OutlookRuleBlobExists)

Console.WriteLine("WARNING: Adding a new rule will delete the


Outlook rule BLOB.");

Console.WriteLine("This can lead to a loss of any disabled rules.");

Console.Write("Hit Y to proceed (any other key to cancel): ");

ConsoleKeyInfo cki = Console.ReadKey();

if (cki.KeyChar != 'Y' && cki.KeyChar != 'y')

Console.WriteLine("\nCanceling addition of new rule...");

return;

Console.WriteLine();

Console.WriteLine("Adding \"Sales\" rule.");

Rule newRule = new Rule();

// Creating a rule called "Sales"

newRule.DisplayName = "Sales";

// Conditions

// When messages are sent to the "Sales" address ([email protected]),

newRule.Conditions.SentToAddresses.Add("Sales", "[email protected]");

FolderId moveToFolderId = GetFolderIdByName(service,


WellKnownFolderName.Inbox, "Sales");

if (moveToFolderId == null)

throw new ArgumentException("Invalid subfolder specified");

// Actions

// Move the message to the "Sales" folder

newRule.Actions.MoveToFolder = moveToFolderId;

// And stop processing more rules

newRule.Actions.StopProcessingRules = true;

// Exceptions

// Except if the message is from Hope Gross ([email protected]).

newRule.Exceptions.FromAddresses.Add("Hope Gross", "[email protected]");

Console.WriteLine("Rule: {0}", newRule.DisplayName);

ParseRuleDetails(service, newRule);

// Add the new rule to the CreateRule operation.

CreateRuleOperation createMoveIfFromSalesRule = new


CreateRuleOperation(newRule);

try

// Update rules. Note that this method can accept

// an array of rule operations, enabling you to batch

// updates.

service.UpdateInboxRules(new RuleOperation[] {
createMoveIfFromSalesRule }, true);

catch (UpdateInboxRulesException ex)

Console.WriteLine("Error updating Inbox rules: {0}",


ex.ErrorCode.ToString());

return;

Console.WriteLine("Rule added.");

Create Inbox rules by using EWS


The following EWS SOAP request creates the "Sales" rule in [email protected]'s Inbox.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:UpdateInboxRules>

<m:RemoveOutlookRuleBlob>true</m:RemoveOutlookRuleBlob>

<m:Operations>

<t:CreateRuleOperation>

<t:Rule>

<t:DisplayName>Sales</t:DisplayName>

<t:Priority>1</t:Priority>

<t:IsEnabled>true</t:IsEnabled>

<t:IsInError>false</t:IsInError>

<t:Conditions>

<t:SentToAddresses>

<t:Address>

<t:Name>Sales</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Address>

</t:SentToAddresses>

</t:Conditions>

<t:Exceptions>

<t:FromAddresses>

<t:Address>

<t:Name>Hope Gross</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Address>

</t:FromAddresses>

</t:Exceptions>

<t:Actions>
<t:MoveToFolder>

<t:FolderId
Id="AAMkADg1OWUwODcyLTg4M2MtNDAyMS05YjI0LTI5ZGM5OTU4Njk3YwAuAAAAAADPriAxh444
TpHj2GoQxWQNAQAN+VjmVZl5Rq1ymCq5eFKOAAAAABSxAAA="

ChangeKey="AQAAABYAAAAN+VjmVZl5Rq1ymCq5eFKOAAAAABTZ" />

</t:MoveToFolder>

<t:StopProcessingRules>true</t:StopProcessingRules>

</t:Actions>

</t:Rule>

</t:CreateRuleOperation>

</m:Operations>

</m:UpdateInboxRules>

</soap:Body>

</soap:Envelope>

Update Inbox rules by using the EWS Managed


API
To update a rule, include a SetRuleOperation object in the collection of RuleOperation
objects passed to the UpdateInboxRules method.

In this example, the "Sales" rule is updated to add an exception. If the subject contains
the word "Urgent", the messages will not be moved to the "Sales" subfolder.

C#

using System;

using System.Collections.Generic;
using Microsoft.Exchange.WebServices.Data;

private static void UpdateInboxRule(ExchangeService service, string


emailAddress)

// Before modifying the rules on the server, determine

// whether an Outlook rules BLOB exists. Updating rules

// via EWS requires removal of the Outlook BLOB. This can

// result in any rules that the user has disabled via the Outlook

// UI to be lost.

RuleCollection currentRules = null;

try

currentRules = service.GetInboxRules(emailAddress);

catch (ServiceResponseException ex)

Console.WriteLine("Error getting inbox rules: {0}",


ex.ErrorCode.ToString());

if (currentRules != null && currentRules.OutlookRuleBlobExists)

Console.WriteLine("WARNING: Updating an existing rule will delete


the Outlook rule BLOB.");

Console.WriteLine("This can lead to a loss of any disabled rules.");

Console.Write("Hit Y to proceed (any other key to cancel): ");

ConsoleKeyInfo cki = Console.ReadKey();

if (cki.KeyChar != 'Y' && cki.KeyChar != 'y')

Console.WriteLine("\nCanceling update of rule...");

return;

Console.WriteLine();

// Look for the rule called "Sales" and modify it

// to add an exception if "Urgent" is in the subject.

Console.WriteLine("Updating rule \"Sales\"...");

Rule ruleToUpdate = null;

foreach (Rule rule in currentRules)

if (rule.DisplayName == "Sales")

ruleToUpdate = rule;

break;

if (ruleToUpdate == null)

Console.WriteLine("Could not find a rule called \"Sales\", canceling


update.");

return;

// Add the exception.

ruleToUpdate.Exceptions.ContainsSubjectStrings.Add("Urgent");

SetRuleOperation setRuleOperation = new SetRuleOperation(ruleToUpdate);

try

// Update rules. Note that this method can accept

// an array of rule operations, enabling you to batch

// updates.

service.UpdateInboxRules(new RuleOperation[] { setRuleOperation },


true);

catch (UpdateInboxRulesException ex)

Console.WriteLine("Error updating Inbox rules: {0}",


ex.ErrorCode.ToString());

return;

Console.WriteLine("Rule updated.");

Update Inbox rules by using EWS


The following EWS SOAP request updates the "Sales" rule in [email protected]'s
Inbox.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:UpdateInboxRules>

<m:RemoveOutlookRuleBlob>true</m:RemoveOutlookRuleBlob>

<m:Operations>

<t:SetRuleOperation>

<t:Rule>

<t:RuleId>AQAAAATnzOA=</t:RuleId>

<t:DisplayName>Sales</t:DisplayName>

<t:Priority>1</t:Priority>

<t:IsEnabled>true</t:IsEnabled>

<t:IsInError>false</t:IsInError>

<t:Conditions>

<t:SentToAddresses>

<t:Address>

<t:Name>Sales</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Address>

</t:SentToAddresses>

</t:Conditions>

<t:Exceptions>

<t:ContainsSubjectStrings>

<t:String>Urgent</t:String>

</t:ContainsSubjectStrings>

<t:FromAddresses>

<t:Address>

<t:Name>Hope Gross</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Address>

</t:FromAddresses>

</t:Exceptions>

<t:Actions>
<t:MoveToFolder>

<t:FolderId
Id="AAMkADg1OWUwODcyLTg4M2MtNDAyMS05YjI0LTI5ZGM5OTU4Njk3YwAuAAAAAADPriAxh444
TpHj2GoQxWQNAQAN+VjmVZl5Rq1ymCq5eFKOAAAAABSxAAA="

ChangeKey="AQAAAA==" />

</t:MoveToFolder>

<t:StopProcessingRules>true</t:StopProcessingRules>

</t:Actions>

</t:Rule>

</t:SetRuleOperation>

</m:Operations>

</m:UpdateInboxRules>

</soap:Body>

</soap:Envelope>

Delete Inbox rules by using the EWS Managed


API
To delete a rule, include a DeleteRuleOperation object in the collection of
RuleOperation objects passed to the UpdateInboxRules method.

In this example, the "Sales" rule is deleted.

C#

using System;

using System.Collections.Generic;
using Microsoft.Exchange.WebServices.Data;

private static void DeleteInboxRule(ExchangeService service, string


emailAddress)

// Before modifying the rules on the server, determine

// whether an Outlook rules BLOB exists. Updating rules

// via EWS requires removal of the Outlook BLOB. This can

// result in any rules that the user has disabled via the Outlook

// UI to be lost.

RuleCollection currentRules = null;

try

currentRules = service.GetInboxRules(emailAddress);

catch (ServiceResponseException ex)

Console.WriteLine("Error getting inbox rules: {0}",


ex.ErrorCode.ToString());

if (currentRules != null && currentRules.OutlookRuleBlobExists)

Console.WriteLine("WARNING: Deleting a rule will delete the Outlook


rule BLOB.");

Console.WriteLine("This can lead to a loss of any disabled rules.");

Console.Write("Hit Y to proceed (any other key to cancel): ");

ConsoleKeyInfo cki = Console.ReadKey();

if (cki.KeyChar != 'Y' && cki.KeyChar != 'y')

Console.WriteLine("\nCancelling deletion of new rule...");

return;

Console.WriteLine();

// Look for the rule called "Sales" and delete it.

Console.WriteLine("Deleting rule \"Sales\"...");

string ruleId = string.Empty;

foreach (Rule rule in currentRules)

if (rule.DisplayName == "Sales")

ruleId = rule.Id;

break;

if (string.IsNullOrEmpty(ruleId))

Console.WriteLine("Could not find a rule called \"Sales\", canceling


delete.");

return;

DeleteRuleOperation deleteRuleOperation = new


DeleteRuleOperation(ruleId);

try

// Update rules. Note that this method can accept

// an array of rule operations, enabling you to batch

// updates.

service.UpdateInboxRules(new RuleOperation[] { deleteRuleOperation


}, true);

catch (UpdateInboxRulesException ex)

Console.WriteLine("Error updating Inbox rules: {0}",


ex.ErrorCode.ToString());

return;

Console.WriteLine("Rule deleted.");

Delete Inbox rules by using EWS


The following EWS SOAP request deletes the "Sales" rules from [email protected]'s
inbox.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:UpdateInboxRules>

<m:RemoveOutlookRuleBlob>true</m:RemoveOutlookRuleBlob>

<m:Operations>

<t:DeleteRuleOperation>

<t:RuleId>AQAAAATnzOA=</t:RuleId>

</t:DeleteRuleOperation>

</m:Operations>

</m:UpdateInboxRules>

</soap:Body>

</soap:Envelope>

Source for sample utility methods


The EWS Managed API examples in this article use the utility methods included in the
following example.

C#

private static void ParseRuleDetails(ExchangeService service, Rule rule)

// Conditions

string conditions = ParseRulePredicates(rule.Conditions, false);

if (!string.IsNullOrEmpty(conditions))

Console.WriteLine("When a message:");

Console.WriteLine(conditions);

// Actions

string actions = ParseRuleActions(service, rule.Actions);

if (!string.IsNullOrEmpty(actions))

Console.WriteLine("Take the following action(s):");

Console.WriteLine(actions);

// Exceptions

string exceptions = ParseRulePredicates(rule.Exceptions, true);

if (!string.IsNullOrEmpty(exceptions))

Console.WriteLine("Except when the message:");

Console.WriteLine(exceptions);

private static string ParseRulePredicates(RulePredicates predicates, bool


isExceptions)

string humanReadablePredicates = string.Empty;

foreach (string category in predicates.Categories)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"has the category \"" + category + "\"", isExceptions);

foreach (string bodyString in predicates.ContainsBodyStrings)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"has \"" + bodyString + "\" in the body", isExceptions);

foreach (string headerString in predicates.ContainsHeaderStrings)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"has \"" + headerString + "\" in the headers", isExceptions);

foreach (string recipientString in predicates.ContainsRecipientStrings)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"has \"" + recipientString + "\" in the recipient's address",


isExceptions);

foreach (string senderString in predicates.ContainsSenderStrings)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"has \"" + senderString + "\" in the sender's address",


isExceptions);

foreach (string subjectOrBodyString in


predicates.ContainsSubjectOrBodyStrings)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"has \"" + subjectOrBodyString + "\" in the subject or body",


isExceptions);

foreach (string subjectString in predicates.ContainsSubjectStrings)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"has \"" + subjectString + "\" in the subject", isExceptions);

if (predicates.FlaggedForAction != null)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is flagged for \"" + predicates.FlaggedForAction.Value + "\"


action", isExceptions);

foreach (EmailAddress fromAddress in predicates.FromAddresses)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is from " + fromAddress.Name + " (" + fromAddress.Address +


")", isExceptions);

foreach (string fromConnectedAccount in


predicates.FromConnectedAccounts)
{

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is from the \"" + fromConnectedAccount + "\" account",


isExceptions);

if (predicates.HasAttachments)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"has an attachment", isExceptions);

if (predicates.Importance != null)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is marked as " + predicates.Importance.Value + " importance",


isExceptions);

if (predicates.IsApprovalRequest)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is an approval request", isExceptions);

if (predicates.IsAutomaticForward)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is an automatic forward", isExceptions);

if (predicates.IsAutomaticReply)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is an automatic reply", isExceptions);

if (predicates.IsEncrypted)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is encrypted", isExceptions);

if (predicates.IsMeetingRequest)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is a meeting request", isExceptions);

if (predicates.IsMeetingResponse)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is a meeting response", isExceptions);

if (predicates.IsNonDeliveryReport)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is a non-delivery report", isExceptions);

if (predicates.IsPermissionControlled)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is a rights-managed message", isExceptions);

if (predicates.IsReadReceipt)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is a read receipt", isExceptions);

if (predicates.IsSigned)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is signed", isExceptions);

if (predicates.IsVoicemail)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is a voicemail", isExceptions);

foreach (string messageClass in predicates.ItemClasses)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"has a message class of \"" + messageClass + "\"",


isExceptions);

foreach (string messageClassification in


predicates.MessageClassifications)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"has a classification of \"" + messageClassification + "\"",


isExceptions);

if (predicates.NotSentToMe)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is not sent to me", isExceptions);

if (predicates.Sensitivity != null)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"has a sensitivity of \"" + predicates.Sensitivity.Value + "\"",


isExceptions);

if (predicates.SentCcMe)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"has me on the CC line", isExceptions);

if (predicates.SentOnlyToMe)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is sent ONLY to me", isExceptions);

foreach (EmailAddress sentToAddress in predicates.SentToAddresses)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is sent to " + sentToAddress.Name + " (" +


sentToAddress.Address + ")", isExceptions);

if (predicates.SentToMe)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"has me on the To line", isExceptions);

if (predicates.SentToOrCcMe)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"has me on the To or CC line", isExceptions);

if (predicates.WithinDateRange != null)

if (predicates.WithinDateRange.Start != null)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"was received after " +


predicates.WithinDateRange.Start.ToString(), isExceptions);

if (predicates.WithinDateRange.End != null)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"was recieved before " +


predicates.WithinDateRange.End.ToString(), isExceptions);

if (predicates.WithinSizeRange != null)

if (predicates.WithinSizeRange.MinimumSize != null)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is larger than " + predicates.WithinSizeRange.MinimumSize +


" kb", isExceptions);

if (predicates.WithinSizeRange.MaximumSize != null)

humanReadablePredicates =
AppendToHumanReadableString(humanReadablePredicates,

"is smaller than " + predicates.WithinSizeRange.MaximumSize


+ " kb", isExceptions);

return humanReadablePredicates;

private static string ParseRuleActions(ExchangeService service, RuleActions


actions)

string humanReadableActions = string.Empty;

foreach (string category in actions.AssignCategories)

humanReadableActions =
AppendToHumanReadableString(humanReadableActions,

"assign the \"" + category + "\" category", false);

if (actions.CopyToFolder != null)

humanReadableActions =
AppendToHumanReadableString(humanReadableActions,

"move to the \"" + GetFolderNameFromId(service,


actions.CopyToFolder) + "\" folder", false);

if (actions.Delete)

humanReadableActions =
AppendToHumanReadableString(humanReadableActions,

"delete the message", false);

foreach (EmailAddress forwardAddress in


actions.ForwardAsAttachmentToRecipients)

humanReadableActions =
AppendToHumanReadableString(humanReadableActions,

"forward as an attachment to " + forwardAddress.Name + " (" +

forwardAddress.Address + ")", false);

foreach (EmailAddress forwardAddress in actions.ForwardToRecipients)

humanReadableActions =
AppendToHumanReadableString(humanReadableActions,

"forward to " + forwardAddress.Name + " (" +


forwardAddress.Address + ")", false);

if (actions.MarkAsRead)

humanReadableActions =
AppendToHumanReadableString(humanReadableActions,

"mark the message as read", false);

if (actions.MarkImportance != null)

humanReadableActions =
AppendToHumanReadableString(humanReadableActions,

"mark the message with " + actions.MarkImportance.Value + "


importance", false);

if (actions.MoveToFolder != null)

humanReadableActions =
AppendToHumanReadableString(humanReadableActions,

"move the message to the \"" + GetFolderNameFromId(service,


actions.MoveToFolder) + "\" folder", false);

if (actions.PermanentDelete)

humanReadableActions =
AppendToHumanReadableString(humanReadableActions,

"permanently delete the message", false);

foreach (EmailAddress redirectAddress in actions.RedirectToRecipients)

humanReadableActions =
AppendToHumanReadableString(humanReadableActions,

"redirect the message to " + redirectAddress.Name + " (" +

redirectAddress.Address + ")", false);

foreach (MobilePhone smsRecipient in actions.SendSMSAlertToRecipients)

humanReadableActions =
AppendToHumanReadableString(humanReadableActions,

"send SMS alert to " + smsRecipient.Name + " (" +

smsRecipient.PhoneNumber + ")", false);

if (actions.ServerReplyWithMessage != null)

humanReadableActions =
AppendToHumanReadableString(humanReadableActions,

"have the server reply with a template message, ID=" +


actions.ServerReplyWithMessage.UniqueId, false);

if (actions.StopProcessingRules)

humanReadableActions =
AppendToHumanReadableString(humanReadableActions,

"stop processing more rules", false);

return humanReadableActions;

private static string AppendToHumanReadableString(string


humanReadableString, string appendString, bool isExceptions)

// Conditions and Actions are AND'ed together

string logicalOperator = "AND";

if (isExceptions)

// Exceptions are OR'ed

logicalOperator = "OR";

if (!string.IsNullOrEmpty(humanReadableString))

// There's already an item in the list, so we need to

// add the operator

humanReadableString += "\n " + logicalOperator + " ";

else

humanReadableString += " ";

humanReadableString += appendString;

return humanReadableString;

private static string GetFolderNameFromId(ExchangeService service, FolderId


folderId)

string folderName = string.Empty;

Folder folder = null;

try

folder = Folder.Bind(service, folderId);

catch (ServiceResponseException)

Console.WriteLine("Unable to bind to the folder specified.");

if (folder != null)
folderName = folder.DisplayName;

return folderName;

private static FolderId GetFolderIdByName(ExchangeService service,


WellKnownFolderName parentWellKnownFolder, string subFolderName)

FolderId returnId = null;

Folder parentFolder = null;

try

parentFolder = Folder.Bind(service, parentWellKnownFolder);

catch (ServiceResponseException)

Console.WriteLine("Unable to bind to the {} folder.",


parentWellKnownFolder.ToString());

if (parentFolder == null)

return null;

SearchFilter searchFilter = new


SearchFilter.IsEqualTo(FolderSchema.DisplayName, subFolderName);

FolderView view = new FolderView(10);

view.PropertySet = new PropertySet(BasePropertySet.IdOnly);

view.PropertySet.Add(FolderSchema.DisplayName);

view.Traversal = FolderTraversal.Shallow;

FindFoldersResults searchResults = null;

try

searchResults = parentFolder.FindFolders(searchFilter, view);

catch (ServiceResponseException ex)

Console.WriteLine("Error searching for {0} folder: {1}",


subFolderName,

ex.ErrorCode.ToString());

foreach (Folder subFolder in searchResults.Folders)

if (subFolder.DisplayName == subFolderName)

returnId = subFolder.Id;

break;

return returnId;

See also
Inbox management and EWS in Exchange

ExchangeService.GetInboxRules method

ExchangeService.UpdateInboxRules method

GetInboxRules operation

UpdateInboxRules operation
Add and remove email addresses from
the Blocked Senders List by using EWS
in Exchange
Article • 09/15/2021 • 2 minutes to read

Find out how to use the EWS Managed API or EWS to add email addresses to and
remove them from the Blocked Senders List.

The Blocked Senders List in a user's Junk Email options provides a way to move all email
messages from specified senders to the Junk Email folder. You can enable your EWS
Managed API or EWS application to add email addresses to or remove them from the
Blocked Senders List.

Note that a message from the email address must exist in the user's mailbox before you
can add the email address to or remove it from the Blocked Senders List. The
ExchangeService.MarkAsJunk EWS Managed API method and the MarkAsJunk EWS
operation use a collection of item IDs. The item IDs in the collection indicate messages
in the mailbox for which the junk mail status should be changed.

You can use the Get-MailboxJunkEmailConfiguration and Set-


MailboxJunkEmailConfiguration Exchange Management Shell cmdlets to access the
Blocked Senders List directly.

Add an email address to or remove it from the


Blocked Senders List by using the EWS
Managed API
To add the sender of an email message to the Blocked Senders List, use the MarkAsJunk
method and set the isJunk parameter to true. To remove the sender of an email
message from the Blocked Senders List, set the isJunk parameter to false.

The following example shows how to use the MarkAsJunk method to change the junk
status of a message.

C#

private static void MarkMessageAsJunk(ExchangeService service, ItemId


messageId, bool isJunk, bool moveItem)

List<ItemId> junkItemIds = new List<ItemId>();

junkItemIds.Add(messageId);

ServiceResponseCollection<MarkAsJunkResponse> responseCollection = null;

try

// If isJunk is true, the sender of the email message is added to

// the Blocked Senders List. If isJunk is false, the sender is


removed

// from the list (if present).

responseCollection = service.MarkAsJunk(junkItemIds, isJunk,


moveItem);

catch (ServiceResponseException ex)

Console.WriteLine("Error marking item as junk: {0}", ex.ErrorCode);

return;

foreach (MarkAsJunkResponse response in responseCollection)

if (response.Result == ServiceResult.Success)

Console.WriteLine("Successfully marked message as {0}junk.",


isJunk ? "": "NOT ");

if (moveItem)

Console.WriteLine("New item ID: {0}",


response.MovedItemId.ToString());
}

else

Console.WriteLine("[{0}]: {1}", response.Result.ToString(),

response.ErrorCode.ToString());

Add an email address to or remove it from the


Blocked Senders List by using EWS
The following EWS SOAP request marks an item as junk by setting the IsJunk attribute
on the MarkAsJunk element to true. It also moves the message to the Junk Email
folder by setting the MoveItem attribute on the MarkAsJunk element to true.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:MarkAsJunk IsJunk="true" MoveItem="true">

<m:ItemIds>

<t:ItemId
Id="AAMkADg1OWUwODcyLTg4M2MtNDAyMS05YjI0LTI5ZGM5OTU4Njk3YwBGAAAAAADPriAxh444
TpHj2GoQxWQNBwAN+VjmVZl5Rq1ymCq5eFKOAAAAAAENAAAN+VjmVZl5Rq1ymCq5eFKOAAAAAAEu
AAA="

ChangeKey="CQAAABYAAAAN+VjmVZl5Rq1ymCq5eFKOAAAAAADi" />

</m:ItemIds>

</m:MarkAsJunk>

</soap:Body>

</soap:Envelope>

The following EWS SOAP response shows the successful response. The MovedItemId
element in the response contains the item ID for the item after it was moved.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="712" MinorBuildNumber="22" Version="V2_3"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:MarkAsJunkResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:MarkAsJunkResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:MovedItemId
Id="AAMkADg1OWUwODcyLTg4M2MtNDAyMS05YjI0LTI5ZGM5OTU4Njk3YwBGAAAAAADPriAxh444
TpHj2GoQxWQNBwAN+VjmVZl5Rq1ymCq5eFKOAAAAAAEbAAAN+VjmVZl5Rq1ymCq5eFKOAAAE59DI
AAA="

ChangeKey="CQAAABYAAAAN+VjmVZl5Rq1ymCq5eFKOAAAE59E+" />

</m:MarkAsJunkResponseMessage>

</m:ResponseMessages>

</m:MarkAsJunkResponse>

</s:Body>

</s:Envelope>

See also
Inbox management and EWS in Exchange
ExchangeService.MarkAsJunk
MarkAsJunk operation
Get-MailboxJunkEmailConfiguration
Set-MailboxJunkEmailConfiguration
Exchange Management Shell
Notification subscriptions, mailbox events, and
EWS in Exchange
Article • 03/19/2022 • 9 minutes to read

Find out about notification subscriptions and mailbox event in EWS in Exchange.

You can use both the EWS Managed API and Exchange Web Services (EWS) to subscribe to receive
notifications when events occur in a mailbox, or in one or more of the folders in a mailbox. Three
subscription types are available: streaming notifications, pull notifications, and push notifications. Each
of these subscription types uses different techniques to receive or retrieve the notifications.

Getting notifications - what are my options?


EWS includes three subscription types that work independently to notify the client of changes on the
server. No matter which subscription type you choose, you'll have access to all the same notification
events in the end - it's just a matter of how you get them.

Table 1. Subscription types

Option Description Is it right for me?

Streaming Notifications Streaming notifications are generally recommended for most applications. They're
notifications that are sent similar to pull and push notifications, and offer the best of both worlds. After you
by the establish your notification subscription, the connection remains open for up to 30
server minutes to allow the server to push notifications back to the client. No need to
through a request updates, like you would with a pull subscription, and you don't have to
connection create a web service listener application like you would with a push subscription.
that remains
open for a
specified
period of
time.

Pull Notifications Pull notifications are generally most appropriate for loosely coupled clients, where
notifications that are the client is not reliably connected to the network. Pull notifications can create
requested excess traffic between the client and the server because the client is sending
(or pulled) frequent requests to the server to retrieve notifications, and not all requests result
by the client. in notifications retrieved.

Push Notifications Generally, push notifications provide for smaller notification latency than pull
notifications that are sent notifications and are suited for tightly coupled clients to which the server has
(or pushed) reliable access and the client is IP addressable. However, push notifications have
by the fallen out of favor since the advent of streaming notifications in Exchange 2010. If
server to a possible, we recommend that you use streaming notifications instead of push
client-side notifications going forward. Push notifications require that you write a listener
web service application, which is where the notifications are pushed to. This has a slight benefit
via a over pull notifications in that it reduces wire traffic, but it adds overhead by
callback requiring a separate application.
address.
What EWS events can I subscribe to?
The types of EWS events that clients subscribe to are defined by the EventType enumeration for the
EWS Managed API or the EventType element for EWS. The following EWS events are available for
subscription:

NewMail — A new message arrived in the Inbox.

Deleted — A message was hard deleted from the Inbox. To learn more about deleted item
notifications, see Deleting items by using EWS in Exchange and Pull notifications for EWS
deletion-related mailbox events in Exchange.

Modified — An item or folder was changed.

Moved — An item or folder was moved.

Copied — An item or folder was copied.

Created — An item or folder was created.

FreeBusyChanged — A user's free busy information has been changed.

Another EWS event type, the Status event, is defined by the EventType element, but you don't
subscribe to this event. Instead, it's sent by the server to check the status of the client for streaming
and push notifications only. The client needs to respond to this event or the client will time out.

A single user action often results in the creation of multiple notifications. To illustrate this, the
following figure shows some common scenarios and the notifications created for each one. Client
settings have an impact on the notifications received, so this is not an exhaustive list of all the
configuration options and resulting notifications.

Figure 1. Event types returned by notification subscriptions


Figure 1 simplifies the notification process. In reality, multiple notifications (even multiple notifications
of the same type) can be created for a single user action. For example, in the case of a folder move
operation, three folder events are created: one for the folder being modified, one for the old parent
folder, and one for the new parent folder. Because numerous events can be fired for a single
operation, we recommend that you build a wait time of a few seconds into your synchronization
operations, so that you only synchronize when the action is complete, instead of partway through the
operation.

It's also important to realize that the configuration settings that each user chooses will affect which
notifications are created. For example, some users' free busy data is updated automatically and the
FreeBusyChanged event is created when a new meeting request is received, even before they've read
the item. For other users, free busy data isn't updated and the FreeBusyChanged event isn't created
until after the meeting has been accepted. These settings can have a considerable impact on the
notifications created by the server.

How do EWS notifications work?


EWS notifications are handled on a subscription basis. Typically there's one subscription per mailbox,
and within the mailbox subscription you can subscribe to some or all folders. You decide what kind of
notification to subscribe to (streaming, pull, or push) and what kind of events you'd like to receive
(NewMail, Created, Deleted, Modified, etc.), and then you create a subscription. The EWS events are
then sent asynchronously from the mailbox server to the client. (History lesson: events are
synchronous in Exchange 2007 - and events are stored on the Client Access server in Exchange 2010,
but no more!).

Depending on the type of subscription you have, the ways in which the notifications are sent to the
client vary. This section describes how each type of subscription works in more detail.
EWS streaming notifications
Streaming notifications rely on a hanging get request on the server to keep a streaming subscription
connection open, so that any events that occur while the connection is active are streamed to the
client immediately. Multiple notifications can be sent over the course of a single connection, and the
connection stays open until the interval expires, or for a maximum of 30 minutes. After the connection
expires, the client sends the hanging get request again. Figure 2 shows how streaming subscriptions
and streaming notifications work.

Figure 2. Streaming notification overview

For information about creating streaming notifications, see Stream notifications about mailbox events
by using EWS in Exchange.

EWS pull notifications


Pull notifications rely on the client asking for the notifications on an interval that the client manages.
This can result in GetEvents responses with no notifications. Figure 3 shows how pull subscriptions and
pull notifications work.

Figure 3. Pull notification overview

For information about creating pull notifications, see Pull notifications about mailbox events by using
EWS in Exchange.

EWS push notifications


Push notifications rely on the server pushing notifications back to the client. There's only traffic if
there's a notification. Figure 4 shows how push subscriptions and push notifications work.
Figure 4. Push notification overview

If you are using push notifications with Exchange 2010 , consider upgrading your application to use
streaming notifications , so that you don't need a separate application to receive the events.

How do I subscribe to notifications?


Depending on the type of subscription you'd like to create, you have a number of options to choose
from for subscribing to notifications.

Table 2. Operations and methods for subscribing to notifications

Subscription EWS EWS Managed API methods What it


type operation does

Streaming Subscribe ExchangeService.BeginSubscribeToStreamingNotifications method


Creates a
operation ExchangeService.BeginSubscribeToStreamingNotificationsOnAllFolders request to
method
subscribe to
ExchangeService.SubscribeToStreamingNotificationsOnAllFolders streaming
method
notifications.

Pull Subscribe ExchangeService.BeginSubscribeToPullNotifications method Creates a


operation ExchangeService.BeginSubscribeToPullNotificationsOnAllFolders request to
method
subscribe to
ExchangeService.SubscribeToPullNotifications method
pull
ExchangeService.SubscribeToPullNotificationsOnAllFolders method
notifications.

Push Subscribe ExchangeService.BeginSubscribeToPushNotifications overloaded Creates a


operation method
request to
ExchangeService.BeginSubscribeToPushNotificationsOnAllFolders subscribe to
overload method
push
ExchangeService.SubscribeToPushNotifications overloaded method
notifications.
ExchangeService.SubscribeToPushNotificationsOnAllFolders
overloaded method

How do I get EWS events?


After the subscription is created, the way in which the actual events are sent to the client depends on
the subscription type.

For streaming notifications, a streaming subscription connection must be created, and then the
subscription is added to the connection. You can read more about this process in Stream notifications
about mailbox events by using EWS in Exchange.

For pull notifications, the subscription object was initialized when the subscription was created, so you
just have to call the GetEvent method or operation to retrieve the events from the server. You can
read more about this in Pull notifications about mailbox events by using EWS in Exchange.

The following table lists the operations and classes required to retrieve events.

Table 3. Elements and classes for creating a connection and getting events

Subscription EWS operation EWS Managed API method What it does


type

Streaming GetStreamingEvents StreamingSubscriptionConnection.AddSubscription Creates a hanging


operation
method
get request on the
server, which is
responded to when
events occur.

Pull GetEvents PullSubscription.GetEvents method


Gets pull notification
operation
events from the
server.

Push Not applicable. Not applicable. Push notifications are


automatically sent to
the web service
listener (the callback
URL specified in the
subscription request).
No additional
methods or
operations need to
be called.

How do I unsubscribe to notifications?


The following table lists the ways in which you can unsubscribe to each type of subscription.

Table 4. Operations and methods for unsubscribing to notifications

Subscription EWS EWS Managed API


type

Streaming Unsubscribe operation


StreamingSubscription.BeginUnsubscribe
method

StreamingSubscription.EndUnsubscribe
method

StreamingSubscription.Unsubscribe
method

Subscription EWS EWS Managed API


type

Pull Unsubscribe operation


PullSubscription.BeginUnsubscribe
method

PullSubscription.EndUnsubscribe
method

PullSubscription.Unsubscribe method

Push Return Unsubscribe in the StatusFrequency element Not applicable. Let the subscription time
of the SendNotificationResponseMessage
out instead.

Alternatively, you can let each of the subscriptions time out.

Table 5. Subscription time-outs

Subscription Timeout value in Timeout value in the EWS Timeout handling


type EWS Managed API

Streaming ConnectionTimeout lifetime parameter of the For the EWS Managed API, after the
element StreamingSubscriptionConnection timeout value elapses, the
constructor OnDisconnect event is raised. If the
StreamingSubscriptionConnection.Open
method is not called, the connection is
closed.
For EWS, after the timeout value elapses,
the GetUserConfigurationResponse
message returns a ConnectionStatus
value of Closed.

Pull Timeout element timeout parameter of the After the timeout value elapses, the server
SubscribeToPullNotification deletes the subscription.
method

Push StatusFrequency frequency parameter of the If the server does not receive a response
element SubscribeToPushNotification to a push notification or status ping, it
method retries sending the notification several
times before it stops sending the
notifications. For more information, see
StatusFrequency .

Can I limit subscriptions?


In an on-premises deployment, you can limit the number of subscriptions per user with the
EwsMaxSubscriptions throttling parameter of the throttling policy. That policy can be applied to all
users or just specific users. The EwsMaxSubscriptions throttling policy is not configurable for
Exchange Online.

In this section
Stream notifications about mailbox events by using EWS in Exchange
Pull notifications about mailbox events by using EWS in Exchange
Maintain affinity between a group of subscriptions and the Mailbox server in Exchange
Handling notification-related errors in EWS in Exchange

See also
Develop web service clients for Exchange
Web services reference for Exchange
Start using web services in Exchange
Mailbox synchronization and EWS in Exchange
Push Notification Sample Application
Stream notifications about mailbox
events by using EWS in Exchange
Article • 01/15/2020 • 3 minutes to read

Find out how to use the EWS Managed API or EWS to subscribe to streaming
notifications and get events.

EWS in Exchange uses streaming notifications to receive notifications that are sent by
the server through a connection that remains open for a specified period of time.

If you're subscribing to streaming notifications by using the EWS Managed API, you
subscribe and get streaming notifications by using the
SubscribeToStreamingNotifications method. You then create a connection to the
subscription by using the StreamingSubscriptionConnection object.

To subscribe to streaming notifications by using EWS, you create a subscription by using


the Subscribe operation , parse the response, and then get the streaming notifications
by using the GetStreamingEvents operation request.

After the client receives notifications of items changed or created on the server, the next
step is to synchronize the changes.

Subscribe to and get streaming notifications by


using the EWS Managed API
The following code example shows how to use the SubscribeToStreamingNotifications
method to subscribe to streaming notifications for all events in the Inbox folder. It then
creates a connection for the subscription by creating a
StreamingSubscriptionConnection object. In this example, we assume that service is a
valid ExchangeService binding.

C#

// Subscribe to streaming notifications in the Inbox.

StreamingSubscription = service.SubscribeToStreamingNotifications(

new FolderId[] { WellKnownFolderName.Inbox },

EventType.NewMail,

EventType.Created,

EventType.Deleted,

EventType.Modified,

EventType.Moved,

EventType.Copied,

EventType.FreeBusyChanged);

// Create a streaming connection to the service object, over which events


are returned to the client.

// Keep the streaming connection open for 30 minutes.

StreamingSubscriptionConnection connection = new


StreamingSubscriptionConnection(service, 30);

connection.AddSubscription(StreamingSubscription);

connection.OnNotificationEvent += OnNotificationEvent;

connection.OnDisconnect += OnDisconnect;

connection.Open();

After you have received events from the server, the next step is to synchronize those
changes with the server. Use one of the unsubscribe methods listed in Table 4 to end
the subscription with the server when the subscription is no longer needed.

Subscribe to streaming notifications by using


EWS
The following example shows an XML request that is sent by the client to the server
when the client calls the Subscribe operation to subscribe to all EventTypes in the
Inbox folder. This is also the XML request that the EWS Managed API sends when you
use the SubscribeToStreamingNotifications method to subscribe to streaming
notifications.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:Subscribe>

<m:StreamingSubscriptionRequest>

<t:FolderIds>

<t:DistinguishedFolderId Id="inbox" />

</t:FolderIds>

<t:EventTypes>

<t:EventType>NewMailEvent</t:EventType>

<t:EventType>CreatedEvent</t:EventType>

<t:EventType>DeletedEvent</t:EventType>

<t:EventType>ModifiedEvent</t:EventType>

<t:EventType>MovedEvent</t:EventType>

<t:EventType>CopiedEvent</t:EventType>

<t:EventType>FreeBusyChangedEvent</t:EventType>

</t:EventTypes>

</m:StreamingSubscriptionRequest>

</m:Subscribe>

</soap:Body>

</soap:Envelope>

The following XML example shows the SubscribeResponse message that is sent from
the server to the client in response to the Subscribe operation request. The inclusion
of the NoError value for the ResponseCode element means that the subscription was
created successfully. The SubscriptionId element uniquely identifies the streaming
notification subscription on the server.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="785"

MinorBuildNumber="6"

Version="V2_6"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:SubscribeResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:SubscribeResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:SubscriptionId>JgBibjFwcjAzbWIyMDIubmFtcHJkMDMucHJvZC5vdXRsb29rLmNvbRAAAA
DwXxVesOnHS5BxUHKwAW88SHjwd1iB0Ag=</m:SubscriptionId>

</m:SubscribeResponseMessage>

</m:ResponseMessages>

</m:SubscribeResponse>

</s:Body>

</s:Envelope>

After creating the subscription, you can now get the streamed events by using the
SubscriptionId returned in the SubscribeResponse message.

Get streaming events by using EWS


The following XML example shows the GetStreamingEvents operation request
message that the client sends to the server to get notifications for the SubscriptionId
returned in the SubscribeResponse message. The GetStreamingEvents operation
request indicates that the length of the connection is 30 minutes long.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:GetStreamingEvents>

<m:SubscriptionIds>

<t:SubscriptionId>JgBibjFwcjAzbWIyMDIubmFtcHJkMDMucHJvZC5vdXRsb29rLmNvbRAAAA
DwXxVesOnHS5BxUHKwAW88SHjwd1iB0Ag=</t:SubscriptionId>

</m:SubscriptionIds>

<m:ConnectionTimeout>30</m:ConnectionTimeout>

</m:GetStreamingEvents>

</soap:Body>

</soap:Envelope>

The following XML example shows the GetStreamingEventsResponse message that is


sent from the server to the client in response to the GetStreamingEvents operation
request. It contains a CreatedEvent and a NewMailEvent for the item, and a
ModifiedEvent for the folder, all of which occur when a new message is received.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="785"

MinorBuildNumber="6"

Version="V2_6"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<soap:Body xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<m:GetStreamingEventsResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetStreamingEventsResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Notifications>

<m:Notification>

<t:SubscriptionId>JgBibjFwcjAzbWIyMDIubmFtcHJkMDMucHJvZC5vdXRsb29rLmNvbRAAAA
DwXxVesOnHS5BxUHKwAW88SHjwd1iB0Ag=</t:SubscriptionId>

<t:CreatedEvent>

<t:TimeStamp>2013-09-16T04:31:29Z</t:TimeStamp>

<t:ItemId
Id="AAMkADkzNjJjODUzLWZhMDMtNDVkMS05ZDdjLWVmMDlkYjQ1Zjc4MwBGAAAAAABSSWVKrmGU
TJE+MVIvofglBwDZGACZQpSgSpyNkexYe2b7AAAAAAENAADZGACZQpSgSpyNkexYe2b7AAANGFYw
AAA=" ChangeKey="CQAAAA==" />

<t:ParentFolderId
Id="AQMkADkzNjJjODUzLWZhMDMtNDVkMS05ZDdjLWVmMDlkYjQ1Zjc4MwAuAAADUkllSq5hlEyR
PjFSL6H4JQEA2RgAmUKUoEqcjZHsWHtm+wAAAgENAAAA" ChangeKey="AQAAAA==" />

</t:CreatedEvent>

<t:NewMailEvent>

<t:TimeStamp>2013-09-16T04:31:29Z</t:TimeStamp>

<t:ItemId
Id="AAMkADkzNjJjODUzLWZhMDMtNDVkMS05ZDdjLWVmMDlkYjQ1Zjc4MwBGAAAAAABSSWVKrmGU
TJE+MVIvofglBwDZGACZQpSgSpyNkexYe2b7AAAAAAENAADZGACZQpSgSpyNkexYe2b7AAANGFYw
AAA=" ChangeKey="CQAAAA==" />

<t:ParentFolderId
Id="AQMkADkzNjJjODUzLWZhMDMtNDVkMS05ZDdjLWVmMDlkYjQ1Zjc4MwAuAAADUkllSq5hlEyR
PjFSL6H4JQEA2RgAmUKUoEqcjZHsWHtm+wAAAgENAAAA" ChangeKey="AQAAAA==" />

</t:NewMailEvent>

<t:ModifiedEvent>

<t:TimeStamp>2013-09-16T04:31:29Z</t:TimeStamp>

<t:FolderId
Id="AQMkADkzNjJjODUzLWZhMDMtNDVkMS05ZDdjLWVmMDlkYjQ1Zjc4MwAuAAADUkllSq5hlEyR
PjFSL6H4JQEA2RgAmUKUoEqcjZHsWHtm+wAAAgENAAAA" ChangeKey="AQAAAA==" />

<t:ParentFolderId
Id="AQMkADkzNjJjODUzLWZhMDMtNDVkMS05ZDdjLWVmMDlkYjQ1Zjc4MwAuAAADUkllSq5hlEyR
PjFSL6H4JQEA2RgAmUKUoEqcjZHsWHtm+wAAAgEJAAAA" ChangeKey="AQAAAA==" />

<t:UnreadCount>1</t:UnreadCount>

</t:ModifiedEvent>

</m:Notification>

</m:Notifications>

</m:GetStreamingEventsResponseMessage>

</m:ResponseMessages>

</m:GetStreamingEventsResponse>

</soap:Body>

After you have received events from the server, the next step is to synchronize those
changes with the server. Use the Unsubscribe operation to end the subscription with
the server when the subscription is no longer needed.

Next steps
After you've received notifications, you can sync the folder hierarchy or sync the
contents of the folder that changed.

See also
Notification subscriptions, mailbox events, and EWS in Exchange

Pull notifications about mailbox events by using EWS in Exchange

Maintain affinity between a group of subscriptions and the Mailbox server in


Exchange

Handling notification-related errors in EWS in Exchange

Mailbox synchronization and EWS in Exchange


Pull notifications about mailbox events
by using EWS in Exchange
Article • 09/15/2021 • 3 minutes to read

Find out how to use the EWS Managed API or EWS to subscribe to pull notifications and
get events.

EWS in Exchange uses pull notifications to enable clients to request (or pull)
notifications about changes to the mailbox from the server to the client.

If you're subscribing to pull notifications by using the EWS Managed API, you subscribe
to and get pull notifications by using the SubscribeToPullNotifications method. You
then get events from the server by using the GetEvents method.

To subscribe to pull notifications by using EWS, you create a subscription by using the
Subscribe operation , parse the response, and then get the notifications by using the
GetEvents operation .

After the client receives notifications of items that are changed or created on the server,
it can then synchronize the changes.

Subscribe to and get pull notifications by using


the EWS Managed API
The following code example shows how to use the SubscribeToPullNotifications
method to subscribe to pull notifications for all events in the Inbox folder. The example
then uses the GetEvents method to retrieve events from the server. In this example,
we assume that service is a valid ExchangeService binding.

C#

// Subscribe to pull notifications in the Inbox.

PullSubscription subscription = service.SubscribeToPullNotifications(

new FolderId[] { WellKnownFolderName.Inbox }, 30, null,

EventType.NewMail, EventType.Created, EventType.Deleted,

EventType.Modified, EventType.Moved, EventType.Copied,


EventType.FreeBusyChanged);

// Call GetEvents to retrieve events from the server.

GetEventsResults events = subscription.GetEvents();

After you receive an event from the server, you can synchronize those changes with the
server. Use one of the unsubscribe methods specified in How do I unsubscribe to
notifications? to end the subscription with the server when the subscription is no longer
needed.

Subscribe to pull notifications by using EWS


The following example shows the XML request to send to the server to subscribe to all
EventTypes in the Inbox folder by using the Subscribe operation . This is also the
XML request that the EWS Managed API sends when subscribing to pull notifications by
using the SubscribeToPullNotifications method.

XML

<?xml version="1.0" encoding="utf-8"?>

<Subscribe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<PullSubscriptionRequest
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<FolderIds
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<DistinguishedFolderId Id="inbox" />

</FolderIds>

<EventTypes
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<EventType>NewMailEvent</EventType>

<EventType>CreatedEvent</EventType>

<EventType>DeletedEvent</EventType>

<EventType>ModifiedEvent</EventType>

<EventType>MovedEvent</EventType>

<EventType>CopiedEvent</EventType>
<EventType>FreeBusyChangedEvent</EventType>

</EventTypes>

<Timeout
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">30</Timeo
ut>

</PullSubscriptionRequest>

</Subscribe>

The following XML example shows the SubscribeResponse message that is sent from
the server to the client in response to the Subscribe operation request. The inclusion of
the NoError value for the ResponseCode element means that the subscription was
created successfully. The SubscriptionId element uniquely identifies the pull
notification subscription on the server. The Watermark element represents a
bookmark in the mailbox event queue.

XML
<?xml version="1.0" encoding="utf-8"?>

<SubscribeResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<ResponseMessages
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<SubscribeResponseMessage ResponseClass="Success">

<ResponseCode>NoError</ResponseCode>

<SubscriptionId>d581ab79-a2ec-4653-9c8e-564d7cfc1d8c</SubscriptionId>

<Watermark>AAAAAGUhAAAAAAAAAQ==</Watermark>

</SubscribeResponseMessage>

</ResponseMessages>

</SubscribeResponse>

After creating the subscription, you can now get events by using the SubscriptionId that
is returned in the SubscribeResponse message.

Get pull notifications by using EWS


The following XML example shows the GetEvents operation request message that is
sent from the client to the server to get notifications for the SubscriptionId that is
returned in the SubscribeResponse message. For the first GetEvents request, use the
Watermark returned in the Subscribe response. For subsequent GetEvents requests,
use the last Watermark that was returned in the previous GetEvents request.

XML

<?xml version="1.0" encoding="utf-8"?>

<GetEvents xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<SubscriptionId
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">d581ab
79-a2ec-4653-9c8e-564d7cfc1d8c</SubscriptionId>

<Watermark
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">AAAAAG
UhAAAAAAAAAQ==</Watermark>

</GetEvents>

The following XML example shows the GetEvents response message that is sent from
the server to the client. Each GetEvents response includes information about one or
more events. A Watermark is returned for each event. The last Watermark must be
saved and used in the next GetEvents request. If no store events have occurred since the
last GetEvents request, a status event is returned.

XML
<?xml version="1.0" encoding="utf-8"?>

<GetEventsResponseType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<ResponseMessages
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<GetEventsResponseMessage ResponseClass="Success">

<ResponseCode>NoError</ResponseCode>

<Notification>

<SubscriptionId
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">d581ab79-
a2ec-4653-9c8e-564d7cfc1d8c</SubscriptionId>

<PreviousWatermark
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">AAAAAGUhA
AAAAAAAAQ==</PreviousWatermark>

<MoreEvents
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">false</Mo
reEvents>

<NewMailEvent
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Watermark>AAAAAHMhAAAAAAAAAQ==</Watermark>

<TimeStamp>2013-09-15T21:37:01Z</TimeStamp>

<ItemId Id="AAAtA=" ChangeKey="CQAAAA==" />

<ParentFolderId Id="AQAtAEFkbWA==" ChangeKey="AQAAAA==" />

</NewMailEvent>

</Notification>

</GetEventsResponseMessage>

</ResponseMessages>

</GetEventsResponse>

After you receive an event from the server, synchronize the changes to the client. Use
the Unsubscribe operation to end the subscription with the server when the
subscription is no longer needed.

Next steps
After you're received notifications, you can sync the folder hierarchy or sync the
contents of the folder that changed.

See also
Notification subscriptions, mailbox events, and EWS in Exchange

Stream notifications about mailbox events by using EWS in Exchange

Maintain affinity between a group of subscriptions and the Mailbox server in


Exchange
Handling notification-related errors in EWS in Exchange

Mailbox synchronization and EWS in Exchange


Maintain affinity between a group of
subscriptions and the Mailbox server in
Exchange
Article • 01/15/2020 • 11 minutes to read

Find out about maintaining the affinity between a group of subscriptions and the
Mailbox server.

Affinity is the association of a sequence of request and response messages with a


particular Mailbox server. For most functionality in Exchange, affinity is handled by the
server. Notifications, however, are an exception. The client is responsible for maintaining
the affinity with the Mailbox server for notification subscriptions. This affinity enables
the load balancer and Client Access servers between the client and the server to route
notification subscriptions and related requests to the Mailbox server that maintains the
subscription. Without affinity, the request might get routed to a different Mailbox server
that does not include the client's subscriptions, which can cause an
ErrorSubscriptionNotFound error to be returned.

How is affinity maintained?


Affinity in Exchange is cookie based. The client triggers the creation of the cookie by
including specific headers in the subscription request, and then the subscription
response contains the cookie. The client then sends that cookie in subsequent requests
to ensure that the request is routed to the right Mailbox server.

More specifically, affinity in Exchange is handled by the following:

X-AnchorMailbox — An HTTP header that is included in the initial subscription


request. It identifies the first mailbox in a group of mailboxes that share affinity
with the same Mailbox server.

X-PreferServerAffinity — An HTTP header that is included in the initial subscription


request with the X-AnchorMailbox header and is set to true to indicate that the
client is requesting that affinity be maintained with the Mailbox server.

X-BackEndOverrideCookie — A cookie that is included in the initial subscription


response and contains a cookie that the load balancer and Client Access server use
to route subsequent requests to the same Mailbox server.
How do I maintain affinity by using the EWS
Managed API or EWS?
You can use the same steps to maintain affinity for multiple mailbox subscriptions and
their Mailbox servers, regardless of whether you are using streaming, pull, or push
notifications, and regardless of whether you're targeting an Exchange on-premises
server or Exchange Online.

1. For each mailbox, call Autodiscover and get the GroupingInformation and
ExternalEwsUrl user settings. For SOAP Autodiscover, you use the Setting
element, and for POX Autodiscover, you use the GroupingInformation element.

2. Using the GroupingInformation and ExternalEwsUrl settings from the Autodiscover


responses, place mailboxes with the same ExternalEwsUrl and GroupingInformation
concatenated value in the same group. If any groups have more than 200
mailboxes, break the groups down further so that each group has no more than
200 mailboxes.

3. Create and use one ExchangeService object for the rest of the procedure. When
you use the same ExchangeService object, cookies and headers (when they are
set) are automatically maintained. Note that if you do not intend to group
streaming subscriptions into a single connection, you are free to create a different
ExchangeService object for each impersonated user.

4. Send a subscription request for the user whose user name appears first when all
users in the group are sorted alphabetically (we'll refer to this user as the anchor
mailbox user). Do the following:

Include the X-AnchorMailbox header with a value set to the SMTP address of the
anchor mailbox user.

Include the X-PreferServerAffinity header with a value set to true.

Use the ApplicationImpersonation role (the ExchangeImpersonation type).

5. In the subscription response, get the X-BackEndOverrideCookie value. Include this


value in each of the subsequent subscription requests for users in this group.

6. For each additional user in the group, send a subscription request and do the
following:

Include the X-AnchorMailbox header with a value set to the SMTP address of the
anchor mailbox user for the group.
Include the X-PreferServerAffinity header with a value set to true.

Include the X-BackEndOverrideCookie that was returned in the anchor mailbox


user's subscription response.

Use the ApplicationImpersonation role (the ExchangeImpersonation type).

Note that the server uses the X-PreferServerAffinity and X-BackendOverrideCookie


values together to perform the routing to the mailbox server. The X-
AnchorMailbox header is also required, but is ignored by the server if the other
two values are valid. If X-AnchorMailbox and X-PreferServerAffinity are in a request
and X-BackendOverrideCookie is not included, the X-AnchorMailbox value is used
to route the requests.

Because the X-PreferServerAffinity and X-BackendOverrideCookie values perform


the routing, if the anchor mailbox ever moves to another group or server, the logic
does not change because the X-BackendOverrideCookie will route the request to
the correct server for the group.

7. Send a single GetStreamingEvents or GetEvents requests for the group, and


do the following:

Include the SubscriptionId values returned in each of the individual subscription


responses for mailboxes in the group.

If more than 200 subscriptions exist for the group, create multiple requests. The
maximum number of SubscriptionId values to include in a request is 200.

If you need more connections than are available to the target mailbox, use the
service account to impersonate the anchor mailbox for the group; otherwise, do
not use impersonation. Ideally, you want to impersonate a unique mailbox per
GetStreamingEvents or GetEvents request so that you never encounter
throttling limits.

Use ApplicationImpersonation if you need more connections than are available to


the target mailbox; otherwise, do not use ApplicationImpersonation.

Include the X-PreferServerAffinity header and set it to true. This value is


automatically included if you are using the ExchangeService object that you
created in step 2.

Include the X-BackEndOverrideCookie for the group (the X-


BackEndOverrideCookie that was returned in the anchor mailbox user's
subscription response). This value is automatically included if you are using the
ExchangeService object that you created in step 2.
8. Pass the returned events to a separate thread for processing.

What throttling values do I need to take into


consideration?
As you plan your notification implementation, you'll want to take two values into
consideration: the number of connections, and the number of subscriptions. The
following table lists the default values for each throttling setting and how the settings
are used. For each value, the budget is allocated to the target mailbox. For this reason,
using impersonation to gain additional connections is a required step in many scenarios.

Table 1. Default throttling values

Area of Throttling setting Default Description


consideration value

Streaming Default hanging 10 for The maximum number of concurrent


connections connection limit Exchange streaming connections that an account can
Online have open on the server at one time. To
3 for work within this limit, use a service account
Exchange with the ApplicationImpersonation role
2013 assigned for the target mailboxes, and
impersonate the first user in each
subscription ID group when getting
streamed events.

Pull or push EWSMaxConcurrency 27 The maximum number of concurrent pull or


connections push connections (requests that have been
received but not yet responded to) that an
account can have open on the server at one
time.

Subscriptions EWSMaxSubscriptions 20 for The maximum number of nonexpired


Exchange subscriptions that an account can have at
Online one time. This value is decremented when
5000 for the subscription is created on the server.
Exchange
2013

The following example shows how budgets are handled between any target mailbox
and the service account that has the ApplicationImpersonation role assigned for the
target mailboxes.

ServiceAccount1 (sa1) impersonates many users (m1, m2, m3, and so on) and
creates subscriptions for each mailbox. Note that when the subscriptions are
created, the subscription owner is sa1, so when sa1 opens a connection with the
subscriptions, EWS enforces that the subscriptions are owned by sa1.

Sa1 can open the connection in the following ways:

1. Without impersonation, so the connection is charged against sa1.

2. By impersonating any of the users — m1 for example — so that the connection is


charged against a copy of m1's budget. (M1 itself can open ten connections by
using Exchange Online, and all service accounts impersonating m1 can open ten
connections by using the copied budget.)

If the connection limit is hit, the following workarounds are available:

If option 1 is used, the administrator can create multiple service accounts to


impersonate additional users.

If option 2 is used, the code can impersonate another user — m2 for example.

Example: Maintaining affinity between a group


of subscriptions and the Mailbox server
Okay, let's see it in action. The following code example shows you how to group users
and use the X-AnchorMailbox and X-PreferServerAffinity headers and the X-
BackendOverrideCookie cookie to maintain affinity with the Mailbox server. Because the
headers and the cookie are of primary importance in the affinity story, this example
focuses on the EWS XML requests and responses. To use the EWS Managed API to
create the body of the subscription requests and responses, see Stream notifications
about mailbox events by using EWS in Exchange and Pull notifications about mailbox
events by using EWS in Exchange. This section includes additional steps particular to
maintaining affinity and adding the headers to your requests.

This example has four users: [email protected], [email protected],


[email protected], and [email protected]. The following figure shows the
GroupingInformation and ExternalEwsUrl Autodiscover settings for the users.

Figure 1. Autodiscover settings used to group mailboxes


Using the settings from the Autodiscover responses, the mailboxes are grouped by the
concatenated value of the GroupingInformation and ExternalEwsUrl settings. In this
example, Alfred and Sadie have the same values, so they are in one group, and Alisa and
Ronnie share the same values, so they are in another group.

Figure 2. Creating mailbox groups

For the purpose of this example, we'll focus on Group A. We would use the same steps
for group B, but use a different X-AnchorMailbox value for that group.

Using ApplicationImpersonation , create the subscription request for the anchor


mailbox ([email protected]), with the X-AnchorMailbox header set to the their email
address and an X-PreferServerAffinity header value of true. Setting these two header
values will trigger the server to create an X-BackEndOverrideCookie for the response.

If you're using the EWS Managed API, use the HttpHeaders Add method to add the
two headers to your subscription request, as shown.

C#

service.HttpHeaders.Add("X-AnchorMailbox", Mailbox.SMTPAddress);

service.HttpHeaders.Add("X-PreferServerAffinity", "true");

So Alfred's subscription request looks like this.

XML

POST https://outlook.office365.com/EWS/Exchange.asmx HTTP/1.1

Content-Type: text/xml; charset=utf-8

Accept: text/xml

User-Agent: ExchangeServicesClient/15.00.0516.014

X-AnchorMailbox: [email protected]

X-PreferServerAffinity: true

Host: outlook.office365.com

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:ExchangeImpersonation>

<t:ConnectingSID>
<t:SmtpAddress>[email protected]</t:SmtpAddress>

</t:ConnectingSID>

</t:ExchangeImpersonation>

</soap:Header>

<soap:Body>

<m:Subscribe>

<m:StreamingSubscriptionRequest>

<t:FolderIds>

<t:DistinguishedFolderId Id="inbox" />

</t:FolderIds>

<t:EventTypes>

<t:EventType>NewMailEvent</t:EventType>

</t:EventTypes>

</m:StreamingSubscriptionRequest>

</m:Subscribe>

</soap:Body>

</soap:Envelope>

The following XML message is the response to Alfred's subscription request, and it
includes the X-BackEndOverrideCookie. Resend this cookie for all subsequent requests
for users in this group. Notice that the response also contains additional cookies, such
as the exchangecookie cookie used by Exchange 2010. Exchange Online, Exchange
Online as part of Office 365, and versions of Exchange starting with Exchange 2013,
ignore exchangecookie if it is included in subsequent subscription requests.

XML

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Set-Cookie: exchangecookie=ddb8c383aef34c7694132aa679744feb; expires=Thu,


25-Sep-2014 18:42:45 GMT; path=/;
HttpOnly

Set-Cookie: X-
BackEndOverrideCookie=CO1PR06MB222.namprd06.prod.outlook.com~1941996295;
path=/; secure; HttpOnly

Set-Cookie: [email protected]=Ox8XKzcXLxg==;

expires=Wed, 25-Sep-2013 18:52:49 GMT; path=/EWS; secure; HttpOnly

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="775"

MinorBuildNumber="7"

Version="V2_4"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:SubscribeResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:SubscribeResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:SubscriptionId>JgBjbzFwcjA2bWIyMjIubmFtcHJkMDYucHJvZC5vdXRsb29rLmNvbRAAAA
AUeGk+7JFdSaFM8/NI/gQQpVdgZX6H0Ag=</m:SubscriptionId>

</m:SubscribeResponseMessage>

</m:ResponseMessages>

</m:SubscribeResponse>

</s:Body>

</s:Envelope>

Using the X-BackEndOverrideCookie from Alfred's response and the X-AnchorMailbox


header, the subscription request is created for Sadie, the other member of Group A.
Sadie's subscription request looks like this.

XML

POST https://outlook.office365.com/EWS/Exchange.asmx HTTP/1.1

Content-Type: text/xml; charset=utf-8

Accept: text/xml

User-Agent: ExchangeServicesClient/15.00.0516.014

X-AnchorMailbox: [email protected]

X-PreferServerAffinity: true

Host: outlook.office365.com

Cookie: X-
BackEndOverrideCookie=CO1PR06MB222.namprd06.prod.outlook.com~1941996295

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:ExchangeImpersonation>

<t:ConnectingSID>
<t:SmtpAddress>[email protected] </t:SmtpAddress>

</t:ConnectingSID>

</t:ExchangeImpersonation>

</soap:Header>

<soap:Body>

<m:Subscribe>

<m:StreamingSubscriptionRequest>

<t:FolderIds>

<t:DistinguishedFolderId Id="inbox" />

</t:FolderIds>

<t:EventTypes>

<t:EventType>NewMailEvent</t:EventType>

</t:EventTypes>

</m:StreamingSubscriptionRequest>

</m:Subscribe>

</soap:Body>

</soap:Envelope>

Sadie's subscription response looks like this. Note that it does not include the X-
BackEndOverrideCookie. The client is responsible for caching that value for future
requests.

XML

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Set-Cookie: exchangecookie=640ea858f69d47ff8cce8b44c337f6d9; path=/

Set-Cookie: [email protected]=Ox8XKzcXLxg==;

expires= Wed, 25-Sep-2013 18:53:06 GMT; path=/EWS; secure; HttpOnly

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="775"

MinorBuildNumber="7"

Version="V2_4"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:SubscribeResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:SubscribeResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:SubscriptionId>JgBjbzFwcjA2bWIyMjIubmFtcHJkMDYucHJvZC5vdXRsb29rLmNvbRAAAA
B4EQOy2pfrQJfM3hzs/nZJIZssan6H0Ag=</m:SubscriptionId>

</m:SubscribeResponseMessage>

</m:ResponseMessages>

</m:SubscribeResponse>

</s:Body>

</s:Envelope>

Using the SubscriptionId values from the subscription responses, a


GetStreamingEvents operation request was created for all the subscriptions in the
group. Because there are less than 200 subscriptions in this group, they are all sent in
one request. The X-PreferServerAffinity header is set to true and the X-
BackEndOverrideCookie is included.

XML

POST https://outlook.office365.com/EWS/Exchange.asmx HTTP/1.1

Content-Type: text/xml; charset=utf-8

Accept: text/xml

User-Agent: ExchangeServicesClient/15.00.0516.014

X-AnchorMailbox: [email protected]

X-PreferServerAffinity: true

Host: outlook.office365.com

Cookie: X-
BackEndOverrideCookie=CO1PR06MB222.namprd06.prod.outlook.com~1941996295

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:ExchangeImpersonation>

<t:ConnectingSID>
<t:SmtpAddress>[email protected]</t:SmtpAddress>
</t:ConnectingSID>

</t:ExchangeImpersonation>

</soap:Header>

<soap:Body>

<m:GetStreamingEvents>

<m:SubscriptionIds>

<t:SubscriptionId>JgBjbzFwcjA2bWIyMjIubmFtcHJkMDYucHJvZC5vdXRsb29rLmNvbRAAAA
B4EQOy2pfrQJfM3hzs/nZJIZssan6H0Ag=</t:SubscriptionId>

<t:SubscriptionId>JgBjbzFwcjA2bWIyMjIubmFtcHJkMDYucHJvZC5vdXRsb29rLmNvbRAAAA
AUeGk+7JFdSaFM8/NI/gQQpVdgZX6H0Ag=</t:SubscriptionId>

</m:SubscriptionIds>

<m:ConnectionTimeout>10</m:ConnectionTimeout>

</m:GetStreamingEvents>

</soap:Body>

</soap:Envelope>

The returned events are then passed to a separate thread for processing.
How has affinity changed?
In Exchange 2010, subscriptions are maintained on the Client Access server, as shown in
Figure 3. In versions of Exchange later than Exchange 2010, subscriptions are maintained
on the Mailbox server, as shown in Figure 4.

Figure 3. Process for maintaining affinity in Exchange 2010

Figure 4. Process for maintaining affinity in Exchange Online and Exchange 2013
In Exchange 2010, the client only knows the address of the load balancer, and the
exchangecookie that is returned by the server ensures that the request is routed to the
right Client Access server. However, in later versions, the load balancer and the Client
Access server roles both have to route the requests appropriately before they get to the
Mailbox server. To do that, additional information is required, which is why the new
headers and cookie were introduced. The article Notification subscriptions, mailbox
events, and EWS in Exchange explains how subscriptions are maintained in Exchange
2013.

You might notice that the exchangecookie that Exchange 2010 uses is still returned by
later versions. There's no harm in including this cookie in requests, but later versions of
Exchange ignore it.

See also
Notification subscriptions, mailbox events, and EWS in Exchange
Stream notifications about mailbox events by using EWS in Exchange
Pull notifications about mailbox events by using EWS in Exchange
Handling notification-related errors in EWS in Exchange
Changes in Managing Affinity for EWS Subscriptions…
EWS throttling in Exchange
Handling notification-related errors in
EWS in Exchange
Article • 09/15/2021 • 4 minutes to read

Find out how to handle notification-related errors in applications that you develop by
using the EWS Managed API or EWS in Exchange.

If your application subscribes to and gets notifications, you might have to handle
notification-related errors. You can handle these errors at runtime, or while you are
developing your EWS application.

Table 1. Notification-related errors and how to handle them

Error Occurs when you try to… Handle it by…

ErrorExceededConnectionCount Open a connection to get Using impersonation to


events when the account open connections.
reached its connection limit Using fewer connections
of open streaming to get events. Maximize
connections. the number of
subscriptions in each
connection by using
affinity and placing a
maximum of 200
subscription IDs in the
same group. You can then
use the same connection
to retrieve events for the
entire group, reducing the
number of connections
required.
Changing the value of the
HangingConnectionLimit
in the web.config file for
Exchange on-premises to
override the default value
of three open
connections. Exchange
Online has a default
HangingConnectionLimit
of 10, which is not
configurable.
Error Occurs when you try to… Handle it by…

ErrorExceededSubscriptionCount Create too many Using impersonation to


subscriptions. The create subscriptions.
EwsMaxSubscriptions Reducing the number of
throttling policy parameter subscriptions.
determines the maximum
number of subscriptions that
an account can create.

ErrorInvalidSubscriptionRequest Create subscriptions for Creating a subscription for a


multiple mailboxes or single public folder or a single
multiple folders from a single mailbox in a single request.
request.

ErrorInvalidWatermark Get events by using an invalid Checking the subscription


watermark. ID returned in a previous
response.
Ensuring that you're
sending the subscription
ID for the correct
ExchangeService object.
Creating a new
subscription.

ErrorMissedNotificationEvents Get events when some Comparing the extended folder


previous events were missed. properties
PR_LOCAL_COMMIT_TIME_MAX
(0x670a) and
PR_DELETED_COUNT_TOTAL
(0x670b) to determine what
changes were missed, and
creating a new subscription.

ErrorProxyRequestNotAllowed Subscribe to events for a user Using Autodiscover to


in a batched request whose rediscover the ExternalEwsUrl or
mailbox has moved to EwsPartnerUrl, and creating a
another site. new subscription.

ErrorReadEventsFailed Get events from a Using Autodiscover to


subscription that cannot be rediscover the ExternalEwsUrl or
found. EwsPartnerUrl, and creating a
new subscription.
Error Occurs when you try to… Handle it by…

ErrorServerBusy Exceed throttling limits. Be Considering the


aware of the following implications of the
regarding throttling: notification-related
throttling policies and
The limiting the number of
EwsMaxSubscriptions active subscriptions and
throttling limit active connections so that
identifies the maximum the application is not
number of push, pull, throttled.
or streaming Using fewer connections
notification to get events. Maximize
subscriptions that can the number of
be active at one time. subscriptions in each
This is the value of connection by placing a
mailbox subscriptions, maximum of 200
not the number of subscription IDs in the
individual folder same group. You can then
subscriptions in a use the same connection
mailbox subscription. to retrieve events for the
Starting with service entire group, reducing the
mailbox versions number of connections
14.16.0135 and required.
14.15.0057.000, a Changing the value of the
mailbox hosted by HangingConnectionLimit
Exchange Online or in the web.config file to
Exchange Online as override the default value
part of Office 365 can of ten open streaming
have up to 20 connections.
subscriptions, and a
target Exchange 2013
on-premises mailbox
can have up to 5000
subscriptions.
The
EwsMaxConcurrency
throttling limit
identifies the maximum
number of active
requests for non-
streaming connections
and has a default value
of 27.
The default limit for
open streaming
connections is ten.
Error Occurs when you try to… Handle it by…

ErrorSubscriptionNotFound Get events for a subscription Verifying that you're using


that cannot be found. The the same subscription ID
subscription might have that was returned in a
expired, the EWS process previous response.
might have been restarted, or Ensuring that you're
an invalid subscription was sending the subscription
passed in. ID for the correct
ExchangeService object.
Creating a new
subscription.

ServiceLocalException Add a subscription to a new Changing your subscription to


folder while a subscription subscribe to all folders in the
connection is open on mailbox, instead of a specific
another folder. folder.

ServiceResponseException Get events for a subscription Verifying that you're using


that cannot be located in the the same subscription ID
Exchange store. that was returned in a
previous response.
Ensuring that you're
sending the subscription
ID for the correct
ExchangeService object.

Recovering from lost subscriptions


When a subscription is lost, or is no longer accessible, it is best to create a new
subscription and not include the old watermark in the new subscription. Resubscribing
with the old watermark causes a linear scan for events, which is costly. Instead, create a
new subscription and compare folder properties to look for content changes that
occurred between the lost subscription and the new subscription. The extended folder
properties that we recommend that you check are PR_LOCAL_COMMIT_TIME_MAX
(0x670a0040) and PR_DELETED_COUNT_TOTAL (0x670b0003). You can do this by
creating an extended property definition.

See also
Notification subscriptions, mailbox events, and EWS in Exchange
Stream notifications about mailbox events by using EWS in Exchange
Pull notifications about mailbox events by using EWS in Exchange
Maintain affinity between a group of subscriptions and the Mailbox server in
Exchange
Mailbox synchronization and EWS in
Exchange
Article • 02/11/2022 • 10 minutes to read

Find out how mailbox synchronization works when you use EWS to access Exchange.

EWS in Exchange uses two types of synchronization to retrieve mailbox content and
changes to mailbox content:

Folder synchronization
Item synchronization

In this article, you'll learn about both types of synchronization, how synchronization
works, synchronization design patterns, and synchronization best practices.

Folder and item synchronization


Folder synchronization syncs a folder structure, or folder hierarchy. Item synchronization
syncs the items within a folder. When you synchronize items, you have to sync each
folder in the mailbox independently. You can use EWS or the EWS Managed API in your
application to implement both folder and item synchronization.

Table 1. EWS operations and EWS Managed API methods for syncing folders and
items

EWS operation EWS Managed API method

SyncFolderHierarchy ExchangeService.SyncFolderHierarchy method

SyncFolderItems ExchangeService.SyncFolderItems method

The scope of the synchronization that occurs differs depending on whether it is an initial
or an ongoing sync, as follows:

An initial synchronization syncs all folders or items on the server to the client. After
the initial synchronization, the client has a sync state that it stores for future
synchronizations. The sync state represents all the changes on the server that the
server communicated to the client.
Ongoing synchronizations sync any items or folders that have been added,
deleted, or changed since the previous synchronization. The server uses the sync
state to calculate the changes to report to the client during each of the ongoing
synchronization loops.
Each synchronization method or operation returns a list of changes, not the actual folder
or message that changed. Changes to items and folders are reported by means of the
following change types:

Create — Indicates that a new item or folder should be created on the client.
Update — Indicates that an item or folder should be changed on the client.
Delete — Indicates that an item or folder should be deleted on the client.
ReadStateChange for EWS or ReadFlagChange for the EWS Managed API —
Indicates that that the read state of the item has changed, either from unread to
read, or read to unread.

In Exchange Online, Exchange Online as part of Office 365, and versions of Exchange
starting with Exchange 2010 SP2, items and folders are returned in order from newest to
oldest. In previous versions of Exchange, items and folders are returned from oldest to
newest.

How does EWS synchronization work?


In a nutshell, if you're synchronizing a mailbox for the first time, use the process as
shown in Figure 1. Although you can use other synchronization design patterns, we
recommend this approach for scalable applications.

Figure 1. Initial synchronization design pattern


If you're using an existing sync state on the client to synchronize a mailbox, we
recommend that you implement the design pattern as shown in Figure 2.

Figure 2. Ongoing synchronization design pattern


Synchronization design patterns
You can use one of two synchronization design patterns in your application to keep your
mailboxes up to date: notification-based synchronization, or the synchronization-only
approach.

Notification-based synchronization, as illustrated in Figure 2, relies on notifications to


alert the client to make a call to the EWS Managed API SyncFolderItems or
SyncFolderHierarchy methods, or the EWS SyncFolderHierarchy or
SyncFolderItems operations. This type of synchronization is generally recommended
for scalable applications, but it might not be the best approach for everyone.
Notification-based synchronization has the following advantage:

Notifications are optimized to reduce calls to the backend Exchange database. Event
queues and subscriptions are managed by the mailbox server (or the Client Access
server in Exchange 2010 and Exchange 2007); however, the management of the events
and subscriptions uses fewer resources than the alternative, which is more frequent
synchronization calls to the Exchange database. In addition, Exchange has specific
throttling policies for notifications and subscriptions, to safeguard consumption of
resources.

However, there are also some drawbacks to using notification-based synchronization:

Notifications are noisy because most scenarios involve multiple notifications for
one user intent. This is especially true of the Calendar folder. For example, when a
single meeting request is received, multiple item and folder notifications are
created, including a notification to create the item and another to modify the item.
One way to mitigate this drawback is to build a delay of a few seconds into your
Load , LoadPropertiesForItems , GetItem , or GetFolder call. In the case of a
meeting request, if you made calls to the GetItem operation immediately, you
might have one call to create the item and another to modify the item. Instead, by
delaying the call, you can call the GetItem operation once and get the changes
that encompass the creation and the modification of the item at the same time.
Notifications are queued on the mailbox server and subscriptions are saved on the
mailbox server. If the mailbox server that manages the subscription is unavailable,
you lose any new notifications, your mailbox won't synchronize, and you'll have to
resubscribe to the notifications.
You'll need to plan for mitigation strategies in the event that notifications fail. In
this way, the second approach, the synchronization-only design pattern, is more
resilient than notification-based synchronization, because it only requires that the
client maintain the sync state — there are no issues with affinity to the mailbox
server managing the subscription.

If implemented as recommended, the notification-based subscription design pattern


relies on:

Notifications to determine when the data changed.


The EWS Managed API SyncFolderHierarchy or SyncFolderItems methods, or the
EWS SyncFolderHierarchy or SyncFolderItems operations to determine what
changed, optimizing the number of sync events returned. Was a new item created,
updated, or deleted? That's all you need to know from these methods, don't rely
on them for the property list of changes. (Don't do a GetItem or
LoadPropertiesForItems call on all items or folders returned).
Using the Load or LoadPropertiesForItems methods in the EWS Managed API, or
the EWS GetItem operation to determine how the data changed and to retrieve
properties from the server as needed, organizing batched requests based on the
amount of data that will be returned. This is followed by a comparison of the
properties on the client and those just returned from the server, and ultimately the
creation, deletion, or modification of the item or folder on the client.

The synchronization-only approach relies entirely on the SyncFolderItems and


SyncFolderHierarchy EWS Managed API methods, or the SyncFolderHierarchy or
SyncFolderItems EWS operations, which you can either call continuously, or as a timed
event. There are pros and cons to this option as well. The synchronization-only approach
is more resilient because the sync state is stored on the client at the mailbox level and a
unique relationship between the sync state and any the mailbox server that maintains
the notification subscription is not required. The synchronization approach can survive a
mailbox failover because of its independence from the mailbox server. However, the
synchronization approach increases latency for the user because items are synchronized
on a timed or intermittent basis — not in real time when items arrive. This approach is
also more costly, because you're making calls to the Exchange database when it's
possible that no changes have occurred.

Synchronization best practices


For highly scalable applications, we recommend that you apply the following best
practices to synchronize mailboxes in your application:

When calling the EWS Managed API SyncFolderItems or SyncFolderHierarchy


method use the IdOnly value for the propertySet parameter, or when using the
EWS SyncFolderHierarchy or SyncFolderItems operations use the IdOnly value for
the BaseShape value to reduce calls to the Exchange database. The more
properties you request in the property set of the SyncFolderItems or
SyncFolderHierarchy call, the more backend calls are created. A new RPC call is
made for every property value requested, whereas only one RPC call is made to
retrieve all the ItemIds for a request - no matter the number of results to report.
So an IdOnly request results in one database call, whereas a property bag request
for the subject and sender results in three database calls: one for the Subject, one
for the Sender, and one for the ItemId.

Don't call the EWS Managed API Load or LoadPropertiesForItems methods, or the
EWS GetItem or GetFolder operations, on every item in a synchronization
response. Instead, parse the results; look for changes that don't require all the
properties to be retrieved, like read state changes. If a response includes a read
state change, just update the flag on the client and you're done; no need to get all
the item properties. And make sure that you don't duplicate effort by making
changes that originated from the same client. For example, if the synchronization
response includes the deletion of an item, and the deletion happened on the local
client, you don't need to delete the message again or get all the properties for that
item.

Avoid getting throttled, by doing the following:


When you do call the EWS Managed API LoadPropertiesForItems method or
the EWS GetItem operation to get the items in a batch, do not batch too many
items in your request; otherwise, you might get throttled. We recommend that
you include 10 items per batch.
Don't make too many requests in too short a time. This will also cause
throttling, and increase the response time, rather than shorten it.
If you are batching items, batch all items with the same values for the Id and
ChangeKey attributes of the FolderId element.
If you do get throttled, stop sending requests. Resending requests will prolong
the recovery effort. Instead, wait for the back off time to expire, and then try
sending your sync requests again.

Depending on the type of notification event received:


For NewMail or Modified events, call the EWS Managed API SyncFolderItems
method or the EWS SyncFolderItems operation because notifications do not
provide a ChangeKey, and notifications do not call out read state changes.
For Deleted events, if the notification subscription was active before the
previous sync, just delete the event locally. You do not need to call the EWS
Managed API SyncFolderItems method or the EWS SyncFolderItems operation
immediately after the deletion.
If a Modified event was caused by a read state change, do not call the EWS
Managed API LoadPropertiesForItems method or the EWS GetItem operation ,
just change the flag on the item.

When synchronizing calendar data, proceed as follows:

Use an approach similar to notification-based synchronization. Because


SyncFolderItem does not include any calendaring logic, use the EWS Managed
API FindAppointments method, or the EWS FindItem operation with the
CalendarView element to view appointments between two dates, and then
call the EWS Managed API LoadPropertiesForItems method, or the EWS
GetItem operation to retrieve the item properties for the calendar item.

Do not poll using the EWS Managed API FindAppointments method, or the
EWS FindItem operation with a CalendarView element.

When synchronizing search folders:

Use an approach similar to notification-based synchronization.


Use notifications to determine when data changes.

Because you can't use SyncFolderItem in a search folder, use a sorted and
paged EWS Managed API FindItems method, or EWS FindItem operation with
the FractionalPageItemView and SortOrder element set, to determine what
changed.

Use the EWS Managed API LoadPropertiesForItems method or the EWS


GetItem operation to retrieve data.

Filtered synchronization
The EWS Managed API SyncFolderItems method and the EWS SyncFolderItems
operation enable you to ignore specific items, based on their ItemIds, by setting the
ignoreItemIds parameter in the EWS Managed API or the Ignore element in EWS. This
is ideal when, for example, individuals begin to reply all to an email message sent to
everyone in the company.

You might wonder, can I filter my notifications (and therefore only trigger
synchronization) if specific properties change? Although that does seem reasonable,
because notification subscriptions are based on the type of change (create, update,
delete), and not the property being updated, you cannot filter notifications in this way.
Instead, you can do the following:

Use the notification-based subscription design pattern.


Call the EWS Managed API SyncFolderItems and SyncFolderHierarchy methods
repeatedly with the propertySet parameter set to IdOnly to make your sync state
current. Or if using EWS, call the SyncFolderHierarchy and SyncFolderItems
operations repeatedly with the BaseShape value set to IdOnly.
Discard the response (don't parse it or do any property comparisons).
Use the EWS Managed API FindItems method or the EWS FindItem operation and
sort and page to prepopulate the items in the filtered scope that you care about.
Use your synchronization state to continue to call the EWS Managed API
SyncFolderItems method or the EWS SyncFolderItems operation, but only monitor
the changes in the filtered item set. If new items are created, you'll have to see if
those new items are within your filtered scope.

In this section
Synchronize folders by using EWS in Exchange
Synchronize items by using EWS in Exchange
Handling synchronization-related errors in EWS in Exchange

See also
Develop web service clients for Exchange
SyncFolderItems method
SyncFolderHierarchy method
SyncFolderHierarchy operation
SyncFolderItems operation
Synchronize folders by using EWS in
Exchange
Article • 02/11/2022 • 6 minutes to read

Find out how to use the EWS Managed API or EWS to get a list of folders, or a list of
folders that have changed, in order to synchronize your client.

EWS in Exchange uses item synchronization and folder synchronization to sync mailbox
content between the client and server. Folder synchronization gets the initial list of
folders from a root folder and then, over time, gets changes that were made to those
folders and gets new folders as well.

If you're performing folder synchronization by using the EWS Managed API, you first get
the initial list of folders in the root folder by using the
ExchangeService.SyncFolderHierarchy method. You then update the value of the
cSyncState parameter during subsequent calls to get the list of new and changed
folders.

To perform folder synchronization by using EWS, you request the initial list of folders in
the root folder by using the SyncFolderHierarchy operation, parse the response, and
then at some point in the future get the changes to the folders in the root, and parse
the response. After the client receives the list of initial or changed folders, it makes
updates locally. How and when you retrieve changes in the future depends on the
synchronization design pattern your application is using.

Get the list of all folders or changed folders by


using the EWS Managed API
The following code example shows how to get an initial list of folders in a root folder
and then get a list of changes to folders in the root folder that have occurred since the
previous synchronization. During the initial call to the
ExchangeService.SyncFolderHierarchy method, set the cSyncState value to null. When
the method completes, save the cSyncState value locally to use in the next
SyncFolderHierarchy method call. In both the initial call and the subsequent calls, the
folders are retrieved in batches of ten, by using successive calls to the
SyncFolderHierarchy method, until no more changes remain. This example sets the
propertySet parameter to IdOnly to reduce calls to the Exchange database, which is a
synchronization best practice. In this example, we assume that service is a valid
ExchangeService object binding and that cSyncState represents the sync state that was
returned by a prior call to SyncFolderHierarchy.

C#

// Get a list of all folders in the mailbox by calling SyncFolderHierarchy.

// The folderId parameter must be set to the root folder to synchronize.

// The propertySet parameter is set to IdOnly to reduce calls to the


Exchange database

// because any additional properties result in additional calls to the


Exchange database.

// The syncState parameter is set to cSyncState, which should be null in the


initial call,

// and should be set to the sync state returned by the previous


SyncFolderHierarchy call

// in subsequent calls.

ChangeCollection<FolderChange> fcc = service.SyncFolderHierarchy(new


FolderId(WellKnownFolderName.Root), PropertySet.IdOnly, cSyncState);

// If the count of changes is zero, there are no changes to synchronize.

if (fcc.Count == 0)

Console.WriteLine("There are no folders to synchronize.");

// Otherwise, write all the changes included in the response

// to the console.

// For the initial synchronization, all the changes will be of type

// ChangeType.Create.

else

foreach (FolderChange fc in fcc)

Console.WriteLine("ChangeType: " + fc.ChangeType.ToString());

Console.WriteLine("FolderId: " + fc.FolderId);

Console.WriteLine("===========");

// Save the sync state for use in future SyncFolderItems requests.

// The sync state is used by the server to determine what changes to report

// to the client.

string fSyncState = fcc.SyncState;

After you retrieve the list of new or changed folders on the server, create or update the
folders on the client.

Get the initial list of folders by using EWS


The following example shows an XML request to get the initial folder hierarchy by using
the SyncFolderHierarchy operation. This is also the XML request that the EWS
Managed API sends when retrieving the list of initial folders by using the
SyncFolderHierarchy method. The SyncState element of the SyncFolderHierarchy
operation is not included because this is the initial synchronization. This example sets
the BaseShape element to IdOnly to reduce calls to the Exchange database, which is a
synchronization best practice.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:SyncFolderHierarchy>

<m:FolderShape>

<t:BaseShape>IdOnly</t:BaseShape>

</m:FolderShape>

<m:SyncFolderId>

<t:DistinguishedFolderId Id="root" />

</m:SyncFolderId>
</m:SyncFolderHierarchy>

</soap:Body>

</soap:Envelope>

The following example shows the XML response that is returned by the server after it
processes the SyncFolderHierarchy operation request. The initial response includes
Create elements for all folders because all folders are considered new during an initial
synchronization. The values of some attributes and elements have been shortened for
readability, and some Create element blocks were removed for brevity.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="785"

MinorBuildNumber="6"

Version="V2_6"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:SyncFolderHierarchyResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:SyncFolderHierarchyResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:SyncState>H4sIAA==</m:SyncState>

<m:IncludesLastFolderInRange>true</m:IncludesLastFolderInRange>

<m:Changes>

<t:Create>

<t:Folder>

<t:FolderId Id="AAMkADM="

ChangeKey="AQAAABYA"/>

</t:Folder>

</t:Create>

<t:Create>

<t:Folder>

<t:FolderId Id="AAMkADMzM="

ChangeKey="AQAAABY"/>

</t:Folder>

</t:Create>

<t:Create>

<t:Folder>

<t:FolderId Id="AAMkAD/AAA="

ChangeKey="AQAAABYA"/>

</t:Folder>

</t:Create>

<t:Create>

<t:Folder>

<t:FolderId Id="AAMkADBh="

ChangeKey="AQAAABYA"/>

</t:Folder>

</t:Create>

...

</m:Changes>

</m:SyncFolderHierarchyResponseMessage>

</m:ResponseMessages>

</m:SyncFolderHierarchyResponse>

</s:Body>

</s:Envelope>

After you retrieve the list of new folders on the server, create the folders on the client.

Get the changes since the last sync by using


EWS
The following example shows the XML request to get the list of changes to folders in the
root folder by using the SyncFolderHierarchy operation. This is also the XML request
that the EWS Managed API sends when retrieving the list of changes to the root folder.
This example sets the SyncState element value to the value returned in the previous
response. And for demonstration purposes, this example sets the BaseShape element
to AllProperties instead of IdOnly to show the additional properties returned. Setting
the BaseShape element to IdOnly is a synchronization best practice. The value of
SyncState has been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:SyncFolderHierarchy>

<m:FolderShape>

<t:BaseShape>AllProperties</t:BaseShape>

</m:FolderShape>

<m:SyncFolderId>

<t:DistinguishedFolderId Id="root" />

</m:SyncFolderId>
<m:SyncState>H4sIAA==</m:SyncState>

</m:SyncFolderHierarchy>

</soap:Body>

</soap:Envelope>

The following example shows the XML response that is returned by the server after it
processes the SyncFolderHierarchy operation request from the client. This response
indicates that one folder was updated, one folder was created, and one folder was
deleted since the prior synchronization. The value of the SyncState element, Id
attributes, and ChangeKey attributes have been shortened for readability.

Remember that the request included the AllPropertiesBaseShape . This is just for
demonstration purposes. We recommend that you set the BaseShape element to IdOnly
in production.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="745" MinorBuildNumber="21" Version="V2_3"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:SyncFolderHierarchyResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:SyncFolderHierarchyResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:SyncState>H4sIAAA</m:SyncState>

<m:IncludesLastFolderInRange>true</m:IncludesLastFolderInRange>

<m:Changes>

<t:Update>

<t:Folder>

<t:FolderId Id="AAMkADM=" ChangeKey="AQAAABY" />

<t:ParentFolderId Id="AQMkADMzADI1==" ChangeKey="AQAAAA=="


/>

<t:FolderClass>IPF.Note</t:FolderClass>

<t:DisplayName>Meeting Notes</t:DisplayName>

<t:TotalCount>3</t:TotalCount>

<t:ChildFolderCount>0</t:ChildFolderCount>

<t:EffectiveRights>

<t:CreateAssociated>true</t:CreateAssociated>

<t:CreateContents>true</t:CreateContents>

<t:CreateHierarchy>true</t:CreateHierarchy>

<t:Delete>true</t:Delete>

<t:Modify>true</t:Modify>

<t:Read>true</t:Read>

<t:ViewPrivateItems>true</t:ViewPrivateItems>

</t:EffectiveRights>

<t:UnreadCount>0</t:UnreadCount>

</t:Folder>

</t:Update>

<t:Create>

<t:Folder>

<t:FolderId Id="AAMkADMzM=" ChangeKey="AQAAABYAA" />

<t:ParentFolderId Id="AQMkO67A==" ChangeKey="AQAAAA==" />

<t:FolderClass>IPF.Note</t:FolderClass>

<t:DisplayName>Schedules</t:DisplayName>
<t:TotalCount>0</t:TotalCount>

<t:ChildFolderCount>0</t:ChildFolderCount>

<t:EffectiveRights>

<t:CreateAssociated>true</t:CreateAssociated>

<t:CreateContents>true</t:CreateContents>

<t:CreateHierarchy>true</t:CreateHierarchy>

<t:Delete>true</t:Delete>

<t:Modify>true</t:Modify>

<t:Read>true</t:Read>

<t:ViewPrivateItems>true</t:ViewPrivateItems>

</t:EffectiveRights>

<t:UnreadCount>0</t:UnreadCount>

</t:Folder>

</t:Create>

<t:Delete>

<t:FolderId Id="AAMkAD/AAA=" ChangeKey="AQAAAA==" />

</t:Delete>

</m:Changes>

</m:SyncFolderHierarchyResponseMessage>

</m:ResponseMessages>

</m:SyncFolderHierarchyResponse>

</s:Body>

</s:Envelope>

Update the client


If you're using the EWS Managed API, after you get the list of new or changed folders,
use the Folder.Load method to get properties on the new or changed items, compare
the properties to the local values, and update or create the folders on the client.

If you're using EWS, use the GetFolder operation to get properties on the new or
changed folders and update or create the folders on the client.

See also
Mailbox synchronization and EWS in Exchange
Synchronize items by using EWS in Exchange
Handling synchronization-related errors in EWS in Exchange
Synchronize items by using EWS in
Exchange
Article • 02/11/2022 • 8 minutes to read

Find out how to use the EWS Managed API or EWS to get a list of all items in a folder, or
a list of changes that have occurred in a folder, in order to synchronize your client.

EWS in Exchange uses item synchronization and folder synchronization to sync mailbox
content between the client and server. Item synchronization gets the initial list of items
in a folder and then, over time, gets changes that have been made to those items and
gets new items as well.

Note that before you can sync items to a client, you first have to sync the folder
hierarchy. After the folder hierarchy is in place on the client, if you're performing item
synchronization by using the EWS Managed API, you first get the initial list of items in
the Inbox by using the ExchangeService.SyncFolderItems method. You then update
the value of the cSyncState parameter during subsequent calls to get the list of changed
items in the Inbox.

To perform item synchronization by using EWS, after you sync the folder hierarchy, you
request the initial list of items in the Inbox by using the SyncFolderItems operation ,
parse the response, and then at some point in the future get the changes to the items in
the mailbox, and parse the response. After the client receives the list of initial or
changed items, it makes updates locally. How and when you retrieve changes in the
future depends on the synchronization design pattern your application is using.

Get the list of all items or changed items by


using the EWS Managed API
The following code example shows how to get an initial list of all items in the Inbox
folder and then get a list of changes to items in the Inbox folder that have occurred
since the previous synchronization. During the initial call to the SyncFolderItems
method, set the cSyncState value to null. When the method completes, save the
cSyncState value locally to use in the next SyncFolderItems method call. In both the
initial call and the subsequent calls, the items are retrieved in batches of ten, by using
successive calls to the SyncFolderItems method, until no more changes remain.

This example sets the propertySet parameter to IdOnly to reduce calls to the Exchange
database, which is a synchronization best practice. In this example, we assume that
service is a valid ExchangeService object binding and that cSyncState represents the
sync state that was returned by a prior call to SyncFolderItems.

C#

// Track whether there are more items available for download on the server.

bool moreChangesAvailable = false;

do

// Get a list of all items in the Inbox by calling SyncFolderHierarchy


repeatedly until no more changes are available.

// The folderId parameter must be set to the root folder to synchronize,

// and must be same folder ID as used in previous synchronization calls.

// The propertySet parameter is set to IdOnly to reduce calls to the


Exchange database,

// because any additional properties result in additional calls to the


Exchange database.

// The ignoredItemIds parameter is set to null, so that no items are


ignored.

// The maxChangesReturned parameter is set to return a maximum of 10


items (512 is the maximum).

// The syncScope parameter is set to Normal items, so that associated


items will not be returned.

// The syncState parameter is set to cSyncState, which should be null in


the initial call,

// and should be set to the sync state returned by the

// previous SyncFolderItems call in subsequent calls.

ChangeCollection<ItemChange> icc = service.SyncFolderItems(new


FolderId(WellKnownFolderName.Inbox), PropertySet.IdOnly, null, 10,
SyncFolderItemsScope.NormalItems, cSyncState);

// If the count of changes is zero, there are no changes to synchronize.

if (icc.Count == 0)
{

Console.WriteLine("There are no item changes to synchronize.");

// Otherwise, write all the changes included in the response

// to the console.

else

foreach (ItemChange ic in icc)

Console.WriteLine("ChangeType: " + ic.ChangeType.ToString());

Console.WriteLine("ItemId: " + ic.ItemId);

Console.WriteLine("===========");

// Save the sync state for use in future SyncFolderContent requests.

// The sync state is used by the server to determine what changes to


report

// to the client.

string sSyncState = icc.SyncState;

// Determine whether more changes are available on the server.

moreChangesAvailable = icc.MoreChangesAvailable;

while (moreChangesAvailable);

The SyncFolderItems method is similar to the FindItems method in that it cannot


return properties such as Body or Attachments . If you need properties that cannot
be returned by the SyncFolderItems method, specify the IdOnly property set when
you call SyncFolderItems, and then use the ExchangeService.LoadPropertiesForItems
method to get the properties you require for the items that were returned by the
SyncFolderItems method.

After you retrieve the list of new or changed items on the server, create or update the
items on the client.

Get the initial list of items by using EWS


The following example shows the XML request to get the initial list of items in the Inbox
by using the SyncFolderItems operation . This is also the XML request that the EWS
Managed API sends when retrieving the list of items by using the SyncFolderItems
method. The SyncState element of the SyncFolderItems operation is not included
because this is the initial synchronization. This example sets the BaseShape element to
IdOnly to reduce calls to the Exchange database, which is a synchronization best
practice.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:SyncFolderItems>
<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

</m:ItemShape>

<m:SyncFolderId>

<t:DistinguishedFolderId Id="inbox" />

</m:SyncFolderId>
<m:MaxChangesReturned>10</m:MaxChangesReturned>

<m:SyncScope>NormalItems</m:SyncScope>

</m:SyncFolderItems>

</soap:Body>

</soap:Envelope>

Get the response by using the SyncFolderItems


method
The following example shows the XML response that is returned by the server after it
processes the SyncFolderItems operation request from the client. The initial response
includes Create elements for five items because all items are considered new during
an initial synchronization. The values of some attributes and elements have been
shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="785"

MinorBuildNumber="6"

Version="V2_6"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:SyncFolderItemsResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:SyncFolderItemsResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:SyncState>H4sIAAA==</m:SyncState>
<m:IncludesLastItemInRange>true</m:IncludesLastItemInRange>

<m:Changes>

<t:Create>

<t:Message>

<t:ItemId Id="q04QAAAA=="

ChangeKey="CQAAABYAAABhFfgM7MNwSYx0VZ0GoBMJAAAATVdC"/>

</t:Message>

</t:Create>

<t:Create>

<t:Message>

<t:ItemId Id="q07AAAAA=="

ChangeKey="CQAAABYAAABhFfgM7MNwSYx0VZ0GoBMJAAAATVdB"/>

</t:Message>

</t:Create>

<t:Create>

<t:Message>

<t:ItemId Id="q1AwAAAA=="

ChangeKey="CQAAABYAAABhFfgM7MNwSYx0VZ0GoBMJAAAATVdA"/>

</t:Message>

</t:Create>

<t:Create>

<t:Message>

<t:ItemId Id="AAMkADBh=="

ChangeKey="CQAAABYAAABhFfgM7MNwSYx0VZ0GoBMJAAAATVc5"/>

</t:Message>

</t:Create>

<t:Create>

<t:Message>

<t:ItemId Id="AAMkADBh=="

ChangeKey="CQAAABYAAABhFfgM7MNwSYx0VZ0GoBMJAAAATVc4"/>

</t:Message>

</t:Create>

</m:Changes>

</m:SyncFolderItemsResponseMessage>

</m:ResponseMessages>

</m:SyncFolderItemsResponse>

</s:Body>

</s:Envelope>

After you retrieve the list of new items on the server, create the items on the client.

Get the changes since the last sync by using


EWS
The following example shows the XML request to get the list of changes to items in the
Inbox by using the SyncFolderItems operation. This is also the XML request that the
EWS Managed API sends when retrieving the list of changes to the Inbox. This example
sets the SyncState element value to the value returned in the previous response. And
for demonstration purposes, this example sets the BaseShape element to
AllProperties instead of IdOnly to show the additional properties returned. Setting the
BaseShape element to IdOnly is a synchronization best practice. The value of
SyncState has been shortened for readability.
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010_SP2" />

</soap:Header>

<soap:Body>

<m:SyncFolderItems>
<m:ItemShape>

<t:BaseShape>AllProperties</t:BaseShape>

</m:ItemShape>

<m:SyncFolderId>

<t:DistinguishedFolderId Id="inbox" />

</m:SyncFolderId>
<m:SyncState>H4sIAAA==</m:SyncState>

<m:MaxChangesReturned>10</m:MaxChangesReturned>

<m:SyncScope>NormalItems</m:SyncScope>

</m:SyncFolderItems>

</soap:Body>

</soap:Envelope>

The following example shows the XML response that is returned by the server after it
processes the SyncFolderItems operation request from the client. This response
indicates that one item was updated, two items were created, the read flag of one item
was changed, and one item was deleted since the prior synchronization. The values of
some attributes and elements have been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="731" MinorBuildNumber="10" Version="V2_3"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:SyncFolderItemsResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:SyncFolderItemsResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:SyncState>H4sIAAAAAAAEAO29B2AcSZY==</m:SyncState>

<m:IncludesLastItemInRange>true</m:IncludesLastItemInRange>

<m:Changes>

<t:Update>

<t:Message>

<t:ItemId Id="q04QAAAA=="
ChangeKey="CQAAABYAAADZGACZQpSgSpyNkexYe2b7AAAAird/" />

<t:ParentFolderId Id=" AgENAAAA" ChangeKey="AQAAAA==" />

<t:ItemClass>IPM.Note</t:ItemClass>

<t:Subject>RE: Company Soccer Team</t:Subject>

<t:Sensitivity>Normal</t:Sensitivity>

<t:DateTimeReceived>2013-08-
29T15:22:10Z</t:DateTimeReceived>

<t:Size>23110</t:Size>

<t:Importance>Normal</t:Importance>

<t:InReplyTo>&amp;lt;[email protected].
sdf.contoso.com&amp;gt;</t:InReplyTo>

<t:IsSubmitted>false</t:IsSubmitted>

<t:IsDraft>false</t:IsDraft>

<t:IsFromMe>false</t:IsFromMe>

<t:IsResend>false</t:IsResend>

<t:IsUnmodified>false</t:IsUnmodified>

<t:DateTimeSent>2013-08-29T15:22:10Z</t:DateTimeSent>

<t:DateTimeCreated>2013-08-
28T04:07:38Z</t:DateTimeCreated>

<t:DisplayCc />

<t:DisplayTo>All Employees</t:DisplayTo>

<t:HasAttachments>false</t:HasAttachments>

<t:Culture>en-US</t:Culture>

<t:EffectiveRights>

<t:CreateAssociated>false</t:CreateAssociated>

<t:CreateContents>false</t:CreateContents>

<t:CreateHierarchy>false</t:CreateHierarchy>

<t:Delete>true</t:Delete>

<t:Modify>true</t:Modify>

<t:Read>true</t:Read>

<t:ViewPrivateItems>true</t:ViewPrivateItems>

</t:EffectiveRights>

<t:LastModifiedName>Mara Whitley</t:LastModifiedName>

<t:LastModifiedTime>2013-08-
28T16:53:35Z</t:LastModifiedTime>

<t:IsAssociated>false</t:IsAssociated>

<t:WebClientReadFormQueryString>?
ae=Item&amp;amp;a=Open&amp;amp;t=IPM.Note&amp;amp;id=&amp;amp;exvsurl=1</t:W
ebClientReadFormQueryString>

<t:ConversationId
Id="AAQkADkzNjJjODUzLWZhMDMtNDVkMS05ZDdjLWVmMDlkYjQ1Zjc4MwAQACAi+NTh0F5Eg5YD
wpJsXPE=" />

<t:Sender>

<t:Mailbox>

<t:Name>Alfred Welker </t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Mailbox>

</t:Sender>

<t:IsReadReceiptRequested>false</t:IsReadReceiptRequested>

<t:ConversationIndex>AQHM5V/ZICL41OHQXkSDlgPCkmxc8ZYxA3I4gAAP5UeAANHpbIAAEE+
0gAABYhSAACGYTIAAA2+vgAAE81qAkhv0Eg==</t:ConversationIndex>

<t:ConversationTopic>Company Soccer
Team</t:ConversationTopic>

<t:From>

<t:Mailbox>

<t:Name>Alfred Welker </t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Mailbox>

</t:From>

<t:InternetMessageId>&amp;lt;[email protected]
ontoso.com&amp;gt;</t:InternetMessageId>

<t:IsRead>true</t:IsRead>

<t:References>namsdf01.sdf.contoso.com&amp;gt;
</t:References>

</t:Message>

</t:Update>

<t:Create>

<t:Message>

<t:ItemId Id="AQMkAD+" />

<t:ParentFolderId Id="AQMkA==" ChangeKey="AQAAAA==" />

<t:ItemClass>IPM.Note</t:ItemClass>

<t:Subject>RE: Review Proposal for Contoso</t:Subject>

<t:Sensitivity>Normal</t:Sensitivity>

<t:DateTimeReceived>2013-08-
29T16:20:10Z</t:DateTimeReceived>

<t:Size>32515</t:Size>

<t:Importance>Normal</t:Importance>

<t:InReplyTo>&amp;lt;[email protected]
om&amp;gt;</t:InReplyTo>

<t:IsSubmitted>false</t:IsSubmitted>

<t:IsDraft>false</t:IsDraft>

<t:IsFromMe>false</t:IsFromMe>

<t:IsResend>false</t:IsResend>

<t:IsUnmodified>false</t:IsUnmodified>

<t:DateTimeSent>2013-08-29T16:20:10Z</t:DateTimeSent>

<t:DateTimeCreated>2013-08-
28T04:07:33Z</t:DateTimeCreated>

<t:DisplayCc />

<t:DisplayTo>Legal Team; Executives</t:DisplayTo>

<t:HasAttachments>false</t:HasAttachments>

<t:Culture>en-US</t:Culture>

<t:EffectiveRights>

<t:CreateAssociated>false</t:CreateAssociated>

<t:CreateContents>false</t:CreateContents>

<t:CreateHierarchy>false</t:CreateHierarchy>

<t:Delete>true</t:Delete>

<t:Modify>true</t:Modify>

<t:Read>true</t:Read>

<t:ViewPrivateItems>true</t:ViewPrivateItems>

</t:EffectiveRights>

<t:LastModifiedName>Mara Whitley</t:LastModifiedName>

<t:LastModifiedTime>2013-08-
28T04:07:35Z</t:LastModifiedTime>

<t:IsAssociated>false</t:IsAssociated>

<t:WebClientReadFormQueryString>?
ae=Item&amp;amp;a=Open&amp;amp;t=IPM.Note&amp;amp;id=&amp;amp;exvsurl=1</t:W
ebClientReadFormQueryString>

<t:ConversationId
Id="AAQkADkzNjJjODUzLWZhMDMtNDVkMS05ZDdjLWVmMDlkYjQ1Zjc4MwAQAIsBEZp25UpElByL
LUQFH6Q=" />

<t:Sender>

<t:Mailbox>

<t:Name>Hope Gross</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Mailbox>

</t:Sender>

<t:IsReadReceiptRequested>false</t:IsReadReceiptRequested>

<t:ConversationIndex>AQHM5WBRiwERmnblSkSUHIstRAUfpJYw9fbSgAAAdm2AAAB6koAAAHT
DgAADl6+AAAbxCYAABm5PgAACSA+AANx034AAEKGQgAAAfsiAAB7m3IAABG+ngAABPZyAAASUzoA
AA2DNgAAAfKE=</t:ConversationIndex>

<t:ConversationTopic>Review Proposal for


Contoso</t:ConversationTopic>

<t:From>

<t:Mailbox>

<t:Name>Hope Gross</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Mailbox>

</t:From>

<t:InternetMessageId>&amp;lt;[email protected]
amsdf01.sdf.contoso.com&amp;gt;</t:InternetMessageId>

<t:IsRead>true</t:IsRead>

<t:References>&amp;lt;2d4d7d…</t:References>

</t:Message>

</t:Create>

<t:Create>

<t:Message>

<t:ItemId Id="Q04AAAAA==" ChangeKey="AAAirbnd" />

<t:ParentFolderId Id="AgENAAAA" ChangeKey="AQAAAA==" />

<t:ItemClass>IPM.Note</t:ItemClass>

<t:Subject>RE: Review Proposal for Contoso</t:Subject>

<t:Sensitivity>Normal</t:Sensitivity>

<t:DateTimeReceived>2013-08-
29T15:30:10Z</t:DateTimeReceived>

<t:Size>29518</t:Size>

<t:Importance>Normal</t:Importance>

<t:InReplyTo>&amp;lt;[email protected].
sdf.contoso.com&amp;gt;</t:InReplyTo>

<t:IsSubmitted>false</t:IsSubmitted>

<t:IsDraft>false</t:IsDraft>

<t:IsFromMe>false</t:IsFromMe>

<t:IsResend>false</t:IsResend>

<t:IsUnmodified>false</t:IsUnmodified>

<t:DateTimeSent>2013-08-29T15:30:10Z</t:DateTimeSent>

<t:DateTimeCreated>2013-08-
28T04:07:36Z</t:DateTimeCreated>

<t:DisplayCc />

<t:DisplayTo>Legal Team; Executives</t:DisplayTo>

<t:HasAttachments>false</t:HasAttachments>

<t:Culture>en-US</t:Culture>

<t:EffectiveRights>

<t:CreateAssociated>false</t:CreateAssociated>

<t:CreateContents>false</t:CreateContents>

<t:CreateHierarchy>false</t:CreateHierarchy>

<t:Delete>true</t:Delete>

<t:Modify>true</t:Modify>

<t:Read>true</t:Read>

<t:ViewPrivateItems>true</t:ViewPrivateItems>

</t:EffectiveRights>

<t:LastModifiedName>Mara Whitley</t:LastModifiedName>

<t:LastModifiedTime>2013-08-
28T04:07:38Z</t:LastModifiedTime>

<t:IsAssociated>false</t:IsAssociated>

<t:WebClientReadFormQueryString>?
ae=Item&amp;amp;a=Open&amp;amp;t=IPM.Note&amp;amp;id=&amp;amp;exvsurl=1</t:W
ebClientReadFormQueryString>

<t:ConversationId
Id="AAQkADkzNjJjODUzLWZhMDMtNDVkMS05ZDdjLWVmMDlkYjQ1Zjc4MwAQAIsBEZp25UpElByL
LUQFH6Q=" />

<t:Sender>

<t:Mailbox>

<t:Name>Mack Chaves</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Mailbox>

</t:Sender>

<t:IsReadReceiptRequested>false</t:IsReadReceiptRequested>

<t:ConversationIndex>AQHM5WBRiwERmnblSkSUHIstRAUfpJYw9fbSgAAAdm2AAAB6koAAAHT
DgAADl6+AAAbxCYAABm5PgAACSA+AANx034AAEKGQgAAAfsiAAB7m3IAABG+ngAABPZyAAASUzoA
AA2DN</t:ConversationIndex>

<t:ConversationTopic>Review Proposal for


Contoso</t:ConversationTopic>

<t:From>

<t:Mailbox>

<t:Name>Mack Chaves</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Mailbox>

</t:From>

<t:InternetMessageId>&amp;lt;[email protected]
amsdf01.sdf.contoso.com&amp;gt;</t:InternetMessageId>

<t:IsRead>true</t:IsRead>

<t:References>namsdf01.sdf.contoso.com&amp;gt;
</t:References>

</t:Message>

</t:Create>

<t:ReadFlagChange>

<t:ItemId Id=" q07AAAAA==" ChangeKey="CQAAAA==" />

<t:IsRead>true</t:IsRead>

</t:ReadFlagChange>

<t:Delete>

<t:ItemId Id=" q1AwAAAA==" ChangeKey="CQAAAA==" />

</t:Delete>

</m:Changes>

</m:SyncFolderItemsResponseMessage>

</m:ResponseMessages>

</m:SyncFolderItemsResponse>

</s:Body>

</s:Envelope>

The SyncFolderItems operation is similar to the FindItems method in that it cannot


return elements such as the Body or Attachments elements. If you need properties
that cannot be returned by the SyncFolderItems operation, set the value of the
BaseShape element to IdOnly when you call SyncFolderItems, and then use the
GetItem operation to get the properties you require for the items that were returned
by the SyncFolderItems operation.

After you retrieve the list of changed items on the server, update the items on the client.

Update the client


If you're using the EWS Managed API, after you get the list of new or changed items, use
the LoadPropertiesForItems method to get properties on the new or changed items,
compare the properties to the local values, and update the items on the client.
If you're using EWS, use the GetItem operation to get properties on the new or
changed items and update the items on the client.

See also
Mailbox synchronization and EWS in Exchange
Synchronize folders by using EWS in Exchange
Handling synchronization-related errors in EWS in Exchange
Notification subscriptions, mailbox events, and EWS in Exchange
Handling synchronization-related errors
in EWS in Exchange
Article • 09/15/2021 • 2 minutes to read

Find out how to handle synchronization-related errors in applications that you develop
by using the EWS Managed API or EWS in Exchange.

If your application synchronizes items and folders, you might have to handle
synchronization-related errors. You can handle these errors at runtime, or while you are
developing your EWS application. Most of these errors are defined by the
ResponseCodeType enumeration in the EWS Managed API, and the ResponseCode
element in Exchange Web Services (EWS).

Table 1. Sync-related errors and how to handle them

Error Occurs when you try to… Handle it by…

ErrorInvalidSyncStateData Synchronize items or Ensuring that the sync state value


folders by using an invalid you are sending matches the sync
sync state value. state value returned during a
Exclude a root folder in previous synchronization.
your initial Ensuring that you are not sending
SyncFolderHierarchy the sync state for the folder hierarchy
request, when your when you attempt to sync items, and
subsequent request does vice versa.
include a root folder. Ensuring that you are sending the
Use different root folders sync state for the correct root folder.
in subsequent requests. Ensuring that the same root folder is
specified in each request.
Ensuring that the previous request
did not specify a root folder of null,
while the current request includes a
root folder of root. Null and root are
not treated the same.

ErrorSyncFolderNotFound Synchronize subfolders or Ensuring that the folder ID specified


items in a folder that in the request matches a folder ID
cannot be found on the returned from the server in a
server. previous sync response.

ErrorTimeoutExpired Send too many requests. Limiting your batches to 10 items per
batch to avoid getting throttled.
Error Occurs when you try to… Handle it by…

ServiceResponseException Connect to EWS when the Checking connectivity with the server
server is offline or there is and retrying your request later. This
a problem with is likely a transient service error or
connectivity. network error.

See also
Mailbox synchronization and EWS in Exchange

Synchronize folders by using EWS in Exchange

Synchronize items by using EWS in Exchange

ServiceResponseException
Persistent application settings in EWS in
Exchange
Article • 09/15/2021 • 5 minutes to read

Learn about the different options that your EWS Managed API or EWS application can
use to create persistent custom application settings in Exchange.

The easiest way to keep custom client configurations in sync for a mailbox, or folders
and items in a mailbox, is to store application settings on an Exchange server. You can
ensure that those settings persist for a mailbox by using one of the following:

User configuration objects

Extended properties

Custom items

What are my options for creating persistent


application settings?
User configuration objects are your best option for storing configuration settings for
your EWS client applications. You can also use extend properties or custom items, or a
combination of all three. Choose your option based on the scope of your settings and
whether your settings need to be available to other applications.

Table 1. Recommended options for creating persistent application settings based on


scope

Setting Use… Accessed by


scope

Item An extended property on an existing Any EWS application. Only EWS clients that
item. know the property identifier can access an
extended property.

Folder A user configuration object on the target Any EWS application.


folder. This is a good way to save view
settings for a folder.

Mailbox A user configuration object on the Any EWS application.


default msgrootfolder folder.
User configuration objects
User configuration objects are special items that are associated with folders in a
mailbox. User configuration objects, also known as folder associated items, are typically
the best option for persisting application settings, especially if the configuration
information is associated with a folder or a mailbox. They typically are not surfaced to
end users. Because they can natively store data streams and data dictionaries, they are
ideal for storing configuration information. The best way to use user configuration
objects is to store a set of configurations in an XML document and then save that
information in one of the user configuration stream properties.

User configuration objects are accessed differently than the other item types stored in a
mailbox. You can use the Folder.FindItems EWS Managed API method or the
FindItem EWS operation to find all items, but you must use the Associated search
traversal option to find user configuration objects. The Associated search traversal
indicates that the search results should contain only user configuration objects. EWS
includes a set of operations that are specific to user configuration objects.

Table 1. EWS operations and EWS Managed API methods for working with user
configuration objects

In order to… Use this EWS operation Use this EWS Managed API
method

Create a user configuration CreateUserConfiguration UserConfiguration.Save

object operation

Get a user configuration GetUserConfiguration UserConfiguration.Bind

object operation
UserConfiguration.Load

Update a user configuration UpdateUserConfiguration UserConfiguration.Update

object operation

Delete a user configuration DeleteUserConfiguration UserConfiguration.Delete

object operation

7 Note

User configuration objects created by using EWS have an ItemClass prefix that
starts with "IPM.Configuration.". The ItemClass of a user configuration object is the
user configuration object prefix and your user configuration object name. You can
use the Item.ItemClass EWS Managed API property or the ItemClass EWS
element to search for user configuration objects that you've defined.
Extended properties
Use Extended properties if you want to store configuration information on items. EWS,
unlike MAPI, does not return a property bag for items. This means that an EWS client
must know the extended property identifier in order to find and access the extended
property. If you need to store configuration information on items other than user
configuration objects, using extended properties to create custom properties might be
the solution for you. Extended properties enable you to access and store information on
properties that are not part of the standard property set for an item.

) Important

The Exchange database schema has a finite number of properties. The maximum
number of property identifiers for an Exchange database is 32,767. If you are using
extended properties to store many settings, we suggest that you use a single
extended property to store those settings so that you don't exceed this maximum.

You can use the Item.Update EWS Managed API method or the UpdateItem EWS
operation to set extended properties on user configuration objects.

Custom items
Custom items can also be used to store information. The existing item properties can be
repurposed to contain configuration information. Or, you can use extended properties
to define your own properties for you application. Using custom items to store
configuration provides the following benefits:

They work for all versions of Exchange that support EWS.

If you don't use extended properties on the item, the budget of Exchange
properties is not charged.

Where should I store my application settings?


Mailbox folders and the items within them are located in the root message folder. This
folder is identified by the WellKnownFolderName.msgfolderroot value in the EWS
Managed API. In MAPI terms, this is the equivalent of the IPM subtree of a mailbox. User
configuration objects are often used to create UI-based settings, so that an application
can render view settings based on the folder that a user is accessing. Folder-based view
settings are usually set on a user configuration object that is associated with the folder.
But sometimes, you might want to make your settings global to your application. In this
case, you can store your settings in the root message folder.

Most users are not aware of and typically don't access the root mailbox folder. This
folder is identified by the WellKnownFolderName.root value in the EWS Managed API.
In MAPI terms, this is the equivalent of the non-IPM subtree of a mailbox. Information
that end users don't access directly is stored in the root mailbox folder. You might want
to store your application setting in this folder because client applications do not
typically access it.

Version differences
User configuration objects are available on Exchange Online, Exchange Online as part of
Office 365, and versions of Exchange starting with Exchange 2010.

See also
Manage persistent application settings by using EWS in Exchange

EWS client design overview for Exchange

Properties and extended properties in EWS in Exchange

Work with folders by using EWS in Exchange

Work with Exchange mailbox items by using EWS in Exchange


Manage persistent application settings
by using EWS in Exchange
Article • 09/15/2021 • 8 minutes to read

Learn how to create, find, get, update, and delete persistent application settings by
using the EWS Managed API or EWS in Exchange.

User configuration objects are the best option for storing configuration settings for your
Exchange client application, primarily because they are hidden from search results in
most client applications. Client applications typically hide these settings because the end
user doesn't need to see them, and so that the user doesn't accidentally access this
information. The code examples in this article show you how you can use user
configuration objects to manage persistent settings, including how to create, find, get,
update, and delete persistent application settings that are stored in user configuration
objects.

Create an application setting by using the EWS


Managed API
You can use the UserConfiguration.Save EWS Managed API method to create a
custom configuration setting. A user configuration object can contain XML, binary, a
data dictionary, or a combination of those three data types. The following example
shows how to save a user configuration object named ContosoDraftSettings that
contains binary data to your Drafts folder by using the EWS Managed API. This might be
useful if you want to store configuration information about how draft items are
displayed in your client application.

C#

private static void CreateUserConfiguration(ExchangeService service, byte[]


binaryData)

// Create the user configuration object.

UserConfiguration configDrafts = new UserConfiguration(service);

// Add user configuration data to the BinaryData property.

configDrafts.BinaryData = binaryData;

// Name and save the user configuration object on the Drafts folder.

// This results in a call to EWS.

configDrafts.Save("ContosoDraftSettings", WellKnownFolderName.Drafts);

Create an application setting by using EWS


You can use the CreateUserConfiguration EWS operation to create a custom
configuration setting. The following example shows the request XML for creating a user
configuration object named ContosoDraftSettings. The request attempts to save a
binary stream to a user configuration object on the Drafts folder. This is the same XML
that is generated by the EWS Managed API example.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:CreateUserConfiguration>

<m:UserConfiguration>

<t:UserConfigurationName Name="ContosoDraftSettings">

<t:DistinguishedFolderId Id="drafts" />

</t:UserConfigurationName>

<t:BinaryData>iVBORw0KGH5UhKquRSzaeAAAAAElFTkSuQmCC</t:BinaryData>

</m:UserConfiguration>

</m:CreateUserConfiguration>

</soap:Body>

</soap:Envelope>

The response XML is simple and indicates whether the create request was successful
or whether an error occurred.

Find an application setting by using the EWS


Managed API
You can use the Folder.FindItems EWS Managed API method with the associated
traversal option to find user configuration objects. The following code example shows
you how to find user configuration objects stored on the Drafts folder by using the EWS
Managed API.

C#
private static void FindAssociated(ExchangeService service)

// This is the ItemClass prefix of user configuration objects that are


created by using EWS.

const string userConfigPrefix = "IPM.Configuration.";

// This is the name of a configuration setting created by using EWS.

string userConfigName = "TestConfig";

// Return the first five items.

ItemView view = new ItemView(5);

// Request only the properties that you need. Because all the results
will be user configuration

// objects, you won't need to request the ItemSchema.IsAssociated


property, which identifies

// user configuration objects.

PropertySet props = new PropertySet(BasePropertySet.IdOnly,

ItemSchema.ItemClass);

view.PropertySet = props;

// Set the traversal to find user configuration objects.

view.Traversal = ItemTraversal.Associated;

// Send the request to search the Drafts folder for all the user
configuration objects

// in the folder. You do not have to use a search restriction because


you will not return

// a large number of search results. For this scenario, it is better to


sort the results

// on the client. This method results in a call to EWS.

FindItemsResults<Item> findResults =
service.FindItems(WellKnownFolderName.Drafts, view);

// Output a list of the item classes for the associated items.

foreach (Item item in findResults)

if (item.ItemClass == userConfigPrefix + userConfigName)

Console.WriteLine("You found the configuration: " +


userConfigPrefix + userConfigName);

Find an application setting by using EWS


You can use the FindItem EWS operation to find user configuration objects.

The following example shows the request XML for finding user configuration objects.
This is the same XML that is generated by the EWS Managed API example.

XML
<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:FindItem Traversal="Associated">

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:ItemClass" />

</t:AdditionalProperties>

</m:ItemShape>

<m:IndexedPageItemView MaxEntriesReturned="5" Offset="0"


BasePoint="Beginning" />

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="drafts" />

</m:ParentFolderIds>

</m:FindItem>

</soap:Body>

</soap:Envelope>

The following example shows the successful response XML for finding user
configuration objects. This is the same XML that is processed by the EWS Managed API
example. Note the following in this response XML:

We shortened the identifier and change keys for readability.

The two user configuration objects are returned as messages. This is because the
FindItem operation returns all items that are not defined in the EWS schema as
message items.

The ItemClass properties for the two user configuration objects are different. The
first user configuration object was created by using EWS. The second object was
created by another API.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="800"

MinorBuildNumber="5"

Version="V2_6"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:FindItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder IndexedPagingOffset="2"

TotalItemsInView="2"

IncludesLastItemInRange="true">

<t:Items>

<t:Message>

<t:ItemId Id="AAMkDEY9M6AAA=" ChangeKey="CQAAACYnYF5aFMwP0T"


/>

<t:ItemClass>IPM.Configuration.TestConfig</t:ItemClass>

</t:Message>

<t:Message>

<t:ItemId Id="AAkADEzOzFAAA=" ChangeKey="CQAAABQAAABAByOw=="


/>

<t:ItemClass>IPM.Microsoft.FolderDesign.NamedView</t:ItemClass>

</t:Message>

</t:Items>

</m:RootFolder>

</m:FindItemResponseMessage>

</m:ResponseMessages>

</m:FindItemResponse>

</s:Body>

</s:Envelope>

Get and update application settings by using


the EWS Managed API
After you find a user configuration object, you can use the UserConfiguration.Bind
EWS Managed API method to get the configuration object from the mailbox. After you
get the configuration object, you can use the UserConfiguration.Update method to
update it. The following example shows how to get and update a user configuration
object by using the EWS Managed API.
C#

private static void GetAndUpdateUserConfiguration(ExchangeService service)

// Binds to a user configuration object named "TestConfig" in the user's


mailbox.

// Results in a call to EWS. You can also use the Load method to get the
latest

// server version of the user configuration object.

UserConfiguration usrConfig = UserConfiguration.Bind(service,

"TestConfig",

WellKnownFolderName.Drafts,

UserConfigurationProperties.All);

// Display the returned configuration object property values.

if (usrConfig.XmlData != null)

Console.WriteLine("XmlData: " +
Encoding.UTF8.GetString(usrConfig.XmlData));

if (usrConfig.BinaryData != null)

Console.WriteLine("BinaryData: " +
Encoding.UTF8.GetString(usrConfig.BinaryData));

if (usrConfig.Dictionary.Count > 0)

Console.WriteLine("Contains {0} dictionary entries",


usrConfig.Dictionary.Count);

// Add dictionary property values to the local copy of the object.

usrConfig.Dictionary.Add("Key5", 1);

// Updates the server version of the user configuration object

// if it has changed on the client. Results in a call to EWS.

if (usrConfig.IsDirty)

usrConfig.Update();

Get and update application settings by using


EWS
You can use the GetUserConfiguration EWS operation to retrieve the configuration
object from the mailbox, and the UpdateUserConfiguration to update the object. The
following example shows the request XML for getting a user configuration object
named TestConfig. The request states that all configurations should be returned in the
response. This is the same XML that is generated by the EWS Managed API example.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:GetUserConfiguration>

<m:UserConfigurationName Name="TestConfig">

<t:DistinguishedFolderId Id="drafts" />

</m:UserConfigurationName>

<m:UserConfigurationProperties>All</m:UserConfigurationProperties>

</m:GetUserConfiguration>

</soap:Body>

</soap:Envelope>

The following example shows the successful response XML for getting a user
configuration objects. The response contains a data dictionary. This is the same XML
that is processed by the EWS Managed API example.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="800"

MinorBuildNumber="5"

Version="V2_6"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetUserConfigurationResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetUserConfigurationResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:UserConfiguration>

<t:UserConfigurationName Name="TestConfig">

<t:DistinguishedFolderId Id="drafts" />

</t:UserConfigurationName>

<t:ItemId Id="AAMkDEY9M6AAA=" ChangeKey="CQAAACYnYF5aFMwP0T" />

<t:Dictionary>

<t:DictionaryEntry>

<t:DictionaryKey>

<t:Type>String</t:Type>

<t:Value>Key1</t:Value>

</t:DictionaryKey>

<t:DictionaryValue>

<t:Type>Integer32</t:Type>

<t:Value>1</t:Value>

</t:DictionaryValue>

</t:DictionaryEntry>

<t:DictionaryEntry>

<t:DictionaryKey>

<t:Type>String</t:Type>

<t:Value>PhoneNumber</t:Value>

</t:DictionaryKey>

<t:DictionaryValue>

<t:Type>String</t:Type>

<t:Value>555-555-1111</t:Value>

</t:DictionaryValue>

</t:DictionaryEntry>

</t:Dictionary>

</m:UserConfiguration>

</m:GetUserConfigurationResponseMessage>

</m:ResponseMessages>

</m:GetUserConfigurationResponse>

</s:Body>

</s:Envelope>

The following example shows the request XML for updating a user configuration object.
The request states that all configurations should be returned in the response. This is the
same XML that is generated by the EWS Managed API example that calls the
UserConfiguration.Update method. You can see that the update XML contains the
existing dictionary entries and the additional one that was added before the update.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:UpdateUserConfiguration>

<m:UserConfiguration>

<t:UserConfigurationName Name="TestConfig">

<t:DistinguishedFolderId Id="drafts" />

</t:UserConfigurationName>

<t:Dictionary>

<t:DictionaryEntry>

<t:DictionaryKey>

<t:Type>String</t:Type>

<t:Value>Key1</t:Value>

</t:DictionaryKey>

<t:DictionaryValue>

<t:Type>Integer32</t:Type>

<t:Value>1</t:Value>

</t:DictionaryValue>

</t:DictionaryEntry>

<t:DictionaryEntry>

<t:DictionaryKey>

<t:Type>String</t:Type>

<t:Value>PhoneNumber</t:Value>

</t:DictionaryKey>

<t:DictionaryValue>

<t:Type>String</t:Type>

<t:Value>555-555-1111</t:Value>

</t:DictionaryValue>

</t:DictionaryEntry>

<t:DictionaryEntry>

<t:DictionaryKey>

<t:Type>String</t:Type>

<t:Value>Key5</t:Value>

</t:DictionaryKey>

<t:DictionaryValue>

<t:Type>Integer32</t:Type>

<t:Value>1</t:Value>

</t:DictionaryValue>

</t:DictionaryEntry>

</t:Dictionary>

</m:UserConfiguration>

</m:UpdateUserConfiguration>

</soap:Body>

</soap:Envelope>

The response XML is simple and indicates whether the update was successful or
whether an error occurred.
Delete an application setting by using the EWS
Managed API
You can use the UserConfiguration.Delete EWS Managed API method to delete user
configuration objects. The following code example shows you how to delete the
ContosoDraftSettings user configuration object by using the EWS Managed API.

C#

private static void DeleteUserConfiguration(ExchangeService service)

// Binds to a user configuration object. Results in a call to EWS.

UserConfiguration usrConfig = UserConfiguration.Bind(service,

"ContosoDraftSettings",

WellKnownFolderName.Drafts,

UserConfigurationProperties.Id);

// Deletes the user configuration object.

// Results in a call to EWS.

usrConfig.Delete();

Delete an application setting by using EWS


You can use the DeleteUserConfiguration EWS operation to delete user configuration
objects.

The following example shows the request XML for deleting a user configuration object
named ContosoDraftSettings that was applied to the Drafts folder. This is the same XML
that is generated by the EWS Managed API example.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:DeleteUserConfiguration>

<m:UserConfigurationName Name="ContosoDraftSettings">

<t:DistinguishedFolderId Id="drafts" />

</m:UserConfigurationName>

</m:DeleteUserConfiguration>

</soap:Body>

</soap:Envelope>

The response XML is simple and indicates whether the delete request was a success or
whether an error occurred.

See also
Persistent application settings in EWS in Exchange
EWS client design overview for Exchange
Develop web service clients for Exchange
People and contacts in EWS in Exchange
Article • 01/15/2020 • 6 minutes to read

Learn about personas, the Unified Contact Store, and how to work with contacts by
using the EWS Managed API or EWS in Exchange.

Contacts are items in Exchange that store information about an individual, group, or
organization. Contacts can include names and email addresses, and other information,
including IM addresses, physical addresses, birthdays, family information, and a photo or
image that represents the contact.

Contact information is stored in one of two places:

Active Directory Domain Services (AD DS), if the contact is within the organization.

The Contacts folder or another folder in a user's mailbox, if the contact is outside
the organization.

Multiple contact items can represent a single individual. Exchange uses personas to help
bring these different contact items together. A persona is an aggregation of contact
information for the same individual from different sources. In addition to contact
information in Exchange, personas can also be aggregated from information in the
recipient cache for the mailbox, a hidden folder for IM contacts called QuickContacts,
and from third-party data sources. The Unified Contact Store in Exchange enables IM
clients to use this aggregation; the only difference is that the Unified Contact Store does
not aggregate information from AD DS, as shown in Figure 1.

Figure 1. Contact information sources for personas and for the Unified Contact Store
Table 1. EWS Managed API methods and EWS operations for working with contacts

If you want Use this EWS Managed API method Use this EWS
to… operation

Create a new Instantiate a new Contact object, and use CreateItem

contact Contact.Save

Copy a Contact.Copy
CopyItem

contact

Move a Contact.Move
MoveItem

contact

Update an Contact.Bind and Contact.Update


UpdateItem

existing
contact

Delete a Contact.Bind and Contact.Delete


DeleteItem

contact

Search for a ExchangeService.FindItems


FindItem

contact

Search for N/A FindPeople


people

Expand a ExchangeService.ExpandGroup
ExpandDL

distribution
group

Resolve an ExchangeService.ResolveName
ResolveNames

ambiguous
name

Get a persona N/A GetPersona

Work with Contact.SetContactPicture , GetUserPhoto or


contact Contact.GetContactPictureAttachment , or GetAttachment

photos Contact.RemoveContactPicture

Personas
Until recently, contacts were commonly stored in a single location — typically, on an
email client. Today, it is becoming more common to store contacts in many different
locations, such as on a phone, on a social networking site, in a Contacts folder in an
Exchange mailbox, or in an organization's directory service. With the proliferation of
contact information, it's possible that multiple contacts that represent the same person
contain different information; for example, one contact might include a business phone
number and another a personal phone number, or a contact stored in a Contacts folder
might have a different name than the contact for the same person that is stored on your
phone.

In Exchange Online, Exchange Online as part of Office 365, and on-premises versions of
Exchange starting with Exchange 2013, contacts from different sources that represent
the same person are associated with one another, similar to the way that email
messages are aggregated into conversations, by means of a common link ID. When
aggregated contact information is returned by an Exchange server, it includes a set of
attributes for each contact, such as a source folder, a display name, an ID, and a source
ID. The sum of the properties and attributes returned is known as a persona, and the set
of properties returned is referred to as the persona's shape .

Because the information that makes up a persona is not stored in a single location, and
because that information can change at any time, a persona is created only when you
make a request to an Exchange server. You use the FindPeople EWS operation to
make a persona search request. Your request can include a sort order, and can be
filtered according to a query string to help you find the correct persona by ordering and
filtering the results. For example, you can retrieve the display name and a set of all email
addresses that are associated with a specific contact from the Contacts folder, a Hotmail
account, a LinkedIn account, and a company's directory service, or you can retrieve a set
of all personas that have IM addresses. The linking of contacts into personas is
automatic based on an algorithm that recognizes a relationship between contacts stored
on various devices.

7 Note

The EWS Managed API does not implement this functionality.

Table 2. EWS operations for working with personas

Operation Description
name

FindPeople Returns all available personas from a specified contacts folder or retrieves
contacts that match a specified query string.

GetPersona Returns a set of properties associated with a specific persona, such as all the IM
addresses or display names for a specified persona ID.

You can use the GetPersona and FindPeople operations to efficiently retrieve contact
information from multiple sources. Because all items related to a persona are associated
with a link ID, you can use these operations in a wide variety of applications that use
contact data. The following are some examples:

A mobile phone app that uses the GetPersona operation when a user calls a
contact, and then offers additional phone numbers to call if no one answers.

An application that uses the FindPeople operation to scan Inbox messages for
email addresses to determine whether they are found in an existing persona.
Addresses that are not already associated with a persona can be used to create
sales leads or list all recent communications with the person represented by that
persona.

A mail app for Outlook that offers different salutations based on whether
correspondence is formal or informal. Formal salutations are supplied by the
display names from the directory service and informal salutations come from the
display name that originates in social network contacts.

Unified Contact Store


Personas aren't just limited to an email client. If you're developing an IM client, you
might ask yourself any or all of the following:

How can I provision Lync client applications with a default set of IM contact items?

How do I manage IM contact and group lists?

How do I manage custom Lync client access to IM contacts and IM groups?

The Unified Contact Store works behind the scenes in Exchange to aggregate contact
data from Exchange and other sources into a single entity, or persona. Although the
EWS operations that you use to access the Unified Contact Store are specific to IM
contacts, You can use the Unified Contact Store in Exchange to work with personas in all
types of applications. Keep in mind that the Unified Contact Store cannot access contact
data AD DS.

IM contacts are stored in a hidden folder called QuickContacts. You can use the
AddNewImContactToGroup and AddImContactToGroup operations to add contacts to
groups that are stored in this hidden folder. And because you can use the Unified
Contact Store to group IM contacts, you can access and update groups of contacts more
easily.

7 Note
The EWS Managed API does not implement this functionality.

Table 3. EWS operations for accessing the Unified Contact Store

Operation name Description

AddNewImContactToGroup
Adds a new IM contact to an IM group, up to a
maximum of 1000 contacts.

AddImContactToGroup Adds an existing IM contact to an IM group, up to a


maximum of 1000 contacts.

AddImGroup
Adds a new IM group, up to a maximum of 64 groups.

AddDistributionGroupToImList
Adds a new distribution group to an IM group, up to a
maximum of 64 groups.

GetImItemList
Retrieves a list of IM groups and IM contact personas.

GetImItems
Retrieves information about specific IM groups and IM
contact personas.

RemoveContactFromImList
Removes a contact from an IM group.

RemoveImContactFromGroup
Removes an IM contact from an IM group.

RemoveDistributionGroupFromImList Removes a distribution group from an IM group.

RemoveImGroup Removes an IM group.

SetImGroup
Changes the display name of an IM group.

In this section
Process contacts in batches by using EWS in Exchange

Resolve ambiguous names by using EWS in Exchange 2013

Get user photos by using EWS in Exchange

See also
Develop web service clients for Exchange

Start using web services in Exchange

EWS client design overview for Exchange


Process contacts in batches by using
EWS in Exchange
Article • 09/15/2021 • 10 minutes to read

Learn how to create, get, update, and delete batches of contacts in a single call by using
the EWS Managed API or EWS in Exchange.

You can use the EWS Managed API or EWS to work with batches of contacts to reduce
the number of calls a client makes to an Exchange server. When you use the EWS
Managed API to create, get, update, and delete contacts in batches, you use
ExchangeService object methods, whereas when you work with single contacts, you
use Contact object methods. If you are using EWS, you use the same operations to
work with both a single contact and batches of contacts.

Table 1. EWS Managed API methods and EWS operations for working with batches of
contacts

In order to… Use this EWS Managed API method Use this EWS
operation

Create contacts in ExchangeService.CreateItems


CreateItem

batches

Get contacts in ExchangeService.BindToItems or GetItem

batches ExchangeService.LoadPropertiesForItems

Update contacts in ExchangeService.UpdateItems


UpdateItem

batches

Delete contacts in ExchangeService.DeleteItems


DeleteItem

batches

In this article, you'll learn how to complete basic tasks for batches of contacts by using
the EWS Managed API or EWS.

Create contacts in batches by using the EWS


Managed API
You can create contacts in batches by using the EWS Managed API CreateItems
method, as shown in the following example. This example creates three Contact
objects locally, adds each contact to a collection, then calls the CreateItems method on
the collection of contacts.
C#

public static Collection<ItemId> CreateContactsInBatch(ExchangeService


service)

// These are unsaved local instances of a Contact object.

// Despite the required parameter of an ExchangeService object


(service), no call

// to an Exchange server is made when the objects are instantiated.

// A call to the Exchange server is made when the service.CreateItems()


method is called.

Contact contact1 = new Contact(service);

Contact contact2 = new Contact(service);

Contact contact3 = new Contact(service);

// Set the properties on the first contact.

contact1.DisplayName = "Sadie Daniels";

contact1.EmailAddresses[EmailAddressKey.EmailAddress1] = new
EmailAddress("[email protected]");

// Set the properties on the second contact.

contact2.DisplayName = "Alfred Welker";

contact2.EmailAddresses[EmailAddressKey.EmailAddress1] = new
EmailAddress("[email protected]");

// Set the properties on the third contact.

contact3.DisplayName = "Hope Gross";

contact3.EmailAddresses[EmailAddressKey.EmailAddress1] = new
EmailAddress("[email protected]");
// Add the Contact objects to a collection.

Collection<Contact> contactItems = new Collection<Contact>() { contact1,


contact2, contact3 };

// Create the batch of contacts on the server.

// This method call results in an CreateItem call to EWS.

ServiceResponseCollection<ServiceResponse> response =
service.CreateItems(contactItems, WellKnownFolderName.Contacts, null, null);

// Instantiate a collection of item IDs to populate from the values that


are returned by the Exchange server.

Collection<ItemId> itemIds = new Collection<ItemId>();

// Collect the item IDs from the created contacts.

foreach (Contact contact in contactItems)

try

itemIds.Add(contact.Id);

Console.WriteLine("Contact '{0}' created successfully.",


contact.DisplayName);

catch (Exception ex)

// Print out the exception and the last eight characters of the
item ID.

Console.WriteLine("Exception while creating contact {0}: {1}",


contact.Id.ToString().Substring(144), ex.Message);

// Determine whether the CreateItems method call completed successfully.

if (response.OverallResult == ServiceResult.Success)

Console.WriteLine("All locally created contacts were


successfully created in the Contacts folder.");

Console.WriteLine("\r\n");

// If the method did not return success, print the result message for
each contact.

else

int counter = 1;

foreach (ServiceResponse resp in response)

// Print out the result and the last eight characters of the
item ID.

Console.WriteLine("Result (contact {0}), id {1}: {2}", counter,


itemIds[counter - 1].ToString().Substring(144), resp.Result);

Console.WriteLine("Error Code: {0}", resp.ErrorCode);

Console.WriteLine("ErrorMessage: {0}\r\n", resp.ErrorMessage);

Console.WriteLine("\r\n");

counter++;

return itemIds;

Create contacts in batches by using EWS


You can create contacts in batches by using the CreateItem EWS operation, as shown
in the following code example. This is also the XML request that the EWS Managed API
sends when you use the EWS Managed API to create contacts in batches.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:CreateItem>

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="contacts" />

</m:SavedItemFolderId>

<m:Items>

<t:Contact>

<t:DisplayName>Sadie Daniels</t:DisplayName>
<t:EmailAddresses>

<t:Entry Key="EmailAddress1">[email protected]</t:Entry>

</t:EmailAddresses>

</t:Contact>

<t:Contact>

<t:DisplayName>Alfred Welker</t:DisplayName>
<t:EmailAddresses>

<t:Entry Key="EmailAddress1">[email protected]</t:Entry>

</t:EmailAddresses>

</t:Contact>

<t:Contact>

<t:DisplayName>Hope Gross</t:DisplayName>

<t:EmailAddresses>

<t:Entry Key="EmailAddress1">[email protected]</t:Entry>

</t:EmailAddresses>

</t:Contact>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The server responds to the CreateItem request with a CreateItemResponse message


that includes a ResponseCode value of NoError for each of the new contacts, which
indicates that each contact was created and saved successfully.

Get contacts in batches by using the EWS


Managed API
You can get contacts in batches by using the EWS Managed API BindToItems method,
as shown in the following example. This example assumes that service is a valid
ExchangeService object and that the user has been authenticated to an Exchange
server.

C#

public static Collection<Contact> BatchGetContactItems(ExchangeService


service, Collection<ItemId> itemIds)

// Create a property set that limits the properties returned by


the Bind method to only those that are required.

PropertySet propSet = new PropertySet(BasePropertySet.IdOnly,


ContactSchema.DisplayName);

// Get the items from the server.

// This method call results in a GetItem call to EWS.

ServiceResponseCollection<GetItemResponse> response =
service.BindToItems(itemIds, propSet);

// Instantiate a collection of Contact objects to populate from


the values that are returned by the Exchange server.

Collection<Contact> contactItems = new Collection<Contact>();

foreach (GetItemResponse getItemResponse in response)

try

Item item = getItemResponse.Item;

Contact contact = (Contact)item;

contactItems.Add(contact);

// Print out confirmation and the last eight characters


of the item ID.

Console.WriteLine("Found item {0}.",


contact.Id.ToString().Substring(144));

catch (Exception ex)

Console.WriteLine("Exception while getting a contact:


{0}", ex.Message);

// Check for success of the BindToItems method call.

if (response.OverallResult == ServiceResult.Success)

Console.WriteLine("All contacts retrieved successfully.");

Console.WriteLine("\r\n");

return contactItems;

Get contacts in batches by using EWS


You can get contacts in batches by using the GetItem EWS operation and the code in
the following example. This is also the XML request that the EWS Managed API sends
when you use the EWS Managed API to get contacts in batches. The ItemId attribute
has been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:GetItem>

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="contacts:DisplayName" />

</t:AdditionalProperties>

</m:ItemShape>

<m:ItemIds>

<t:ItemId Id="ceJwVAAA="
ChangeKey="EQAAABYAAAD2WuN+TpqwSrNP9JCCMKC0AAFc51yS" />

<t:ItemId Id="ceJwWAAA="
ChangeKey="EQAAABYAAAD2WuN+TpqwSrNP9JCCMKC0AAFc51yT" />

<t:ItemId Id="ceJwXAAA="
ChangeKey="EQAAABYAAAD2WuN+TpqwSrNP9JCCMKC0AAFc51yU" />

</m:ItemIds>

</m:GetItem>

</soap:Body>

</soap:Envelope>

The server responds to the GetItem request with a GetItemResponse message that
includes the ID and the display name for each of the requested contacts.

Update contacts in batches by using the EWS


Managed API
You can update contacts in batches by using the EWS Managed API UpdateItems
method, as shown in the following example. The previous example creates the contact
but does not specify who they work for. You can use the code in this example to update
all your contacts at once to include their company name.

This example assumes that service is a valid ExchangeService object and that the user
has been authenticated to an Exchange server.

C#

public static Collection<Contact> BatchUpdateContactItems(ExchangeService


service, Collection<Contact> contactItems)

// Update the company name of each contact locally.

foreach (Contact contact in contactItems)

// Update the company name of the contact.

contact.CompanyName = "Contoso";

// Print out confirmation with the last eight characters of


the item ID and the contact company name.

Console.WriteLine("Updated local contact {0} with the


company name '{1}'.", contact.Id.ToString().Substring(144),
contact.CompanyName);

// Send the item updates to the server.

// This method call results in an UpdateItem call to EWS.

ServiceResponseCollection<UpdateItemResponse> response =
service.UpdateItems(contactItems, WellKnownFolderName.Contacts,
ConflictResolutionMode.AutoResolve, null, null);

// Verify the success of the UpdateItems method call.

if (response.OverallResult == ServiceResult.Success)

Console.WriteLine("All contacts updated successfully.\r\n");

// If the method did not return success, print the result


message for each contact.

else

Console.WriteLine("All contacts were not successfully saved


on the server.\r\n");

int counter = 1;

foreach (ServiceResponse resp in response)

Console.WriteLine("Result for (contact {0}): {1}",


counter, resp.Result);

Console.WriteLine("Error Code: {0}", resp.ErrorCode);

Console.WriteLine("ErrorMessage: {0}\r\n",
resp.ErrorMessage);

counter++;

return contactItems;

Update contacts in batches by using EWS


You can update contacts in batches by using the GetItem EWS operation, as shown in
following code example. This is also the XML request that the EWS Managed API sends
when you use the EWS Managed API to update contacts in batches. The ItemId attribute
has been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:UpdateItem ConflictResolution="AutoResolve">

<m:SavedItemFolderId>

<t:DistinguishedFolderId Id="contacts" />

</m:SavedItemFolderId>

<m:ItemChanges>

<t:ItemChange>

<t:ItemId Id="ceJwVAAA="
ChangeKey="EQAAABYAAAD2WuN+TpqwSrNP9JCCMKC0AAFc51yS" />

<t:Updates>
<t:SetItemField>

<t:FieldURI FieldURI="contacts:CompanyName" />

<t:Contact>

<t:CompanyName>Contoso</t:CompanyName>
</t:Contact>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

<t:ItemChange>

<t:ItemId Id="ceJwWAAA="
ChangeKey="EQAAABYAAAD2WuN+TpqwSrNP9JCCMKC0AAFc51yT" />

<t:Updates>
<t:SetItemField>

<t:FieldURI FieldURI="contacts:CompanyName" />

<t:Contact>

<t:CompanyName>Contoso</t:CompanyName>
</t:Contact>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

<t:ItemChange>

<t:ItemId Id="ceJwXAAA="
ChangeKey="EQAAABYAAAD2WuN+TpqwSrNP9JCCMKC0AAFc51yU" />

<t:Updates>
<t:SetItemField>

<t:FieldURI FieldURI="contacts:CompanyName" />

<t:Contact>

<t:CompanyName>Contoso</t:CompanyName>
</t:Contact>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

</m:ItemChanges>

</m:UpdateItem>

</soap:Body>

</soap:Envelope>

The server responds to the UpdateItem request with an UpdateItemResponse


message that includes a ResponseCode value of NoError, which indicates that each of
the updates was saved successfully on the server. Any conflicts are reported in the
ConflictResult element.
Delete contacts in batches by using the EWS
Managed API
You can delete contacts in batches by using the DeleteItems EWS Managed API
method, as shown in the following example. This example assumes that service is a valid
ExchangeService object and that the user has been authenticated to an Exchange
server.

C#

public static void BatchDeleteContactItems(ExchangeService service,


Collection<ItemId> itemIds)

// Delete the batch of contact objects.

// This method call results in an DeleteItem call to EWS.

ServiceResponseCollection<ServiceResponse> response =
service.DeleteItems(itemIds, DeleteMode.SoftDelete, null,
AffectedTaskOccurrence.AllOccurrences);

// Check for success of the DeleteItems method call.

// DeleteItems returns success even if it does not find all the


item IDs.

if (response.OverallResult == ServiceResult.Success)

Console.WriteLine("Contacts deleted successfully.\r\n");

// If the method did not return success, print a message.

else

Console.WriteLine("Not all contacts deleted


successfully.\r\n");

Delete contacts in batches by using EWS


You can delete contacts in batches by using the DeleteItem EWS operation, as shown in
the following code example. This is also the XML request that the EWS Managed API
sends when you use the EWS Managed API to delete contacts in batches. The ItemId
attribute has been shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

</soap:Header>

<soap:Body>

<m:DeleteItem DeleteType="SoftDelete"
AffectedTaskOccurrences="AllOccurrences">

<m:ItemIds>

<t:ItemId Id="ceJwYAAA="
ChangeKey="EQAAABYAAAD2WuN+TpqwSrNP9JCCMKC0AAFc51yY" />

<t:ItemId Id="ceJwZAAA="
ChangeKey="EQAAABYAAAD2WuN+TpqwSrNP9JCCMKC0AAFc51yZ" />

<t:ItemId Id="ceJwaAAA="
ChangeKey="EQAAABYAAAD2WuN+TpqwSrNP9JCCMKC0AAFc51ya" />

</m:ItemIds>

</m:DeleteItem>

</soap:Body>

</soap:Envelope>

The server responds to the DeleteItem request with a DeleteItemResponse message


that includes a ResponseCode value of NoError for each item that was removed. Note
that the operation also returns success if the item ID could not be found.

Verifying that a batch process completed


successfully
When one or more contacts in a batched request can't be processed as requested, an
error is returned for each contact that failed, and the rest of the contacts in the batch
are processed as expected. Failures in batch processing can occur if the item was
deleted, and therefore can't be retrieved, or updated, or if the item moved to a different
folder, and therefore has a new item ID, and cannot be modified with the item ID sent.
The information in this section shows how to get error details about failures in batch
processing of contacts.

To verify the success of a batch process by using the EWS Managed API, you can check
that the OverallResult property of the ServiceResponseCollection is equal to
ServiceResult.Success . If so, all the contacts were processed successfully. If the
OverallResult is not equal to ServiceResult.Success, one or more of the contacts were
not processed successfully. Each of the objects returned in the
ServiceResponseCollection contains the following properties:

ErrorCode

ErrorDetails
ErrorMessage

ErrorProperties

Result

These properties contain information about why the contacts could not be processed as
requested. The examples in this article print out the Result, ErrorCode, and
ErrorMessage for each failed contact. You can use these results to investigate the issue.

For EWS, to verify the success of a batched process, check the ResponseClass attribute
for each item being processed. The following is the basic structure of the
ResponseMessageType, the base type from which all response messages are derived.

XML

<ResponseMessage ResponseClass="Success | Warning | Error">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</ResponseMessage>

The ResponseClass attribute is set to Success if the contact was processed successfully,
or Error if the contact was not processed successfully. For contacts, you will not
encounter a Warning during batch processing. If the ResponseClass is Success, the
ResponseCode element that follows is also always set to NoError. If the
ResponseClass is Error, you need to check the values of the MessageText ,
ResponseCode, and MessageXml elements to determine what caused the problem.
DescriptiveLinkKey is currently unused.

See also
People and contacts in EWS in Exchange

Process email messages in batches by using EWS in Exchange

Process calendar items in batches in Exchange


Resolve ambiguous names by using
EWS in Exchange 2013
Article • 02/11/2022 • 6 minutes to read

Learn how to use the EWS Managed API or EWS to resolve ambiguous names by getting
possible matches from Active Directory Domain Services (AD DS) or a contacts folder in
your user's mailbox.

A user in your organization is given a hand-written list of names and addresses for
employees that attended a training session. They want to send an email with some
additional information to people on the list, but they can't read everyone's email
address. If you want to solve this problem for your users in your application, EWS can
help. You can use the ExchangeService.ResolveName EWS Managed API method or
the ResolveNames EWS operation to return a list of potential matches for a selection
of text, such as part of a last name. The returned items can be public user mailboxes,
distribution groups, and contacts.

Note that Exchange saves email addresses with prefixed routing types, such as smtp or
sip, in a multivalue array. The ResolveName method and the ResolveNames operation
perform a partial match against each value of that array when you add the routing type
at the beginning of the unresolved name, such as "sip:User1". If you don't specify a
routing type, the method or operation will default to smtp, match it to a primary smtp
address property, and not search the multivalue array. For example, if you search for
User1 and do not include the sip prefix, you will not receive sip:[email protected] as
a result, even if that is a valid mailbox.

You can only specify one ambiguous name in a single request. If you have a list of
ambiguous names to resolve, you will need to loop through the list and call the method
or operation for each entry. Candidates from a user's Contacts folder will have a non-
null item ID value, which can then be used in a Contact.Bind method call or GetItem
operation request to retrieve additional information. If the candidate is a distribution
group, you can use the ExpandGroup(ItemId) EWS Managed API method or the
ExpandDL EWS operation to get the list of members. If the returnContactDetails
parameter or the ReturnFullContactData EWS attribute is set to true, Active Directory
entries returned via a ResolveName method or ResolveNames operation will include
additional properties that describe the contact. The returnContactDetails parameter or
the ReturnFullContactData attribute does not affect the data that is returned for
contacts and contact groups.
Resolve ambiguous names by using EWS
Managed API
You can use the ResolveName method to find candidates that match the ambiguous
name you pass. You can use overloads of the ResolveName method to search for
candidates in five different ways.

Table 1. Overloaded ResolveName methods

Method How it works

ResolveName(String) Finds contacts in the user's Contacts folder and the Global
Address List (GAL) — in that order. The string variable is the
ambiguous name you are trying to resolve.

ResolveName(String, Finds contacts in the default Contacts folder and/or the Global
ResolveNameSearchLocation, Address List (GAL). The string value is the ambiguous name, the
Boolean) search location specifies the Contacts folder and/or the GAL, and
the Boolean value indicates whether to return the full contact
information.

ResolveName(String, Finds contacts in the default Contacts folder and/or Global


ResolveNameSearchLocation, Address List (GAL). This method enables you to set the properties
Boolean, PropertySet) that are returned.

ResolveName(String, Finds contacts in specified contact folders and/or the Global


IEnumerable<FolderId>, Address List (GAL). You can use this method to pass a collection of
ResolveNameSearchLocation, folders to search. This enables you to look in contact folders other
Boolean) than the default Contacts folder.

ResolveName(String, Finds contacts in the Global Address List (GAL) and/or in specific
IEnumerable<FolderId>, contact folders. This method enables you to set the properties
ResolveNameSearchLocation, that are returned.
Boolean, PropertySet)

Let's start with a simple example. The following example shows how to resolve the text
string "dan" and output the name and email address of each candidate found. This
example assumes that service is a valid ExchangeService object and that the user has
been authenticated to an Exchange server.

C#

// Resolve the ambiguous name "dan".

NameResolutionCollection resolvedNames = service.ResolveName("dan");

// Output the list of candidates.

foreach (NameResolution nameRes in resolvedNames)

Console.WriteLine("Contact name: " + nameRes.Mailbox.Name);

Console.WriteLine("Contact e-mail address: " +


nameRes.Mailbox.Address);

Console.WriteLine("Mailbox type: " + nameRes.Mailbox.MailboxType);

The response returns a maximum of 100 candidates, although there might be more than
100 potential candidates. To determine whether only the first 100 candidates of a larger
number of candidates were returned, check the value of IncludesAllResolutions in the
NameResolutionCollection object. If the value is true, there are no more possible
candidates; if the value is false, the method only returned the first 100 of a larger
number of potential candidates.

If you work in a large organization, it's likely that a name like "dan" will return the
maximum number of 100 candidates. To reduce the number of candidates returned,
limit where you search. The next example uses the ResolveNameSearchLocation
enumeration to specify where to search to resolve the ambiguous name.

C#

// Resolve the ambiguous name "dan".

// Only use the Contacts folder.

NameResolutionCollection resolvedNames = service.ResolveName("dan",


ResolveNameSearchLocation.ContactsOnly, false);

// Output the list of candidates.

foreach (NameResolution nameRes in resolvedNames)

Console.WriteLine("Contact name: " + nameRes.Mailbox.Name);

Console.WriteLine("Contact e-mail address: " +


nameRes.Mailbox.Address);

Console.WriteLine("Mailbox type: " + nameRes.Mailbox.MailboxType);

If you store your contacts in a folder other than the well-known Contacts folder, use one
of the overloaded methods to specify where to look for candidates. The following
example creates a folder list for the ResolveName method based on the folder ID. The
FolderId has been shortened for readability.

C#

// Create a list to store folders to search.

List<FolderId> folders = new List<FolderId>();

// Add a folder to the list based on the FolderId.

folders.Add(new FolderId("AABR8mboAAA="));

// Resolve the ambiguous name "dan".

// Only use the folders specified.

NameResolutionCollection resolvedNames = service.ResolveName("dan", folders,


ResolveNameSearchLocation.ContactsOnly, false);

foreach (NameResolution nameRes in resolvedNames)

Console.WriteLine("Contact name: " + nameRes.Mailbox.Name);

Console.WriteLine("Contact e-mail address: " +


nameRes.Mailbox.Address);

Console.WriteLine("Mailbox type: " + nameRes.Mailbox.MailboxType);

If you apply filters and no candidates are returned, the NameResolutionCollection will
contain zero entries. You can verify this by looking at the Count property of the
collection.

Resolve ambiguous names by using EWS


You can use the ResolveNames EWS operation to identify possible candidates for an
ambiguous name. The UnresolvedEntry element contains the ambiguous name you
want to resolve. The following example shows how to resolve the name Sadie. This is
also the XML request that the EWS Managed API uses when you use the ResolveName
method, except that it uses a different name for valid output examples.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<ResolveNames
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

ReturnFullContactData="true">

<UnresolvedEntry>Sadie</UnresolvedEntry>

</ResolveNames>

</soap:Body>

</soap:Envelope>

The response returns a maximum of 100 candidates, although there might be more than
100 potential candidates To determine whether only the first 100 candidates of a larger
number of candidates were returned, check the value of the IncludesLastItemInRange
attribute of the ResolutionSet element. If the value is true, there are no more possible
candidates; if the value is false, the operation only returned the first 100 of a larger
number of potential candidates.
The following example shows the XML response when one candidate is found.
Remember, the ResolutionSet can contain up to 100 candidates, each one represented
by the Resolution element and its child elements.

XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Body>

<ResolveNamesResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:ResolveNamesResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:ResolutionSet TotalItemsInView="1"
IncludesLastItemInRange="true">

<t:Resolution>

<t:Mailbox>

<t:Name>Sadie Daniels</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Mailbox>

<t:Contact>

<t:DisplayName>Sadie Daniels</t:DisplayName>

<t:EmailAddresses>

<t:Entry
Key="EmailAddress1">SMTP:[email protected]</t:Entry>

</t:EmailAddresses>

<t:ContactSource>ActiveDirectory</t:ContactSource>

</t:Contact>

</t:Resolution>

</m:ResolutionSet>

</m:ResolveNamesResponseMessage>

</m:ResponseMessages>

</ResolveNamesResponse>

</soap:Body>

</soap:Envelope>

You're not always going to come up with candidates for your ambiguous name. The
following example shows the XML response, as an error, when no candidates are found.

XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Body>

<ResolveNamesResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:ResolveNamesResponseMessage ResponseClass="Error">

<m:MessageText>No results were found.</m:MessageText>

<m:ResponseCode>ErrorNameResolutionNoResults</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:ResolveNamesResponseMessage>

</m:ResponseMessages>

</ResolveNamesResponse>

</soap:Body>

</soap:Envelope>

See also
People and contacts in EWS in Exchange
Expand distribution groups by using EWS in Exchange 2013
Get user photos by using EWS in
Exchange
Article • 01/15/2020 • 8 minutes to read

Learn how to get user photos that are associated with a mailbox or contact by using the
EWS Managed API or EWS in Exchange.

It's nice to put a face to a name. If your users like to put names to faces, your application
can request an image, typically a photo, from Exchange that represents an email
account. You can get a user photo stored on an Exchange server for a mailbox, or you
can get a contact photo from contacts stored in your mailbox.

You can use several different technologies to get photos from mailboxes or Active
Directory Domain Services (AD DS). The best way to get a photo depends on the type of
contact that you want to get a photo from.

Table 1. Technologies to use to get user photos based on contact type

Contact type Technologies to use

Mailbox user photo Get a mailbox user photo by using REST

Get a user photo by using EWS

Contact user photo Get a contact user photo by using EWS Managed API

Get a user photo by using EWS

Get a mailbox user photo by using REST


You can request user photos from an Exchange server by using a standard HTTPS GET
request. In the request, specify the email account address and a size code for the image,
as shown in the following example.

HTML

https://Exchange Server/ews/Exchange.asmx/s/GetUserPhoto?email=email
address&amp;size=size code

Use the Autodiscover service GetUserSettings operation to retrieve the ExternalEwsUrl


setting, which contains the URL of the Exchange Web Services (EWS) endpoint and the
location of the Exchange.asmx HTTP handler that returns the user photos.
Each size code indicates the height and width of the image in pixels. For example, the
size code HR48x48 returns an image that is 48 pixels high by 48 pixels wide. The
possible values for the size code parameter are the same as the possible values for the
SizeRequested element. If the request specifies a size that is not available, the largest
available photo will be returned. If no photo is stored on the Exchange server, the
thumbnail image stored in AD DS for the account will be returned.

7 Note

The HR48x48 size code always returns the AD DS thumbnail image if it is available.

The following example shows how you can use the GET request to retrieve the user
photo for Sadie and save it to your local computer.

C#

// Create the web request with the REST URL.

HttpWebRequest request =

WebRequest.Create("https://www.contoso.com/ews/exchange.asmx/s/GetUserPhoto?
[email protected]&amp;size=HR240x240")

as HttpWebRequest;

// Submit the request.

using (HttpWebResponse resp = request.GetResponse() as HttpWebResponse)

// Take the response and save it as an image.

Bitmap image = new Bitmap(resp.GetResponseStream());

image.Save("Sadie.jpg");

The request will return an HTTP response.

Table 2. Response codes for a GetUserPhoto request

Response Description
code

200 An image is available for the specified email account and the binary image is
contained in the response.

304 The image has not changed since the last time the ETag was returned to the
application.

404 No image is available for the specified email account.


Cache user photos
Exchange returns the data with a content type of image/jpeg, along with a collection of
header values. The ETag header is similar to a change key. The value is a string that
represents the last time the photo was updated. The ETag remains the same for the user
photo until the photo is changed. You can send this ETag value to the server in the
HTTPS GET request in an If-None-Match header. If the photo hasn't changed since the
last request, the server will respond with an HTTP 304 response that indicates as such.
This means that you can use the user photo that you previously requested and saved
rather than processing a new one.

Get a contact user photo by using EWS


Managed API
Your application can use the EWS Managed API to retrieve photos for contacts, if the
contact is stored in a contact folder in the user's mailbox. To do this, first, find the ItemId
for the contact you want use. Then, after you bind to that contact, load it to the
attachments collection. If the contact has a photo, the photo will be one of the
attachments. Loop through the attachments collection, checking the value of the
IsContactPhoto property. When you find the contact photo, you can save it to your local
computer, and your application can access it.

The following example shows this process. This example assumes that service is a valid
ExchangeService object and that the user has been authenticated to an Exchange
server.

C#

private static void GetContactPhoto(ExchangeService service, string ItemId)

// Bind to an existing contact by using the ItemId passed into this


function.

Contact contact = Contact.Bind(service, ItemId);

// Load the contact to get access to the collection of attachments.

contact.Load(new PropertySet(ContactSchema.Attachments));

// Loop through the attachments looking for a contact photo.

foreach (Attachment attachment in contact.Attachments)

if ((attachment as FileAttachment).IsContactPhoto)

// Load the attachment to access the content.

attachment.Load();

FileAttachment photo = contact.GetContactPictureAttachment();

// Create a file stream and save the contact photo to your computer.

using (FileStream file = new FileStream(photo.Name, FileMode.Create,


System.IO.FileAccess.Write))

photo.Load(file);

Get a user photo by using EWS


If you're getting a user photo from AD DS, you can use the GetUserPhoto operation (if
you know the email address) or the ResolveNames operation (if you don't know the
email address). If you're getting a user photo from a contacts folder in the mailbox, use
the GetItem operation followed by the GetAttachment operation. In either case, the
photo is returned as a Base64-encoded string in the XML response.

Get a mailbox user photo by using the GetUserPhoto


operation
Using the GetUserPhoto operation is straightforward. In the XML request, specify the
email address of the user, and the size of the photo to return (in the SizeRequested
element). The following XML request example shows how to get a photo for Sadie
Daniels that's 360 pixels wide by 360 pixels high.

XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013 "/>

</soap:Header>

<soap:Body>

<m:GetUserPhoto>

<m:Email>[email protected]</m:Email>

<m:SizeRequested>HR360x360</m:SizeRequested>

</m:GetUserPhoto>
</soap:Body>

</soap:Envelope>

The following is the XML response. The Base64-encoded photo is contained in the
PictureData element (the content has been shortened for readability).

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<GetUserPhotoResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<HasChanged>true</HasChanged>

<PictureData>/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAg... wATRRRSuB//2Q==
</PictureData>

</GetUserPhotoResponse>

</s:Body>

</s:Envelope>

Get a mailbox user photo by using the ResolveNames


operation
If you don't know the email address of the user for whom you are getting a photo, you
can use the ResolveNames operation to get candidates for a possible match. If you
specify "AllProperties" for the ContactDataShape attribute of the ResolveNames
element, a lot of data, including user photos, will be returned for each candidate. The
following example shows the XML request to resolve the name "Sadie" and return all the
properties for each candidate.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:ResolveNames ReturnFullContactData="true"
ContactDataShape="AllProperties">

<m:UnresolvedEntry>sadie</m:UnresolvedEntry>

</m:ResolveNames>

</soap:Body>

</soap:Envelope>

A lot of data will be returned in the response. The following example shows only the
data that is relevant to the user photo. The Photo element contains the Base64-encoded
user photo (the content has been shortened for readability).

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:ResolveNamesResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:ResolveNamesResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:ResolutionSet TotalItemsInView="1"
IncludesLastItemInRange="true">

<t:Resolution>

<t:Mailbox>

<t:Name>Sadie Daniels</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Mailbox>

<t:Contact>

<t:DisplayName>Sadie Daniels</t:DisplayName>

<t:GivenName>Sadie</t:GivenName>

<t:Initials/>

<t:CompanyName>CONTOSO</t:CompanyName>

......

<t:Photo>/9j/4AAQSkZJRgABAQE...qKKKAP/2Q==</t:Photo>

......

</t:Contact>

</t:Resolution>

</m:ResolutionSet>

</m:ResolveNamesResponseMessage>

</m:ResponseMessages>

</m:ResolveNamesResponse>

</s:Body>

</s:Envelope>

Get a contact user photo by using the GetAttachment


operation
You can use EWS to get photos from contacts stored in your mailbox. First, you use the
GetItem operation to return all properties so you can look for photos. The following
example shows an XML request to get a contact item. The item ID has been shortened
for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<GetItem
xmlns='https://schemas.microsoft.com/exchange/services/2006/messages'>

<ItemShape>

<t:BaseShape>AllProperties</t:BaseShape>

</ItemShape>

<ItemIds>

<t:ItemId Id="AAAAGECXAAA="
ChangeKey="EQAAABYAAAD2WuN+TpqwSrNP9JCCMKC0AABLzXRv"/>

</ItemIds>

</GetItem>

</soap:Body>

</soap:Envelope>

Look for the HasPicture element to verify that the contact has an associated photo.
Then look through the collection of attachments for one that has a value of true for the
IsContactPhoto element. The following response example shows only the relevant
data. The ID values are shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Contact>
<t:ItemId Id="AAAAGECXAAA="
ChangeKey="EQAAABYAAAD2WuN+TpqwSrNP9JCCMKC0AABLzXRv"/>

<t:ParentFolderId Id="nIxIAAA=" ChangeKey="AQAAAA=="/>

<t:ItemClass>IPM.Contact</t:ItemClass>

<t:Subject>Hope Gross</t:Subject>

<t:Sensitivity>Normal</t:Sensitivity>

......

<t:Attachments>

<t:FileAttachment>

<t:AttachmentId Id="1LGlhgpgoA="/>

<t:Name>ContactPicture.jpg</t:Name>

<t:Size>6260</t:Size>

<t:LastModifiedTime>2011-03-
09T16:55:55</t:LastModifiedTime>

<t:IsInline>false</t:IsInline>

<t:IsContactPhoto>true</t:IsContactPhoto>

</t:FileAttachment>

</t:Attachments>

......

<t:HasPicture>true</t:HasPicture>

</t:Contact>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</m:GetItemResponse>

</s:Body>

</s:Envelope>

Next, use the GetAttachment operation with the AttachmentId to request the
attachment that has the contact photo. The following example shows the XML request
to get the attachment. The ID is shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<GetAttachment
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<AttachmentShape/>

<AttachmentIds>

<t:AttachmentId Id="1LGlhgpgoA="/>

</AttachmentIds>

</GetAttachment>

</soap:Body>

</soap:Envelope>

The following example shows the XML response with the information about the
attachment you requested. The Content element contains the Base64-encoded string
for the user photo, shortened in this example for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetAttachmentResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetAttachmentResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Attachments>

<t:FileAttachment>

<t:AttachmentId Id="+KsDBEr1LGlhgpgoA="/>

<t:Name>ContactPicture.jpg</t:Name>

<t:Content>/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAg...D//2Q==
</t:Content>

</t:FileAttachment>

</m:Attachments>

</m:GetAttachmentResponseMessage>

</m:ResponseMessages>

</m:GetAttachmentResponse>

</s:Body>

</s:Envelope>

Decode a Base64-encoded string


Regardless of the operation you use to get a user photo, you'll need to decode that
string so you can use it in your application. The following example shows how to decode
the string, and then save it to your local computer so you application can access it later.

C#

// Convert the encoded string into a byte array.

byte[] data = System.Convert.FromBase64String(Photo);

// Create a memory stream to read the data.

MemoryStream ms = new MemoryStream(data);

// Save the data on your local computer as a JPG image.

using (FileStream file = new FileStream(ContactName + ".jpg",


FileMode.Create, System.IO.FileAccess.Write))

byte[] bytes = new byte[ms.Length];

ms.Read(bytes, 0, (int)ms.Length);

file.Write(bytes, 0, bytes.Length);

ms.Close();

See also
People and contacts in EWS in Exchange
Resolve ambiguous names by using EWS in Exchange 2013
Process contacts in batches by using EWS in Exchange
Properties and extended properties in EWS in
Exchange
Article • 01/15/2020 • 10 minutes to read

Discover how you can define and access properties on items and folders by using EWS in Exchange.

An Exchange mailbox contains a large number of items, including email messages, appointments,
meetings, and so on. Those items are made up of properties; the properties describe the items. You can
use item properties to perform a search, synchronize item changes, and create custom property types .
This article provides an overview of properties and how you can work with properties in your application.

Exchange item properties


Items and folders in Exchange are essentially rows in tables. The main property that identifies an item or
folder is its EWS identifier. Although there are other identifier-related properties in the Exchange
database, for EWS, the EWS identifier acts as the primary key for the collection of properties that describe
an item. The EWS identifier property contains two parts:

An ItemId or FolderId property that identifies the item

A ChangeKey property that contains stateful information about whether an item or folder has
changed

All items in a mailbox are stored in the same Exchange database and use the same database schema.
Items are distinguished by a combination of the ItemClass property, property constraints, and the
business logic layers that affect how they are managed in the Exchange store. Table 1 shows how
properties are applied across different item types; in this example, email and appointment items. Both
items have a value for the Subject property. But notice that the IsAllDayEvent property is not set on
the email item, and the IsReadReceiptRequested property is not set on the appointment. Fortunately, you
don't need to know which properties are applicable for each item class; EWS handles this for you.

Table 1. Comparison of appointment and email properties

Item type Item class Subject IsAllDayEvent IsReadReceiptRequested

Email IPM.Note Status report: Project X complete NULL true

Appointment IPM.Appointment Contoso company meeting false NULL

The EWS schema supports many of the constraints managed by the Exchange database and the business
logic layers between EWS and the Exchange database. The EWS schema applies a defined a set of
properties to each item type. The following are the strongly-typed Exchange database items provided by
EWS:

Email messages

Appointments

Contacts
Distribution lists

Meeting messages

Meeting requests

Meeting responses

Meeting cancellations

Tasks

Post items

Generic items are returned by EWS as email messages. The EWS Managed API implements all these item
types.

7 Note

Response objects are only sent by the client to the server in response to items received from other
people. They do not exist in the Exchange database.

What are properties in EWS?


The EWS schema describes the data that is sent between an EWS client and Exchange. A large part of the
schema describes the item and folder properties that you can access in the Exchange database. The EWS
schema describes the XML representation of the Exchange database properties that are available to your
application. The actual properties, in terms of which properties are available, what form they take, and the
values they return, vary based on what you trying to do. For example, the Body property will only return
the first 512 characters in a FindItem operation, but the GetItem operation returns the full text of the
item. Although most properties are both settable and retrievable, some properties are only set by
Exchange. Each property exists in the schema in an XML format that either reflects the property as it is
stored in the Exchange database, or is computed from properties stored in the Exchange database. The
Subject property is an example of a settable property; the UnreadCount property on a folder is an
example of a computed property. A core set of properties are common to the core item types.

The following factors determine the property set that your application gets from Exchange:

The operation that your application is calling

The base response shape

The item type

The specified property paths

It is important to understand how these different factors affect the data that you can access. As with the
example of the Body property mentioned earlier, some information is conditionally available depending
on various factors. Understanding these factors might save you time by helping you choose the correct
options to access the information you want. To discover which properties are accessible, you will need to
test these factors to determine how to access the properties your application needs. This section
describes how these different factors affect which properties are returned in EWS responses.

EWS response shapes


Exchange stores a lot of information about items. Sometimes, your application doesn't need all of that
information, and in many cases, it is best not to get it all. EWS response shapes, also called property
shapes, indicate which properties are returned from the server. The core element of the response shape is
the base shape. A base shape is a default preset property bag for strongly typed items. The EWS
Managed API equivalent of the base shape is the BasePropertySet . EWS includes three default response
shapes.

Table 2. Default response shapes

Default EWS Managed API equivalent Description


response
shape name

IdOnly BasePropertySet.IdOnly value Only the EWS identifier and change key are returned. Unless
the client uses all the properties returned by the AllProperties
or Default shape, use the IdOnly shape and specify additional
properties by using the property path set on the PropertySet
class. Most applications should use the IdOnly response shape
with additional properties specified. This reduces the amount of
unused data that is requested by clients.

Default N/A A set of standard properties for the item type. Only use this
response shape if your application uses all the properties.

AllProperties BasePropertySet.FirstClassProperties A larger set of properties than the Default shape. Although the
value name implies it, this option does not return all properties on an
item. This property set returns the properties that client
applications use most often. If you need additional properties,
you can request them by their property path.
If your application doesn't use all the properties returned with
this response shape, use the IdOnly response shape with
additional properties specified.

Many EWS operations return items and their properties. Regardless of the response shapes that you
specify, different operations can return different property sets. Different item types also return different
properties, depending on the operation and the response shape specified. The following operations use
response shapes to identify which properties to return.

Table 3. Operations that use response shapes

EWS operation EWS Managed API method

GetConversationItems
ExchangeService.GetConversationItems method

GetFolder
Folder.Bind method

GetItem
Item.Bind method

ExchangeService.BindToItems method

FindConversation
ExchangeService.FindConversation method

EWS operation EWS Managed API method

FindFolder
Folder.FindFolders method

ExchangeService.FindFolders method

FindItem
Folder.FindItems method

ExchangeService.FindItems method

FindPeople Not implemented.

ResolveNames
ExchangeService.ResolveNames method

SearchMailboxes
ExchangeService.SearchMailboxes method

ExchangeService.BeginSearchMailboxes method

SyncFolderHierarchy
ExchangeService.SyncFolderHierarchy method

SyncFolderItems
ExchangeService.SyncFolderItems method

Property shapes are one, rudimentary way to identify the properties that you want your application to
return. Sometimes, however, your application needs a more refined set of specific properties. For this, you
can use the property path.

Choose properties by their property path


An EWS property path is metadata that is used to identify properties in either a request or response.

Table 4. Property path types

Property path Schema type EWS Managed API Description


type implementation

FieldUri PathToUnindexedFieldType Types that inherit from The most common property path. FieldUri
ServiceObjectSchema . property paths are specified on a
PropertySet object in the EWS Managed
API. Most EWS properties can be specified
by the FieldUri property path. This is
described by the UnindexedFieldURIType in
the EWS schema.
The FieldUri property path XML looks like
this:
XML<FieldURI
FieldURI="item:Subject"/> This property
path is the equivalent of
ItemSchema.Subject in the EWS Managed
API.
Property path Schema type EWS Managed API Description
type implementation

IndexedFieldUri PathToIndexedFieldType Types that inherit from Identifies dictionary properties that require
ItemSchema . a property index to specify the value to
return. Use this path when a property can
have more than one value. This is described
by the DictionaryURIType property in the
EWS schema. DictionaryURIType property
paths are specified on a PropertySet object
in the EWS Managed API.
The IndexedFieldUri property path XML
looks like this:
XML<IndexedFieldURI
FieldURI="contacts:PhysicalAddress:Street
FieldIndex="Home"/>

ExtendedFieldUri PathToExtendedFieldType ExtendedPropertyDefinition Identifies an extended property definition


that identifies custom or non-schematized
properties on items.
The ExtendedFieldUri property path XML
looks like this:
XML<ExtendedFieldURI>
PropertyTag="0x1234"
PropertyType="Integer" />

ExceptionFieldUri ExceptionFieldURI ServiceResponse


Specifies properties that are associated
with an error in an EWS response. This is
described by the
ExceptionPropertyURIType type in the
EWS schema. This only occurs in the
MessageXml element of error responses
that occur when you are working with
calendar recurrence patterns.

As a best practice, when you request properties, use the IdOnly base shape (BasePropertySet.IdOnly in
the EWS Managed API) and then request only the properties your application needs by specifying the
property paths.

Schematized properties
Most of the properties that your EWS client needs are described by the EWS schema. The primary folder
and item type definitions, which contain the property definitions, are found in the types.xsd schema. The
following schema types contain the property definitions for most objects that you can use.

Table 5. Schema types that contain property definitions

EWS schema type EWS Managed API Defines the…


type equivalent

ItemType
Item class
Base item type property set. This type can be created
from a client but is never returned by Exchange.
Exchange returns a MessageType object for all generic
objects.
EWS schema type EWS Managed API Defines the…
type equivalent

MessageType
EmailMessage Email message object property set and the property set
class
for all generic objects.

CalendarItemType
Appointment Calendar item property set; this includes single and
class
recurring appointments.

ContactItemType
Contact class
Contact item property set.

DistributionListType
ContactGroup Personal distribution list property set.
class

MeetingMessageType
MeetingMessage Meeting message type property set.
class

MeetingRequestMessageType
MeetingRequest Meeting request type property set.
class

MeetingResponseMessageType
MeetingResponse Meeting response type property set.
class

MeetingCancellationMessageType MeetingCancellation Meeting cancellation type property set.


class

TaskType
Task class
Task type property set.

PostItemType
PostItem class
Postitem type property set.

FolderType
Folder class
Folder type property set.

CalendarFolderType
CalendarFolder SearchFolder type property set.
class

ContactsFolderType
ContactsFolder ContactsFolder type property set.
class

SearchFolderType
SearchFolder class SearchFolder type property set.

TasksFolderType
TasksFolder class
TasksFolder type property set.

UserConfigurationType
UserConfiguration UserConfiguration type property set.
class

While the properties in the EWS schema are sufficient for many applications, you can't implement some
scenarios by using only what is described in the schema. For those scenarios, you can extended
properties.

Extended properties (aka non-schematized properties)


Extended properties enable you to create custom properties, which give you access to properties on
items and folders in the Exchange store that are not defined in the EWS schema. You can use them to
access the native MAPI item and folder properties in the Exchange database. You can use extended
properties to access all the schematized properties, because under the covers, those schematized
properties are nothing more than MAPI properties in the Exchange database.
The PathToExtendedFieldType schema type, located in the types.xsd schema, defines the XML that
represents an extended property. This schema type defines the ExtendedFieldURI element in XML
instances; in other words, it defines the XML that is sent between the service and client. The
ExtendedPropertyType schema type defines both the ExtendedFieldURI element and the value or array
of values that an extended property contains. The following table shows the approximate mapping of the
extended property XML and how it is implemented on items in the EWS Managed API.

Table 6. Extended property XML as implemented in the EWS Managed API

EWS Managed API What it contains What it maps to


implementation

Item.ExtendedProperties A collection of extended properties One or more instances of extended properties


property
on an item. on an item.

ExtendedProperty class
The extended property definition and The ExtendedPropertyType schema type.
values.

ExtendedPropertyDefinition An extended property definition. The PathToExtendedFieldType schema type.


class

If you want to learn more about how you can use extended properties in your application, you can
explore the following code samples:

MFCMapi

Exchange 2013: Provision custom X-headers programmatically

Exchange 2013: Access a property by its property tag

Exchange 2013: Access a named property by its identifier

Exchange 2013: Access a named property by its name

Exchange 2013: Access a property by property set GUID and name

Exchange 2013: Create custom extended properties programmatically

In this section
Provision x-headers by using EWS in Exchange

EWS property-related errors

See also
Start using web services in Exchange

MFCMapi
Provision x-headers by using EWS in
Exchange
Article • 09/15/2021 • 3 minutes to read

Learn how to provision x-headers for a mailbox by using the EWS Managed API or EWS
in Exchange.

X-headers are non-standard headers that are added to the header collection of an email
to communicate information. For example, Exchange stamps messages with the X-MS-
Exchange-Organization-SCL header to indicate the spam confidence level (SCL)
attributed to the email. Email clients like Outlook can use that information to determine
what type of action to take on the email (for example, Outlook can prevent images from
displaying unless the user takes an action).

Exchange adds incoming x-headers to the mailbox schema as a named property the first
time it receives an email with that x-header. The x-header value is not saved on that first
email; however, it is saved on all subsequent emails that include the x-header. For this
reason, your application should provision x-headers before you expect to use them. The
mapping between a named property and an x-header occurs in the transport delivery of
the email to the mailbox. This means that you need to receive the email via transport
delivery; you cannot just save an email that includes the x-header to a mailbox to create
the mapping to a named property.

7 Note

If you find that x-headers aren't being saved, determine whether a transport
agent or header firewall is filtering out your x-headers before they get to the
mailbox.
r

Provision an x-header by using the EWS


Managed API
The following code example shows how to use the EWS Managed API
EmailMessage.Send method to provision an x-header for a mailbox. This example
assumes that service is a valid ExchangeService object and that the target mailbox
hasn't exceeded the quota for named properties .

C#
private static void ProvisionCustomXHeaderByEmail(ExchangeService service)

// Create a definition for an extended property that will represent a


custom x-header. X-headers must be created in the

// InternetHeaders property set. The x-header name must match the name
of the x-header sent in the subsequent emails so

// the x-header and value are saved on the email.

ExtendedPropertyDefinition xExperimentalHeader = new


ExtendedPropertyDefinition(DefaultExtendedPropertySet.InternetHeaders,

"X-Experimental",

MapiPropertyType.String);

// Create an item that is used to provision the custom x-header.

EmailMessage email = new EmailMessage(service);

email.ToRecipients.Add("[email protected]");

email.SetExtendedProperty(xExperimentalHeader, "Provision X-Experimental


Internet message header");

try

// The mapping of the named property happens in transport delivery.

email.Send();

if (service.ServerInfo.MajorVersion == 12)

Console.WriteLine("Provisioned the X-Experimental across the


mailbox database that hosts the user's mailbox.");

else // For versions of Exchange starting with Exchange 2010

Console.WriteLine("Provisioned the X-Experimental for the user's


mailbox. You will need to run this " +

"for each mailbox that needs to process this


x-header.");

catch (Exception ex)

Console.WriteLine("Error: {0}", ex.Message);

Provision an x-header by using EWS


The following code example shows how to use the EWS CreateItem operation to
create and send an email to provision a mailbox with an x-header. This is the XML
request that is sent by the EWS Managed API when you Provision an x-header by using
the EWS Managed API.

XML
<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:CreateItem MessageDisposition="SendOnly">

<m:Items>

<t:Message>

<t:ExtendedProperty>

<t:ExtendedFieldURI DistinguishedPropertySetId="InternetHeaders"

PropertyName="X-Experimental"

PropertyType="String" />

<t:Value>Provision X-Experimental Internet message


header</t:Value>

</t:ExtendedProperty>

<t:ToRecipients>

<t:Mailbox>
<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:ToRecipients>

</t:Message>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

Version differences
The first time that you provision an x-header in Exchange Online, Exchange Online as
part of Office 365, or an on-premises version of Exchange starting with Exchange Server
2010, the value of a new custom x-header will not be written to the stored message. This
is because the x-header must first be mapped to a named property in the user's
mailbox. The mapping occurs upon the first request to add the named properties. When
a subsequent request to create the named property occurs, the property and value are
stored on the message. In Exchange 2007, the first time an x-header is written to a
mailbox database, a mapping is created for the x-header to a named property across the
mailbox database. When a subsequent request to create the named property occurs, the
x-header is processed and stored for any mailbox in the Exchange 2007 database.
Next steps
This article shows you how to provision an x-header for a single mailbox by sending an
email to a user. You can also provision an x-header for many users by sending a batch
email to a list of recipients in the caller's organization.

See also
Properties and extended properties in EWS in Exchange

Exchange 2013: Provision custom X-headers programmatically

Named Properties, X-Headers, and You

Named Properties, Round 2: What lies Ahead

Header Firewall

EWS, MIME, and the missing Internet message headers

Process email messages in batches by using EWS in Exchange


EWS property-related errors
Article • 09/15/2021 • 3 minutes to read

Find out how to handle property-related errors in your EWS application.

Most EWS client applications will use properties, which means that you will have to
handle property-related errors. You can handle these errors at runtime, or while you are
developing your EWS application.

Table 1: Property-related errors and how to handle them

Error Caused by an Handle it by…


attempt to…

ErrorDataSizeLimitExceeded Set a property with Limiting the size of data you


a value that exceeds set on the property.
the maximum size
for the property or
the property does
not support
streaming, such as
folder properties.

ErrorFolderPropertRequestFailed Get a property that Indicating that the property


could not be cannot be retrieved.
retrieved.

ErrorInvalidExtendedProperty Set an invalid Checking the extended


combination of property value.
extended property
values or results in
an invalid extended
property Uniform
Resource Identifier
(URI).

ErrorInvalidExtendedPropertyValue Set an extended Updating your code to check


property value that for matching types.
does not match the
specified type

ErrorInvalidFolderId Set the structure of Only using identifiers returned


a folder identifier to by EWS.
an invalid form.
Error Caused by an Handle it by…
attempt to…

ErrorInvalidId Set the structure of Only using identifiers returned


an identifier and/or by EWS.
change key to an
invalid form.

ErrorInvalidIdEmpty Set an empty an Setting the identifier with a


identifier. valid item or folder identifier.

ErrorInvalidIdMalformed Set the structure of Only using identifiers returned


an identifier and/or by EWS.
change key to an
invalid form.

ErrorInvalidPropertyAppend Append a property Updating your code so that it


that does not only attempts to append values
support appending. to the recipient collection
properties (To, Cc, Bcc),
Attendee collection properties
(Required, Optional,
Resources), Body property, and
the ReplyTo property.

ErrorInvalidPropertyDelete Delete a property Updating your code to not try


that does not to delete the property. For
support deleting. example, the folder and item
identifiers cannot be deleted.

ErrorInvalidPropertyForExists Set an existential Updating your code to not use


based search flag-based properties in an
restriction on a flag- existential based search
based property. restriction. Flag-based
properties are IsDraft,
IsSubmitted, IsUnmodified,
IsResend, and IsFromMe.

ErrorInvalidPropertyForOperation Act on a property of Updating your code to not


an item or folder access the property with the
that is not operation that caused the
supported by the error.
operation.

ErrorInvalidPropertyRequest Specify a property Updating your code to not try


in the request that to access the property with the
is not supported for operation.
the item type.
Error Caused by an Handle it by…
attempt to…

ErrorInvalidPropertySet Set a read-only Updating your code to not try


property. to set the property.

ErrorInvalidValueForProperty Compare a property Updating your code to check


value in a search for property type mismatch.
restriction where
the comparison
value does not
match the property
type.

ErrorItemSavePropertyError Save an item or Checking the property values


folder with invalid and types before submitting
property values. them in a request.

ErrorNoFolderClassOverride Set the folder class Using a generic folder type to


on a new folder that set the folder class.
is not the base
folder type.

ErrorNoPropertyTagForCustomProperties Reference a custom Updating your code to


extended property reference the custom extended
by its property tag. property by property set
identifier and either the
property name or property
dispatch identifier.

ErrorObjectTypeChanged Set or update the Updating your code so that


item class on an item class matches the item
item that doesn't schema type.
match with its
schema type.

ErrorPropertyUpdate Update a property Checking the property value


with an invalid before submitting it in an
property value. UpdateItem request.

ErrorRequiredPropertyMissing Send a Updating your code to set the


CreateAttachment missing property as specified
request that is by the property path returned
missing a required in the response.
property.

ErrorUnsupportedMapiPropertyType Use extended Updating your code to not use


property types of the restricted extended
type object, object property types.
array, error or null.
Error Caused by an Handle it by…
attempt to…

ErrorUnsupportedPathForQuery Use an unsupported Changing the search restriction


property path in a to exclude the unsupported
search restriction. property path.

ErrorUnsupportedPathForSortGroup Use an unsupported Changing the search restriction


property path in a to exclude the unsupported
sorted or grouped property path.
search request.

ErrorUnsupportedTypeForConversion Request a property Updating your code to not


type that cannot be request the unsupported
converted to XML property.
for EWS to return in
a response.

ErrorUpdatePropertyMismatch Update an item or Changing your code so that


folder the change the change description
description for matches the item or folder type
which doesn't that is being updated.
match the property
that is specified to
be updated.

See also
Properties and extended properties in EWS in Exchange

Start using web services in Exchange

Develop web service clients for Exchange


Property sets and response shapes in
EWS in Exchange
Article • 03/15/2022 • 5 minutes to read

Learn to manage the response shapes and property sets that are returned by the EWS
managed API and EWS in Exchange.

The Exchange data store provides a flexible storage solution that enables you to store
different items, such as contacts and calendar entries, in the same folder; however, it can
make it difficult to manage the data that is returned from a call to an EWS operation or
an EWS managed API method.

To make it easier to manage the data that is returned by Exchange Online, Exchange
Online as part of Office 365, or version of Excahange starting with Exchange 2013, the
EWS Managed API uses property sets, and EWS uses response shapes. These are
predefined collections that provide the most common properties of a store item. The set
of properties that is returned is determined by the item type. That means that when you
bind an item by using the Exchange Managed API Item.Bind method, you get a
different set of properties depending on the type of item to which you bind. Binding to
a calendar item will return a different set of properties than binding to a contact item.
Likewise, if you are using EWS, the GetItem operation returns a different set of
properties based on the type of item that is returned.

Binding to a folder with the Folder.Bind method or using the GetFolder operation
also returns different sets of properties based on the folder that you request.

Table 1. Predefined response shapes

Response EWS Managed API equivalent Description


shape

ID only BasePropertySet.IdOnly
Returns only the identifier of the item or
folder. Most applications should use this
response shape and specify any additional
properties that are required.

Default N/A Returns a predefined set of properties that


are the default for the item or folder (EWS
only).
Response EWS Managed API equivalent Description
shape

All BasePropertySet.FirstClassProperties Returns the properties that client


properties applications use most often. You can return
additional properties by using a property
path.

Default response shapes


EWS includes a set of default response shapes for folders and for items.

The following table lists the default properties that are returned for each folder by the
FindFolder and GetFolder EWS operations.

Table 2. Default folder properties

Property Inbox Calendar Contacts Deleted Drafts Notes Other Outbox


items folders

Display X X X X X X X X
name

Folder ID X X X X X X X X

Subfolder X X X X X X X X
count

Total count X X X X X X X

Unread X X X X X
count

The following table lists the default properties that are returned for each item type by
the FindItem and GetItem EWS operations.

Table 3. Default item properties

Property Calendar item Contact item Message item Task item

Body X(1)

CalendarItemType x

CompanyName x

CompleteName x
Property Calendar item Contact item Message item Task item

DateTimeCreated x

DateTimeSent x

DueDate x(2)

EmailAddresses x

End x

FileAs x

From x

HasAttachments x x x x

ImAddresses x

IsAssociated x x

IsDeliveryReceiptRequested x

ItemId x x x x

JobTitle x

LegacyFreeBusyStatus x

Location x

Organizer x

PercentComplete x

PhoneNumbers x

PhysicalAddresses x

ResponseObjects x(1) x(1)

Sensitity x

Size x

StartDate x(2)

Status x

Subject x x x

Notes:
1. Included in the response from the GetItem operation. Not included in the
response from the FindItem operation.

2. Only included in the response if the field contains data. Not included in the
response if the field is blank.

All properties set and response shape


The following table lists the first-class properties that are returned by calling the EWS
Managed API Item.Bind and Item.FindItems EWS Managed API methods, and the
"all properties" response shape returned by the FindItem and GetItem EWS
operations.

You can add additional properties to the property set or include extended properties.
For details, see Properties and extended properties in EWS in Exchange.

Table 4. First-class properties

Property Calendar Contact Message Post Task


item item item item item

ActualWork x

AdjacentMeetingCount x

AdjacentMeetings x

Alias x

AllowNewTimeProposal x

AppointmentReplyTime x

AppointmentSequenceNumber x

AppointmentState x

AssignedTime x

AssistantName x

BccRecipients x

BillingInformation x

Body x(1) x(1) x(1) x(1)

BusinessHomePage x x
Property Calendar Contact Message Post Task
item item item item item

CalendarItemType x

Categories x x x x

CcRecipients x

ChangeCount x

Children x

Companies x

CompleteDate x

CompleteName x

ConferenceType x

ConflictingMeetingCount x

ConflictingMeetings x

Contacts x

ContactSource x

ConversationId x x x x x

ConversationIndex x x

ConversationTopic x x

Culture x x x x x

DateTimeCreated x x x x x

DateTimeReceived x x x x x

DateTimeSent x x x x x

DateTimeStamp x

DelegationState x

Delegator x

DeletedOccurrences x

Department x

DirectoryId x
Property Calendar Contact Message Post Task
item item item item item

DirectReports x

DisplayCc x x x x x

DisplayName x

DisplayTo x x x x x

DueDate x

Duration x

EffectiveRights x x x x x

EmailAddresses x

End x

EndTimeZone x

FileAs x

FileAsMapping x

FirstOccurrence x

From x x

Generation x

GivenName x

HasAttachments x x x x x

HasPicture x

ImAddresses x

Importance x x x x x

Initials x

InReplyTo x x x x x

InternetMessageId x x

InternetMessageHeaders x x x x x

IsAllDayEvent x

IsAssociated x x x x x
Property Calendar Contact Message Post Task
item item item item item

IsCancelled x

IsComplete x

IsDeliveryReceiptRequested x

IsDraft x x x x x

IsFromMe x x x x x

IsMeeting x

IsOnlineMeeting x

IsRead x

IsReadReceiptRequested x

IsRecurring x x

IsResend x x x x x

IsResponseRequested x x

IsSubmitted x x x x x

IsUnmodified x x x x x

ItemClass x x x x x

ItemId x x x x x

JobTitle x

LastModifiedName x x x x x

LastModifiedTime x x x x x

LastOccurrance x

LegacyFreeBusyStatus x

Location x

Manager x

MeetingRequestWasSent x

MeetingTimeZone x

MeetingWorkspaceUrl x
Property Calendar Contact Message Post Task
item item item item item

MiddleName x

Mileage x x

ModifiedOccurrances x

MyResponseType x

NetShowUrl x

NickName x

Notes x

OfficeLocation x

OptionalAttendees x

Organizer x

OriginalStart x

Owner x

ParentFolderId x x x x x

PercentComplete x

PhoneNumbers x

PhoneticFirstName x

PhoneticFullName x

PhoneticLastName x

Photo x

PhysicalAddresses x

PostalAddressIndex x

PostedTime x

Profession x

ReceivedBy x

ReceivedRepresenting x

Reccurrence x x
Property Calendar Contact Message Post Task
item item item item item

References x x

ReminderDueBy x x x x x

ReminderIsSet x x x x x

ReminderMinutesBeforeStart x x x x x

ReplyTo x

RequiredAttendees x

Resources x

ResponseObjects x(1) x(1) x(1) x(1) x(1)

Sender x x

Sensitivity x x x x x

Size x x x x x

SpouseName x

Start x

StartDate x

StartTimeZone x

Status x

StatusDescription x

Subject x x x x

Surname x

TimeZone x

ToRecipients x

TotalWork x

WebClientEditFormQueryString x x x x x

WebClientReadFormQueryString x x x x x

Notes:
1. Included when binding to an item and in the response from the GetItem
operation . Not included in the result of the Item.FindItems method or the
response from the FindItem operation .

See also
Develop web service clients for Exchange

FindItem operation

GetItem operation

FindFolder operation

GetFolder operation
Public folder access with EWS in
Exchange
Article • 01/15/2020 • 5 minutes to read

Learn about how to use EWS and the EWS Managed API to access public folders and
route public folder requests in Exchange.

Public folders provide a shared repository of items that users in your organization can
access. Office 365, Exchange Online, and on-premises versions of Exchange starting with
Exchange 2013 introduce a new architecture for public folders. Public folders in
Exchange use a specialized mailbox design (instead of a public folder database) to store
the public folder hierarchy and public folder content. Public folder permissions are
managed through Role Based Access Control (RBAC).

Client access technologies, like Exchange Web Services (EWS) and the EWS Managed
API, provide programmatic access to both the public folder hierarchy and content items
in a public folder database. This article provides information about how you can use
EWS and the EWS Managed API to access public folders and public folders and public
folder data.

EWS operations and EWS Managed API


methods for public folder access
Most of the core EWS operations support public folder access. You can use the folder
and item operations and the EWS Managed API methods listed in the following table to
work with public folders.

For information about EWS Managed API methods, see EWS Managed API
namespaces .

EWS operation EWS Managed API method

CreateFolder operation
Folder.Save()

UpdateFolder operation
Folder.Update()

DeleteFolder operation
Folder.Delete()

MoveFolder operation 1
Folder.Move()

CopyFolder operation 2
Folder.Copy()

EWS operation EWS Managed API method

GetFolder operation
Folder.Bind()

EmptyFolder operation 3
Folder.Empty()

FindFolder operation
ExchangeService.FindFolders()

Folder.FindFolders()

CreateItem operation
Item.Save()

MoveItem operation
Item.Move()

CopyItem operation
Item.Copy()

UpdateItem operation
Item.Update()

DeleteItem operation
Item.Delete()

FindItem operation 4
ExchangeService.FindItems()

Folder.FindItems()

GetItem operation
Item.Bind()

ConvertId operation 5
ExchangeService.ConvertId()

ExchangeService.ConvertIds()

1
Moving folders between a public folder and private folder is not available in versions
of Exchange starting with Exchange 2013.

2
This operation is only applicable to public folders in Exchange Server 2007 and
Exchange Server 2010.

3 This operation is only applicable to public folders in Exchange 2010.

4 Full text indexed search within a single public folder by means of the QueryString
search option is supported in versions of Exchange starting with Exchange 2013.

5
The ConvertId operation does not correctly convert public folder identifiers from the
EWS identifier to the store identifier. You can manually update the identifier that is
returned as a workaround .

The following operations are not supported, or are partially supported, for public folders
in versions of Exchange starting with Exchange 2013:

CopyFolder (not supported). You can use CreateFolder with the CopyItems
operation to implement CopyFolder operation functionality.
EmptyFolder (not supported). You can use FindItem with the DeleteItem operation
to implement EmptyFolder operation functionality.

MoveFolder (partially supported). You cannot move folders between private and
public folders. You can move folders between private and public folders in
Exchange 2007 and Exchange 2010. You can move folders within a public folder in
all versions of Exchange.

EWS and the EWS Managed API do not support the following functionality for public
folders:

Using SyncFolderHierarchy. Use the FindFolder, GetFolder and SyncFolderItems


operations to synchronize items and folders in a public folder mailbox.

Deep-traversal searches of a public folder hierarchy. Use recursive FindFolder


operation calls to traverse the public folder hierarchy.

Using the CreateFolderPath operation to create a folder hierarchy for public


folders. You will need to use the CreateFolder operation for each folder level in a
distinct folder hierarchy when you target a public folder mailbox.

Using the CreateItem operation to save copies of sent email messages. Instead,
use the MoveItem operation to move a copy of the message into a public folder.

Scenarios for using EWS and the EWS Managed


API to work with public folders
Public folders enable many important scenarios for Exchange mailbox users. You can
empower users by using EWS and the EWS Managed API to implement custom
solutions for accessing and using public folders and their contents.

Programmatically access email messages that have been


sent to distribution lists
Exchange mailbox users can use public folders to store email messages that are sent to
distribution lists. This is a convenient way to save distribution list history. You can use
the FindItem operation in EWS or the ExchangeService.FindItems() and
Folder.FindItems() methods in the EWS Managed API to access stored distribution list
email messages.

Share important email messages and other mailbox items


Mailbox users can use public folders as a shared repository for mailbox items. Different
users in an organization can share important email messages or contacts by using public
folders. EWS can provide the access to these shared mailbox items. You can use the
MoveItem operation in EWS or the Item.Move() method in the EWS Managed API to
move email messages, contacts, and other mailbox items into and out of a public folder.

Public discussions with post items


Public folders are a convenient container for post items. Post items provide a way to use
threaded conversations without having to send email messages between users. Users
can use public folders and post items to host and maintain threaded conversations
between different mailbox users in an organization. This way, mailbox users can access
the shared history of a conversation that uses post items even if they were not part of
the conversation. You can use the CreateItem operation in EWS or the Item.Save()
method in the EWS Managed API to both create and respond to post items stored in a
public folder.

Routing public folder requests


Public folder content can be stored on multiple mailbox servers. The public folder
hierarchy can be stored on one mailbox, while the content for the public folder is stored
on another. And each of these servers can be different than the mailbox server for the
user requesting the information. In these situations, it's important to include the
additional X-AnchorMailbox and X-PublicFolderMailbox headers in your public folder
requests to receive accurate information about public folders.

The value for the X-AnchorMailbox and X-PublicFolderMailbox can differ depending on
whether you're performing a request related to the folder hierarchy or the folder
content. The following table identifies which procedure to follow for each EWS Managed
API method or EWS operation.

EWS Managed API methods and EWS operations for routing public folder requests

When calling these When calling these Use this procedure


methods operations

Folder.FindFolders
CreateFolder
Routing public folder hierarchy
Folder.Delete
FindFolder
requests
Folder.Update DeleteFolder

Folder.Move
UpdateFolder

MoveFolder

When calling these When calling these Use this procedure


methods operations

Item.Bind
CreateItem
Routing public folder content
Item.Update
GetItem
requests
Item.Copy
UpdateItem

Item.Move
CopyItem

Item.Delete
MoveItem

Folder.Bind
DeleteItem

Folder.FindItems
GetFolder

FindItem

Version differences
In Exchange 2007 and Exchange 2010, the ConvertId operation works as expected when
converting public folder identifiers from the EWS identifier to the store identifier.

See also
Develop web service clients for Exchange

Start using web services in Exchange

Public folder limits

FAQ: Public Folders

Public Folder Procedures


Route public folder hierarchy requests
Article • 09/14/2022 • 3 minutes to read

All requests for public folder information that require knowledge of the public folder
hierarchy, such as moving, updating, deleting, or finding public folders, need to be
routed to the default public folder hierarchy mailbox for the given user. To route the
requests to that mailbox, you need to set the X-AnchorMailbox and X-
PublicFolderMailbox headers to specific values returned by the Autodiscover service.

Overview of public folders

Header What do I need? How do I get it?

X-AnchorMailbox
The 1. Send a GetUserSetting request with the
PublicFolderInformation SMTP address for the user's mailbox.

value from a
GetUserSettings 2. Use the PublicFolderInformation element
Autodiscover SOAP to populate the value of the X-
response, which becomes AnchorMailbox header. The value of the
the value of the X- PublicFolderInformation element is an SMTP
AnchorMailbox header. address.

X- The 1. Send a GetUserSetting request with the


PublicFolderMailbox InternalRpcClientServer SMTP address for the user's mailbox.

value from a
GetUserSettings 2. Use the InternalRpcClientServer element
Autodiscover SOAP returned by the Autodiscover service to
response, which becomes populate the value of the X-
the value of the X- PublicFolderMailbox header. The value of
PublicFolderMailbox the X-PublicFolderMailbox element is an
header. SMTP address where the user part of the
address is a GUID.

After you have determined the header values, include them when you make public
folder hierarchy requests.

The steps in this article are specific to public folder hierarchy requests. To determine
whether your request is a public folder hierarchy or content request, see Routing public
folder requests.

Determine the header values using the EWS


Managed API
You can use a single call to GetUserSettings using the following code, which retrieves
both InternalRpcClientServer and PublicFolderInformation elements. Include the SMTP
address of the mailbox user as an input parameter.

C#

GetUserSettingsResponse userResponse = GetUserSettings(adservice,


"[email protected]", 3, UserSettingName.PublicFolderInformation,
UserSettingName.InternalRpcClientServer);

Console.WriteLine("X-AnchorMailbox value for public folder hierarchy


requests: {0}",
userResponse.Settings[UserSettingName.PublicFolderInformation]);

Console.WriteLine("X-PublicFolderMailbox value for public folder hierarchy


requests: {0}",
userResponse.Settings[UserSettingName.InternalRpcClientServer]);

After running the code, the following information is displayed on the console:

X-AnchorMailbox for public folder hierarchy requests:

[email protected]

X-PublicFolderMailbox value for public folder hierarchy requests: 1ec2a236-ed93-

[email protected]

Now that you have the PublicFolderInformation value, include it as the value for the X-
AnchorMailbox header in all public folder hierarchy requests. The
InternalRpcClientServer value is used for the X-PublicFolderMailbox header. Both
headers are required.

X-AnchorMailbox: [email protected]

X-PublicFolderMailbox: [email protected]

Determine the the header values using SOAP


The following code example shows how to retrieve the PublicFolderInformation and
InternalRpcClientServer values using the GetUserSettings SOAP operation. The mailbox
user is specified in the Mailbox element, and the RequestedSettings element limits the
response to the PublicFolderInformation and InternalRpcClientServer values.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope
xmlns:a="http://schemas.microsoft.com/exchange/2010/Autodiscover"

xmlns:wsa="http://www.w3.org/2005/08/addressing"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<a:RequestedServerVersion>Exchange2016</a:RequestedServerVersion>

<wsa:Action>http://schemas.microsoft.com/exchange/2010/Autodiscover/Autodisc
over/GetUserSettings</wsa:Action>

<wsa:To>https://autodiscover-
s.outlook.com/autodiscover/autodiscover.svc</wsa:To>

</soap:Header>

<soap:Body>

<a:GetUserSettingsRequestMessage
xmlns:a="http://schemas.microsoft.com/exchange/2010/Autodiscover">

<a:Request>

<a:Users>

<a:User>

<a:Mailbox>[email protected]</a:Mailbox>

</a:User>

</a:Users>

<a:RequestedSettings>

<a:Setting>PublicFolderInformation</a:Setting>

<a:Setting>InternalRpcClientServer</a:Setting>

</a:RequestedSettings>

</a:Request>

</a:GetUserSettingsRequestMessage>

</soap:Body>

</soap:Envelope>

The response includes the PublicFolderInformation value.

XML

<UserSetting i:type="StringSetting">

<Name>InternalRpcClientServer</Name>

<Value>[email protected]</Value>

</UserSetting>

<UserSetting i:type="StringSetting">

<Name>PublicFolderInformation</Name>

<Value>[email protected]</Value>

</UserSetting>

Now that you have the PublicFolderInformation value, include it as the value for the X-
AnchorMailbox header in all public folder hierarchy requests. Use the
InternalRpcClientServer value for the X-PublicFolderMailbox header. Both headers are
required.

X-AnchorMailbox: [email protected]

X-PublicFolderMailbox: [email protected]

For more information about the Autodiscover process, see Autodiscover for Exchange,
Generate a list of Autodiscover endpoints, and Get user settings from Exchange by using
Autodiscover.

Set the values of the X-AnchorMailbox and X-


PublicFolderMailbox headers
Using the values of PublicFolderInformation and InternalRpcClientServer acquired in
Determine the value of the X-AnchorMailbox header by using the EWS Managed API or
Determine the value of the X-AnchorMailbox header using SOAP, set the values of X-
AnchorMailbox and X-PublicFolderMailbox headers in your public folder content
request.

For example, given a PublicFolderInformation SMTP address of


[email protected] and an InternalRpcClientServer value of 1ec2a236-
[email protected], include the following headers when
making calls to the following methods or operations.

X-AnchorMailbox: [email protected]

X-PublicFolderMailbox: [email protected]

Public folder calls that require the X-AnchorMailbox and X-PublicFolder headers

EWS Managed API methods EWS operations

Folder.FindFolders
CreateFolder

Folder.Delete
FindFolder

Folder.Update DeleteFolder

Folder.Move
UpdateFolder

MoveFolder

To add these headers by using the EWS Managed API, use the HttpHeaders.Add
method.

C#

service.HttpHeaders.Add("X-AnchorMailbox",
"[email protected]");

service.HttpHeaders.Add("X-PublicFolderMailbox", "1ec2a236-ed93-4f88-b9c6-
[email protected]");

For example, the following code shows a FindFolder request with the X-AnchorMailbox
and X-PublicFolderMailbox header set to the values retrieved in the examples in this
article.

XML
POST https://outlook.office365.com/EWS/Exchange.asmx HTTP/1.1

Content-Type: text/xml; charset=utf-8

X-AnchorMailbox: [email protected]

X-PublicFolderMailbox: [email protected]

Host: outlook.office365.com

Content-Length: 1174

Expect: 100-continue

Connection: Keep-Alive

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013_SP1" />

</soap:Header>

<soap:Body>

<m:FindFolder Traversal="Shallow">

<m:FolderShape>

<t:BaseShape>AllProperties</t:BaseShape>

</m:FolderShape>

<m:IndexedPageFolderView MaxEntriesReturned="1" Offset="0"


BasePoint="Beginning" />

<m:Restriction>

<t:IsEqualTo>

<t:FieldURI FieldURI="folder:DisplayName" />

<t:FieldURIOrConstant>

<t:Constant Value="My Public Contacts" />

</t:FieldURIOrConstant>

</t:IsEqualTo>

</m:Restriction>

<m:ParentFolderIds>

<t:FolderId
Id="AQEuAAADy/LIWjRCp0GFb0W6aGPbwwEARg5aCLUc8k6wLfl1c0a/2AAAAwIAAAA="
ChangeKey="AQAAABYAAABGDloItRzyTrAt+XVzRr/YAABdo/XB" />

</m:ParentFolderIds>

</m:FindFolder>

</soap:Body>

</soap:Envelope>

See also
Public folder access with EWS in Exchange
Route public folder content requests
Get user settings by using the EWS Managed API
Route public folder content requests
Article • 03/04/2022 • 8 minutes to read

All requests for public folder information that involve the content of the public folder
need to be routed to the public folder mailbox that holds the content for the target
folder. To route the requests to that mailbox, you need to set the X-AnchorMailbox and
X-PublicFolderMailbox headers to specific values.

The following table provides an overview of the process:

Public folder overview


Header What do I need? How do I get it?

X-AnchorMailbox
1. The X-AnchorMailbox and X- 1. Use the code example in this article,
PublicFolderInformation values which implements the EWS Managed
for the public folder hierarchy API. Or use EWS and convert your
mailbox.
results to obtain a GUID.

2. The GUID of the public folder 2. Make an Autodiscover request by


mailbox that contains the using the GUID plus the domain name.

mailbox content, which is sent to


the Autodiscover service.
3. Use the value of the
AutoDiscoverSMTPAddress element
The AutoDiscoverSMTPAddress returned in the Autodiscover response
in the Autodisover response to populate the value of the headers.
becomes the value of the X-
AnchorMailbox header.

X- Your work is done, the X- You already have it!


PublicFolderMailbox PublicFolderMailbox value is the
same as the X-AnchorMailbox
value!

After you have determined the header values, include them when you make public
folder content requests.

The steps in this article are specific to public folder content requests. To determine
whether your request is a public folder hierarchy or content request, see Routing public
folder requests.
Determine the GUID of the public folder
mailbox by using the EWS Managed API
To determine the GUID of the public folder content mailbox, use the following code
example, which does the following:

Uses the X-AnchorMailbox and X-PublicFolderInformation headers you retrieved


by routing public folder hierarchy requests.

Calls the EWS Managed API FindFolders method, and includes a request for the
PR_REPLICA_LIST (0x66980102) property

The PR_REPLICA_LIST value identifies the mailbox GUID of the public folder mailbox
that has the content for the folder. The PR_REPLICA_LIST property is a byte array, but is
cast as a GUID for this scenario. The GUID and the domain name are concatenated to
form the address on which to call Autodiscover.

This example assumes that service is the ExchangeService object for the mailbox
user, PFHAnchorHeader and PFHMailboxHeader are the values of the X-AnchorMailbox
and X-PublicFolderMailbox headers, and domain is the domain name used by the
tenant.

C#

public static string GetMailboxGuidAddress(ExchangeService service, String


PFHAnchorHeader, String PFHMailboxHeader, String domain)

// Create a new folder view, and pass in the maximum number of folders
to return.

FolderView view = new FolderView(10);

// Create an extended property definition for the PR_REPLICA_LIST


property.

ExtendedPropertyDefinition PR_REPLICA_LIST = new


ExtendedPropertyDefinition(0x6698, MapiPropertyType.Binary);

// As a best practice, limit the properties returned to only those


required.

// In this case, return the folder ID, the folder display name, and

// the value of the PR_REPLICA_LIST extended property definition.

view.PropertySet = new PropertySet(BasePropertySet.IdOnly,


FolderSchema.DisplayName, PR_REPLICA_LIST);

service.HttpHeaders.Add("X-AnchorMailbox", PFHAnchorHeader);

service.HttpHeaders.Add("X-PublicFolderMailbox", PFHMailboxHeader);

// Add a call to the CertificateValidationCallback method here if


needed.

// ServicePointManager.ServerCertificateValidationCallback =
CertificateValidationCallBack;

// Call FindFolders to retrieve the folder hierarchy, starting with the


PublicFolderRoot folder.

// This method call results in a FindFolder call to EWS.

FindFoldersResults findResults =
service.FindFolders(WellKnownFolderName.PublicFoldersRoot, view);

string GuidAsString = null;

List<string> Guids = new List<string>();

// For each folder under the root, display the name, and copy the value
of the

// PR_REPLICA_LIST byte array to a string value.

foreach (Folder folder in findResults.Folders)

Console.WriteLine("Public folder display name: {0}",


folder.DisplayName);

byte[] ByteArr = (byte[])folder.ExtendedProperties[0].Value;

GuidAsString = System.Text.Encoding.ASCII.GetString(ByteArr, 0, 36);

Guids.Add(GuidAsString);

Console.WriteLine("Address for Autodiscover: {0}.{1}\r\n",


GuidAsString, domain);

// Concatenate the GUID value of the PR_REPLICA_LIST with the domain


name to generate the

// SMTP address to use for the AutoDiscover request for the public
folder content mailbox.

string AutoDSMTPAddress = GuidAsString + "@" + domain;

// Check that all folders have the same GUID value. If they do not, use
the GUID value of the

// folder that you're requesting content for.

string commonGuid = CompareGuidsForEquality(Guids);

if (commonGuid == "Not Equal")

Console.WriteLine("The GUIDs for all the folders in the hierarchy


are not the same. Run the Autodiscover sample using the address returned
above that is associated with the folder in your hierarchy request.",
AutoDSMTPAddress);

return null;

else

Console.WriteLine("The GUIDs for all public folders in the hierarchy


are the same. Run the Autodiscover sample using the {0} address.",
AutoDSMTPAddress);

return AutoDSMTPAddress;

// Method to compare the GUID for each folder under the public folder root.

// If each GUID is the same, return the GUID.

// If the GUIDs are not the same, return "Not equal".

public static string CompareGuidsForEquality(List<string> list)

string NotEqual = "Not equal";

string first = list.First();

return list.All(x => x == first) ? first : NotEqual;

If you received the error "The request failed. The underlying connection was closed:
Could not establish trust relationship for the SSL/TLS secure channel", you'll need to add
a call to a validation callback method. A placeholder and comment for that method is
included in the code example.

If the mailbox GUID is the same for all the public folders under the public folder root,
the example indicates the address to use when calling Autodiscover in the console
output and as the return value. If the mailbox GUID is not the same for all public folders
under the public folder root, you need to Make an Autodiscover request on the address
associated with the folder in your content request.

Determine the GUID of the public folder


mailbox by using EWS
The following code example shows how retrieve the value of the PR_REPLICA_LIST
(0x66980102) property by using the EWS FindFolder operation. For the
ExtendedFieldURI element, the PropertyTag attribute is set to the decimal value
(26264) of the PR_REPLICA_LIST property, and the PropertyType attribute is set to
Binary.

This is also the XML request that the EWS Managed API sends when you use the
FindFolders method to determine the GUID of the public folder mailbox by using the
EWS Managed API.

XML

POST https://outlook.office365.com/EWS/Exchange.asmx HTTP/1.1

Content-Type: text/xml; charset=utf-8

Accept: text/xml

User-Agent: ExchangeServicesClient/15.00.0913.015

Accept-Encoding: gzip,deflate

Authorization: Basic
c29ueWFmQGNvbnRvc28xMDAwLm9ubWljcm9zb2Z0LmNvbTpFWENIIzIwMTQ=

Host: outlook.office365.com

Cookie: ClientId=KZPBLKA9ZMPXAQDW
Content-Length: 1005

Expect: 100-continue

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013_SP1" />

</soap:Header>

<soap:Body>

<m:FindFolder Traversal="Shallow">

<m:FolderShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="folder:DisplayName" />

<t:ExtendedFieldURI PropertyTag="26264" PropertyType="Binary" />

</t:AdditionalProperties>

</m:FolderShape>

<m:IndexedPageFolderView MaxEntriesReturned="10" Offset="0"


BasePoint="Beginning" />

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="publicfoldersroot" />

</m:ParentFolderIds>

</m:FindFolder>

</soap:Body>

</soap:Envelope>

The server responds to the FindFolder request with a FindFolderResponse message


that includes the value of the PR_REPLICA_LIST extended property. Note that the value
of the property appears on the EWS response as the string format of a base-64 encoded
byte array. Some header values in the response are shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?><s:Envelope


xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="1019" MinorBuildNumber="15" Version="V2_17"
xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

</s:Header>

<s:Body>

<m:FindFolderResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder IndexedPagingOffset="2" TotalItemsInView="2"


IncludesLastItemInRange="true">

<t:Folders>
<t:ContactsFolder>

<t:FolderId
Id="AAEuAAAAAADL8shaNEKnQYVvRbpoY9vDAQBGDloItRzyTrAt+XVzRr/YAABdofPkAAA="
ChangeKey="AwAAABYAAABGDloItRzyTrAt+XVzRr/YAABdo/2h"/>

<t:DisplayName>My Public Contacts</t:DisplayName>

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertyTag="0x6698"
PropertyType="Binary"/>

<t:Value>MWVjMmEyMzYtZWQ5My00Zjg4LWI5YzYtMzNlNjNmYTRhYTQ0AA==</t:Value>

</t:ExtendedProperty>

</t:ContactsFolder>

<t:Folder>

<t:FolderId
Id="AQEuAAADy/LIWjRCp0GFb0W6aGPbwwEARg5aCLUc8k6wLfl1c0a/2AAAAxEAAAA="
ChangeKey="AQAAABYAAABGDloItRzyTrAt+XVzRr/YAABdo/W/"/>

<t:DisplayName>SampleFolder</t:DisplayName>

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertyTag="0x6698"
PropertyType="Binary"/>

<t:Value>MWVjMmEyMzYtZWQ5My00Zjg4LWI5YzYtMzNlNjNmYTRhYTQ0AA==</t:Value>

</t:ExtendedProperty>

</t:Folder>

</t:Folders>

</m:RootFolder>

</m:FindFolderResponseMessage>

</m:ResponseMessages>

</m:FindFolderResponse>

</s:Body>

</s:Envelope>

In order to use the value of the PR_REPLICA_LIST returned in the XML,


MWVjMmEyMzYtZWQ5My00Zjg4LWI5YzYtMzNlNjNmYTRhYTQ0AA==, to determine
the mailbox GUID, the value must be converted into a GUID in a format similar to how
the value is converted in the EWS Managed API code example. The GUID is then
concatenated with the domain name to create an SMTP address, which is included in the
Autodiscover request.

Make an Autodiscover request


Use the address returned by the GetMailboxGuidAddress method to call Autodiscover.
We recommend that you use the Exchange 2013: Get user settings with Autodiscover
code sample to call the Autodiscover service because it streamlines the Autodiscover
process for you. This code sample uses the command-line arguments listed in the
following table to call the POX Autodiscover service to retrieve the
AutoDiscoverSMTPAddress value associated with the mailbox GUID.

Argument Description

emailAddress The address returned by the GetMailboxGuidAddress method in Determine


the GUID of the public folder mailbox.

-skipSOAP Indicates that POX Autodiscover requests are required.


Argument Description

-auth The mailbox user's email address, which is used for authentication. You will
authEmailAddress be prompted to enter the mailbox user's password when you run the sample.

For example, the command-line arguments should look like this:

[email protected] -skipSOAP -auth


[email protected]

Where [email protected] is the address returned by


the GetMailboxGuidAddress method, and [email protected] is the mailbox user.

When you run the Exchange 2013: Get user settings with Autodiscover sample, the last
Autodiscover response should be successful and include all the user settings associated
with the mailbox GUID. Save the AutoDiscoverSMTPAddress user setting locally, as
you'll use that in the next step.

Alternatively, if you do not want to use Exchange 2013: Get user settings with
Autodiscover sample, you can get the AutoDiscoverSMTPAddress user setting by
generating a list of Autodiscover endpoints, and then sending the following POX
Autodiscover request to each URL until you receive a successful response.

XML

<?xml version="1.0" encoding="utf-8"?>

<Autodiscover
xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestsch
ema/2006">

<Request>

<EMailAddress>1ec2a236-ed93-4f88-b9c6-
[email protected]</EMailAddress>

<AcceptableResponseSchema>https://schemas.microsoft.com/exchange/autodiscove
r/outlook/responseschema/2006a</AcceptableResponseSchema>

</Request>

</Autodiscover>

For more information about the Autodiscover process, see Autodiscover for Exchange,
Generate a list of Autodiscover endpoints, and Get user settings from Exchange by using
Autodiscover.

Set the values of the X-AnchorMailbox and X-


PublicFolderMailbox headers
Using the value for the AutoDiscoverSMTPAddress acquired in Make an Autodiscover
request, set the values of the X-AnchorMailbox and X-PublicFolderMailbox headers in
your public folder content request.

For example, given an AutoDiscoverSMTPAddress of [email protected],


include the following headers when making calls to the following methods or
operations.

X-AnchorMailbox: [email protected]
X-PublicFolderMailbox: [email protected]

Public folder calls that require the X-AncorMailbox and X-PublicFolder headers

EWS Managed API methods EWS operations

Item.Bind
CreateItem

Item.Update
GetItem

Item.Copy
UpdateItem

Item.Move
CopyItem

Item.Delete
MoveItem

Folder.Bind
DeleteItem

Folder.FindItems
GetFolder

FindItem

To add these headers by using the EWS Managed API, use the HttpHeaders.Add
method.

C#

service.HttpHeaders.Add("X-AnchorMailbox", "[email protected]");

service.HttpHeaders.Add("X-PublicFolderMailbox",
"[email protected]");

The following code shows a GetFolder request with the X-AnchorMailbox and X-
PublicFolderMailbox header set to the values retrieved in the examples in this article.

XML

POST https://outlook.office365.com/EWS/Exchange.asmx HTTP/1.1

Content-Type: text/xml; charset=utf-8

User-Agent: SoapSender1.0

X-AnchorMailbox: [email protected]

X-PublicFolderMailbox: [email protected]

Authorization: Basic
c29ueWFmQGNvbnRvc28xMDAwLm9ubWljcm9zb2Z0LmNvbTpFWENIIzIwMTQ=

Host: outlook.office365.com

Content-Length: 688

Expect: 100-continue

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013_SP1" />

</soap:Header>

<soap:Body>

<m:GetFolder>

<m:FolderShape>

<t:BaseShape>AllProperties</t:BaseShape>

</m:FolderShape>

<m:FolderIds>

<t:DistinguishedFolderId Id="publicfoldersroot" />

</m:FolderIds>

</m:GetFolder>

</soap:Body>

</soap:Envelope>

See also
Public folder access with EWS in Exchange
Autodiscover for Exchange
Generate a list of Autodiscover endpoints
Get user settings from Exchange by using Autodiscover
Search and EWS in Exchange
Article • 06/14/2022 • 9 minutes to read

Find out how to search for items in Exchange by using the EWS Managed API or EWS.

Does this sound familiar? You're finally starting that project you've been putting off for
weeks, and you need information about the project that your manager sent you in email
weeks ago. Your Inbox has hundreds or perhaps thousands of messages in it. What do
you do? Do you scroll through your email scanning each subject and sender until you
find it? Or do you use the search feature in your favorite email client to quickly zero in
on what you need?

Search is arguably a must-have feature for any email client. But search can be used for a
lot more than just enabling users to search their mailbox. Does your app need to
process appointments that fall within specific time windows? Maybe you need to report
on all task items with a specific status, or move all contacts with a specific company
name to a different folder. Search can help with all of these requirements.

Search basics
The EWS Managed API and EWS offer two basic methods for specifying a search. You
can use a search filter or a query string. The method you use depends on the intent
behind your search.

Table 1. Scenarios for search filters and search queries

If you want Use Notes


to… a…

Limit your Search Search filters provide the best level of control over which properties are
search to a filter searched. Although query strings can target a limited set of properties
specific by using Advanced Query Syntax (AQS), search filters can target any
property or property.
set of
properties

Create Search With search filters, multiple search criteria can be joined together with
searches with filter logical ANDs or ORs, allowing for searches like "subject contains
multiple 'Meeting Notes' AND sender equals 'Sadie Daniels'". Although query
criteria strings can also join multiple search criteria, they are limited to the set
of properties supported by query strings.
If you want Use Notes
to… a…

Search Search Search filters can target custom properties. Query strings do not search
custom filter custom properties.
properties

Perform a Search Query string searches are not case sensitive.


case sensitive filter
search of
string
properties

Control the Search Query string searches are always substring searches. If you need to
containment filter search for specific prefixes, or require exact matches, a search filter is
mode when the best choice.
searching
string
properties

Search for Search EWS does not support searching for folders with a query string.
folders filter

Create a Search EWS does not support creating search folders with a query string.
search folder filter

Search across Query Query strings that do not contain AQS will search across all commonly
all commonly string used properties. For example, a query string value of "Mack Chaves" will
used return all messages sent by Mack Chaves as well as any messages that
properties have "Mack Chaves" in the body or subject.

Construct a Query A query string is a great choice for allowing an end user to do a quick
search based string search by typing in a simple string. Because a query string search
on simple includes all commonly used properties, the results will contain any
user input items that contain the user's search terms.

Using a search filter


Search filters give you a wide range of search options and the greatest degree of control
over how the search is performed. You can use search filters to perform basic equality
and comparison searches, but you can also search within the contents of string
properties or do bitmask comparisons.

For example, you can search the contents of the subject of items by using the
SearchFilter.ContainsSubstring class in the EWS Managed API. In this example, a
search filter is created to search the subject for the substring "meeting notes", ignoring
case.
C#

SearchFilter.ContainsSubstring subjectFilter = new


SearchFilter.ContainsSubstring(ItemSchema.Subject,

"meeting notes", ContainmentMode.Substring, ComparisonMode.IgnoreCase);

You can also search against custom properties. In this example, the custom property
ItemIndex is searched for values greater than 3.

C#

Guid MyAppGuid = new Guid("{AA3DF801-4FC7-401F-BBC1-7C93D6498C2E}");

ExtendedPropertyDefinition customPropDefinition =

new ExtendedPropertyDefinition(MyAppGuid, "ItemIndex",


MapiPropertyType.Integer);

SearchFilter.IsGreaterThan customPropFilter =

new SearchFilter.IsGreaterThan(customPropDefinition, 3);

You can also combine multiple search filters to create more complex searches. For
example, you can combine the previous two filters with a logical AND by using the
SearchFilter.SearchFilterCollection class.

C#

SearchFilter.SearchFilterCollection compoundFilter =

new SearchFilter.SearchFilterCollection(LogicalOperator.And,
subjectFilter, customPropFilter);

Using a query string


Query strings provide a different approach to search. You have less control over the
fields that are searched and how the search is performed when you use a query string
search. Not that that's a bad thing! In some cases, you might want to cast a wider net, so
to speak.

For example, you can search for "meeting notes" by using the
ExchangeService.FindItems EWS Managed API method.

C#

FindItemsResults<Item> results = service.FindItems(folder, "meeting notes",


view);

If you compare the results of this search to the results of the


SearchFilter.ContainsSubstring search example earlier, this search will contain more
results. The search filter search will return only items that have "meeting notes" in the
subject, while this search will return items that have "meeting notes" in the subject,
body, and other fields.

Let's take a look at how you can refine the query string to get closer to the results you
see from the search filter. Using AQS, you can limit your search to the subject.

C#

FindItemsResults<Item> results = service.FindItems(folder, "subject:meeting


notes", view);

This is closer, but the results are still not quite the same. When you use a query string
with multiple words, you will get matches even if the words are not in the order you
specify, or even if they're not adjacent to each other. With the query string
"subject:meeting notes", you will get matches for "meeting notes", "notes from the
meeting", and so on. To further refine, you can wrap the search terms in double quotes
to indicate that you want that phrase only.

C#

FindItemsResults<Item> results = service.FindItems(folder,


"subject:\"meeting notes\"", view);

Requesting specific properties in search results


By default, search results will contain all properties on the items that match the search.
In some cases this might be what you want, but in most cases your application only
requires a discrete set of properties. In this case, you should limit the set of properties
that are returned to only the properties your application needs. In the following
example, the ItemView class is used to limit the returned properties to the subject,
date/time received, and ID of the items.

C#

ItemView view = new ItemView(10);

// Creating a new PropertySet with this constructor includes

// ItemSchema.Id.

view.PropertySet = new PropertySet(ItemSchema.Subject,


ItemSchema.DateTimeReceived);

Controlling search depth


Setting the traversal on the view controls the depth and scope of the search.

Table 2. Search traversal values

Traversal Applies Description


value to

Shallow Items Shallow searches are limited to direct children of the folder being
and searched.
Folders

Deep Items Deep searches recursively search the folder being searched and
(only subfolders.
with
search
folders)
and
Folders

Associated Items Associated searches only include associated items from the folder
being searched. Associated items are hidden items within the folder.

SoftDeleted Items This traversal type is deprecated. SoftDeleted searches only include
and items that are in the dumpster. The dumpster has been replaced by the
Folders Recoverable Items Folder in Exchange Online, Exchange Online as part
of Office 365, and versions of Exchange starting with Exchange 2010.

Managing search results


The EWS Managed API and EWS also allow you to change how your search results are
returned. You can use views to specify which properties are included in the results, sort
results, and page your results to only get back a set number of results per response. You
can also group results by specific field values and control the depth of a search by
specifying a traversal type. Finally, you can use search folders to create persistent
searches that are updated dynamically as new items arrive.

Sorting
You can get the server to return sorted results, which can make it easier to display or
process items in order. In this example, the results will be sorted by the date/time
received, with the newest items being first.

C#

view.OrderBy.Add(ItemSchema.DateTimeReceived, SortDirection.Descending);

Paging
When you send a search request by using the EWS Managed API or EWS, you specify a
view size, which controls the maximum number of items returned. However, the number
of items on the server that match your search might be larger than the view size. In this
case, the server indicates that more items are available. You can use paging to repeat
your search and get the next set of results.

For example, you can send a search request with a view size of 10. There might be 15
items on the server that match your search, but you will only get back the first 10, along
with an indicator (the FindItemsResults<TItem>.MoreAvailable property if you're
using the EWS Managed API) that there are more results on the server. You can then
send the same search with an offset of 10 to ask for the next 10 items that match your
search. The server will return the remaining five items.

Figure 1. Paged search example

Grouping
Exchange enables you to group search results by a specific field. This can help break up
search results into more manageable sets. For example, you can search for "meeting
notes" and group the results by sender. As shown in the following figure, the items
returned will be separated into groups, with all the items that match the criteria from
the same sender in one group, all the matching items from another sender in another
group, and so on.

Figure 2. Search results grouped by sender

Search folders
With a regular search, the search is executed, the results are returned to your application
for processing, and the search ceases to exist. Search folders provide a way to make a
search persistent. This is a great option for searches that you know you will want to
execute multiple times. Rather than executing the same search repeatedly, causing the
server to evaluate the search from scratch each time, a search folder makes a search
always on, allowing the server to update the existing result set as items are added to or
removed from the search scope. Search folders act like regular folders, in that they
appear as folders that have items in them. The difference is that the only items
contained in the folder are those that match the search criteria that are associated with
the folder. After a search folder is created, your application can get up-to-date results of
the search just by checking the contents of the folder.

Creating a search folder is simple when you've mastered creating search filters. In the
following example, a search folder is created to show all email with a subject that
contains "meeting notes".

C#

static void CreateSearchFolder(ExchangeService service)

SearchFilter.ContainsSubstring subjectFilter = new


SearchFilter.ContainsSubstring(ItemSchema.Subject,

"meeting notes", ContainmentMode.Substring,


ComparisonMode.IgnoreCase);

SearchFolder searchFolder = new SearchFolder(service);

searchFolder.DisplayName = "Meeting Notes";

searchFolder.SearchParameters.RootFolderIds.Add(WellKnownFolderName.Inbox);

searchFolder.SearchParameters.Traversal = SearchFolderTraversal.Deep;

searchFolder.SearchParameters.SearchFilter = subjectFilter;

searchFolder.Save(WellKnownFolderName.SearchFolders);

In this section
Use search filters with EWS in Exchange

Perform an AQS search by using EWS in Exchange

Perform paged searches by using EWS in Exchange

Perform grouped searches by using EWS in Exchange

Work with search folders by using EWS in Exchange

See also
Develop web service clients for Exchange

Recoverable Items Folder

ExchangeService.FindItems

Throttling policy parameters that affect EWS search operations


Use search filters with EWS in Exchange
Article • 01/15/2020 • 12 minutes to read

Find out how to use search filters with the EWS Managed API or EWS in Exchange.

Search filters are the primary tool for expressing search criteria in your EWS Managed
API or EWS application. We recommend that you use search filters, as opposed to query
strings, to do the following:

Search on a specific property or set of properties.


Search using multiple search criteria.

Search filters are your only option if you are doing any of the following:

Searching custom properties.


Performing case-sensitive string searches.
Performing prefix or exact match string searches.
Performing bitmask searches.
Searching for items that have a specific property set, regardless of value.
Searching for folders.
Creating search folders.

Determine what type of search filter you need


Before you create a search filter, first determine which type of filter you need. The filter
types are implemented as descendant classes of the SearchFilter class in the EWS
Managed API, and as child elements of the Restriction element in EWS.

Table 1. Types of search filters

Filter type EWS Managed API class EWS element Description

Contains ContainsSubstring
Contains
The best filter type to use
filter for string comparisons. It
allows you to control case
sensitivity, whether to
ignore whitespace, and
set the containment
mode.
Filter type EWS Managed API class EWS element Description

Bitmask ExcludesBitmask
Excludes
Allows you to search
filter integer properties as
bitmasks and only return
results that have bits
corresponding to the
specified bitmask unset.

Exists filter Exists


Exists
Returns all items that
have the specified
property present,
regardless of value.

Equality IsEqualTo
IsEqualTo
Compares the value of
filter IsNotEqualTo
IsNotEqualTo
the specified property
with either a specified
constant value or the
value of another property
and return all items that
have an equal value (in
the case of an IsEqualTo
filter) or a non-equal
value (in the case of an
IsNotEqualTo filter).

Relational IsGreaterThan
IsGreaterThan
Returns all items that
testing IsGreaterThanOrEqualTo IsGreaterThanOrEqualTo have a value for the
filter IsLessThan
IsLessThan
specified property in the
IsLessThanOrEqualTo
IsLessThanOrEqualTo
appropriate relation to
either a specified
constant value or another
property. For example, an
IsGreaterThan filter
returns all items that have
a value that is greater
than the specified value
in the specified property.

Negating Not
Not
Negates the result of the
filter other filters.

Compound SearchFilterCollection
And
Combines multiple filters,
filter Or
allowing for more
complex search criteria.

Contains filter
A contains filter is the best choice for searching string properties. With a contains filter,
you can control aspects of string matching, like case sensitivity and how whitespace is
treated, by setting the containment mode and the comparison mode.

Contains filter in the EWS Managed API


If you're using the EWS Managed API, you set the containment mode by using the
ContainmentMode property of the ContainsSubstring class, and you set the
comparison mode by using the ComparisonMode property of the ContainsSubstring
class. The following example shows you how to create a search filter that searches the
subject field of items for the substring "meeting notes". This example ignores case, but
does not ignore whitespace.

C#

// Find all items with a subject that contain the substring

// "meeting notes", regardless of case.

// Matches include:

// - meeting notes

// - Meeting Notes

// - Here are my meeting notes

SearchFilter.ContainsSubstring subjectFilter = new


SearchFilter.ContainsSubstring(ItemSchema.Subject,

"meeting notes", ContainmentMode.Substring, ComparisonMode.IgnoreCase);

Contains filter in EWS


In EWS, you set the containment mode by using the ContainmentMode attribute on the
Contains element, and you set the comparison mode by using the
ContainmentComparison attribute on the Contains element. The following example
shows you how to create a search filter to search the subject field of items for the
substring "meeting notes". This example ignores case, but does not ignore whitespace.

XML

<t:Contains ContainmentMode="Substring" ContainmentComparison="IgnoreCase">

<t:FieldURI FieldURI="item:Subject" />

<t:Constant Value="meeting notes" />

</t:Contains>

Bitmask filter
A bitmask filter enables you to search integer properties as bitmasks, and return results
where specific bits are not set in the value of the specified property.

Bitmask filter in the EWS Managed API

The following example shows you how to use the EWS Managed API to create a search
filter to return all items that have a value in the ItemIndex custom property (defined in
the Example: Find items by using a search filter and the EWS Managed API section of
this article) that do not have the second bit (10 in binary) set.

C#

// Find all items with a value of the custom property that does not

// have the second bit (0010) set.

// Matches include:

// - Property not set

// - 1 (0001)

// - 4 (0100)

// - 5 (0101)

// - 8 (1000)

SearchFilter.ExcludesBitmask bit2NotSetFilter =

new SearchFilter.ExcludesBitmask(customPropDefinition, 2);

Bitmask filter in EWS


The following example shows you how to use EWS to create a search filter to return all
items that have a value in the ItemIndex custom property (defined in the Example: Find
items by using a search filter and the EWS Managed API section of this article) that do
not have the second bit (10 in binary) set.

XML

<t:Excludes>

<t:ExtendedFieldURI PropertySetId="aa3df801-4fc7-401f-bbc1-7c93d6498c2e"
PropertyName="ItemIndex" PropertyType="Integer" />

<t:Bitmask Value="2" />

</t:Excludes>

Exists filter
An exists filter enables you to search for items that have a specific property set on them,
regardless of the value.
Exists filter in the EWS Managed API
The following example shows you how to create a search filter to return all items that
have the ItemIndex custom property set.

C#

// Find all items that have the custom property set.

SearchFilter.Exists customPropSetFilter =

new SearchFilter.Exists(customPropDefinition);

Exists filter in EWS


The following example shows you how to create a search filter to return all items that
have the ItemIndex custom property set.

XML

<t:Exists>

<t:ExtendedFieldURI PropertySetId="aa3df801-4fc7-401f-bbc1-7c93d6498c2e"
PropertyName="ItemIndex" PropertyType="Integer" />

</t:Exists>

Equality filter
Equality filters enable you to search for all items that have a value for the specified
property that either equals a specific value or does not equal a specific value. The value
to compare with can be either a constant value or the value of another property on each
item.

Equality filter in the EWS Managed API

The following example shows you how to use the EWS Managed API to create a search
filter to return all items that have not been read.

C#

// Find all items that are not marked as read.

SearchFilter.IsEqualTo unreadFilter =

new SearchFilter.IsEqualTo(EmailMessageSchema.IsRead, false);

The following example shows you how to create a search filter to return all items that
have a value in the ItemIndex property that is not equal to the size of the item.
C#

// Find all items that are marked as read.

SearchFilter.IsNotEqualTo indexNotEqualToSizeFilter =

new SearchFilter.IsNotEqualTo(customPropDefinition, ItemSchema.Size);

Equality filter in EWS


The following example shows you how to use EWS to create a search filter to return all
items that have not been read.

XML

<t:IsEqualTo>

<t:FieldURI FieldURI="message:IsRead" />

<t:FieldURIOrConstant>

<t:Constant Value="false" />

</t:FieldURIOrConstant>

</t:IsEqualTo>

The following example shows you how to create a search filter to return all items that
have a value in the ItemIndex property that is not equal to the size of the item.

XML

<t:IsNotEqualTo>

<t:ExtendedFieldURI PropertySetId="aa3df801-4fc7-401f-bbc1-7c93d6498c2e"
PropertyName="ItemIndex" PropertyType="Integer" />

<t:FieldURIOrConstant>

<t:FieldURI FieldURI="item:Size" />

</t:FieldURIOrConstant>

</t:IsNotEqualTo>

Relational testing filter


Relational testing filters enable you to search for all items that have a value in the
specified property that is either greater than (>), greater than or equal to (>=), less than
(<), or less than or equal to (<=) a specified value. The value to compare with can be
either a constant value or the value of another property on each item.

Relational testing filter in the EWS Managed API


The following example shows you how to use the EWS Managed API to create search
filters to return all items with a value in the ItemIndex property that has the specified
relationship to the constant value 3.

C#

// Find all items where the custom property value is > 3.

SearchFilter.IsGreaterThan greaterThanFilter =

new SearchFilter.IsGreaterThan(customPropDefinition, 3);

// Find all items where the custom property value is >= 3.

SearchFilter.IsGreaterThanOrEqualTo greaterThanOrEqualFilter =

new SearchFilter.IsGreaterThanOrEqualTo(customPropDefinition,
ItemSchema.Size);

// Find all items where the custom property value is < 3.

SearchFilter.IsLessThan lessThanFilter =

new SearchFilter.IsLessThan(customPropDefinition, 3);

// Find all items where the custom property value is <= 3.

SearchFilter.IsLessThanOrEqualTo lessThanOrEqualFilter =

new SearchFilter.IsLessThanOrEqualTo(customPropDefinition, 3);

Relational testing filter in EWS

The following example shows you how to use EWS to create a search filter to return all
items with a value in the ItemIndex property that is greater than the constant value 3.

XML

<t:IsGreaterThan>

<t:ExtendedFieldURI PropertySetId="aa3df801-4fc7-401f-bbc1-7c93d6498c2e"
PropertyName="ItemIndex" PropertyType="Integer" />

<t:FieldURIOrConstant>

<t:Constant Value="3" />

</t:FieldURIOrConstant>

</t:IsGreaterThan>

The following example shows you how to create a search filter to return all items with a
value in the ItemIndex property that is greater than or equal to the constant value 3.

XML

<t:IsGreaterThanOrEqualTo>

<t:ExtendedFieldURI PropertySetId="aa3df801-4fc7-401f-bbc1-7c93d6498c2e"
PropertyName="ItemIndex" PropertyType="Integer" />

<t:FieldURIOrConstant>

<t:Constant Value="3" />

</t:FieldURIOrConstant>

</t:IsGreaterThanOrEqualTo>

The following example shows you how to create a search filter to return all items with a
value in the ItemIndex property that is less than the constant value 3.
XML

<t:IsLessThan>

<t:ExtendedFieldURI PropertySetId="aa3df801-4fc7-401f-bbc1-7c93d6498c2e"
PropertyName="ItemIndex" PropertyType="Integer" />

<t:FieldURIOrConstant>

<t:Constant Value="3" />

</t:FieldURIOrConstant>

</t:IsLessThan>

The following example shows you how to create a search filter to return all items with a
value in the ItemIndex property that is less than or equal to the constant value 3.

XML

<t:IsLessThanOrEqualTo>

<t:ExtendedFieldURI PropertySetId="aa3df801-4fc7-401f-bbc1-7c93d6498c2e"
PropertyName="ItemIndex" PropertyType="Integer" />

<t:FieldURIOrConstant>

<t:Constant Value="3" />

</t:FieldURIOrConstant>

</t:IsLessThanOrEqualTo>

Negating filter
A negating filter enables you to negate another filter and get the opposite search
results. While other filters return results that match specific criteria, a negating filter
returns results that do not match the criteria specified by the filter it is applied to.

Negating filter in the EWS Managed API


The following example shows you how to use the EWS Managed API to create a search
filter to return all items that do not have the substring "meeting notes" in the subject.

C#

SearchFilter.ContainsSubstring subjectFilter = new


SearchFilter.ContainsSubstring(ItemSchema.Subject,

"meeting notes", ContainmentMode.Substring, ComparisonMode.IgnoreCase);

SearchFilter.Not subjectNotFilter =

new SearchFilter.Not(subjectFilter);

Negating filter in EWS


The following example shows you how to create a search filter to return all items that do
not have the substring "meeting notes" in the subject.

XML

<t:Not>

<t:Contains ContainmentMode="ExactPhrase"
ContainmentComparison="IgnoreCase">

<t:FieldURI FieldURI="item:Subject" />

<t:Constant Value="meeting notes" />

</t:Contains>

</t:Not>

Compound filter
A compound filter enables you to combine multiple filters to create more complex
search criteria. You can combine criteria by using the logical operators AND or OR. In
this way, you can perform searches like "all mail from Sadie Daniels that contains
'meeting notes' in the subject".

Compound filter in the EWS Managed API

The following example shows you how to use the EWS Managed API to create a search
filter that returns all items that are sent from Sadie Daniels and contain "meeting notes"
in the subject.

C#

SearchFilter.ContainsSubstring subjectFilter = new


SearchFilter.ContainsSubstring(ItemSchema.Subject,

"meeting notes", ContainmentMode.Substring, ComparisonMode.IgnoreCase);

EmailAddress manager = new EmailAddress("[email protected]");

SearchFilter.IsEqualTo fromManagerFilter =

new SearchFilter.IsEqualTo(EmailMessageSchema.Sender, manager);

SearchFilter.SearchFilterCollection compoundFilter =

new SearchFilter.SearchFilterCollection(LogicalOperator.And,
subjectFilter, fromManagerFilter);

Compound filter in EWS

The following example shows you how to use EWS to create a search filter that returns
all items that are sent from Sadie Daniels and contain "meeting notes" in the subject.

XML
<t:And>

<t:Contains ContainmentMode="Substring"
ContainmentComparison="IgnoreCase">

<t:FieldURI FieldURI="item:Subject" />

<t:Constant Value="meeting notes" />

</t:Contains>

<t:IsEqualTo>

<t:FieldURI FieldURI="message:Sender" />

<t:FieldURIOrConstant>

<t:Constant Value="[email protected]" />

</t:FieldURIOrConstant>

</t:IsEqualTo>

</t:And>

Example: Find items by using a search filter and


the EWS Managed API
The following EWS Managed API methods use search filters:

ExchangeService.FindItems
ExchangeService.FindFolders
Folder.FindFolders
Folder.FindItems

The following example uses the ExchangeService.FindItems method; however, the same
rules and concepts apply to all the methods. In this example, a method called
SearchWithFilter is defined. It takes an ExchangeService object, a
WellKnownFolderName object, and a SearchFilter object as parameters. This
example assumes that the ExchangeService object has been initialized with valid values
in the Credentials and Url properties. The SearchFilter class is the base class for all
the different search filters.

C#

using Microsoft.Exchange.WebServices.Data

private static Guid SearchTestGUID = new Guid("{AA3DF801-4FC7-401F-BBC1-


7C93D6498C2E}");

private static ExtendedPropertyDefinition customPropDefinition =

new ExtendedPropertyDefinition(SearchTestGUID, "ItemIndex",


MapiPropertyType.Integer);

static void SearchWithFilter(ExchangeService service, WellKnownFolderName


folder, SearchFilter filter)

// Limit the result set to 10 items.

ItemView view = new ItemView(10);

view.PropertySet = new PropertySet(ItemSchema.Subject,

ItemSchema.DateTimeReceived,

EmailMessageSchema.IsRead,

customPropDefinition);

// Item searches do not support Deep traversal.

view.Traversal = ItemTraversal.Shallow;

// Sorting.

view.OrderBy.Add(ItemSchema.DateTimeReceived, SortDirection.Descending);

try

FindItemsResults<Item> results = service.FindItems(folder, filter,


view);

foreach (Item item in results.Items)

Console.WriteLine("Subject: {0}", item.Subject);

Console.WriteLine("Id: {0}", item.Id.ToString());

if (item.ExtendedProperties.Count > 0 &&

item.ExtendedProperties[0].PropertyDefinition ==
customPropDefinition)

Console.WriteLine("Search Index: {0}",


item.ExtendedProperties[0].Value);

if (item is EmailMessage)

EmailMessage message = item as EmailMessage;

Console.WriteLine("Read: {0}", message.IsRead.ToString());

catch (Exception ex)

Console.WriteLine("Exception while enumerating results: {0}",


ex.Message);

You can use this function with any of the search filters shown in the examples in this
article. This example uses a compound filter to return all items in the Inbox from Sadie
Daniels with "meeting notes" in the subject.

C#

SearchFilter.ContainsSubstring subjectFilter = new


SearchFilter.ContainsSubstring(ItemSchema.Subject,

"meeting notes", ContainmentMode.Substring, ComparisonMode.IgnoreCase);

EmailAddress manager = new EmailAddress("[email protected]");

SearchFilter.IsEqualTo fromManagerFilter =

new SearchFilter.IsEqualTo(EmailMessageSchema.Sender, manager);

SearchFilter.SearchFilterCollection compoundFilter =

new SearchFilter.SearchFilterCollection(LogicalOperator.And,
subjectFilter, greaterThanFilter);

SearchWithFilter(service, WellKnownFolderName.Inbox, compoundFilter);

Example: Find an item by using a search filter


and EWS
The following EWS operations use search filters:

FindFolder
FindItem

The following example uses the FindItem operation; however, the same rules and
concepts apply to both operations. Search filters are contained in the Restriction
element in SOAP requests. This example sends a SOAP request that is equivalent to the
search that is shown in the preceding EWS Managed API example.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:FindItem Traversal="Shallow">

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

<t:FieldURI FieldURI="item:DateTimeReceived" />

<t:FieldURI FieldURI="message:IsRead" />

<t:ExtendedFieldURI PropertySetId="aa3df801-4fc7-401f-bbc1-
7c93d6498c2e" PropertyName="ItemIndex" PropertyType="Integer" />

</t:AdditionalProperties>

</m:ItemShape>

<m:IndexedPageItemView MaxEntriesReturned="10" Offset="0"


BasePoint="Beginning" />

<m:Restriction>

<t:And>

<t:Contains ContainmentMode="Substring"
ContainmentComparison="IgnoreCase">

<t:FieldURI FieldURI="item:Subject" />

<t:Constant Value="meeting notes" />

</t:Contains>

<t:IsEqualTo>
<t:FieldURI FieldURI="message:Sender" />

<t:FieldURIOrConstant>

<t:Constant Value="[email protected]" />

</t:FieldURIOrConstant>

</t:IsEqualTo>

</t:And>

</m:Restriction>

<m:SortOrder>

<t:FieldOrder Order="Descending">

<t:FieldURI FieldURI="item:DateTimeReceived" />

</t:FieldOrder>

</m:SortOrder>

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="inbox" />

</m:ParentFolderIds>

</m:FindItem>

</soap:Body>

</soap:Envelope>

The following example shows the response from the server, including the search results.

XML

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="712" MinorBuildNumber="22" Version="V2_3"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:FindItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder IndexedPagingOffset="3" TotalItemsInView="3"


IncludesLastItemInRange="true">

<t:Items>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>meeting notes</t:Subject>

<t:DateTimeReceived>2013-11-
20T21:18:51Z</t:DateTimeReceived>

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertySetId="aa3df801-4fc7-401f-
bbc1-7c93d6498c2e" PropertyName="ItemIndex" PropertyType="Integer" />

<t:Value>5</t:Value>

</t:ExtendedProperty>

<t:IsRead>true</t:IsRead>

</t:Message>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>Meeting Notes</t:Subject>

<t:DateTimeReceived>2013-11-
20T21:18:51Z</t:DateTimeReceived>

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertySetId="aa3df801-4fc7-401f-
bbc1-7c93d6498c2e" PropertyName="ItemIndex" PropertyType="Integer" />

<t:Value>6</t:Value>

</t:ExtendedProperty>

<t:IsRead>true</t:IsRead>

</t:Message>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>Meeting notes</t:Subject>

<t:DateTimeReceived>2013-11-
20T21:18:51Z</t:DateTimeReceived>

<t:ExtendedProperty>

<t:ExtendedFieldURI PropertySetId="aa3df801-4fc7-401f-
bbc1-7c93d6498c2e" PropertyName="ItemIndex" PropertyType="Integer" />

<t:Value>7</t:Value>

</t:ExtendedProperty>

<t:IsRead>true</t:IsRead>

</t:Message>

</t:Items>

</m:RootFolder>

</m:FindItemResponseMessage>

</m:ResponseMessages>

</m:FindItemResponse>

</s:Body>

</s:Envelope>

Next steps
Now that you're familiar with using search filters in basic searches, you can move on to
more advanced search techniques.

Perform grouped searches by using EWS in Exchange

Perform paged searches by using EWS in Exchange

See also
Search and EWS in Exchange
Perform an AQS search by using EWS in Exchange
ExchangeService.FindItems
ExchangeService.FindFolders
Folder.FindFolders
Folder.FindItems
FindFolder operation
FindItem operation
Perform an AQS search by using EWS in
Exchange
Article • 01/15/2020 • 7 minutes to read

Find out how to search with query strings and AQS in your EWS Managed API or EWS
application.

Query strings provide an alternative to search filters for expressing search criteria. The
biggest advantage to using query strings is that you are not required to specify a single
property to search. You can just provide a value, and the search will apply to all
commonly used fields on the items. You can also refine your search by using Advanced
Query Syntax (AQS) instead of a simple value. However, query strings have the following
limitations that you should be aware of before you add them to your toolbox:

Limited ability to search specific properties. When you search with a simple value
in a query string, the search is performed against all indexed properties. You can
refine your search to specific properties, but the properties available to use in an
AQS string are limited. If the property you want to search isn't one of the
properties that are available for AQS, consider using a search filter.

Custom properties aren't searched. Query string searches are performed against
an index, and custom properties are not included in that index. If you need to
search custom properties, use a search filter instead.

Limited control for string searches. Query string searches always ignore case, and
are always substring searches. If you want to do case-sensitive, prefix, or exact
match searches, use a search filter.

Not available for folders or search folders. The EWS operations for searching for
folders don't support using a query string. Additionally, search folders don't
support query strings. In both cases, a search filter is your only option.

Creating a query string


Query strings in the EWS Managed API and EWS are interpreted as a subset of AQS
syntax. AQS strings are composed of either values or keyword/value pairs, separated by
a colon (:).

keyword:value
When a value is specified without a keyword, all indexed properties are searched for the
value. If a keyword is paired with a value, the keyword specifies a property to search for
the corresponding value.

Table 1. Supported AQS keywords

Keyword Value type Example

subject String subject:project

body String body:sales figures

attachment String attachment:report

to String to:"Sadie Daniels"

from String from:hope

cc String cc:"Ronnie Sturgis"

bcc String bcc:mack

participants String participants:sadie

category String category:project

importance String importance:high

kind Item type kind:meetings

sent Date sent:12/10/2013

received Date received:yesterday

hasattachment Boolean Has attachment:true

isflagged Boolean isflagged:true

isread Boolean isread:false

size Number size:>5000

Let's take a look at how the different value types work.

Using a string value type


String value types are by default searched as prefix substring searches that are not case-
sensitive. That means that searching for subject:project would match any of the
following subjects:
Project meeting notes

Do you have the project plans?

December sales projections

You can change the search to require the whole word rather than matching prefixes by
enclosing the string in quotation marks. Searching for subject:"project" would eliminate
the "December sales projections" value from the list of matches. Note that the value is
still not case-sensitive.

If you use multiple words in a query string, a match requires that both words appear in
the searched fields. For example, searching for subject:project plan would match any of
the following subjects:

Project plan

Do you have the project plans?

Please send me the plan for our project

Planning project milestones

If you enclose multiple words in quotation marks, they are treated as a single phrase.
Searching for subject:"project plan" would only match the "Project plan" subject from
the previous list.

Using an item type value type


You can use the following item type values with the kind keyword to limit your search
results to only a specific type of item, such as email or meeting requests:

contacts
docs
email
faxes
im (corresponds to instant messages)
journals
meetings (corresponds to appointments and meeting requests)
notes
posts
rssfeeds
tasks
voicemail
Using a date value type
You can search date value types in a number of different ways. The simplest is to search
for a specific date. Searching with received:12/11/2013 will return all items received on
December 11, 2013. However, you can also be less specific. Searching with
received:12/11 will return all items received on December 11 of the current year.

Another option is to use the month names. You can search with received:December 11,
2013 or December 11 to get the same results as received:12/11/2013 and
received:12/11, respectively. You can also search with received:December to get all items
received in the month of December, in the current year.

Using the names of the days of the week is also an option. Searching with
received:Tuesday will return all items received on Tuesday of the current week.

Date value types also support a set of keywords for searches relative to the current time.
The following keywords are supported:

today
tomorrow
yesterday
this week
last week
next month
past month
coming year

Date value types can also be compared with relational operators like greater than or less
than, or specified as a range with the range operator ... For example,
received:>11/30/2013, sent:>=yesterday, and received:12/1/2013..today are all valid
query strings.

Using a Boolean value type


Boolean value types can be "true" or "false". The values are not case-sensitive, so
isread:false will produce the same results as isread:FALSE.

Using a number value type


Number value types can be searched as exact matches, but they can also be searched
using relational operators like greater than or less than. For example, size:10000 will
return only items that have a size of exactly 10000 bytes, but size:>=10000 will return
items that have a size greater than or equal to 10000 bytes. You can also specify a range
by using the range operator ( ..). For example, size:7000..8000 will return items that have
a size between 7000 and 8000.

Using logical operators


Query strings support the following logical operators.

Table 2. Supported logical operators

Operator Examples

AND project AND from:"Sadie Daniels"


subject:(project AND plan)

OR subject:meeting OR from:"Hope Gross"


from:("Sadie Daniels" OR "Hope Gross")

NOT NOT from:"Ronnie Sturgis"


received:NOT today

Notice that you can use these operators to join multiple criteria together or to join
multiple values within a single keyword/value pair together. However, when joining
multiple values in a single keyword/value pair, you should use parentheses to enclose
the multiple values. To understand why, consider searching with from:"Sadie Daniels" OR
"Hope Gross". This search actually is interpreted as the following criteria:

The item is from Sadie Daniels, OR

The item has the phrase "Hope Gross" in any of its indexed properties.

In contrast, from:("Sadie Daniels" OR "Hope Gross") is interpreted as:

The item is from Sadie Daniels, OR

The item is from Hope Gross

The default operator when multiple criteria are specified but no logical operator is
included is AND. For example, has attachment:true subject:project is equivalent to
has:attachment:true AND subject:project.

Example: Find items by using a query string


and the EWS Managed API
In this example, a method called SearchWithQueryString is defined. It takes an
ExchangeService object, a WellKnownFolderName object, and a string object that
represents the query string as parameters. This example assumes that the
ExchangeService object has been initialized with valid values in the Credentials and
Url properties.

C#

using Microsoft.Exchange.WebServices.Data;

static void SearchWithQueryString(ExchangeService service,


WellKnownFolderName folder, string queryString)

// Limit the result set to 10 items.

ItemView view = new ItemView(10);

view.PropertySet = new PropertySet(ItemSchema.Subject,

ItemSchema.DateTimeReceived,

ItemSchema.Size,

ItemSchema.Importance,

EmailMessageSchema.IsRead);

// Item searches do not support Deep traversal.

view.Traversal = ItemTraversal.Shallow;

// Sorting

view.OrderBy.Add(ItemSchema.DateTimeReceived, SortDirection.Descending);

try

// Execute the search based on the query string.

// Example: "subject:project plan"

FindItemsResults<Item> results = service.FindItems(folder,


queryString, view);

foreach (Item item in results.Items)

Console.WriteLine("Subject: {0}", item.Subject);

Console.WriteLine("Received: {0}",
item.DateTimeReceived.ToString());

Console.WriteLine("Size: {0}", item.Size.ToString());

Console.WriteLine("Importance: {0}",
item.Importance.ToString());

if (item is EmailMessage)

EmailMessage message = item as EmailMessage;

Console.WriteLine("Read: {0}", message.IsRead.ToString());

catch (Exception ex)

Console.WriteLine("Exception while enumerating results: {0}",


ex.Message);

You can use this method to search for all items with the phrase "project plan" in the
subject, as shown in this example.

C#

string queryString = "subject:\"project plan\"";

SearchWithQueryString(service, WellKnownFolderName.Inbox, queryString);

Example: Find items by using a query string


and EWS
In this example, a SOAP FindItem request finds all items in the Inbox with the phrase
"project plan" in the subject.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:FindItem Traversal="Shallow">

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

<t:FieldURI FieldURI="item:DateTimeReceived" />

<t:FieldURI FieldURI="item:Size" />

<t:FieldURI FieldURI="item:Importance" />

<t:FieldURI FieldURI="message:IsRead" />

</t:AdditionalProperties>

</m:ItemShape>

<m:IndexedPageItemView MaxEntriesReturned="10" Offset="0"


BasePoint="Beginning" />

<m:SortOrder>

<t:FieldOrder Order="Descending">

<t:FieldURI FieldURI="item:DateTimeReceived" />

</t:FieldOrder>

</m:SortOrder>

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="inbox" />

</m:ParentFolderIds>

<m:QueryString>subject:"project plan"</m:QueryString>

</m:FindItem>

</soap:Body>

</soap:Envelope>

The following example shows the response from the server with the search results.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="712" MinorBuildNumber="22" Version="V2_3"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:FindItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder IndexedPagingOffset="1" TotalItemsInView="1"


IncludesLastItemInRange="true">

<t:Items>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>project plan</t:Subject>

<t:DateTimeReceived>2013-12-
11T15:42:02Z</t:DateTimeReceived>

<t:Size>7406</t:Size>

<t:Importance>Normal</t:Importance>

<t:IsRead>false</t:IsRead>

</t:Message>

</t:Items>

</m:RootFolder>

</m:FindItemResponseMessage>

</m:ResponseMessages>

</m:FindItemResponse>

</s:Body>

</s:Envelope>

See also
Search and EWS in Exchange
Use search filters with EWS in Exchange
ExchangeService.FindItems
FindItem operation
Perform paged searches by using EWS
in Exchange
Article • 11/18/2020 • 12 minutes to read

Find out how to perform paged searches in your EWS Managed API or EWS application
that targets Exchange.

Paging is a feature in EWS that enables you to control the size of the results of a search.
Rather than retrieve the entire result set in one EWS response, you can retrieve smaller
sets in multiple EWS responses. For example, consider a user with 10,000 email
messages in their Inbox. Hypothetically, you could retrieve all 10,000 emails in one very
large response, but you might want to break that up into more manageable chunks for
bandwidth or performance reasons. Paging gives you the tools to do just that.

7 Note

While you can hypothetically retrieve 10,000 items in one request, in reality, this is
unlikely due to EWS throttling. To find out more, see EWS throttling in Exchange.

Table 1. Paging parameters in the EWS Managed API and EWS

To configure or In the EWS Managed API, use… In EWS, use…


retrieve the…

Maximum The pageSize parameter to the The MaxEntriesReturned attribute on


number of items ItemView constructor or the the IndexedPageItemView element
or folders in a FolderView constructor
or the IndexedPageFolderView
response Or element
The PagedView.PageSize property

Starting point in The offsetBasePoint parameter to The BasePoint attribute on the


the list of items the ItemView constructor or the IndexedPageItemView element or
or folders FolderView constructor the IndexedPageFolderView element
Or
The PagedView.OffsetBasePoint
property

Offset from the The offset parameter to the The Offset attribute on the
starting point ItemView constructor or the IndexedPageItemView element or
FolderView constructor the IndexedPageFolderView element
Or
The PagedView.Offset property
To configure or In the EWS Managed API, use… In EWS, use…
retrieve the…

Total number of The FindItemsResults.TotalCount The TotalItemsInView attribute on


results on the property or the the RootFolder
server FindFoldersResults.TotalCount (FindItemResponseMessage)
property element or the RootFolder
(FindFolderResponseMessage)
element

Offset of first The The IndexedPagingOffset attribute


item or folder not FindItemsResults.NextPageOffset on the RootFolder element
included in property or the
current response FindFoldersResults.NextPageOffset
property

Indicator that The The IncludesLastItemInRange


response includes FindItemsResults.MoreAvailable attribute on the RootFolder element
the last item or property or the
folder in the list FindFoldersResults.MoreAvailable
property

How paging works


To understand how paging works, it's helpful to visualize the messages in a folder as
billboards lined up side by side in a field outside your house. You can see some of these
billboards through a magical window. You have the ability to change the size of the
window (to see more or fewer billboards at once) and to move the window (to control
which billboards you can see). This manipulation of the window is paging.

When you send your request to the Exchange server, you specify the size of your
window in terms of how many items to return. You set the position of the window by
specifying a starting point (either the beginning of the line or the end of the line) and an
offset from that starting point, expressed in a number of items. The beginning of the
window is the number of items specified by the offset from the starting point.

Where paging gets a bit more interesting is in the server's response, and how your
application can use that response to shape its next request. The server gives you three
pieces of information that you can use to determine how to configure your "window" for
your next request:

Whether the results in the response include the last item in the overall result set on
the server.

The total number of items in the result set on the server.


What the next offset value should be, if you want to advance your window to the
next item in the result set that isn't included in the current response.

Let's look at a simple example. Imagine an Inbox with 15 messages in it. Your application
sends an initial request to retrieve a maximum of 10 items, starting at the beginning of
the list of messages (so the offset is zero). The server responds with the first 10
messages, and indicates that the response does not include the last item, that there are
a total of 15 items, and that the next offset should be 10.

Figure 1. Requesting 10 items at offset 0 from the beginning of a list of 15 items

Your application then resends the same request to the server, with the only change
being that the offset is now 10. The server returns the last five items, and indicates that
the response does include the last item, that there are a total of 15 items, and that the
next offset should be 15 (though of course, you've reached the end, so there won't be a
next offset.)

Figure 2. Requesting 10 items at offset 10 from the beginning of a list of 15 items

Design considerations for paging


Making the most out of paging in your application does require some consideration. For
example, how large do you make your "window"? What do you do if the results on the
server change while you're moving your "window"?

Determine the size of your window


There is no "one-size-fits-all" maximum number of entries that all applications should
use. Determining the number that's right for your application depends on several
different factors. However, it's helpful to keep the following guidelines in mind:
By default, Exchange limits the maximum number of items that can be returned in
a single request to 1000.

Setting the maximum number of entries to a larger number results in having to


send fewer requests to get all items, at the cost of having to wait longer for
responses.

Setting the maximum number of entries to a smaller number results in quicker


response times, at the cost of having to send more requests to get all items.

Handling changes to the result set


In the simple example earlier in this article, the number of items in the user's Inbox
remained constant. However, in reality, the number of items in an Inbox can change
frequently. New messages can arrive and items can be deleted or moved at any time.
But how does this impact paging? Let's modify the earlier example scenario to find out.

We'll start again with the 15 items in the user's Inbox, and send the same initial request.
As before, the server responds with the first 10 messages, and indicates that the
response does not include the last item, that there are a total of 15 items, and that the
next offset should be 10, as shown in Figure 1.

Now, while your application is processing those 10 items, a new message arrives in the
Inbox and is added to the result set on the server. Your application resends the same
request to the server (only with the offset set to 10). This time the server gets back six
items, and indicates that there are a total of 16 items in the result set.

At this point you might be wondering if this is even a problem. After all, you got 16
items back over the two responses, so why all the fuss? The answer depends on where in
the list the new item is placed. If the list is sorted so that the oldest items (by received
date/time) are first, there's no cause for concern in this scenario. The new item will be
placed at the end of the list, and will be included in the second response.

Figure 3. Requesting 10 items at offset 10 from the beginning of a list of 16 items, with
the 16th item in the list being new
If the list is sorted so that the newest items are first, it's a different story. In this case, the
first item in the second request would be the last item from the previous request plus
the remaining five items from the original 15. To put it in terms of our imaginary magical
window, you shifted your window's position by 10, but the billboards themselves also
shifted by 1.

Figure 4. Requesting 10 items at offset 10 from the beginning of a list of 16 items, with
the first item in the list being new

One way to detect a change to the results on the server is to use the concept of an
anchor item. An anchor item is an additional item in your response that is not processed
along with the rest of the results, but is used to compare with the next results to see if
the items themselves have shifted. Building again on our simple example, if your
application is using a "window" size of 10, you actually set the maximum number of
items to return to 11. Your application processes the first 10 items in the response as
usual. For the last item, you save the item's identifier as an anchor, then issue the next
request with an offset of 10. If the data has not changed, the first item in the second
response should have an item identifier that matches the anchor. If the item identifiers
don't match, you know that the data has been removed or inserted in the parts of the
list you have already "paged" over.

Even when you know that the data has changed, you still need to decide how to react.
There isn't a one-size-fits-all answer for this question either. Your actions will depend on
the nature of your application and how critical it is to capture all items. You might ignore
it altogether, restart the process from the beginning, or back track and try to detect
where the change happened.

Example: Perform a paged search by using the


EWS Managed API
Paging is supported by the following EWS Managed API methods:

ExchangeService.FindFolders

ExchangeService.FindItems
Folder.FindFolders

Folder.FindFolders

If you are using the EWS Managed API, your application configures paging with the
ItemView or FolderView class and receives information from the server regarding
paging from the FindItemsResults or FindFoldersResults class.

The following example retrieves all the items in a folder using a paged search that
returns five items in each response. It also retrieves an additional item to serve as an
anchor to detect changes to the results on the server.

This example assumes that the ExchangeService object has been initialized with valid
values in the Credentials and Url properties.

C#

using Microsoft.Exchange.WebServices.Data;

static void PageSearchItems(ExchangeService service, WellKnownFolderName


folder)

int pageSize = 5;

int offset = 0;

// Request one more item than your actual pageSize.

// This will be used to detect a change to the result

// set while paging.

ItemView view = new ItemView(pageSize + 1, offset);

view.PropertySet = new PropertySet(ItemSchema.Subject);

view.OrderBy.Add(ItemSchema.DateTimeReceived, SortDirection.Descending);

view.Traversal = ItemTraversal.Shallow;

bool moreItems = true;

ItemId anchorId = null;

while (moreItems)

try

FindItemsResults<Item> results = service.FindItems(folder,


view);

moreItems = results.MoreAvailable;

if (moreItems && anchorId != null)

// Check the first result to make sure it matches

// the last result (anchor) from the previous page.

// If it doesn't, that means that something was added

// or deleted since you started the search.

if (results.Items.First<Item>().Id != anchorId)

Console.WriteLine("The collection has changed while


paging. Some results may be missed.");

if (moreItems)

view.Offset += pageSize;

anchorId = results.Items.Last<Item>().Id;

// Because you're including an additional item on the end of


your results

// as an anchor, you don't want to display it.

// Set the number to loop as the smaller value between


// the number of items in the collection and the page size.

int displayCount = 0;

if ((results.MoreAvailable == false && results.Items.Count >


pageSize) || (results.Items.Count < pageSize))

displayCount = results.Items.Count;

else

displayCount = pageSize;

for (int i = 0; i < displayCount; i++)

Item item = results.Items[i];

Console.WriteLine("Subject: {0}", item.Subject);

Console.WriteLine("Id: {0}\n", item.Id.ToString());

catch (Exception ex)

Console.WriteLine("Exception while paging results: {0}",


ex.Message);

Example: Perform a paged search by using EWS


Paging is supported by the following EWS operations:

FindFolder

FindItem

If you're using EWS, your application configures paging with the


IndexedPageItemView element or the IndexedPageFolderView element and receives
information from the server regarding paging from the RootFolder
(FindItemResponseMessage) element or the RootFolder
(FindFolderResponseMessage) element.
In this request example, a FindItem request is sent for a maximum of six items, starting
at an offset of zero from the beginning of the list of items in the user's Inbox.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Eastern Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:FindItem Traversal="Shallow">

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

</t:AdditionalProperties>

</m:ItemShape>

<m:IndexedPageItemView MaxEntriesReturned="6" Offset="0"


BasePoint="Beginning" />

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="inbox" />

</m:ParentFolderIds>

</m:FindItem>

</soap:Body>

</soap:Envelope>

The server returns the following response, which contains six items. The response also
indicates that there are a total of eight items in the results on the server, and that the
last item in the results list is not present in this response.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="775" MinorBuildNumber="35" Version="V2_4"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:FindItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder IndexedPagingOffset="6" TotalItemsInView="8"


IncludesLastItemInRange="false">

<t:Items>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>Query</t:Subject>

</t:Message>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>Update</t:Subject>

</t:Message>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>Planning resources</t:Subject>

</t:Message>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>Timeline</t:Subject>

</t:Message>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>For your perusal</t:Subject>

</t:Message>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>meeting notes</t:Subject>

</t:Message>

</t:Items>

</m:RootFolder>

</m:FindItemResponseMessage>

</m:ResponseMessages>

</m:FindItemResponse>

</s:Body>

</s:Envelope>

In this example, the same request is sent, but this time, the Offset attribute is changed
to five, which indicates that the server should return at most six items starting at offset
five from the beginning.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Eastern Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:FindItem Traversal="Shallow">

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

</t:AdditionalProperties>

</m:ItemShape>

<m:IndexedPageItemView MaxEntriesReturned="6" Offset="5"


BasePoint="Beginning" />

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="inbox" />

</m:ParentFolderIds>

</m:FindItem>

</soap:Body>

</soap:Envelope>

The server sends the following response, which contains three items. The response also
indicates that the total number of items in the results on the server is still eight, and that
the last item in the results list is included in this response.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="775" MinorBuildNumber="35" Version="V2_4"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:FindItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder IndexedPagingOffset="8" TotalItemsInView="8"


IncludesLastItemInRange="true">

<t:Items>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>meeting notes</t:Subject>

</t:Message>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>Meeting notes</t:Subject>

</t:Message>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>This cat is hilarious!</t:Subject>

</t:Message>

</t:Items>

</m:RootFolder>

</m:FindItemResponseMessage>

</m:ResponseMessages>

</m:FindItemResponse>

</s:Body>

</s:Envelope>

See also
Search and EWS in Exchange

ExchangeService.FindFolders method

ExchangeService.FindItems method

Folder.FindFolders method

Folder.FindFolders method

FindFolder operation

FindItem operation

EWS throttling in Exchange


Perform grouped searches by using
EWS in Exchange
Article • 09/15/2021 • 8 minutes to read

Find out how to perform grouped searches in your EWS Managed API or EWS
application that targets Exchange.

Grouped searches are useful in that they gives you control over how search results are
organized. Organized search results can make it easier for your application to process
results or display them to an end user in a manageable way.

Grouping works by putting all items within the result set that have the same value of a
specific field into a group. For example, you can group your results by the sender, and
all items from the same person will be in a separate group, and the items within each
group will be sorted according to the order you specify on the view. The groups
themselves are sorted by an aggregate value based on a field you choose.

Table 1. EWS Managed API methods and EWS operations for organizing search results

If you want to… In the EWS Managed API, In EWS, use…


use…

Organize items with the same value in a Grouping.GroupOn


FieldURI element
specific property in your results into groups as a child of the
GroupBy element

Sort items within each group by the value in ItemView.OrderBy


SortOrder
a specific property element

Sort the groups Grouping.AggregateOn


FieldURI element as
a child of the
Grouping.AggregateType AggregateOn
element

Grouping.SortDirection

Aggregate attribute
on the
AggregateOn
element

Order attribute on
the GroupBy
element

Let's take it step by step.


Group results by a specific property
The first step to using grouping is to select a property, or attribute on the items in the
Exchange store, to group by. The EWS Managed API exposes these as class properties
on the corresponding classes, while EWS exposes them as XML elements. You can
choose any property, including custom or extended properties, but it is helpful to
understand how items are grouped based on the value of the property you choose.

All items that have the same value in the property you choose to group by will be
grouped together. This might seem obvious, but it is an important detail. Consider what
happens if you group by a date/time property, such as Item.DateTimeReceived in the
EWS Managed API, or the DateTimeReceived element in EWS. The intent might be to
organize the results into groups, with each group containing items from the same day.
However, grouping looks at the entire value, which includes the time.

The end result is that the items will be grouped so that items received at the same time,
down to the second, are in their own groups. The results will most likely be sorted into a
large number of groups with a small number of items in each group.

To get a results set with a smaller number of groups and a larger number of items in
each group, choose a property that is likely to have a smaller number of values, such as
EmailMessage.From or Item.Categories in the EWS Managed API, or From or
Categories in EWS. The following figure shows a list of emails that appear in an Inbox.

Figure 1. Messages in an Inbox

If you group the items in Figure 1 by the EmailMessage.From property, the result will be
two groups, one for messages sent by Hope Gross, and one for messages sent by Sadie
Daniels.

Figure 2. Messages separated into groups based on the From property


Sort the items within groups
You can control how items are sorted within each group by using the
ItemView.OrderBy property in the EWS Managed API, or the SortOrder element in
EWS. The same ordering applies to each group. For example, if you sort the items from
Figure 1 by the Item.DateTimeReceived property, in descending order, the item most
recently received from Hope Gross will be first in the Hope Gross group, and the item
most recently received from Sadie Daniels will be first in the Sadie Daniels group.
Conveniently, the groups in Figure 2 are already sorted this way.

Sort the groups


Now that you have your groups settled, the final step is sorting the groups themselves.
Because the groups themselves have no specific values, the grouping process has to
assign a sort value to each group. This is done by aggregation of the values of a specific
property within each group, specified by the Grouping.AggregateOn property in the
EWS Managed API, or the FieldURI element as a child of the AggregateOn element
in EWS. The Grouping.AggregateType property in the EWS Managed API (or the
Aggregate attribute on the AggregateOn element in EWS) specifies which value from
the items within each group is assigned to the sort value for the group — either the
largest value or the smallest value. Finally, the sort order (descending or ascending) is
specified by the Grouping.SortDirection property in the EWS Managed API, or the
Order attribute on the GroupBy element in EWS.

For example, if the groups from Figure 2 are sorted by aggregating on the
Item.DateTimeReceived property, using the smallest value, and sorting in descending
order, the items are returned in the order in shown Figure 3.

Figure 3. Grouped search results with the groups sorted by the DateTimeReceived
property
The next sections show you how you might pull grouping and sorting together in code.

Example: Perform a grouped search by using


the EWS Managed API
The following EWS Managed API methods can use grouping:

ExchangeService.FindItems

Folder.FindItems

The following example uses the ExchangeService.FindItems method; however, the same
rules and concepts apply to the Folder.FindItems method. In this example, a method
called GroupItemsByFrom is defined. It takes an ExchangeService object and a
WellKnownFolderName object as parameters. It requests the first 50 items in the
folder, grouped by the EmailMessage.From property, sorted by the
Item.DateTimeReceived property in descending order. The groups themselves are
sorted by the smallest Item.DateTimeReceived property value on their items, in
descending order.

This example assumes that the ExchangeService object has been initialized with valid
values in the Credentials and Url properties.

C#

static void GroupItemsByFrom(ExchangeService service, WellKnownFolderName


folder)

// Limit the result set to 50 items.

ItemView view = new ItemView(50);

view.PropertySet = new PropertySet(ItemSchema.Subject,

ItemSchema.DateTimeReceived,

EmailMessageSchema.From,

ItemSchema.Categories);

// Item searches do not support Deep traversal.

view.Traversal = ItemTraversal.Shallow;

// Specify the sorting done within the groups.

view.OrderBy.Add(ItemSchema.DateTimeReceived, SortDirection.Descending);

// Configure grouping.

Grouping groupByFrom = new Grouping();

groupByFrom.GroupOn = EmailMessageSchema.From;

groupByFrom.AggregateOn = ItemSchema.DateTimeReceived;

groupByFrom.AggregateType = AggregateType.Minimum;

groupByFrom.SortDirection = SortDirection.Descending;

try

GroupedFindItemsResults<Item> results = service.FindItems(folder,

view, groupByFrom);

foreach (ItemGroup<Item> group in results.ItemGroups)

Console.WriteLine("Group: {0}", group.GroupIndex);

foreach (Item item in group.Items)

if (item is EmailMessage)

EmailMessage message = item as EmailMessage;

Console.WriteLine("From: {0}", message.From);

Console.WriteLine("Subject: {0}", message.Subject);

Console.WriteLine("Id: {0}\n", message.Id.ToString());

catch (Exception ex)

Console.WriteLine("Exception while enumerating results: {0}",


ex.Message);

Example: Perform a grouped search by using


EWS
The following request example shows a FindItem operation request for the first 50
items in the folder, grouped by the From element, sorted by the DateTimeReceived
element in descending order. The groups themselves are sorted by the smallest
DateTimeReceived element value on their items, in descending order.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Eastern Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:FindItem Traversal="Shallow">

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

<t:FieldURI FieldURI="item:DateTimeReceived" />

<t:FieldURI FieldURI="message:From" />

<t:FieldURI FieldURI="item:Categories" />

</t:AdditionalProperties>

</m:ItemShape>

<m:IndexedPageItemView MaxEntriesReturned="50" Offset="0"


BasePoint="Beginning" />

<m:GroupBy Order="Descending">

<t:FieldURI FieldURI="message:From" />

<t:AggregateOn Aggregate="Minimum">

<t:FieldURI FieldURI="item:DateTimeReceived" />

</t:AggregateOn>

</m:GroupBy>

<m:SortOrder>

<t:FieldOrder Order="Descending">

<t:FieldURI FieldURI="item:DateTimeReceived" />

</t:FieldOrder>

</m:SortOrder>

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="inbox" />

</m:ParentFolderIds>

</m:FindItem>

</soap:Body>

</soap:Envelope>

The server returns the following response.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="712" MinorBuildNumber="22" Version="V2_3"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:FindItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder IndexedPagingOffset="10" TotalItemsInView="8"


IncludesLastItemInRange="true">

<t:Groups>

<t:GroupedItems>

<t:GroupIndex>0</t:GroupIndex>

<t:Items>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>Planning resources</t:Subject>

<t:DateTimeReceived>2013-12-
10T17:41:05Z</t:DateTimeReceived>

<t:From>

<t:Mailbox>

<t:Name>Sadie Daniels</t:Name>

<t:EmailAddress>/O=FIRST ORGANIZATION/OU=EXCHANGE
ADMINISTRATIVE GROUP
(FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=8D84A3F4CBB34D48838A3AECF99795C0-
SADIE</t:EmailAddress>

<t:RoutingType>EX</t:RoutingType>

</t:Mailbox>

</t:From>

</t:Message>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>Timeline</t:Subject>

<t:DateTimeReceived>2013-12-
10T17:40:37Z</t:DateTimeReceived>

<t:Categories>

<t:String>Project</t:String>

</t:Categories>

<t:From>

<t:Mailbox>

<t:Name>Sadie Daniels</t:Name>

<t:EmailAddress>/O=FIRST ORGANIZATION/OU=EXCHANGE
ADMINISTRATIVE GROUP
(FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=8D84A3F4CBB34D48838A3AECF99795C0-
SADIE</t:EmailAddress>

<t:RoutingType>EX</t:RoutingType>

</t:Mailbox>

</t:From>

</t:Message>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>For your perusal</t:Subject>

<t:DateTimeReceived>2013-11-
20T21:51:16Z</t:DateTimeReceived>

<t:From>

<t:Mailbox>

<t:Name>Sadie Daniels</t:Name>

<t:EmailAddress>/O=FIRST ORGANIZATION/OU=EXCHANGE
ADMINISTRATIVE GROUP
(FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=8D84A3F4CBB34D48838A3AECF99795C0-
SADIE</t:EmailAddress>

<t:RoutingType>EX</t:RoutingType>

</t:Mailbox>

</t:From>

</t:Message>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>meeting notes</t:Subject>

<t:DateTimeReceived>2013-11-
20T21:18:51Z</t:DateTimeReceived>

<t:Categories>

<t:String>Blue category</t:String>
</t:Categories>

<t:From>

<t:Mailbox>

<t:Name>Sadie Daniels</t:Name>

<t:EmailAddress>/O=FIRST ORGANIZATION/OU=EXCHANGE
ADMINISTRATIVE GROUP
(FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=8D84A3F4CBB34D48838A3AECF99795C0-
SADIE</t:EmailAddress>

<t:RoutingType>EX</t:RoutingType>

</t:Mailbox>

</t:From>

</t:Message>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>Meeting notes</t:Subject>

<t:DateTimeReceived>2013-11-
20T21:18:51Z</t:DateTimeReceived>

<t:From>

<t:Mailbox>

<t:Name>Sadie Daniels</t:Name>

<t:EmailAddress>/O=FIRST ORGANIZATION/OU=EXCHANGE
ADMINISTRATIVE GROUP
(FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=8D84A3F4CBB34D48838A3AECF99795C0-
SADIE</t:EmailAddress>

<t:RoutingType>EX</t:RoutingType>

</t:Mailbox>

</t:From>

</t:Message>

</t:Items>

</t:GroupedItems>

<t:GroupedItems>

<t:GroupIndex>1</t:GroupIndex>

<t:Items>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>Query</t:Subject>

<t:DateTimeReceived>2013-12-
10T17:43:15Z</t:DateTimeReceived>

<t:From>

<t:Mailbox>

<t:Name>Hope Gross</t:Name>

<t:EmailAddress>/O=FIRST ORGANIZATION/OU=EXCHANGE
ADMINISTRATIVE GROUP
(FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=9B55E4100C064D9D8C5F72FF36802ED3-
HOPE</t:EmailAddress>

<t:RoutingType>EX</t:RoutingType>

</t:Mailbox>

</t:From>

</t:Message>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>Update</t:Subject>

<t:DateTimeReceived>2013-12-
10T17:42:33Z</t:DateTimeReceived>

<t:Categories>

<t:String>Project</t:String>

<t:String>Blue category</t:String>
</t:Categories>

<t:From>

<t:Mailbox>

<t:Name>Hope Gross</t:Name>

<t:EmailAddress>/O=FIRST ORGANIZATION/OU=EXCHANGE
ADMINISTRATIVE GROUP
(FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=9B55E4100C064D9D8C5F72FF36802ED3-
HOPE</t:EmailAddress>

<t:RoutingType>EX</t:RoutingType>

</t:Mailbox>

</t:From>

</t:Message>

<t:Message>

<t:ItemId Id="AAMkAGM2..." ChangeKey="CQAAABYA..." />

<t:Subject>This cat is hilarious!</t:Subject>

<t:DateTimeReceived>2013-10-
15T20:22:12Z</t:DateTimeReceived>

<t:From>

<t:Mailbox>

<t:Name>Hope Gross</t:Name>

<t:EmailAddress>/O=FIRST ORGANIZATION/OU=EXCHANGE
ADMINISTRATIVE GROUP
(FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=9B55E4100C064D9D8C5F72FF36802ED3-
HOPE</t:EmailAddress>

<t:RoutingType>EX</t:RoutingType>

</t:Mailbox>

</t:From>

</t:Message>

</t:Items>

</t:GroupedItems>

</t:Groups>

</m:RootFolder>

</m:FindItemResponseMessage>

</m:ResponseMessages>

</m:FindItemResponse>

</s:Body>

</s:Envelope>

Version differences
Versions of Exchange starting with major version 15 and ending with build 15.0.775.38
return Group elements (of type GroupedItemsType) in place of GroupedItems
elements in the SOAP response. If you are using the EWS Managed API, this will cause
the GroupedFindItemsResults.ItemGroups collection to contain 0 objects. If you are
using EWS, Group elements should be handled as GroupedItems elements.

Versions of Exchange starting with major version 15 return extra Group or


GroupedItems elements with the xsi:nil attribute set to true in the SOAP response. If
you are using the EWS Managed API, these extra elements will cause a
ServiceXmlDeserializationException to be thrown. If you are using EWS, these extra
elements should be ignored.

See also
Search and EWS in Exchange
ExchangeService.FindItems
Folder.FindItems
Grouping class
FindItem operation
Work with search folders by using EWS
in Exchange
Article • 09/15/2021 • 8 minutes to read

Find out how to create, get, update, and delete search folders by using the EWS
Managed API or EWS in Exchange.

A search folder represents a persistent "always-on" search in a user's mailbox. A search


folder looks and acts like a regular mailbox folder. However, instead of containing items,
it contains a "virtual" copy of items from any folders in its search scope that match the
search criteria set on the folder. Both applications and end-users can use search folders.
Does your application need to perform the same search over and over? Search folders
are a great tool for this task. Or maybe you just want to give your users the ability to
access and manage search folders in your client. Whatever your scenario, the EWS
Managed API and EWS enable your application to fully interact with search folders.

7 Note

This article applies only when using Outlook in online mode. Search folders do not
sync; therefore, search folders created in online mode will not appear in cached
mode.

Table 1. EWS Managed API methods and EWS operations for working with search
folders

If you want to… In the EWS Managed API, use… In EWS, use…

Create a search folder SearchFolder.Save


CreateFolder operation

Get a search folder SearchFolder.Bind


GetFolder operation

Update a search folder SearchFolder.Update


UpdateFolder operation

Delete a search folder SearchFolder.Delete


DeleteFolder operation

Core concepts to know for working with search


folders
Before you start working with search folders, you'll want to be familiar with how search
filters work. Search folders rely on search filters to express their criteria. Search filters for
search folders are constructed in the same way that search filters for search operations
are constructed.

Create a search folder by using the EWS


Managed API
Basically, you create a search folder using the EWS Managed API in the same way that
you create a regular folder. However, instead of using the Folder class , you use the
SearchFolder class , and set the SearchParameters property to configure the search
criteria.

In the following example, a search folder is created to find all messages in the Inbox and
its subfolders that were sent by the user's manager, [email protected]. The folder is
created as a child of the Search Folders folder in the user's mailbox.

7 Note

You can create a search folder as a child of any folder in the user's mailbox.
However, if you want the newly created folder to show up under Search Folders in
Outlook, create it under the Search Folders well-known folder, using the
SearchFolders value of the WellKnownFolderName enumeration .

This example assumes that the ExchangeService object has been initialized with valid
values in the Credentials and Url properties.

C#

using Microsoft.Exchange.WebServices.Data;

static void CreateSearchFolder(ExchangeService service)

// Create the folder.

SearchFolder searchFolder = new SearchFolder(service);

searchFolder.DisplayName = "From Manager";

// Create a search filter to express the criteria

// for the folder.

EmailAddress manager = new EmailAddress("[email protected]");

SearchFilter.IsEqualTo fromManagerFilter =

new SearchFilter.IsEqualTo(EmailMessageSchema.Sender, manager);

// Set the search filter.

searchFolder.SearchParameters.SearchFilter = fromManagerFilter;

// Set the folder to search.

searchFolder.SearchParameters.RootFolderIds.Add(WellKnownFolderName.Inbox);

// Set the search traversal. Deep will search all subfolders.

searchFolder.SearchParameters.Traversal = SearchFolderTraversal.Deep;

// Call Save to make the EWS call to create the folder.

searchFolder.Save(WellKnownFolderName.SearchFolders);

Create a search folder by using EWS


If you are using EWS, use the CreateFolder operation with a SearchFolder element
to create a search folder. In the following request example, a search folder is created to
find all messages in the Inbox and its subfolders that were sent by the user's manager,
[email protected]. The folder is created in the Search Folders folder in the user's
mailbox.

7 Note

You can create a search folder as a child of any folder in the user's mailbox.
However, if you want the newly created folder to show up under Search Folders in
Outlook, create it under the Search Folders well-known folder, using the
searchfolders value in the Id attribute of the DistinguishedFolderId element.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Eastern Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:CreateFolder>

<m:ParentFolderId>

<t:DistinguishedFolderId Id="searchfolders" />

</m:ParentFolderId>

<m:Folders>

<t:SearchFolder>

<t:DisplayName>From Manager</t:DisplayName>

<t:SearchParameters Traversal="Deep">

<t:Restriction>

<t:IsEqualTo>

<t:FieldURI FieldURI="message:Sender" />


<t:FieldURIOrConstant>

<t:Constant Value="[email protected]" />

</t:FieldURIOrConstant>

</t:IsEqualTo>

</t:Restriction>

<t:BaseFolderIds>

<t:DistinguishedFolderId Id="inbox" />

</t:BaseFolderIds>

</t:SearchParameters>

</t:SearchFolder>

</m:Folders>

</m:CreateFolder>

</soap:Body>

</soap:Envelope>

The server responds with a CreateFolderResponse message that includes a


ResponseCode value of NoError, which indicates success.

Get a search folder by using the EWS Managed


API
Use the ExchangeService.FindFolders EWS Managed API method to find search
folders. Note, however, that you can't limit your results to only include search folders;
you'll want to keep that in mind when you process the results. Use the
SearchFolder.Bind method to get search folders.

The following example finds the first 10 folders in the Search Folders folder. It checks to
determine whether each one is a search folder, and if so, it gets the search folder and
displays how many target folders it searches.

C#

using Microsoft.Exchange.WebServices.Data;

static void GetSearchFolders(ExchangeService service)

FolderView folderView = new FolderView(10);

folderView.PropertySet = new PropertySet(FolderSchema.DisplayName);

try

FindFoldersResults findResults =
service.FindFolders(WellKnownFolderName.SearchFolders, folderView);

foreach (Folder folder in findResults.Folders)

// You can't request only search folders in

// a FindFolders request, so other search folders might also be


present.

if (folder is SearchFolder)

Console.WriteLine("{0} is a search folder.",


folder.DisplayName);

// In order to access the SearchParameters property,

// you have to bind to the folder. SearchParameters are not

// returned in FindFolders results.

SearchFolder searchFolder = SearchFolder.Bind(service,


folder.Id);

Console.WriteLine("Number of folders searched: {0}.",

searchFolder.SearchParameters.RootFolderIds.Count);

else

Console.WriteLine("{0} is NOT a search folder.",


folder.DisplayName);

catch (Exception ex)

Console.WriteLine("Exception while enumerating results: {0}",


ex.Message);

Get a search folder by using EWS


If you're using EWS, use the FindFolder operation to find search folders, and the
GetFolder operation to get search folders. A successful GetFolder response for a
search folder will contain a SearchFolder element. The following request example
finds the first 10 folders in the Search Folders folder.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Eastern Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:FindFolder Traversal="Shallow">

<m:FolderShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="folder:DisplayName" />

</t:AdditionalProperties>

</m:FolderShape>

<m:IndexedPageFolderView MaxEntriesReturned="10" Offset="0"


BasePoint="Beginning" />

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="searchfolders" />

</m:ParentFolderIds>

</m:FindFolder>

</soap:Body>

</soap:Envelope>

The server returns the following response, which shows one search folder.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="712" MinorBuildNumber="22" Version="V2_3"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:FindFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder IndexedPagingOffset="3" TotalItemsInView="3"


IncludesLastItemInRange="true">

<t:Folders>
<t:SearchFolder>

<t:FolderId Id="AAMkAGM2..." ChangeKey="CAAAABYA..." />

<t:DisplayName>From Manager</t:DisplayName>

</t:SearchFolder>

</t:Folders>

</m:RootFolder>

</m:FindFolderResponseMessage>

</m:ResponseMessages>

</m:FindFolderResponse>

</s:Body>

</s:Envelope>

The following example of a request uses the value of the FolderId element from the
previous response in a GetFolder operation request to get the search folder.

XML
<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Eastern Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:GetFolder>

<m:FolderShape>

<t:BaseShape>AllProperties</t:BaseShape>

</m:FolderShape>

<m:FolderIds>

<t:FolderId Id="AAMkAGM2..." ChangeKey="CAAAABYA..." />

</m:FolderIds>

</m:GetFolder>

</soap:Body>

</soap:Envelope>

The server returns the following response with all the first-class properties for the search
folder.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="https://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="712" MinorBuildNumber="22" Version="V2_3"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Folders>

<t:SearchFolder>

<t:FolderId Id="AAMkAGM2..." ChangeKey="CAAAABYA..." />

<t:ParentFolderId Id="AQMkAGM2..." ChangeKey="AQAAAA==" />

<t:FolderClass>IPF.Note</t:FolderClass>

<t:DisplayName>From Manager</t:DisplayName>

<t:TotalCount>8</t:TotalCount>

<t:ChildFolderCount>0</t:ChildFolderCount>

<t:EffectiveRights>

<t:CreateAssociated>true</t:CreateAssociated>

<t:CreateContents>true</t:CreateContents>

<t:CreateHierarchy>true</t:CreateHierarchy>

<t:Delete>true</t:Delete>

<t:Modify>true</t:Modify>

<t:Read>true</t:Read>

<t:ViewPrivateItems>true</t:ViewPrivateItems>

</t:EffectiveRights>

<t:UnreadCount>0</t:UnreadCount>

<t:SearchParameters Traversal="Deep">

<t:Restriction>

<t:IsEqualTo>

<t:FieldURI FieldURI="message:Sender" />

<t:FieldURIOrConstant>

<t:Constant Value="/o=First Organization/ou=Exchange


Administrative Group
(FYDIBOHF23SPDLT)/cn=Recipients/cn=8d84a3f4cbb34d48838a3aecf99795c0-Sadie"
/>

</t:FieldURIOrConstant>

</t:IsEqualTo>

</t:Restriction>

<t:BaseFolderIds>

<t:FolderId Id="AQMkAGM2..." ChangeKey="AQAAAA==" />

</t:BaseFolderIds>

</t:SearchParameters>

</t:SearchFolder>

</m:Folders>

</m:GetFolderResponseMessage>

</m:ResponseMessages>

</m:GetFolderResponse>

</s:Body>

</s:Envelope>

Update a search folder by using the EWS


Managed API
Use the Folder.Update EWS Managed API method on a SearchFolder object to update
a search folder. The following example updates the search criteria on a search folder
with the display name "From Manager".

C#

using Microsoft.Exchange.WebServices.Data;

static void UpdateSearchFolder(ExchangeService service)

FolderView folderView = new FolderView(10);

folderView.PropertySet = new PropertySet(FolderSchema.DisplayName);

try

FindFoldersResults findResults =
service.FindFolders(WellKnownFolderName.SearchFolders, folderView);

foreach (Folder folder in findResults.Folders)

// You cannot request only search folders in

// a FindFolders request, so other search folders might also be


present.

if (folder is SearchFolder &amp;&amp;


folder.DisplayName.Equals("From Manager"))

Console.WriteLine("\"{0}\" folder found.",


folder.DisplayName);

SearchFolder searchFolder = folder as SearchFolder;

EmailAddress newManager = new


EmailAddress("[email protected]");
SearchFilter.IsEqualTo newManagerFilter =

new SearchFilter.IsEqualTo(EmailMessageSchema.Sender,
newManager);

searchFolder.SearchParameters.SearchFilter =
newManagerFilter;

searchFolder.SearchParameters.RootFolderIds.Add(WellKnownFolderName.Inbox);

searchFolder.SearchParameters.Traversal =
SearchFolderTraversal.Deep;

searchFolder.Update();

Console.WriteLine("\"{0}\" folder updated.",


folder.DisplayName);

catch (Exception ex)

Console.WriteLine("Exception while enumerating results: {0}",


ex.Message);

Update a search folder by using EWS


If you're using EWS, use the UpdateFolder operation with a SearchFolder element
to update a search folder. The following request example updates the search criteria on
the "From Manager" search folder.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Eastern Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:UpdateFolder>

<m:FolderChanges>
<t:FolderChange>

<t:FolderId Id="AAMkAGM2..." ChangeKey="CAAAABYA..." />

<t:Updates>

<t:SetFolderField>

<t:FieldURI FieldURI="folder:SearchParameters" />

<t:SearchFolder>

<t:SearchParameters Traversal="Deep">

<t:Restriction>

<t:IsEqualTo>

<t:FieldURI FieldURI="message:Sender" />

<t:FieldURIOrConstant>

<t:Constant Value="[email protected]" />

</t:FieldURIOrConstant>

</t:IsEqualTo>

</t:Restriction>

<t:BaseFolderIds>

<t:DistinguishedFolderId Id="inbox" />

</t:BaseFolderIds>

</t:SearchParameters>

</t:SearchFolder>

</t:SetFolderField>

</t:Updates>

</t:FolderChange>

</m:FolderChanges>

</m:UpdateFolder>

</soap:Body>

</soap:Envelope>

The server responds with an UpdateFolderResponse message that includes a


ResponseCode value of NoError, which indicates success.

Delete a search folder by using the EWS


Managed API
Use the Folder.Delete EWS Managed API method on a SearchFolder object to delete
a search folder. The following example deletes a search folder with the display name
"From Manager". The deleted search folder is moved to the Deleted Items folder.
C#

using Microsoft.Exchange.WebServices.Data;

static void DeleteSearchFolder(ExchangeService service)

FolderView folderView = new FolderView(10);

folderView.PropertySet = new PropertySet(FolderSchema.DisplayName);

try

FindFoldersResults findResults =
service.FindFolders(WellKnownFolderName.SearchFolders, folderView);

foreach (Folder folder in findResults.Folders)

// You cannot request only search folders in

// a FindFolders request, so other folders might also be


present.

if (folder is SearchFolder &amp;&amp;


folder.DisplayName.Equals("From Manager"))

Console.WriteLine("\"{0}\" folder found.",


folder.DisplayName);

folder.Delete(DeleteMode.MoveToDeletedItems);

Console.WriteLine("\"{0}\" folder deleted.",


folder.DisplayName);

catch (Exception ex)

Console.WriteLine("Exception while enumerating results: {0}",


ex.Message);

Delete a search folder by using EWS


If you're using EWS, use the DeleteFolder operation to delete a search folder. The
following example deletes a search folder and moves it to the Deleted Items folder.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Eastern Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:DeleteFolder DeleteType="MoveToDeletedItems">

<m:FolderIds>

<t:FolderId Id="AAMkAGM2..." ChangeKey="CAAAABYA..." />

</m:FolderIds>

</m:DeleteFolder>

</soap:Body>

</soap:Envelope>

The server responds with a DeleteFolderResponse message that includes a


ResponseCode value of NoError, which indicates success.

See also
Search and EWS in Exchange
Use search filters with EWS in Exchange
SearchFolder class
CreateFolder operation
FindFolder operation
GetFolder operation
UpdateFolder operation
DeleteFolder operation
Time zones and EWS in Exchange
Article • 03/04/2022 • 8 minutes to read

Find out how time zones work with the EWS Managed API and EWS in Exchange.

Time zones aren't something that most people give much thought to. However, they're an important concept when
specifying dates and times using the EWS Managed API or EWS. Mishandling time zones in an EWS Managed API
or EWS application can yield unexpected results. Handling time zones properly is easy, as long as you know how.

Handling time zones in the EWS Managed API


If you're using the EWS Managed API, time zones are, for the most part, handled for you automatically. Without
any explicit action on your part, the API uses the local time zone of the client computer and handles all necessary
conversions behind the scenes. This is great when that's the desired effect, but you have other options.

One option is setting the ExchangeService.TimeZone property. This property controls the time zone for all
requests executed by the EWS Managed API. This property is read-only; the only way to set it is via the class
constructor. If you use either the ExchangeService(System.TimeZoneInfo) or the
ExchangeService(ExchangeVersion, System.TimeZoneInfo) constructor, you can specify a specific time zone as a
System.TimeZoneInfo object. If you use one of the other constructors that do not take a TimeZoneInfo object as
a parameter, the ExchangeService class sets the TimeZone property to the current time zone of the client
computer.

Whether you set a specific time zone or leave it as the time zone of the client computer, all dates and times are
expressed in the time zone represented by the TimeZone property. The EWS Managed API exposes all date/time
properties as System.DateTime structures. So if you set any date/time properties, be mindful that the time you
specify is interpreted according to the DateTime.Kind property value on the DateTime object. If the value of the
Kind property is set to Unspecified, the value of the DateTime is interpreted as being in the time zone specified by
the TimeZone property. If you're reading date/time properties, all DateTime properties are expressed in that time
zone.

If you are creating new appointments or meetings or updating existing appointments or meetings, you have the
ability to override the time zone specified in the TimeZone for new Appointment objects. However, exactly what
you can override depends on the EWS schema version you are targeting. For all values of the
ExchangeService.RequestedServerVersion property, you can set the Appointment.StartTimeZone to use a
specific time zone for that appointment or meeting. If you're using a value for the
ExchangeService.RequestedServerVersion property greater than Exchange2007_SP1, you can also set the
Appointment.EndTimeZone property, allowing you to specify a time zone for the Appointment.End property.
However, bear in mind that these properties only affect the interpretation of the date/time for the create request. If
you retrieve the appointment, the start and end times will still be expressed in the time zone specified by the
TimeZone property.

If you are updating existing appointments or meetings, you can change the time zone for an Appointment object
by setting the StartTimeZone property and/or the EndTimeZone property. Doing so will cause the applicable times
to shift accordingly. If you've set the ExchangeService.RequestedServerVersion to Exchange2007_SP1, you cannot
set the EndTimeZone property; the value of the StartTimeZone property will be used in its place.

Table 1. Time zone properties in the EWS Managed API

Time zone Minimum server Description


property request version
Time zone Minimum server Description
property request version

TimeZone
Exchange2007_SP1 If not set via the constructor for the ExchangeService class, this property is set to the
time zone of the client computer. All DateTime properties when creating items and
when retrieving existing items are expressed in this time zone. This time zone can be
overridden in create requests for appointments and meetings by setting the
Appointment.StartTimeZone and/or the Appointment.EndTimeZone property. If not
overridden by the Appointment.StartTimeZone property, this time zone is considered
the creation time zone for appointments and meetings.

StartTimeZone Exchange2007_SP1 If set on new Appointment objects, this time zone is used to interpret the
Appointment.Start and Appointment.ReminderDueBy properties. This time zone is
also considered the creation time zone for the Appointment object.
When retrieving existing items, this property is informational only. The values of
DateTime properties on existing appointment are always expressed in the time zone
specified by the ExchangeService.TimeZone property.

EndTimeZone
Exchange2010
If set on new Appointment objects, this time zone is used to interpret the
Appointment.End property.
When retrieving existing items, this property is informational only. The values of
DateTime properties on existing appointment are always expressed in the time zone
specified by the ExchangeService.TimeZone property.

Handling time zones in EWS


If you're using EWS, time zones aren't handled for you automatically, and things are a bit more complicated. How
time zones impact EWS requests and responses depends on a number of factors:

The Exchange version specified in the RequestServerVersion element

The time zone specified in the TimeZoneContext element (if present)

The time zone specified in the MeetingTimeZone , StartTimeZone , or EndTimeZone elements (if present
on appointments or meetings)

The time zone specified in the XML dateTime elements (if any)

The time zone specified in the value of dateTime elements can take three forms. You can read all the details in XML
Schema Part 2: Datatypes Second Edition , but to paraphrase:

Universal Coordinated Time (UTC): Specified by 'Z'. For example, 2014-06-06T19:00:00.000Z

Specific time zone: Specified by '+' or '-' followed by hours and minutes. For example, 2014-06-
06T19:00:00.000-08:00

No time zone: Specified by the absence of any time zone. For example, 2014-06-06T19:00:00.000

If a time zone is present in a dateTime value (either UTC or a specific time zone), that value is always interpreted as
that time zone. If no time zone is present, then the interpretation of the value depends on the specific combination
of the other time-zone related elements.

Table 2. Time zone elements in EWS and their effects


RequestServerVersion TimeZoneContext MeetingTimeZone, dateTime dateTime dateTime with no Appointment and
present? StartTimeZone, or in UTC in specific time zone meeting creation
EndTimeZone time zone time zone
present
(CalendarItem and
MeetingRequest
only)?

Exchange2007_SP1
Yes Yes ( Interpreted Interpreted Elements within Time zone in
MeetingTimeZone as UTC as the time the MeetingTimeZone
) zone CalendarItem or element
indicated MeetingRequest
in the element that
value contains the
MeetingTimeZone
element are
interpreted as the
time zone in the
MeetingTimeZone
element, all others
interpreted as UTC

Exchange2007_SP1
Yes No Interpreted Interpreted Interpreted as UTC UTC
as UTC as the time
zone
indicated
in the
value

Exchange2007_SP1
No Yes ( Interpreted Interpreted Elements within Time zone in
MeetingTimeZone as UTC as the time the MeetingTimeZone
) zone CalendarItem or element
indicated MeetingRequest
in the element that
value contains the
MeetingTimeZone
element are
interpreted as the
time zone in the
MeetingTimeZone
element, all others
interpreted as UTC

Exchange2007_SP1
No No Interpreted Interpreted Interpreted as UTC UTC
as UTC as the time
zone
indicated
in the
value
RequestServerVersion TimeZoneContext MeetingTimeZone, dateTime dateTime dateTime with no Appointment and
present? StartTimeZone, or in UTC in specific time zone meeting creation
EndTimeZone time zone time zone
present
(CalendarItem and
MeetingRequest
only)?

Exchange2010 and Yes Yes ( Interpreted Interpreted If the Time zone in the
later StartTimeZone as UTC as the time StartTimeZone StartTimeZone
and/or zone element is present, element if present,
EndTimeZone ) indicated the value of the time zone in the
in the Start and TimeZoneContext
value ReminderDueBy element if not
elements are
interpreted as the
time zone in the
StartTimeZone
element.
Otherwise, the
value of those
elements are
interpreted as the
time zone in the
TimeZoneContext
element.
If the
EndTimeZone
element is present,
the value of the
Start element is
interpreted as the
time zone in the
EndTimeZone
element.
Otherwise, the
value of the End
element is
interpreted as the
time zone in the
TimeZoneContext
element.
Elements outside
the
CalendarItem or
MeetingRequest
are interpreted as
the time zone in
the
TimeZoneContext
element.

Exchange2010 and Yes No Interpreted Interpreted Interpreted as the Time zone in the
later as UTC as the time time zone in the TimeZoneContext
zone TimeZoneContext element
indicated element
in the
value
RequestServerVersion TimeZoneContext MeetingTimeZone, dateTime dateTime dateTime with no Appointment and
present? StartTimeZone, or in UTC in specific time zone meeting creation
EndTimeZone time zone time zone
present
(CalendarItem and
MeetingRequest
only)?

Exchange2010 and No Yes ( Interpreted Interpreted If the Time zone in the


later StartTimeZone as UTC as the time StartTimeZone StartTimeZone
and/or zone element is present, element if present,
EndTimeZone ) indicated the value of the UTC if not
in the Start and
value ReminderDueBy
elements are
interpreted as the
time zone in the
StartTimeZone
element.
Otherwise, the
value of those
elements are
interpreted as
UTC.
If the
EndTimeZone
element is present,
the value of the
Start element is
interpreted as the
time zone in the
EndTimeZone
element.
Otherwise, the
value of the End
element is
interpreted as
UTC.
Elements outside
the
CalendarItem or
MeetingRequest
are interpreted as
UTC.

Exchange2010 and No No Interpreted Interpreted Interpreted as UTC UTC


later as UTC as the time
zone
indicated
in the
value

When interpreting responses from the server, you should always check the value of each element and interpret the
value accordingly. Exchange will always include a time zone (either UTC or a specific time zone) in the value.

Additional time zone considerations when creating


appointments and meetings
When you create an appointment or meeting, the time zone that applies to the start time is considered the
creation time zone for the appointment. In addition to controlling how the date/times are interpreted when an
appointment or meeting is created, the creation time zone has the following effects on the item:

If the item is an all-day event, it might display in an unexpected way if viewed from a client that is using a
different time zone than the creation time zone. This is because when an all-day event is created, the start
and end time of all-day events are adjusted to midnight of the creation time zone. That time will show as a
time other than midnight in a different time zone, so the item may appear to span extra days. Because of this,
we recommend that you use the time zone configured for the user's primary calendaring client to create all-
day events when possible.

If the item is a meeting, the creation time zone will be displayed in the Outlook information bar on the
meeting requests received by the attendees, if that time zone differs from the time zone of their client.

In this section
Create appointments in a specific time zone by using EWS in Exchange

Update the time zone for an appointment by using EWS in Exchange

See also
Develop web service clients for Exchange

EWS schema versions in Exchange

Create appointments and meetings by using EWS in Exchange 2013

Update appointments and meetings by using EWS in Exchange

Create all-day events by using EWS in Exchange

DateTime Structure

TimeZoneInfo Class
Create appointments in a specific time
zone by using EWS in Exchange
Article • 02/06/2023 • 6 minutes to read

When an appointment or meeting is created on an Exchange calendar, the time zone


used to specify the start and end times is saved as the creation time zone for the
appointment. That time zone is also used to interpret date and time values that do not
have an explicit time zone specified, so it is important to understand your options to
specify the time zone.

Create appointments in different time zones by


using the EWS Managed API
When creating appointments or meetings using the EWS Managed API, you have three
options for specifying the time zone:

To use the time zone of the computer where your EWS Managed API is executing,
do not specify a time zone when creating the ExchangeService object.

To use a specific time zone for all date/time properties, including properties when
creating a new appointment or meeting, specify a time zone in the constructor for
the ExchangeService object.

To use a different time zone than the one specified in the


ExchangeService.TimeZone property, use the Appointment.StartTimeZone and
Appointment.EndTimeZone properties.

7 Note

The EndTimeZone property is only available when the


ExchangeService.RequestedServerVersion property is set to Exchange2010 or
later. If it's not available, setting the StartTimeZone applies to both the start and
end times of the appointment.

In the following example, the EWS Managed API is used to create three appointments.
Each appointment is set to start at 1:00 PM two days from now, in an unspecified time
zone, and end one hour later. The first appointment is created in the client computer's
time zone by using default EWS Managed API behavior. The second is created in the
Central time zone by using the Appointment.StartTimeZone and
Appointment.EndTimeZone properties, in this case we also set the
TimeZoneDescription Extended Property to the same value as TimeZone being used.
The third is created in the Mountain time zone by using the ExchangeService.TimeZone
property.

C#

using Microsoft.Exchange.WebServices.Data;

using System.Security;

static void CreateAppointments(string userEmail, SecureString userPass)

// *****************************************************

// Create an appointment using the client computer's time zone.

// *****************************************************

// Do not specify a time zone when creating the ExchangeService.

ExchangeService clientTZService = new


ExchangeService(ExchangeVersion.Exchange2010);

clientTZService.Credentials = new NetworkCredential(userEmail,


userPass);

clientTZService.AutodiscoverUrl(userEmail, redirectionCallback);

// Create the appointment.

Appointment clientTZAppt = new Appointment(clientTZService);

clientTZAppt.Subject = "Appointment created using client time zone";

clientTZAppt.Body = new MessageBody(string.Format("Time zone: {0}",


clientTZService.TimeZone.DisplayName));

// Set the start time to 1:00 PM two days from today.

DateTime startTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month,


DateTime.Now.Day + 2);

startTime = startTime.AddHours(13);

clientTZAppt.Start = startTime;

// Set the end time to 2:00 PM on that same day.

DateTime endTime = startTime.AddHours(1);

clientTZAppt.End = endTime;

// Save the appointment to the default calendar.

try

// This method results in a call to EWS.

clientTZAppt.Save(SendInvitationsMode.SendToNone);

catch (Exception ex)

Console.WriteLine("Error saving appointment: {0}", ex.Message);

// *****************************************************

// Create an appointment in the Central time zone by

// using the StartTimeZone property.

// *****************************************************

// Extended Property for the TimeZone Description

ExtendedPropertyDefinition tzDescription = new


ExtendedPropertyDefinition(DefaultExtendedPropertySet.Appointment, 33332,
MapiPropertyType.String);

// Retrieve the Central time zone.

TimeZoneInfo centralTZ = TimeZoneInfo.FindSystemTimeZoneById("Central


Standard Time");

// Create the appointment.

Appointment centralTZAppt = new Appointment(clientTZService);

centralTZAppt.Subject = "Appointment created using Central time zone";

centralTZAppt.Body = new MessageBody(string.Format("Time zone: {0}",


centralTZ.DisplayName));

// Set the time zone on the appointment.

centralTZAppt.StartTimeZone = centralTZ;

centralTZAppt.EndTimeZone = centralTZ;

// Set the start time to 1:00 PM two days from today.

centralTZAppt.Start = startTime;

// Set the end time to 2:00 PM on that same day.

centralTZAppt.End = endTime;

// Set the TimeZone Description on the appointment/meeting

centralTZAppt.SetExtendedProperty(tzDescription, centralTZ.DisplayName);

// Save the appointment to the default calendar.

try

// This method results in a call to EWS.

centralTZAppt.Save(SendInvitationsMode.SendToNone);

catch (Exception ex)

Console.WriteLine("Error saving appointment: {0}", ex.Message);

// *****************************************************

// Create an appointment in the Mountain time zone by

// using the ExchangeService.TimeZone property.

// *****************************************************

// Specify the Mountain time zone when creating the ExchangeService.

TimeZoneInfo mountainTZ = TimeZoneInfo.FindSystemTimeZoneById("Mountain


Standard Time");

ExchangeService mountainTZService = new


ExchangeService(ExchangeVersion.Exchange2010, mountainTZ);

mountainTZService.Credentials = new NetworkCredential(userEmail,


userPass);

mountainTZService.AutodiscoverUrl(userEmail, redirectionCallback);

// Create the appointment.

Appointment mountainTZAppt = new Appointment(mountainTZService);

mountainTZAppt.Subject = "Appointment created using Mountain time zone";

mountainTZAppt.Body = new MessageBody(string.Format("Time zone: {0}",


mountainTZService.TimeZone.DisplayName));

// Set the start time to 1:00 PM two days from today.

mountainTZAppt.Start = startTime;

// Set the end time to 2:00 PM on that same day.

mountainTZAppt.End = endTime;
// Save the appointment to the default calendar.

try

// This method results in a call to EWS.

mountainTZAppt.Save(SendInvitationsMode.SendToNone);

catch (Exception ex)

Console.WriteLine("Error saving appointment: {0}", ex.Message);

7 Note

In the second example, the TimeZoneDescription Extended Property need to be set


to avoid a potention issue when meeting updates are being sent out to enternal
recipient.

When this example is executed on a client computer configured in the Eastern time
zone, and the three appointments it creates are viewed from a client configured in the
Eastern time zone, they appear at 1:00 PM, 2:00 PM, and 3:00 PM, respectively.

Create appointments in different time zones by


using EWS
When creating appointments or meetings using EWS, you have three options for
specifying the time zone:

To use Coordinated Universal Time (UTC), do not include a TimeZoneContext


element, MeetingTimeZone element (Exchange 2007 only), or StartTimeZone and
EndTimeZone elements (Exchange 2010 and later) in the CreateItem operation
request.

To use a specific time zone for all date/time properties, including properties when
creating a new appointment or meeting, specify a time zone in the
TimeZoneContext element in the CreateItem operation request.

To use a different time zone than the one specified in the TimeZoneContext
element, include a TimeZoneContext element, MeetingTimeZone element
(Exchange 2007 only), or StartTimeZone and EndTimeZone elements
(Exchange 2010 and later) in the CreateItem operation request.

The following example CreateItem operation request creates an appointment using


UTC. Notice that the TimeZoneContext element, the StartTimeZone element, and the
EndTimeZone element are absent. The Start and End element values are expressed in
UTC.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:CreateItem SendMeetingInvitations="SendToNone">

<m:Items>

<t:CalendarItem>

<t:Subject>Appointment created using UTC</t:Subject>

<t:Body BodyType="HTML">Time zone: UTC</t:Body>

<t:Start>2023-02-07T17:00:00.000Z</t:Start>

<t:End>2023-02-07T18:00:00.000Z</t:End>

</t:CalendarItem>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The following example CreateItem operation request uses the StartTimeZone and
EndTimeZone elements to specify the Central time zone for the appointment. Notice
that the TimeZoneContext element is absent. However, if it were present, the values of
the StartTimeZone and EndTimeZone elements would override its value. Again, the
Start and End element values are expressed in UTC. We also set the
TimeZoneDescription Extended Property to the same value as TimeZone being used.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:CreateItem SendMeetingInvitations="SendToNone">

<m:Items>

<t:CalendarItem>

<t:Subject>Appointment created using Central time zone</t:Subject>

<t:Body BodyType="HTML">Time zone: (UTC-06:00) Central Time (US


&amp;amp; Canada)</t:Body>

<t:ExtendedProperty>

<t:ExtendedFieldURI DistinguishedPropertySetId="Appointment"
PropertyId="33332" PropertyType="String" />

<t:Value>(UTC-06:00) Central Time (US &amp; Canada)</t:Value>

</t:ExtendedProperty>

<t:Start>2023-02-07T18:00:00.000</t:Start>

<t:End>2023-02-07T19:00:00.000</t:End>

<t:StartTimeZone Id="Central Standard Time" />

<t:EndTimeZone Id="Central Standard Time" />

</t:CalendarItem>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

The following example CreateItem operation request sets the TimeZoneContext


element to the Mountain time zone. Notice that the StartTimeZone and EndTimeZone
elements are absent. Again, the Start and End element values are expressed in UTC.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

<t:TimeZoneContext>
<t:TimeZoneDefinition Id="Mountain Standard Time" />

</t:TimeZoneContext>

</soap:Header>

<soap:Body>

<m:CreateItem SendMeetingInvitations="SendToNone">

<m:Items>

<t:CalendarItem>

<t:Subject>Appointment created using Mountain time


zone</t:Subject>

<t:Body BodyType="HTML">Time zone: (UTC-07:00) Mountain Time (US


&amp;amp; Canada)</t:Body>

<t:Start>2023-02-07T19:00:00.000</t:Start>

<t:End>2023-02-07T20:00:00.000</t:End>

</t:CalendarItem>

</m:Items>

</m:CreateItem>

</soap:Body>

</soap:Envelope>

When the three appointments created by the previous EWS example requests are
viewed from a client configured in the Eastern time zone, they appear at 1:00 PM, 2:00
PM, and 3:00 PM, respectively.

Now that you know how to create appointments in specific time zones, you can update
the time zones on existing appointments to a different one.

See also
Time zones and EWS in Exchange

Update the time zone for an appointment by using EWS in Exchange

Create appointments and meetings by using EWS in Exchange 2013


Update the time zone for an
appointment by using EWS in Exchange
Article • 02/11/2022 • 6 minutes to read

Learn how to update the time zone for an existing appointment or meeting by using the
EWS Managed API or EWS in Exchange.

When an appointment or meeting is created on an Exchange calendar, the time zone


used to specify the start and end times is saved as the creation time zone for the
appointment. You can change that time zone by using the EWS Managed API or EWS.
However, changing the time zone on an appointment has other effects on the start and
end time of the appointment.

Time values are stored on the Exchange server in Coordinate Universal Time (UTC). So if
an appointment is set to start at 1:00 PM (13:00) in the Eastern time zone (UTC-05:00),
that value is stored as 6:00 PM (18:00) on the server, assuming that the time zone is in
its standard time phase. When that appointment is viewed in other time zones, the
appropriate number of hours is added or subtracted from the UTC value to determine
the time zone-specific time. For example, if an appointment has a start time at 1:00 PM
Eastern (6:00 PM UTC), and is viewed from a client in the Pacific time zone (UTC-08:00),
the time-zone specific start time for that client would be 10:00 AM (18:00 - 08:00).

When you update the time zone of the appointment without updating the start and end
time, the server updates the UTC values stored on the server to keep the start and end
time as the same time zone-specific times. For example, consider the 1:00 PM Eastern
appointment. The time is stored as 18:00 UTC on the server. If the time zone of the
appointment is changed to the Pacific time zone, the server shifts the start time to 1:00
PM Pacific (21:00 UTC).

You can change this behavior by explicitly setting the start and end times.

Updating the time zone on an existing


appointment by using the EWS Managed API
In the following example, the EWS Managed API is used to update the time zone on an
existing appointment to the Central time zone by updating the
Appointment.StartTimeZone and Appointment.EndTimeZone properties. If the
shiftAppointnment parameter is set to true, the code does not explicitly set the start and
end times on the appointment. In this case, the server will shift the start and end times
to keep them at the same time zone-relative times in the new time zone. If set to false,
the code converts the start and end times explicitly to keep the appointment at the
same time in UTC.

This example assumes that the ExchangeService object has been initialized with valid
values in the Credentials and Url properties.

C#

static void UpdateAppointmentTimeZone(ExchangeService service, ItemId


apptId, bool shiftAppointment)

PropertySet includeTimeZones = new


PropertySet(AppointmentSchema.Subject,

AppointmentSchema.Start,

AppointmentSchema.ReminderDueBy,

AppointmentSchema.End,

AppointmentSchema.StartTimeZone,

AppointmentSchema.EndTimeZone);

Appointment apptToUpdate;

// Load the existing appointment.

// This will result in a call to EWS.

try

apptToUpdate = Appointment.Bind(service, apptId, includeTimeZones);

catch (Exception ex)

Console.WriteLine("Error retrieving existing appointment: {0}",


ex.Message);

return;

Console.WriteLine("Before update:");

// Output the current start, reminder, end, and time zones.

Console.WriteLine(" Start: {0}", apptToUpdate.Start);

Console.WriteLine(" Start time zone: {0}",


apptToUpdate.StartTimeZone.DisplayName);

Console.WriteLine(" Reminder: {0}", apptToUpdate.ReminderDueBy);

Console.WriteLine(" End: {0}", apptToUpdate.End);

Console.WriteLine(" End time zone: {0}",


apptToUpdate.EndTimeZone.DisplayName);

// Retrieve the Central time zone.

TimeZoneInfo centralTZ = TimeZoneInfo.FindSystemTimeZoneById("Central


Standard Time");

// Update the time zones on the appointment.

apptToUpdate.StartTimeZone = centralTZ;

apptToUpdate.EndTimeZone = centralTZ;

if (!shiftAppointment)

// Set the start and end times explicitly so that the appointment

// will start and end at the same UTC time.

// Convert the times to then Central time zone. This

// will keep them at the same time in UTC.

// For example, 1:00 PM Eastern becomes 12:00 PM Central.

DateTime newStartTime = TimeZoneInfo.ConvertTime(

apptToUpdate.Start, centralTZ);

DateTime newEndTime = TimeZoneInfo.ConvertTime(

apptToUpdate.End, centralTZ);

apptToUpdate.Start = newStartTime;

apptToUpdate.End = newEndTime;

try

// Save the changes. This will result in a call to EWS.

apptToUpdate.Update(ConflictResolutionMode.AlwaysOverwrite,

SendInvitationsOrCancellationsMode.SendToNone);

catch (Exception ex)

Console.WriteLine("Error updating appointment: {0}", ex.Message);

return;

// Now rebind to the appointment to get the new values.

Appointment apptAfterUpdate;

try

// This will result in a call to EWS.

apptAfterUpdate = Appointment.Bind(service, apptId,


includeTimeZones);

catch (Exception ex)

Console.WriteLine("Error retrieving existing appointment: {0}",


ex.Message);

return;

Console.WriteLine("After update:");

// Output the current start, reminder, end, and time zones.

Console.WriteLine(" Start: {0}", apptAfterUpdate.Start);

Console.WriteLine(" Start time zone: {0}",


apptAfterUpdate.StartTimeZone.DisplayName);

Console.WriteLine(" Reminder: {0}", apptAfterUpdate.ReminderDueBy);

Console.WriteLine(" End: {0}", apptAfterUpdate.End);

Console.WriteLine(" End time zone: {0}",


apptAfterUpdate.EndTimeZone.DisplayName);

When the example is used to update an appointment that starts at 1:00 PM Eastern and
ends at 2:00 PM Eastern, with the shiftAppointment parameter set to true, and the
ExchangeService.TimeZone property set to the Eastern time zone, the output looks
like the following.
MS-DOS

Before update:

Start: 6/20/2014 1:00:00 PM

Start time zone: (UTC-05:00) Eastern Time (US &amp; Canada)

Reminder: 6/20/2014 1:00:00 PM

End: 6/20/2014 2:00:00 PM

End time zone: (UTC-05:00) Eastern Time (US &amp; Canada)

After update:

Start: 6/20/2014 2:00:00 PM

Start time zone: (UTC-06:00) Central Time (US &amp; Canada)

Reminder: 6/20/2014 2:00:00 PM

End: 6/20/2014 3:00:00 PM

End time zone: (UTC-06:00) Central Time (US &amp; Canada)

When the example is used to update the same appointment with the shiftAppointment
parameter set to false, and with the TimeZone property again set to the Eastern time
zone, the output looks a little different.

MS-DOS

Before update:

Start: 6/20/2014 1:00:00 PM

Start time zone: (UTC-05:00) Eastern Time (US &amp; Canada)

Reminder: 6/20/2014 1:00:00 PM

End: 6/20/2014 2:00:00 PM

End time zone: (UTC-05:00) Eastern Time (US &amp; Canada)

After update:

Start: 6/20/2014 1:00:00 PM

Start time zone: (UTC-06:00) Central Time (US &amp; Canada)

Reminder: 6/20/2014 1:00:00 PM

End: 6/20/2014 2:00:00 PM

End time zone: (UTC-06:00) Central Time (US &amp; Canada)

Notice that the start and end times did not change. This is because the times are being
interpreted in the Eastern time zone (because the TimeZone property is set to the
Eastern time zone), and the time values were updated to prevent the appointment from
shifting.

Updating the time zone on an existing


appointment by using EWS
The following example EWS UpdateItem operation request updates the time zone on
an appointment. This example only updates the StartTimeZone and EndTimeZone
elements, so the server will shift the start and end times of the appointment to keep it at
the same time-zone-relative time in the new time zone. The value of the ItemId element
is shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:UpdateItem ConflictResolution="AlwaysOverwrite"
SendMeetingInvitationsOrCancellations="SendToNone">

<m:ItemChanges>

<t:ItemChange>

<t:ItemId Id="AAMkADA5..." ChangeKey="DwAAABYA..." />

<t:Updates>

<t:SetItemField>

<t:FieldURI FieldURI="calendar:StartTimeZone" />

<t:CalendarItem>

<t:StartTimeZone Id="Central Standard Time" />

</t:CalendarItem>

</t:SetItemField>

<t:SetItemField>

<t:FieldURI FieldURI="calendar:EndTimeZone" />

<t:CalendarItem>

<t:EndTimeZone Id="Central Standard Time" />

</t:CalendarItem>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

</m:ItemChanges>

</m:UpdateItem>

</soap:Body>

</soap:Envelope>

The following example request updates the time zone of the appointment, and also
updates the start and end times by explicitly setting the Start and End elements. The
value of the ItemId element is shortened for readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:UpdateItem ConflictResolution="AlwaysOverwrite"
SendMeetingInvitationsOrCancellations="SendToNone">

<m:ItemChanges>

<t:ItemChange>

<t:ItemId Id="AAMkADA5..." ChangeKey="DwAAABYA..." />

<t:Updates>

<t:SetItemField>

<t:FieldURI FieldURI="calendar:StartTimeZone" />

<t:CalendarItem>

<t:StartTimeZone Id="Central Standard Time" />

</t:CalendarItem>

</t:SetItemField>

<t:SetItemField>

<t:FieldURI FieldURI="calendar:EndTimeZone" />

<t:CalendarItem>

<t:EndTimeZone Id="Central Standard Time" />

</t:CalendarItem>

</t:SetItemField>

<t:SetItemField>

<t:FieldURI FieldURI="calendar:Start" />

<t:CalendarItem>

<t:Start>2014-06-20T17:00:00.000Z</t:Start>

</t:CalendarItem>

</t:SetItemField>

<t:SetItemField>

<t:FieldURI FieldURI="calendar:End" />

<t:CalendarItem>

<t:End>2014-06-20T18:00:00.000Z</t:End>

</t:CalendarItem>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

</m:ItemChanges>

</m:UpdateItem>

</soap:Body>

</soap:Envelope>

See also
Time zones and EWS in Exchange
Create appointments in a specific time zone by using EWS in Exchange
Update appointments and meetings by using EWS in Exchange
Tools and resources for troubleshooting
EWS applications for Exchange
Article • 03/04/2022 • 4 minutes to read

Find resources to help you troubleshoot your EWS Managed API or EWS application.

Things don't always go as planned. Sometimes EWS requests fail, or provide unexpected
results. This can be frustrating, especially if the reason isn't obvious. Hopefully this never
happens to you, but if it does, this article provides information about tools and
resources that you can use to help troubleshoot your problem.

7 Note

This article provides general troubleshooting advice and sources for


troubleshooting information. Unfortunately it isn't possible to give detailed
troubleshooting steps. For assistance troubleshooting your specific error, see Next
steps.

Examine the SOAP requests and responses


When things aren't working correctly, it really helps to be able to see what's going on.
The first line of inquiry when investigating a problem with EWS or the EWS Managed API
is to examine the requests that your application is sending over the network and the
responses that the server is sending back.

The EWS Managed API makes examining SOAP requests and responses easy with its
built in tracing functionality. If you are using EWS, you might or might not have access
to similar tracing functionality, depending on what platform or classes you use to send
your requests. However, you can always use a network tracing tool like Network
Monitor or Fiddler to examine the network traffic and view the request and
response payloads.

Additionally, you can instrument your client requests to enhance the information
available in requests and responses.

After you have the requests and responses, ask yourself the following: Do they look
correct? Are the values that your application is sending expected? Do the responses
make sense?
Examine error codes
Sometimes the error code can go a long way toward pinpointing the problem, even if at
first glance it doesn't seem to make sense. Does the error indicate that your client is
being throttled? Perhaps a call to Autodiscover to refresh configuration information is in
order?

For more information about handling specific errors, see the following articles:

Handling Autodiscover error messages

Handling notification-related errors in EWS in Exchange

Handling synchronization-related errors in EWS in Exchange

Handling deletion-related errors in EWS in Exchange

Verify versions
There are a number of different components involved in EWS operations, and the
versions of those components can influence the results.

Table 1. Versioned components that can affect EWS processes

Component EWS Managed API EWS Notes


Component EWS Managed API EWS Notes

Requested ExchangeServiceBase.RequestedServerVersion RequestServerVersion This value


server property element controls
version which
version of
the EWS
schema is
used to
process
the EWS
request.
Make sure
that the
schema
version
specified
here
makes
sense for
the
request
you are
sending.
Some
properties
and
operations
are not
available
in earlier
versions
of the
schema.
Component EWS Managed API EWS Notes

The server ExchangeServiceBase.ServerInfo property ServerVersionInfo This value


version element is
returned
by the
server in
EWS
responses,
and
indicates
the
version of
the server
that
processed
the
response.
Make sure
this value
is what
you
expect. If
possible,
make sure
that the
Exchange
server is
running
the most
recent
update for
your
major
version of
Exchange.

The EWS The Product version property of the Not applicable If you're
Managed Microsoft.Exchange.WebServices.dll file. using the
API version EWS
Managed
API, make
sure that
you are
using the
most
recent
version .
Verify access
EWS is enabled by default, but defaults can be changed. Use the Get-
OrganizationConfig cmdlet to make sure that EWS is enabled on the server, and the
Get-CASMailbox cmdlet to make sure that EWS is enabled for the user's mailbox. Also
check both cmdlet responses for an EWS allow or block list, and make sure that your
application isn't blocked from using EWS.

You should also verify that the default authentication settings on the EWS virtual
directory have not been modified.

Try another EWS client


Sometimes it is helpful to try the same request from another client and compare results.
If another client gets different results, what is different? Figuring out what is different
between a successful request and a failed request can help explain why a particular
request is failing.

While you can certainly write another client to test with, you don't have to! EWSEditor
is a sample client that uses the EWS Managed API and EWS. You can download the
client (including the source code) and use it to try the same requests that are failing in
your application.

Examine IIS logs


If you have access to the Exchange server, the logging functionality provided by Internet
Information Services (IIS) on the Client Access servers can provide more information
about failures. However, keep in mind that IIS logs will only be helpful if you are
receiving an HTTP error.

IIS provides two different logging methods: IIS logging and failed requests tracing .
To work with IIS logs, you can use Log Parser Studio , which includes a number of built-
in EWS queries.

Next steps
Now that you've learned about the tools and resources that you can use to
troubleshoot, you might need help understanding the information provided by those
tools. The following are some options for getting help:
Exchange Server Development forum on Q&A — Ask a question of the Q&A
Exchange Server development community.

StackOverflow — Ask a question of the StackOverflow community. Be sure to tag


your post with "ews".

Microsoft Support — Contact a Microsoft support professional for assistance.

See also
See the following articles:

Develop web service clients for Exchange

Trace requests and responses to troubleshoot EWS Managed API applications

Instrumenting client requests for EWS and REST in Exchange

EWS throttling in Exchange

Refresh configuration information by using Autodiscover

Handling Autodiscover error messages

Handling notification-related errors in EWS in Exchange

Handling synchronization-related errors in EWS in Exchange

Handling deletion-related errors in EWS in Exchange

Configuring Logging in IIS

Troubleshooting Failed Requests Using Tracing in IIS 7

Introducing: Log Parser Studio

Default Settings for Exchange Virtual Directories

Download the following:

Microsoft Network Monitor 3.4

Fiddler

EWSEditor

Exchange Web Services Managed API


Verifying the results of an EWS or EWS
Managed API call
Article • 03/15/2022 • 8 minutes to read

Learn how to verify the results of your EWS or EWS Managed API calls.

When things aren't working correctly, it helps to see what's going on by examining the
SOAP requests that your application is sending over the network and the responses that
the server is sending back. The tools and resources for troubleshooting EWS
applications article includes links to tools to help capture and view those SOAP requests.
After you've got the requests and the responses, how do you verify that the request you
sent to the server was processed correctly? Read on to find out.

If you're sending EWS requests, you're going to start your verification by checking the
ResponseClass attribute for each response message in the response. That will tell you
whether the operation completed successfully on each item.

Depending on the object that your method is calling, if you're using the EWS Managed
API to send requests, you can do some verification using the response objects. But
because the SOAP response contains a superset of what's included in the EWS Managed
API response objects, you might want to look at the SOAP response as well. Because the
SOAP response can often contain more information than the EWS Managed API
response objects, start your verification with the SOAP response.

Verifying the results of a SOAP response


When you receive a SOAP response, the first thing to look at is the ResponseClass
attribute. This attribute is included in each ResponseMessageType instance in the
ResponseMessages element, as shown in the following example.

XML

<s:Body>

<m:GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

Because a SOAP response might contain multiple response messages in a single SOAP
response, it's important to check each response message individually.

If you're working with an operation that includes a ResponseClass as part of the


operation response, like the following, you might be tempted to only check the
ResponseClass of the operation.

XML

<soap:Body>

<m:AddDelegateResponse
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

ResponseClass="Success"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

However, the operation status only reflects the shape of the top-level response and
does not reflect the status of all the individual message responses. In the following
example, the AddDelegateResponse operation has a ResponseClass of Success, but
the underlying DelegateUserResponseMessageType element has a ResponseClass
value of Error.

XML

<soap:Body>

<m:AddDelegateResponse
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

ResponseClass="Success"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseCode>NoError</m:ResponseCode>

<m:ResponseMessages>

<m:DelegateUserResponseMessageType ResponseClass="Error">

<m:MessageText>The user is already a delegate for the mailbox.


</m:MessageText>

<m:ResponseCode>ErrorDelegateAlreadyExists</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:DelegateUserResponseMessageType>

</m:ResponseMessages>

</m:AddDelegateResponse>

</soap:Body>

So for SOAP EWS responses, you can't rely on the ResponseClass of the operation - you
have to look at the ResponseClass of each response message to determine whether the
operation encountered any errors processing the items.
Verifying success
If each ResponseClass attribute for each ResponseMessage attribute is set to Success,
the operation completed successfully on all the items, and you can move on to your
next task.

The following example shows a successful response to a GetItem operation request to


retrieve a single item. Note that when the ResponseClass is set to Success, the
associated ResponseCode is always set to NoError.

XML

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Message>

<t:ItemId Id="Er5bAAA="

ChangeKey="CQAAABYAAAD32nSTjepyT63rYH17n9THAAAhE0/M" />

<t:Subject>Dinner Party</t:Subject>

</t:Message>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</m:GetItemResponse>

</s:Body>

The following is a successful response to a GetItem operation request to retrieve


multiple items. Each of the GetItemResponseMessage elements has a ResponseClass
of Success.

XML

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Message>

<t:ItemId Id="Er5bAAA="

ChangeKey="CQAAABYAAAD32nSTjepyT63rYH17n9THAAAhE0/M" /

<t:Subject>Dinner Party</t:Subject>

</t:Message>

</m:Items>

</m:GetItemResponseMessage>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Message>

<t:ItemId Id="3c66AAA="

ChangeKey="CQAAABYAAAD32nSTjepyT63rYH17n9THAAAc3kqm"
/>

<t:Subject>Company Soccer Team</t:Subject>

</t:Message>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</m:GetItemResponse>

</s:Body>

Handling errors and warnings


When you receive a response and the ResponseClass attribute is set to Error, the
operation did not complete successfully on one or more items. Correct the issue and
retry your request, or the part of your request that failed. A ResponseClass attribute
value of Warning value is only returned by the ResolveNames operation, and indicates
that the entity could not be resolved to a unique identity. You can ignore it for all other
operations.

In the following response, the ResponseClass attribute has a value of Error.

XML

<m:GetItemResponseMessage ResponseClass="Error">

<m:MessageText>Property is not valid for this object type.</m:MessageText>

<m:ResponseCode>ErrorInvalidPropertyRequest</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:MessageXml>

<t:FieldURI FieldURI="meeting:AssociatedCalendarItemId" />

</m:MessageXml>

<m:Items />

</m:GetItemResponseMessage>

In this example, EWS provides clues to debug the issue. When the ResponseClass
attribute has a value of Error, the following additional elements are included in the
response when applicable:
MessageText — Describes the error.

ResponseCode — Contains the error code, which can be used to find additional
troubleshooting resources.

MessageXml — Identifies the elements that caused the error.

DescriptiveLinkKey — Unused.

You can use the information provided in these elements to investigate your issue. In the
previous example, the MessageText indicates that the property isn't valid for the object
type. The request was to get an email message, but the property set included the
AssociatedCalendarItemId, which is only valid for appointment items.

The following example shows an error that was received as part of a batched operation
to get multiple email items. The first item was retrieved successfully and the
ResponseClass is set to Success. The second item could not be found, and the
ResponseClass is set to Error.

XML

<m:GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>
<m:Items>

<t:Message>

<t:ItemId Id="Er5cAAA="

ChangeKey="CQAAABYAAAD32nSTjepyT63rYH17n9THAAAhE0/O" />

<t:Subject>Business plans</t:Subject>

</t:Message>

</m:Items>

</m:GetItemResponseMessage>

<m:GetItemResponseMessage ResponseClass="Error">

<m:MessageText>The specified object was not found in the store.


</m:MessageText>

<m:ResponseCode>ErrorItemNotFound</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:Items />

</m:GetItemResponseMessage>

</m:ResponseMessages>

</m:GetItemResponse>

When one or more items in a batched request can't be processed as requested, an error
is returned for each item that failed, and the rest of the items in the batch are processed
as expected. Failures in batch processing can occur if the item was deleted, and
therefore can't be sent, retrieved, or updated, or if the item moved to a different folder,
and therefore has a new item ID. Because the operation will complete for some items
and not return an error when one or more items can't be processed, it's important to
check each ResponseClass attribute before you move on to your next operation.

If the information provided by the response elements doesn't help you correct your
request or otherwise unblock you, see Next steps.

Verifying the results of an EWS Managed API


method call
If you're using the EWS Managed API and calling a method on an ExchangeService
object, your method will likely return a ServiceResponseCollection object, which
contains a collection of ServiceResponse objects, or a collection of objects derived
from the ServiceResponse objects. The ServiceResponseCollection and included
ServiceResponse objects contain information about the result of the method call, which
you can use to verify your results.

If you're using the EWS Managed API and calling a method on an Item object, or one
of the derived objects, the method likely does not return a response object to check for
success, but does throw an Exception if the method does not complete successfully.

Verifying success
One benefit of using the EWS Managed API is that it provides an overall status when
dealing with multiple items in one response. So if the method you called returns a
ServiceResponseCollection, you can check that the OverallResult property of the
ServiceResponseCollection is equal to ServiceResult.Success . If so, all the items in the
batched process were completed successfully; you don't have to check each
ServiceResponse object individually. If the OverallResult property is not set to
ServiceResult.Success, you have to handle the error or warning.

If the method you're calling does not return a ServiceResponseCollection, but does
return a ServiceResponse object, you have to check the value of the Result property. If
the Result value is set to Success, you know the method completed successfully.

If the method you're calling has no return value, there's really no way to check for
success via the EWS Managed API. As long as an exception is not thrown, you can
assume the method completed successfully. For additional validation, you can also
check the SOAP response to verify the results.
Handling errors, warnings, and exceptions
If your EWS Managed API code throws an Exception, you can use the
Exception.Message value to determine the source of the error. The Message property
contains the contents of the MessageText element in the underlying SOAP response.
In addition, if the exception is of type ServiceResponseException object, one of the
most common exceptions, you can also retrieve the ErrorCode contained in the
underlying SOAP ResponseCode element, and the Response property that identifies
the associated ServiceResponse object. The following code shows how to catch and
display the contents of a ServiceResponseException.

C#

try

catch (ServiceResponseException ex)

Console.WriteLine("Error code: " + ex.ErrorCode);

Console.WriteLine("Error message: " + ex.Message);

Console.WriteLine("Response: " + ex.Response);

If the method you called returns a ServiceResponseCollection, and the value of the
OverallResult property is equal to Warning or Error, you'll have to loop through each
object in the ServiceResponseCollection to find the error. The OverallResult property is
set to Warning if at least one response has its Result value set to Warning and all other
responses have their Result values set to Success. The OverallResult property is set to
Error if at least one response has its Result value set to Error. When the OverallResult is
set to Warning or Error, the following properties are set on the ServiceResponse objects
as appropriate:

ErrorCode — Contains the error code, which can be used to find additional
troubleshooting resources.

ErrorDetails — Contains details about the error for some ErrorCodes. For
example, when the error code is ErrorRecurrenceHasNoOccurrence, the
ErrorDetails will contain keys for EffectiveStartDate and EffectiveEndDate.

ErrorMessage — Describes the error.

ErrorProperties — If available, identifies the properties that caused the error. For
example, when the error code is ErrorInvalidPropertyForOperation,
ErrorProperties contains the definition of the property that was invalid for the
request.

Result — Contains Error or Warning when an issue is encountered.

If the information provided by the ServiceResponse properties doesn't provide enough


information to correct your method call or unblock you, see Next steps to dig up more
information on ErrorCode values.

You can look up additional troubleshooting information in the following topics:

ResponseCode element

ServiceError enumeration

EWS property-related errors

In addition, depending on what you're trying to accomplish in your request, you might
find additional helpful information about the error code in the following topics:

Handling Autodiscover error messages

Handling notification-related errors in EWS in Exchange

Handling synchronization-related errors in EWS in Exchange

Handling deletion-related errors in EWS in Exchange

See also
Develop web service clients for Exchange

Tools and resources for troubleshooting EWS applications for Exchange


Web services reference for Exchange
Article • 03/29/2023 • 2 minutes to read

Find reference information for web services in Exchange.

This section includes reference information for the APIs that target or are included in
Exchange Online, Exchange Online as part of Office 365, and versions of Exchange
starting with Exchange Server 2007. This section includes the following content:

EWS reference for Exchange — Contains API reference documentation for the
Exchange Web Services (EWS) API. This is the primary API for creating clients and
services that connect to Exchange to get access to mailbox information. This
content includes information about the operations that are available in EWS, and
XML reference documentation that provides information about the instance XML
that is sent to and received from Exchange.

EWS Managed API reference — Contains API reference documentation for the EWS
Managed API. The EWS Managed API is a simple and full-featured interface for
developing and extending applications that use EWS.

Autodiscover web service reference for Exchange — Contains XML API reference
for the Autodiscover services provided by Exchange. The Autodiscover APIs
provide provisioning information to client applications that enables them to
automatically discover the Exchange service endpoints.

Unified Messaging web service reference for Exchange — Contains the XML API
reference for the Unified Messaging (UM) web service. The UM web service
provides client applications access to UM functionality in Exchange. Note that EWS
also provides UM functionality.

EWS generated object models for Exchange — Contains the API reference for the
autogenerated proxy classes in the ExchangeWebServices namespace.

7 Note

For clients that are based on versions of the .NET Framework starting with the
.NET Framework 3.5, we recommend that you use the EWS Managed API to
access EWS. For more information, see Get started with EWS Managed API
client applications.

For information about which set of APIs to use, see EWS client design overview for
Exchange.
The Exchange XML reference is based on the XML instances that are sent between the
client and the server. The XML is described in the WSDL and XSD files for the EWS and
SOAP Autodiscover services. The UM web service and the POX Autodiscover service do
not have published WSDL and schema files that describe their structure. The XML
reference for the services that do not have schema files is based on the XML instances
that can be observed and captured as they are exchanged between the client and the
service.

See also
Explore the EWS Managed API, EWS, and web services in Exchange
Start using web services in Exchange
Autodiscover for Exchange
EWS reference for Exchange
Article • 03/29/2023 • 2 minutes to read

Find reference information for the EWS XML elements and WSDL operations in
Exchange.

This section includes reference information for the EWS XML elements that are sent
between the client and server. The XML element reference contains summaries of what
the elements represent and information about the potential hierarchies that include the
element. This documentation covers the XML instances that are sent between the client
and server. The schema that describes these elements can be found in the virtual
directory of the server that hosts EWS.

The WSDL operation content in this section provides overview information and request
and response examples for all EWS operations, as well as information about SOAP
headers and associated error messages for some operations. You can use the version
information to determine which features are available in different versions of EWS. The
operation reference information will help you to understand the structure of the XML
that is included in the SOAP messages that are sent to and from the server.

In this section
EWS operations in Exchange

EWS XML elements in Exchange

See also
Web services reference for Exchange
Explore the EWS Managed API, EWS, and web services in Exchange
Start using web services in Exchange
EWS operations in Exchange
Article • 03/29/2023 • 8 minutes to read

Find information about the EWS operations that are available in Exchange.

Exchange Web Services (EWS) provides many operations that enable you to access
information from the Exchange store. The articles in this section provide information
about the overall structure of the requests, responses, and error response messages for
EWS operations, as well as XML examples for each operation. They provide an overview
of the message structures that are sent between the client and the server. You can use
this information to debug message structures and to find information about what you
can do in an EWS request. For more information about what the XML structure
represents, see - EWS XML elements in Exchange.

All EWS functionality is associated with a version of the schema. New EWS schema
versions are introduced in new releases of Exchange Server or Exchange Online. The
RequestServerVersion element contains a Version attribute that maps the server version
to the schema version. This article provides information about when each operation was
introduced. Specific functionality within an operation might require a later version of the
service. The versioned schemas are implemented so that clients that are designed
against an older version of EWS will work with a newer version of EWS.

These operations can target the EWS endpoint that services your mailbox. You can
browse to the EWS endpoint by using a URL that is similar in structure to
http://<clientaccessserver>.com/ews/exchange.asmx, where <clientaccessserver> is the
Exchange Client Access server that services your mailbox. You can use Autodiscover to
get the URL to the Client Access server that services your mailbox. For more information
about Autodiscover, see Autodiscover for Exchange.

eDiscovery operations
The eDiscovery operations provide search operations for legal holds and identify
mailbox data that cannot be indexed and returned in discovery search results.

The following table lists the eDiscovery operations.

Operation name Introduced in

GetDiscoverySearchConfiguration operation
Exchange 2013

GetHoldOnMailboxes operation
Exchange 2013
Operation name Introduced in

GetNonIndexableItemDetails operation
Exchange 2013

GetNonIndexableItemStatistics operation
Exchange 2013

GetSearchableMailboxes operation
Exchange 2013

SearchMailboxes operation
Exchange 2013

SetHoldOnMailboxes operation
Exchange 2013

Exchange mailbox data operations


The Exchange mailbox data operations enable clients to handle and organize items,
folders, and attachments, as well as ambiguous name resolution and distribution list
expansion. Exchange mailbox data operations include item, folder, attachment, and
utilities operations.

The following table lists the Exchange mailbox data operations.

Operation name Introduced in

ArchiveItem operation
Exchange 2013

CreateItem operation
Exchange 2007

CopyItem operation
Exchange 2007

DeleteItem operation
Exchange 2007

FindItem operation
Exchange 2007

GetItem operation
Exchange 2007

MarkAllItemsAsRead operation
Exchange 2013

MoveItem operation
Exchange 2007

SendItem operation
Exchange 2007

UpdateItem operation
Exchange 2007

The following table lists the Exchange mailbox data folder operations.

Operation name Introduced in

CreateFolder Exchange 2007


operation

Operation name Introduced in

CreateFolderPath Exchange 2013


operation

CreateManagedFolder Exchange 2007. This functionality has been deemphasized in versions of


operation
Exchange starting with Exchange 2010. For more information about how
to migrate to using retention tags and policies for messaging records
management, see Migrate from Managed Folders .

CopyFolder operation Exchange 2007

DeleteFolder Exchange 2007


operation

EmptyFolder Exchange 2010


operation

FindFolder operation
Exchange 2007

GetFolder operation
Exchange 2007

MoveFolder operation Exchange 2007

UpdateFolder Exchange 2007


operation

The following table lists the Exchange mailbox data attachment operations.

Operation name Introduced in

CreateAttachment operation
Exchange 2007

GetAttachment operation
Exchange 2007

DeleteAttachment operation
Exchange 2007

The following table lists the Exchange mailbox reminder operations.

Operation name Introduced in

GetReminders operation
Exchange 2013

PerformReminderAction operation
Exchange 2013

The following table lists the Exchange mailbox data conversation operations.

Operation name Introduced in

ApplyConversationAction operation
Exchange 2010 Service Pack 1 (SP1)
Operation name Introduced in

FindConversation operation
Exchange 2010 SP1

GetConversationItems operation
Exchange 2013

The following table lists the Exchange mailbox data utilities operations.

Operation name Introduced in

ConvertId operation
Exchange 2007 Service Pack 1

ExpandDL operation
Exchange 2007

GetUserPhoto operation Exchange 2013. This operation has both a REST and a SOAP
implementation.

MarkAsJunk operation
Exchange 2013

ResolveNames operation
Exchange 2007

GetPasswordExpirationDate Exchange 2010 SP1


operation

Availability operations
The availability operations improve the calendar and free/busy sharing experience by
providing more secure, up-to-date, and rich free/busy information. Free/busy data is a
critical component of scheduling meetings. The availability operations provide a reliable
foundation for effective scheduling.

The following table lists the availability operations.

Operation name Introduced in

GetUserAvailability operation
Exchange 2007

GetRoomLists operation
Exchange 2010

GetRooms operation
Exchange 2010

GetUserOofSettings operation
Exchange 2007

SetUserOofSettings operation
Exchange 2007

Bulk transfer operations


The bulk transfer operations enable clients to stream items into and out of a mailbox.

The following table lists the bulk transfer operations.

Operation name Introduced in

UploadItems operation
Exchange 2010 SP1

ExportItems operation Exchange 2010 SP1

Delegate management operations


The delegate management operations enable clients to add, get, update, and remove
delegates from their mailboxes.

The following table lists the delegate management operations.

Operation name Introduced in

AddDelegate operation
Exchange 2007 Service Pack 1 (SP1)

GetDelegate operation
Exchange 2007 SP1

UpdateDelegate operation
Exchange 2007 SP1

RemoveDelegate operation
Exchange 2007 SP1

Inbox rules operations


The Inbox rules operations enable clients to get Inbox rules and update them for
messages on the server. Inbox rules are sets of conditions and associated actions that
enable clients to automatically organize, categorize, and act on messages as the
messages are delivered to a folder.

The following table lists the Inbox rules operations.

Operation name Introduced in

GetInboxRules operation
Exchange 2010 SP1

UpdateInboxRules operation
Exchange 2010 SP1

Mail app management operations


The mail app management operations enable you to manage mail apps for Outlook. You
can use these operations to install, uninstall, disable, and get information about mail
apps that are available for Outlook Web App and Outlook 2013.

The following table lists the mail app management operations.

Operation name Introduced in

DisableApp operation
Exchange 2013

GetAppManifests operation
Exchange 2013

GetAppMarketplaceUrl operation
Exchange 2013

GetClientAccessToken operation
Exchange 2013

InstallApp operation
Exchange 2013

UninstallApp operation
Exchange 2013

Mail tips operation


The mail tips operation enables clients to request information from the server about
recipient mailboxes when an author is composing a message. The following table lists
the mail tips operation.

Operation name Introduced in

GetMailTips operation
Exchange 2010

Message tracking operations


The message tracking operations enable clients to find messages that meet specified
criteria and to get detailed tracking information about each message in a message
tracking report.

The following table lists the message tracking operations.

Operation name Introduced in

FindMessageTrackingReport operation
Exchange 2010

GetMessageTrackingReport operation
Exchange 2010
Notification operations
The notification operations notify the client application of events that are associated
with items and folders a specified mailbox. The subscription model can be push-based,
pull-based, or streaming-based.

The following table lists the notification operations.

Operation name Introduced in

GetEvents operation
Exchange 2007

GetStreamingEvents operation
Exchange 2010 SP1

Subscribe operation
Exchange 2007

Unsubscribe operation
Exchange 2007

Persona operations
The persona operations provide an interface to find and get information about a linked
contact. The following table lists the persona operations.

Operation name Introduced in

FindPeople operation
Exchange 2013

GetPersona operation
Exchange 2013

Retention policy operation


The retention policy operation provides a list of all the retention tags that are linked to a
user's retention policy.

The following table lists the retention policy operation.

Operation name Introduced in

GetUserRetentionPolicyTags operation
Exchange 2013

Service configuration operation


The service configuration operation enables clients to get configuration information for
the Unified Messaging, Protection Rules, Policy Tips, and Mail Tips services.

The following table lists the service configuration operation.

Operation name Introduced in

GetServiceConfiguration operation
Exchange 2010

Sharing operations
The sharing operations enable clients to share calendar data and contacts data.

The following table lists the sharing operations.

Operation name Introduced in

CreateItem Exchange 2010. Although the CreateItem operation is applicable to all


(AcceptSharingInvitation) versions of EWS, the AcceptSharingInvitation response object is only
applicable to EWS in versions of Exchange starting with Exchange
2010.

GetSharingFolder Exchange 2010


operation

GetSharingMetadata Exchange 2010


operation

RefreshSharingFolder Exchange 2010


operation

Synchronization operations
The synchronization operations provide a one-way synchronized cached copy of a user's
folders and items.

The following table lists the synchronization operations.

Operation name Introduced in

SyncFolderHierarchy operation
Exchange 2007

SyncFolderItems operation
Exchange 2007
Time zone operation
The time zone operation enables clients to get a list of time zone definitions that are
supported by the server.

The following table lists the time zone operation.

Operation name Introduced in

GetServerTimeZones operation
Exchange 2010

Unified Messaging operations


The Unified Messaging operations enable clients to read information about Unified
Messaging properties and to play voice mail messages over the phone.

The following table lists the Unified Messaging operations.

Operation name Introduced in

DisconnectPhoneCall operation
Exchange 2010

GetPhoneCallInformation operation
Exchange 2010

PlayOnPhone operation (EWS)


Exchange 2010

Use the GetServiceConfiguration operation to get the Unified Messaging configuration


information for a mailbox. Use the Unified Messaging web service for Unified Messaging
applications that target Exchange 2007. For more information, see Unified Messaging
web service reference for Exchange.

Unified Contact Store operations


The Unified Contact Store provides a consistent contact experience across Office
products and acts as an integration point for third-party applications to use the same
contact store. It enables users and applications to store, manage, and access contact
information and make it available globally among Lync, Exchange 2013, Outlook,
Outlook Web App, and any other application that implements access to the Unified
Contact Store. Exchange is the content store for the Unified Contact Store experience.

The following table lists the Unified Contact Store operations.

Operation name Introduced in


Operation name Introduced in

AddNewImContactToGroup operation
Exchange 2013

AddImContactToGroup operation
Exchange 2013

AddImGroup operation
Exchange 2013

AddNewTelUriContactToGroup operation
Exchange 2013

AddDistributionGroupToImList operation
Exchange 2013

GetImItemList operation
Exchange 2013

GetImItems operation
Exchange 2013

RemoveContactFromImList operation
Exchange 2013

RemoveImContactFromGroup operation
Exchange 2013

RemoveDistributionGroupFromImList operation
Exchange 2013

RemoveImGroup operation
Exchange 2013

SetImGroup operation
Exchange 2013

User configuration operations


The user configuration operations enable clients to create, delete, get, and update user
configuration information.

The following table lists the user configuration operations.

Operation name Introduced in

CreateUserConfiguration operation
Exchange 2010

DeleteUserConfiguration operation
Exchange 2010

GetUserConfiguration operation
Exchange 2010

UpdateUserConfiguration operation
Exchange 2010

See also
Explore the EWS Managed API, EWS, and web services in Exchange
Start using web services in Exchange
Autodiscover for Exchange
AddDelegate operation
Article • 03/29/2023 • 2 minutes to read

The AddDelegate operation adds one or more delegates to a principal's mailbox and
sets specific access permissions.

SOAP headers
The AddDelegate operation can use the SOAP headers that are listed and described in
the following table.

Header Element Description

Impersonation ExchangeImpersonation Identifies the user whom the client application is


impersonating.

MailboxCulture MailboxCulture Identifies the RFC3066 culture to be used to access


the mailbox.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request.

ServerVersion ServerVersionInfo
Identifies the version of the server that responded to
the request.

AddDelegate request example

Description
The following example of an AddDelegate request shows an attempt to give user1
delegate permissions on folders that are owned by user2. User1 is given Author-level
permissions to user2's Calendar folder and Reviewer-level permissions to user2's
Contacts folder. User1 will not receive copies of meeting messages and will be unable to
view private items in user2's mailbox. Meeting requests will be sent to both user1 and
user2.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1"/>

</soap:Header>

<soap:Body
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<AddDelegate>

<Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</Mailbox>

<DelegateUsers>

<t:DelegateUser>

<t:UserId>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

</t:UserId>

<t:DelegatePermissions>

<t:CalendarFolderPermissionLevel>Author</t:CalendarFolderPermissionLevel>

<t:ContactsFolderPermissionLevel>Reviewer</t:ContactsFolderPermissionLevel>

</t:DelegatePermissions>

<t:ReceiveCopiesOfMeetingMessages>false</t:ReceiveCopiesOfMeetingMessages>

<t:ViewPrivateItems>false</t:ViewPrivateItems>
</t:DelegateUser>

</DelegateUsers>

<DeliverMeetingRequests>DelegatesAndMe</DeliverMeetingRequests>

</AddDelegate>

</soap:Body>

</soap:Envelope>

AddDelegate response example

Description
The following example of an AddDelegate response shows a successful response to an
AddDelegate request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8"

MinorVersion="1"

MajorBuildNumber="206"

MinorBuildNumber="0"

Version="Exchange2007_SP1"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<m:AddDelegateResponse
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

ResponseClass="Success"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseCode>NoError</m:ResponseCode>
<m:ResponseMessages>

<m:DelegateUserResponseMessageType ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:DelegateUser>

<t:UserId>

<t:SID>S-1-5-21-1333220396-2200287332-232816053-1116</t:SID>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

<t:DisplayName>User1</t:DisplayName>

</t:UserId>

<t:ReceiveCopiesOfMeetingMessages>false</t:ReceiveCopiesOfMeetingMessages>

<t:ViewPrivateItems>false</t:ViewPrivateItems>

</m:DelegateUser>

</m:DelegateUserResponseMessageType>

</m:ResponseMessages>

</m:AddDelegateResponse>

</soap:Body>

</soap:Envelope>

AddDelegate error response example

Description
The following example shows the response to a request to add a delegate who has
already been added to the principal's mailbox.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8"

MinorVersion="1"

MajorBuildNumber="206"

MinorBuildNumber="0"

Version="Exchange2007_SP1"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<m:AddDelegateResponse
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

ResponseClass="Success"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseCode>NoError</m:ResponseCode>
<m:ResponseMessages>

<m:DelegateUserResponseMessageType ResponseClass="Error">

<m:MessageText>The user is already a delegate for the mailbox.


</m:MessageText>

<m:ResponseCode>ErrorDelegateAlreadyExists</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:DelegateUserResponseMessageType>

</m:ResponseMessages>

</m:AddDelegateResponse>

</soap:Body>

</soap:Envelope>

Comments
If the ErrorDelegateAlreadyExists response code is returned when you try to add a
delegate, use the GetDelegate operation to get all the current permissions for the
delegate, and then use the UpdateDelegate operation to set the new permissions.

See also
Adding Delegates
AddDistributionGroupToImList
operation
Article • 03/29/2023 • 2 minutes to read

Find information about the AddDistributionGroupToImList EWS operation.

The AddDistributionGroupToImList Exchange Web Services (EWS) operation adds a


distribution group to the instant messaging (IM) list in the Unified Contact Store.

This operation was introduced in Exchange Server 2013.

Using the AddDistributionGroupToImList


operation
The AddDistributionGroupToImList operation takes a single argument that identifies a
distribution group to add to the IM list. This operation does not create a distribution
group; the distribution group must already be created.

This operation can use the SOAP headers that are listed in the following table.

Table 1. AddDistributionGroupToImList operation SOAP headers

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This is applicable to a request.

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, "Tags


for the Identification of Languages", to be used to
access the mailbox. This is applicable to a request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This is applicable to a response.

AddDistributionGroupToImList operation
request example
The following example of an AddDistributionGroupToImList operation request shows
how to add a distribution group to the IM list.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:MailboxCulture>en-US</t:MailboxCulture>

</soap:Header>

<soap:Body >

<m:AddDistributionGroupToImList>

<m:SmtpAddress>[email protected]</m:SmtpAddress>

</m:AddDistributionGroupToImList>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

AddDistributionGroupToImList
SmtpAddress

Successful AddDistributionGroupToImList
operation response
The following example shows a successful response to an
AddDistributionGroupToImList operation request.

The successful response contains the distribution group display name, the Exchange
store class for the distribution group, and the EWS identifier of the new distribution
group.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<s:Header>

<t:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="349"

MinorBuildNumber="0"

Version="Exchange2013"/>

</s:Header>

<s:Body>

<m:AddDistributionGroupToImListResponse ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:ImGroup>

<t:DisplayName>[email protected]</t:DisplayName>

<t:GroupType>IPM.DistList.MOC.DG</t:GroupType>

<t:ExchangeStoreId Id="AAMkAGQ1MjJjAA="

ChangeKey="EgAAAA=="/>

</m:ImGroup>

</m:AddDistributionGroupToImListResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

AddDistributionGroupToImListResponse

ResponseCode

ImGroup

DisplayName (string)

GroupType

ExchangeStoreId

AddDistributionGroupToImList operation
ErrorInvalidImDistributionGroupSmtpAddress
error response
The following example shows an error response to an AddDistributionGroupToImList
operation request. The following error response occurs when an attempt is made to add
a distribution group that does not exist in the Exchange store.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="349"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<AddDistributionGroupToImListResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>The specified IM distribution group SMTP address is


invalid.</MessageText>

<ResponseCode>ErrorInvalidImDistributionGroupSmtpAddress</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</AddDistributionGroupToImListResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

AddDistributionGroupToImListResponse

MessageText

DescriptiveLinkKey

See also
People and contacts in EWS in Exchange
AddImGroup
RemoveImGroup
AddEntityFeedback operation
Article • 03/29/2023 • 2 minutes to read

The AddEntityFeedback operation returns error information corresponding to server-


side issues.

This operation relies on the type of event being logged. One of the most important
events is EntityAdded, which corresponds to an entity being selected. This operation is
batch, so it can be used to log batches of entries in a single request.

FindPeople request examples


The AddEntityFeedback operation provides a way for clients to log details of interaction
with entities returned by the service. This can be used as a signal to improve relevance
behind the scenes for each client. E.g., Clients can use this operation to provide
feedback on people entities returned from FindPeople.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body >

<m:AddEntityFeedback>

<m:EntityFeedbackEntries>

<t:EntityFeedbackEntry>

<t:ClientEventTimeUTC> 2015-07-
05T22:16:18+00:00</t:ClientEventTimeUTC>

<t:ClientEventTimeLocal> 2015-07-
05T22:16:18+00:00</t:ClientEventTimeLocal>

<t:ClientSessionId>00000000-0000-0000-0000-
000000000012</t:ClientSessionId>

<t:ClientVersion>15.01.0101.01</t:ClientVersion>

<t:ClientId>Web</t:ClientId>

<t:TransactionId>123456789</t:TransactionId>

<t:EventType>EntityAdded</t:EventType>

<t:TargetEntityList>["a","b","c"]
</t:TargetEntityList>

<t:SourceOfEntityAdded></t:SourceOfEntityAdded>

<t:JSONPropertyBag></t:JSONPropertyBag>

</t:EntityFeedbackEntry>

<t:EntityFeedbackEntry>

</t:EntityFeedbackEntry>

</m:EntityFeedbackEntries>

</m:AddEntityFeedback>

</soap:Body>

</soap:Envelope>

The request SOAP body contents


The soap request contains a single element EntityFeedbackEntries. This in turn contains
an array of EntityFeedbackEntry objects. Each entry in the array can contain the
following elements.

Request Parameters Required Description Type

ClientEventTimeUtc
Yes The UTC time the event occurred on the DateTime
client-side.

ClientEventTimeLocal
Yes The local time the event occurred on the DateTime
client side.

ClientId
Yes Type of Client (E.g., Outlook, OWA, etc.). ClientIDType
Enumeration

ClientSessionId
Yes GUID Identifying the session ID. GUID
Generated on the client.

ClientVersion
Yes Version of the client (E.g., String
15.01.0101.000).

EntityAddSource
No Source for EntityAded (E.g., EntityAddSource
EntityRelevanceAPI, types, pasted). Enumeration

EntrySequenceNumber Yes An incremental integer per client Int


session. Used for detecting data loss.

EventType
Yes Type of event (E.g., Entity Added, Entity String
Removed).

JSONPropertyBag
No Additional properties associated with JSON Blob
the event (JSON blob of key/value
pairs).

TargetEntityList
No List of entities associated with the event. JSON String

TransactionId
No ID (GUID) correlating the ID in query String
logs.
Successful AddEntityFeedback operation response
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="1"

MajorBuildNumber="228"

MinorBuildNumber="0"

Version="V2_49"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body>

<AddEntityFeedbackResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<ResponseCode>NoError</ResponseCode>

<ErrorCount>0</ErrorCount>

<ErrorDetails />

</AddEntityFeedbackResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements

Errors

The API can log a batch of feedback entries, we log all that we can. This field represents
the number of error entries that were not logged.

ErrorDetails
Details pertaining to the errors above separates by ; .

Currently supported values


ClientIdType Enumeration

Desktop

Exchange

IMAP4

Lync

MacMail

MacOutlook

Mobile

Other

Outlook

OutlookService

POP3

Tablet

Web

EntityAddSource Enumeration

ActiveDirectory

EntityRelevanceApi

EntityRelevanceApiCache

ExplicitTyping

LocalCache

LocalCacheAndEntityRelevanceAPI

None

Other

Paste

AddEntityFeedback operation error response


For error codes that are generic to EWS, see ResponseCode.
Example of AddEntityFeedback in conjunction with
FindPeople

FindPeople request

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body >

<m:FindPeople>

<m:IndexedPageItemView BasePoint="Beginning" MaxEntriesReturned="100"


Offset="0"/>

<m:QueryString>user1</m:QueryString>

<m:SearchPeopleSuggestionIndex>true</m:SearchPeopleSuggestionIndex>

</m:FindPeople>

</soap:Body>

</soap:Envelope>

FindPeople response

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="1"


MajorBuildNumber="302" MinorBuildNumber="0" Version="V2_68"
xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
</s:Header>

<s:Body>

<FindPeopleResponse ResponseClass="Success"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<ResponseCode>NoError</ResponseCode>

<People>

<Persona
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<PersonaId Id="AAUQAFjZ4UxX8SZCqSPFsmh0cSo=" />

<PersonaType>Person</PersonaType>

<CreationTime>2015-10-02T23:25:42</CreationTime>

<DisplayName>user2</DisplayName>

</Persona>

</People>

<TotalNumberOfPeopleInView>0</TotalNumberOfPeopleInView>

<FirstMatchingRowIndex>0</FirstMatchingRowIndex>

<FirstLoadedRowIndex>0</FirstLoadedRowIndex>

<TransactionId>b56ad16e-5d5a-4574-90f8-
b8dd57382be6</TransactionId>

</FindPeopleResponse>

</s:Body>

</s:Envelope>

AddEntityFeedback request

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body >

<m:AddEntityFeedback>

<m:EntityFeedbackEntries>

<t:EntityFeedbackEntry>

<t:ClientEventTimeUtc>2015-07-
05T22:16:18+00:00</t:ClientEventTimeUtc>

<t:ClientEventTimeLocal>2015-07-
05T22:16:18+00:00</t:ClientEventTimeLocal>

<t:ClientSessionId>00000000-0000-0000-0000-
000000000012</t:ClientSessionId>

<t:ClientVersion>15.01.0101.01</t:ClientVersion>

<t:ClientId>Web</t:ClientId>

<t:TransactionId>b56ad16e-5d5a-4574-90f8-
b8dd57382be6</t:TransactionId>

<t:EventType>EntityAdded</t:EventType>

<t:TargetEntityList>["[email protected]"]</t:TargetEntityList>

<t:SourceOfEntityAdded>EntityRelevanceApi</t:SourceOfEntityAdded>

<t:JSONPropertyBag></t:JSONPropertyBag>

</t:EntityFeedbackEntry>

</m:EntityFeedbackEntries>

</m:AddEntityFeedback>

</soap:Body>

</soap:Envelope>

7 Note

Using FindPeople response transaction ID as the AddEntityFeedback request


transaction ID.

AddEntityFeedback response

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="1"


MajorBuildNumber="302" MinorBuildNumber="0" Version="V2_68"
xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
</s:Header>

<s:Body>

<AddEntityFeedbackResponse ResponseClass="Success"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<ResponseCode>NoError</ResponseCode>

<ErrorCount>0</ErrorCount>

<ErrorDetails />

</AddEntityFeedbackResponse>

</s:Body>

</s:Envelope>

AddImContactToGroup operation
Article • 03/29/2023 • 2 minutes to read

Find information about the AddImContactToGroup EWS operation.

The AddImContactToGroup Exchange Web Services (EWS) operation adds an existing


instant messaging (IM) contact to a group.

This operation was introduced in Exchange Server 2013.

Using the AddImContactToGroup operation


The AddImContactToGroup operation can only accept IM contacts. If you want to add a
new IM contact to the Unified Contact Store, use the AddNewImContactToGroup
operation.

The AddImContactToGroup operation can use the SOAP headers that are listed in the
following table.

Table 1. AddImContactToGroup operation SOAP headers

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, "Tags


for the Identification of Languages", to be used to
access the mailbox. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

AddImContactToGroup operation request


example: Add an existing IM contact to an IM
group
The following example of an AddImContactToGroup operation request shows how to
add an existing IM contact an IM group.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:MailboxCulture>en-US</t:MailboxCulture>

</soap:Header>

<soap:Body >

<m:AddImContactToGroup>

<m:ContactId Id="AAMkAGQ1MjJjMTBkLTc4Y2AA="

ChangeKey="EQAAABYAAABtF8oI7i"/>

<m:GroupId Id="AAMkAGQ1MjJjMTBkzzAAAQKAAA="

ChangeKey="EgAAAA=="/>

</m:AddImContactToGroup>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

AddImContactToGroup

ContactId

GroupId

Successful AddImContactToGroup operation


response
The following example shows a successful response to an AddImContactToGroup
operation request.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="349"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<AddImContactToGroupResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

</AddImContactToGroupResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

AddImContactToGroupResponse

ResponseCode

AddImContactToGroup operation
ErrorInvalidImContactId error response
The following example shows an error response to an AddImContactToGroup operation
request. The following error response occurs when an attempt is made to add a contact
that is not an IM contact.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="349"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<AddImContactToGroupResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>The specified Im Contact Id is invalid.</MessageText>

<ResponseCode>ErrorInvalidImContactId</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</AddImContactToGroupResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

AddImContactToGroupResponse

MessageText

ResponseCode

DescriptiveLinkKey

See also
AddImGroup operation

AddNewImContactToGroup operation

SetImGroup operation

RemoveImGroup operation

GetImItemList operation

People and contacts in EWS in Exchange


AddImGroup operation
Article • 03/29/2023 • 2 minutes to read

Find information about the AddImGroup EWS operation.

The AddImGroup Exchange Web Services (EWS) operation adds a new instant
messaging (IM) group to a mailbox.

This operation was introduced in Exchange Server 2013.

Using the AddImGroup operation


The AddImGroup operation only takes a single display name argument.

This operation returns the display name, group type, and Exchange store identifier of
the new group.

The AddImGroup operation can use the SOAP headers that are listed in the following
table.

Table 1. AddImGroup operation SOAP headers

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This is applicable to a request.

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, "Tags


for the Identification of Languages", to be used to
access the mailbox. This is applicable to a request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This is applicable to a response.

AddImGroup operation request example:


Create a new IM group
The following example of an AddImGroup operation request shows how to create an IM
group named MyCustomerGroup.
XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:MailboxCulture>en-US</t:MailboxCulture>

</soap:Header>

<soap:Body >

<m:AddImGroup>

<m:DisplayName>MyCustomGroup</m:DisplayName>

</m:AddImGroup>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

AddImGroup

DisplayName (string)

Successful AddImGroup operation response


The following example shows a successful response to an AddImGroup operation
request.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="349"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<AddImGroupResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<ImGroup>

<DisplayName
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">MyCustomG
roup</DisplayName>

<GroupType
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">IPM.DistL
ist.MOC.UserGroup</GroupType>

<ExchangeStoreId
Id="AAMkAGQ1MjJjMTBkLTc4Y2UtNDA5Ny04ZjU5LWI3MAAA="

ChangeKey="EgAAAA=="

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"/>

</ImGroup>

</AddImGroupResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

AddImGroupResponse

ResponseCode

ImGroup

DisplayName (string)

GroupType

ExchangeStoreId

AddImGroup operation error response


The following example shows an error response to an AddImGroup operation request.
This is a response to a request that contains a character that cannot be used in a display
name. Note that this is a SOAP fault and not a schema-based error message. The display
name submitted in the request is ~!@#$%^&, and the error occurs on the & character.
The & character occurred on the 11th line and 33rd character in the request payload.
The response was returned with an HTTP 500 code.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Body>

<s:Fault>

<faultcode
xmlns:a="https://schemas.microsoft.com/exchange/services/2006/types">a:Error
SchemaValidation</faultcode>

<faultstring xml:lang="en-US">The request failed schema validation:


An error occurred while parsing EntityName. Line 11, position 33.
</faultstring>

<detail>

<e:ResponseCode
xmlns:e="https://schemas.microsoft.com/exchange/services/2006/errors">ErrorS
chemaValidation</e:ResponseCode>

<e:Message
xmlns:e="https://schemas.microsoft.com/exchange/services/2006/errors">The
request failed schema validation.</e:Message>

<t:MessageXml
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<t:LineNumber>11</t:LineNumber>

<t:LinePosition>33</t:LinePosition>

<t:Violation>An error occurred while parsing EntityName. Line


11, position 33.</t:Violation>

</t:MessageXml>

</detail>

</s:Fault>

</s:Body>

</s:Envelope>

See also
People and contacts in EWS in Exchange

RemoveImGroup operation

SetImGroup
AddNewImContactToGroup operation
Article • 03/29/2023 • 3 minutes to read

Find information about the AddNewImContactToGroup EWS operation.

The AddNewImContactToGroup operation adds a new contact to an instant messaging


(IM) group.

This operation was introduced in Exchange Server 2013.

Using the AddNewImContactToGroup


operation
The AddNewImContactToGroup operation takes the following three arguments to add
a new contact to an IM group:

ImAddress property - Identifies the contact's IM address. This property is required.

DisplayName property - Identifies the contact's display name.

GroupId property - Identifies the group that the contact is added to.

This operation returns the persona of the contact that was added to the group.

AddNewImContactToGroup operation SOAP headers


The AddNewImContactToGroup operation can use the SOAP headers that are listed in
the following table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, "Tags


for the Identification of Languages", to be used to
access the mailbox. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.
Header name Element Description

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

AddNewImContactToGroup operation request


example: Add a new IM contact to a group
The following example of an AddNewImContactToGroup operation request shows how
to add a new contact to an existing IM group. The GroupId property value for this
example was returned from results of the AddImGroup operation. The ExchangeStoreId
property contains the GroupId property value.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:MailboxCulture>en-US</t:MailboxCulture>

<t:TimeZoneContext>

<t:TimeZoneDefinition Id="GMT Standard Time"/>

</t:TimeZoneContext>

</soap:Header>

<soap:Body >

<m:AddNewImContactToGroup>

<m:ImAddress>[email protected]</m:ImAddress>

<m:DisplayName>Tony Smith</m:DisplayName>

<m:GroupId Id="AAMkAGQ1MjJjMTBkLTc4Y2UtNDAAAQKAAA="

ChangeKey="EgAAAA=="/>

</m:AddNewImContactToGroup>

</soap:Body>

</soap:Envelope>

7 Note

The GroupId value has been shortened to preserve readability.

The request SOAP body contains the following elements:

AddNewImContactToGroup
ImAddress (String)

DisplayName (string)

GroupId

Successful AddNewImContactToGroup
operation response
The following example shows a successful response to an AddNewImContactToGroup
operation request. The response contains the persona of the newly created contact. The
contact is added to the Quick Contacts folder in Exchange.

7 Note

Identifiers have been shortened to preserve readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="349"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<AddNewImContactToGroupResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<Persona>

<PersonaId
Id="AAQkAGQ1MjJjMTBkLTc4Y2UtNDA5Ny04ZjU5LWI3MTYzNGNkZmRkYQAQAJ3EkhEEXN5KufGb
SYJanZk="

xmlns="https://schemas.microsoft.com/exchange/services/2006/types" />

<PersonaType
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">Person</P
ersonaType>

<CreationTime
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">2012-01-
05T23:06:58Z</CreationTime>

<DisplayName
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">Tony
Smith</DisplayName>

<DisplayNameFirstLast
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">Tony
Smith</DisplayNameFirstLast>

<DisplayNameLastFirst
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">Tony
Smith</DisplayNameLastFirst>

<FileAsId
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">None</Fil
eAsId>

<EmailAddress
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Name>Tony Smith</Name>

<Address>[email protected]</Address>

<RoutingType>SMTP</RoutingType>

</EmailAddress>

<EmailAddresses
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<EmailAddress>

<Name>Tony Smith</Name>

<Address>[email protected]</Address>

<RoutingType>SMTP</RoutingType>

</EmailAddress>

</EmailAddresses>

<ImAddress
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">tsmith@co
ntoso.com</ImAddress>

<RelevanceScore
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">214748364
7</RelevanceScore>

<Attributions
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Attribution>
<Id>0</Id>

<SourceId Id="BtF8oI7iVOQatt/bhQoTbWAAAAAAvcAAA="

ChangeKey="EQAAABYAAABtF8oIQoTbWAAAAAAyg" />

<DisplayName>Outlook</DisplayName>
<IsWritable>true</IsWritable>

<IsQuickContact>true</IsQuickContact>

<IsHidden>false</IsHidden>

<FolderId Id="AAMkAGQ1MjJjMTBkLTc4YhQoTbWAAAAAAvZAAA="

ChangeKey="AQAAAA==" />

</Attribution>

</Attributions>

<DisplayNames
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<StringAttributedValue>

<Value>Tony Smith</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</DisplayNames>

<FileAsIds
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<StringAttributedValue>

<Value>None</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</FileAsIds>

<Emails1
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<EmailAddressAttributedValue>

<Value>

<Name>Tony Smith</Name>

<Address>[email protected]</Address>

<RoutingType>SMTP</RoutingType>

</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</EmailAddressAttributedValue>

</Emails1>

<ImAddresses
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<StringAttributedValue>

<Value>[email protected]</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</ImAddresses>

</Persona>

</AddNewImContactToGroupResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

AddNewImContactToGroupResponse

Persona

PersonaId

PersonaType

CreationTime
DisplayName (string)

DisplayNameFirstLast

DisplayNameLastFirst

FileAsId

EmailAddress (EmailAddressType)

Name (EmailAddressType)

Address (string)

RoutingType (EmailAddressType)

ImAddress (String)

RelevanceScore

Attributions (ArrayOfPersonaAttributionsType)

Attribution (PersonaAttributionType)

ID (String)

SourceId

IsWritable

IsQuickContact

IsHidden

FolderId

DisplayNames

StringAttributedValue

Value (ArrayOfStringValueType)

FileAsIds

Emails1

EmailAddressAttributedValue

ImAddresses
AddNewImContactToGroup operation error
response
The following example shows an error response to a AddNewImContactToGroup
operation request. This is a response to a request to add a contact to a group that is not
in the requester's mailbox.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="578"

MinorBuildNumber="11"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<AddNewImContactToGroupResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>No mailbox with such guid.</MessageText>

<ResponseCode>ErrorNonExistentMailbox</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

<MessageXml>

<t:Value Name="MailboxGuid"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">d5fasda
dcw3d-23de-2341-8f59-b71523fsddda</t:Value>

</MessageXml>

</AddNewImContactToGroupResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

AddNewImContactToGroupResponse

MessageText

ResponseCode
DescriptiveLinkKey

MessageXml

For additional error codes that are generic to EWS and specific to this operation, see
ResponseCode.

See also
AddImGroup operation

AddImContactToGroup operation

AddImGroup operation

RemoveImGroup operation

SetImGroup operation

People and contacts in EWS in Exchange


AddNewTelUriContactToGroup
operation
Article • 03/29/2023 • 2 minutes to read

Find information about how to use the AddNewTelUriContactToGroup EWS operation.

The AddNewTelUriContactToGroup operation adds a new contact to a group based on


a contact's phone number.

This operation was introduced in Exchange Server 2013.

Using the AddNewTelUriContactToGroup


operation
An AddNewTelUriContactToGroup operation request submits a contact's TEL URI, SIP
URI, phone number, and the group to add the contact to. An
AddNewTelUriContactToGroup operation response creates a persona for the new
contact. This operation allows clients to add a new contact even if the contact does not
have a name.

AddNewTelUriContactToGroup operation SOAP headers


The AddNewTelUriContactToGroup operation can use the SOAP headers that are listed
in the following table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, "Tags


for the Identification of Languages", to be used to
access the mailbox. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.
AddNewTelUriContactToGroup operation
request example: Add a new contact to a group
The following example of an AddNewTelUriContactToGroup operation request shows
how to create a new contact and add the new contact to an instant messaging (IM)
group by using the contact's TEL and SIP URIs.

7 Note

All item identifiers and change keys in this article have been shortened to preserve
readability.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:MailboxCulture>en-US</t:MailboxCulture>

</soap:Header>

<soap:Body >

<m:AddNewTelUriContactToGroup>

<m:TelUriAddress>tel:5625550100</m:TelUriAddress>

<m:ImContactSipUriAddress>sip:[email protected]</m:ImContactSipUriAddress>

<m:ImTelephoneNumber>5625550100</m:ImTelephoneNumber>

<m:GroupId Id="AAMkADEzOTm4QrAABY7+0GAAA="/>

</m:AddNewTelUriContactToGroup>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

AddNewTelUriContactToGroup

TelUriAddress

ImContactSipUriAddress

ImTelephoneNumber

GroupId
Successful AddNewTelUriContactToGroup
operation response
The following example shows a successful response to an
AddNewTelUriContactToGroup operation request to create a contact. The response
contains the associated persona identifier for the contact, the display name of the
persona, which in this case is based on the contact's phone number, and the contact's
item identifier, which is displayed as part of the source identifier attribution.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="545"

MinorBuildNumber="11"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types" />

</s:Header>

<s:Body>

<AddNewTelUriContactToGroupResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<Persona>

<t:PersonaId Id="AAQkADE686dX3s="/>

<t:PersonaType>Person</t:PersonaType>

<t:CreationTime>2012-10-29T23:10:13Z</t:CreationTime>

<t:DisplayName/>

<t:DisplayNameFirstLast>5625550100</t:DisplayNameFirstLast>

<t:DisplayNameLastFirst>5625550100</t:DisplayNameLastFirst>

<t:FileAs/>

<t:FileAsId >None</t:FileAsId>

<t:RelevanceScore >2147483647</t:RelevanceScore>

<t:Attributions>

<t:Attribution>

<t:Id>0</t:Id>

<t:SourceId Id="ABhHuhCAAA=" ChangeKey="EQAAABxFU"/>

<t:DisplayName>Lync Contacts</t:DisplayName>

<t:IsWritable>false</t:IsWritable>

<t:IsQuickContact>true</t:IsQuickContact>

<t:IsHidden>false</t:IsHidden>

</t:Attribution>

</t:Attributions>

<t:FileAsIds>

<t:StringAttributedValue>

<t:Value>None</t:Value>

<t:Attributions>

<t:Attribution>0</t:Attribution>

</t:Attributions>

</t:StringAttributedValue>

</t:FileAsIds>

<t:OtherTelephones>

<t:PhoneNumberAttributedValue>

<t:Value>

<t:Number>5625550100</t:Number>

<t:Type>Other</t:Type>

</t:Value>

<t:Attributions>

<t:Attribution>0</t:Attribution>

</t:Attributions>

</t:PhoneNumberAttributedValue>

</t:OtherTelephones>

</Persona>

</AddNewTelUriContactToGroupResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains following elements:

AddNewTelUriContactToGroupResponse

ResponseCode

Persona

PersonaId

PersonaType

CreationTime

DisplayName (string)

DisplayNameFirstLast

DisplayNameLastFirst

FileAs

FileAsId

RelevanceScore
Attributions (ArrayOfPersonaAttributionsType)

Attribution (PersonaAttributionType)

ID (String)

SourceId

DisplayName (string)

IsWritable

IsQuickContact

IsHidden

FileAsIds

StringAttributedValue

Value

Attributions (ArrayOfValueAttributionsType)

Attribution (string)

OtherTelephones

PhoneNumberAttributedValue

Value

Number

Type (string)

Attributions (ArrayOfValueAttributionsType)

Attribution (string)

AddNewTelUriContactToGroup operation error


response example
The following example shows an error response to an AddNewTelUriContactToGroup
operation request when the group identifier contains a well-formed value that does not
identify a group in the mailbox.
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="545"

MinorBuildNumber="11"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<AddNewTelUriContactToGroupResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>The specified object was not found in the store.


</MessageText>

<ResponseCode>ErrorItemNotFound</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</AddNewTelUriContactToGroupResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

AddNewTelUriContactToGroupResponse

MessageText

ResponseCode

DescriptiveLinkKey

See also
EWS operations in Exchange

People and contacts in EWS in Exchange


ApplyConversationAction operation
Article • 03/29/2023 • 2 minutes to read

The ApplyConversationAction operation sets a one-time or follow up action on all the


items in a conversation. The ApplyConversationAction operation allows you to
categorize, move, copy, delete, and set the read state on all items in a conversation.
Actions can also be set for new messages in a conversation.

ApplyConversationAction request example

Description
The following example of an ApplyConversationAction request shows how to move the
items in the specified conversation to another folder. Items that are added to the
conversation will also be moved to the specified folder.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010_SP1" />

</soap:Header>

<soap:Body>

<m:ApplyConversationAction>

<m:ConversationActions>

<t:ConversationAction>

<t:Action>AlwaysMove</t:Action>

<t:ConversationId Id="AAQkADVkNjM1EH39AWcDUGrnrnJ32hHpdc="/>

<t:DestinationFolderId>

<t:FolderId
Id="AAMkADVkNjM1ODI3LTEwYTAtNDUBTTT6tWal35iSoKAAAABZZWAAA="/>

</t:DestinationFolderId>

</t:ConversationAction>

</m:ConversationActions>

</m:ApplyConversationAction>

</soap:Body>

</soap:Envelope>

Remarks
The conversation and folder identifiers have been shortened to preserve readability.

ApplyConversationAction response example

Description
The following example shows a successful response to an ApplyConversationAction
request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="1"

MajorBuildNumber="91"

MinorBuildNumber="0"

Version="Exchange2010_SP1"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:ApplyConversationActionResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:ApplyConversationActionResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

</m:ApplyConversationActionResponseMessage>

</m:ResponseMessages>

</m:ApplyConversationActionResponse>

</s:Body>

</s:Envelope>

See also
ApplyConversationAction operation
EWS operations in Exchange
EWS XML elements in Exchange
Conversations in EWS
ArchiveItem operation
Article • 03/29/2023 • 2 minutes to read

Find information about the ArchiveItem EWS operation.

The ArchiveItem operation moves an item into the mailbox user's archive mailbox.

This operation was introduced in Exchange Server 2013.

Using the ArchiveItem operation


The ArchiveItem operation takes two arguments in the request that identify the items to
move to the archive mailbox and the destination folder for those items. An archive
mailbox must be enabled in order for this operation to work. For information about how
to enable an archive mailbox, see Manage In-Place Archives .

ArchiveItem operation SOAP headers


The ArchiveItem operation can use the SOAP headers that are listed in the following
table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, Tags


for the Identification of Languages, to be used to
access the mailbox. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

ArchiveItem operation request example: Move


an item to the archive inbox folder
The following example of an ArchiveItem operation request shows how to move an item
to the archive Inbox folder.

7 Note

All item identifiers and change keys in this article have been shortened to preserve
readability.

XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013"/>

</soap:Header>

<soap:Body>

<m:ArchiveItem>

<m:ArchiveSourceFolderId>

<t:DistinguishedFolderId Id="inbox"/>

</m:ArchiveSourceFolderId>

<m:ItemIds>

<t:ItemId Id="AQMkG5BBwrQAAAxoAAAA="
ChangeKey="CQAAAHCtAAAAAAB7"/>

</m:ItemIds>

</m:ArchiveItem>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

ArchiveItem
ArchiveSourceFolderId
DistinguishedFolderId
ItemIds
ItemId

Successful ArchiveItem operation response


The following example shows a successful response to an ArchiveItem operation
request to move an item to an archive mailbox.
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="526"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:ArchiveItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:ArchiveItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items/>

</m:ArchiveItemResponseMessage>

</m:ResponseMessages>

</m:ArchiveItemResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

ArchiveItemResponse
ResponseMessages
ArchiveItemResponseMessage
ResponseCode
Items

ArchiveItem operation error response


The following example shows an error response to an ArchiveItem operation request.
This is a response to a valid request to archive an item when an archive mailbox is not
enabled for a user.

XML
<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="556"

MinorBuildNumber="8"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:ArchiveItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:ArchiveItemResponseMessage ResponseClass="Error">

<m:MessageText>Archive mailbox is not enabled for this user.


</m:MessageText>

<m:ResponseCode>ErrorInvalidOperation</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:Items/>

</m:ArchiveItemResponseMessage>

</m:ResponseMessages>

</m:ArchiveItemResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

ArchiveItemResponse
ResponseMessages
ArchiveItemResponseMessage
MessageText
ResponseCode
DescriptiveLinkKey
Items

For additional error codes that are generic to EWS and specific to this operation, see
ResponseCode.
See also
EWS operations in Exchange
Archiving in EWS in Exchange
ConvertId operation
Article • 03/29/2023 • 3 minutes to read

Find information about the ConvertId EWS operation.

The ConvertId Exchange Web Services (EWS) operation converts item and folder
identifiers between formats that are accepted by Exchange Online, Exchange Online as
part of Office 365, and on-premises versions of Exchange starting with Exchange Server
2013.

Using the ConvertId operation


You can convert the following identifiers by using the ConvertId operation:

The identifier format for EWS in the initial release version of Exchange 2007. This is
represented by the EwsLegacyId enumeration value in the IdFormat
enumeration.

The identifier format for EWS in Exchange 2007 SP1 or Exchange 2010. This is
represented by the EwsId enumeration value in IdFormat .

The MAPI identifier, as in the PR_ENTRYID property. This is represented by the


EntryId enumeration value in the IdFormat enumeration.

The availability calendar event identifier. This is a hexadecimal-encoded


representation of the PR_ENTRYID property. This is represented by the HexEntryId
enumeration value in IdFormat .

The Exchange store identifier. This is represented by the StoreId enumeration


value in IdFormat . The ConvertId operation does not convert public folder
identifiers from the EWS identifier to the store identifier.

The Outlook Web App identifier. This is represented by the OwaId enumeration
value in IdFormat

The passing of URLs that are created from this identifier to Outlook Web App is
not supported. The Outlook Web App identifier is applicable to Exchange 2007 and
Exchange 2010. Outlook Web App for Exchange Online and versions of Exchange
starting with Exchange Server 2013 uses EWS identifiers.

The ConvertId operation does not work as expected when converting public folder
identifiers from the EWS identifier to the store identifier in Exchange Online and
Exchange 2013. You can manually update the identifier that is returned as a workaround.
To manually update the identifier:

1. In your application code, determine whether the target item/folder is in a public


folder.

2. Decode the Base64-encoded identifier string.

3. Verify that the type byte (21st byte) has a value of 7. A value of 7 indicates that the
identifier is in the incorrect format.

4. Skip the first four bytes. They must be set to zero.

5. Update the next 16 bytes with the following GUID:


1A447390AA6611CD9BC800AA002FC45A

6. Update the next byte (type byte) with a value of 9.

7. Change the identifier to a Base64-encoded string.

7 Note

The ConvertId operation validates that a given SMTP address has a valid format.
The operation does not determine whether an SMTP address represents a valid
mailbox.

The ConvertId operation can use the SOAP headers that are listed in the following table.

Table 1. ConvertId operation SOAP headers

Header Element Description

Impersonation ExchangeImpersonation Identifies the user whom the client application is


impersonating. This is applicable to a request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request This is applicable to a request.

ServerVersion ServerVersionInfo
Identifies the version of the server that responded to
the request. This is applicable to a response.

ConvertId operation request example


The following example of a ConvertId request shows how to convert from an EWS
identifier to an Outlook Web App identifier.
The RequestServerVersion element in the SOAP header must be set to
Exchange2007_SP1 or later for this operation to work.

7 Note

The item identifier has been shortened to preserve readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010"/>

</soap:Header>

<soap:Body>

<ConvertId
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

DestinationFormat="OwaId">

<SourceIds>

<t:AlternateId Format="EwsId" Id="AAMkAGZhN2IxYTA0LWNiNzItN="

Mailbox="[email protected]"/>

</SourceIds>

</ConvertId>

</soap:Body>

</soap:Envelope>

ConvertId operation response example


The following example shows a successful response to a ConvertId request. This
response example contains an Outlook Web App identifier.

7 Note

The Outlook Web App identifier has been shortened to preserve readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="1"

MajorBuildNumber="191" MinorBuildNumber="0"

Version="Exchange2010"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<ConvertIdResponse
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseMessages>

<ConvertIdResponseMessage ResponseClass="Success">

<ResponseCode>NoError</ResponseCode>

<AlternateId xsi:type="t:AlternateIdType" Format="OwaId"


Id="RgAAAAAS2%2"

Mailbox="[email protected]" />

</ConvertIdResponseMessage>

</ResponseMessages>

</ConvertIdResponse>

</soap:Body>

</soap:Envelope>

ConvertId operation error response example


The following example shows the response to a request that contains the wrong type of
identifier format.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<ServerVersionInfo MajorVersion="8" MinorVersion="1"

MajorBuildNumber="206" MinorBuildNumber="0"

Version="Exchange2010"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<ConvertIdResponse
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseMessages>

<ConvertIdResponseMessage ResponseClass="Error">
<MessageText>Id is malformed.</MessageText>

<ResponseCode>ErrorInvalidIdMalformed</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</ConvertIdResponseMessage>

</ResponseMessages>

</ConvertIdResponse>

</soap:Body>

</soap:Envelope>

Version differences
The EWS identifier format changed between the initial release version of Exchange 2007
and Exchange 2007 Service Pack 1 (SP1). Exchange Online as part of Office 365,
Exchange Online, and on-premises versions of Exchange starting with Exchange 2010
use the same identifier format that Exchange 2007 SP1 uses.

The ConvertId operation converts public folder identifiers from the EWS identifier to the
store identifier in Exchange 2007 and Exchange 2010.

See also
Converting Identifiers

ConvertIdType

ConvertId
CopyFolder operation
Article • 03/29/2023 • 2 minutes to read

The CopyFolder operation copies folders in a mailbox.

Using the CopyFolder operation


The CopyFolder operation is similar to the MoveFolder operation. It copies identified
folders and returns the Id and ChangeKey of the copied folders.

CopyFolder request example

Description
The following example of a CopyFolder request shows how to copy folders into the
Inbox folder.

7 Note

The value of the Id attribute of the FolderId element has been shortened for
readability.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<CopyFolder
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ToFolderId>

<t:DistinguishedFolderId Id="inbox"/>

</ToFolderId>

<FolderIds>

<t:FolderId Id="AS4A=" ChangeKey="fsVU4=="/>

<t:FolderId Id="AS4AU=" ChangeKey="fsVU4o=="/>

</FolderIds>

</CopyFolder>

</soap:Body>

</soap:Envelope>

Comments
Folders can be identified by either the DistinguishedFolderId element or the FolderId
element for use in either the ToFolderId or the FolderIds elements.

Request elements
The following elements are used in the request:

CopyFolder

ToFolderId

DistinguishedFolderId

FolderIds

FolderId

7 Note

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

To find other options for the request message of the CopyFolder operation, explore the
schema hierarchy. Start at the CopyFolder element.

Successful CopyFolder response

Description
The following example shows a successful response to the CopyFolder request.

7 Note

The folder ID and the change key have been shortened to preserve readability.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="595" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<CopyFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CopyFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Folders>

<t:Folder>

<t:FolderId Id="AS4AUn=" ChangeKey="fsVU4o==" />

</t:Folder>

</m:Folders>

</m:CopyFolderResponseMessage>

</m:ResponseMessages>

</CopyFolderResponse>

</soap:Body>

</soap:Envelope>

Comment
The FolderId element that is returned in the response represents the folder that was
copied in the new folder location.

Response elements
The following elements are used in the response:

ServerVersionInfo

CopyFolderResponse

ResponseMessages

CopyFolderResponseMessage
ResponseCode

Folders

Folder

FolderId

To find other options for the response message of the CopyFolder operation, explore
the schema hierarchy. Start at the CopyFolderResponse element.

CopyFolder error response

Description
The following example shows an error response to a CopyFolder request. The error
occurred because a folder with the same display name already exists.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="628" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<CopyFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CopyFolderResponseMessage ResponseClass="Error">

<m:MessageText>The move or copy operation failed.</m:MessageText>

<m:ResponseCode>ErrorMoveCopyFailed</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:Folders />
</m:CopyFolderResponseMessage>

</m:ResponseMessages>

</CopyFolderResponse>

</soap:Body>

</soap:Envelope>

Error response elements


The following elements are used in the error response:

CopyFolderResponse

ResponseMessages

CopyFolderResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

Folders

To find other options for the error response message of the CopyFolder operation,
explore the schema hierarchy. Start at the CopyFolderResponse element.

See also
MoveFolder operation
EWS XML elements in Exchange
CopyItem operation
Article • 03/29/2023 • 2 minutes to read

The CopyItem operation copies items and puts the items in a different folder.

CopyItem request example

Description
The following example of a CopyItem request shows how to form a request to copy an
item to the Inbox.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<CopyItem
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ToFolderId>

<t:DistinguishedFolderId Id="inbox"/>

</ToFolderId>

<ItemIds>

<t:ItemId Id="AS4AUnV="/>

</ItemIds>

</CopyItem>

</soap:Body>

</soap:Envelope>

Comments

7 Note

The folder ID and the change key have been shortened to preserve readability.

Request elements
The following elements are used in the request:
CopyItem

ToFolderId

DistinguishedFolderId

ItemIds

ItemId

7 Note

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

To find other options for the request message of the CopyItem operation, explore the
schema hierarchy. Start at the CopyItem element.

Successful CopyItem Response

Description
The following example shows a successful response to the CopyItem request.

The item identifier of the new item is returned in the response message. Item identifiers
are not returned in responses for cross-mailbox or mailbox to public folder CopyItem
operations.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="595" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<CopyItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CopyItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Message>
<t:ItemID Id="AAMkAd" ChangeKey="FwAAABY" />

</t:Message>

</m:Items>

</m:CopyItemResponseMessage>

</m:ResponseMessages>

</CopyItemResponse>

</soap:Body>

</soap:Envelope>

Successful response elements


The following elements are used in the response:

ServerVersionInfo

CopyItemResponse

ResponseMessages

CopyItemResponseMessage

ResponseCode

Items

To find other options for the response message of the CopyItem operation, explore the
schema hierarchy. Start at the CopyItemResponse element.

CopyItem error response

Description
The following example shows an error response to a CopyItem request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="595" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<CopyItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CopyItemResponseMessage ResponseClass="Error">

<m:MessageText>Id is malformed.</m:MessageText>

<m:ResponseCode>ErrorInvalidIdMalformed</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:Items />

</m:CopyItemResponseMessage>

</m:ResponseMessages>

</CopyItemResponse>

</soap:Body>

</soap:Envelope>

Error response elements


The following elements are used in the error response:

ServerVersionInfo

CopyItemResponse

ResponseMessages

CopyItemResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

Items
To find other options for the error response message of the CopyItem operation,
explore the schema hierarchy. Start at the CopyItemResponse element.

See also
EWS XML elements in Exchange
CreateAttachment operation
Article • 03/29/2023 • 2 minutes to read

The CreateAttachment operation creates either an item or file attachment and attaches
it to the specified item.

File CreateAttachment request example


The following example of a CreateAttachment request shows how to create a file
attachment.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<CreateAttachment
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<ParentItemId Id="AAAtAE..." ChangeKey="CQAAABYA..."/>

<Attachments>

<t:FileAttachment>

<t:Name>SomeFile</t:Name>

<t:Content>AQIDBAU=</t:Content>

</t:FileAttachment>

</Attachments>

</CreateAttachment>

</soap:Body>

</soap:Envelope>

A name for the attachment must be provided.

7 Note

The parent item identifier and change key have been shortened to preserve
readability.

File CreateAttachment request elements


The following elements are used in the request:

CreateAttachment
ParentItemId
Attachments
FileAttachment
Name (AttachmentType)
Content

Successful file CreateAttachment response


example
The following example shows a successful response to the CreateAttachment request.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="653" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"/>

</soap:Header>

<soap:Body>

<CreateAttachmentResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CreateAttachmentResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Attachments>

<t:FileAttachment>

<t:AttachmentId Id="AAAtAE=" RootItemId="AAAtAEFk="


RootItemChangeKey="CQAAAB"/>

</t:FileAttachment>

</m:Attachments>

</m:CreateAttachmentResponseMessage>

</m:ResponseMessages>

</CreateAttachmentResponse>

</soap:Body>

</soap:Envelope>

The response contains the identifier of the attached file. It also contains the identifier
and change key of the root item. The item identifiers and change key have been
shortened to preserve readability.

Successful file CreateAttachment response elements


The following elements are used in the response:

ServerVersionInfo
CreateAttachmentResponse
ResponseMessages
CreateAttachmentResponseMessage
ResponseCode
Attachments
FileAttachment
AttachmentId

Item CreateAttachment request example


The following example of a CreateAttachment request shows how to create an item
attachment.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<CreateAttachment
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<ParentItemId Id="AAAtAE=" ChangeKey="CQAAABYA"/>

<Attachments>

<t:ItemAttachment>

<t:Name>An item attachment</t:Name>

<t:Message>

<t:Subject>A message to attach</t:Subject>

</t:Message>

</t:ItemAttachment>

</Attachments>

</CreateAttachment>

</soap:Body>

</soap:Envelope>

A name for the attachment must be provided. The parent item identifier and change key
have been shortened to preserve readability.

Item CreateAttachement request elements


The following elements are used in the request:

CreateAttachment
ParentItemId
Attachments
ItemAttachment
Name (AttachmentType)
Message
Subject

Successful item CreateAttachment response


example
The following example shows a successful response to the CreateAttachment request.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="653" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"/>

</soap:Header>

<soap:Body>

<CreateAttachmentResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CreateAttachmentResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Attachments>

<t:ItemAttachment>

<t:AttachmentId Id="AAAtAEFk=" RootItemId="AAAtAEFkb="


RootItemChangeKey="CQAAABYA"/>

</t:ItemAttachment>

</m:Attachments>

</m:CreateAttachmentResponseMessage>

</m:ResponseMessages>

</CreateAttachmentResponse>

</soap:Body>

</soap:Envelope>

The response contains the identifier of the new attachment. It also contains the identifier
and change key of the root item. The root item is the item that contains the attachment.
The item identifiers and change key have been shortened to preserve readability.

Successful item CreateAttachment response elements


The following elements are used in the response:

ServerVersionInfo
CreateAttachmentResponse
ResponseMessages
CreateAttachmentResponseMessage
ResponseCode
Attachments
ItemAttachment
AttachmentId

CreateAttachment error response example


The following example shows an error response to the CreateAttachment request. The
error is due to the fact that the name of the attachment was not specified.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="653" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"/>

</soap:Header>

<soap:Body>

<CreateAttachmentResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CreateAttachmentResponseMessage ResponseClass="Error">

<m:MessageText>Required property is missing.</m:MessageText>

<m:ResponseCode>ErrorRequiredPropertyMissing</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:MessageXml>

<t:ExceptionFieldURI FieldURI="attachment:Name"/>

</m:MessageXml>

<m:Attachments/>

</m:CreateAttachmentResponseMessage>

</m:ResponseMessages>

</CreateAttachmentResponse>

</soap:Body>

</soap:Envelope>

CreateAttachment error response elements


The following elements are used in the error response:

ServerVersionInfo
CreateAttachmentResponse
ResponseMessages
CreateAttachmentResponseMessage
MessageText
ResponseCode
DescriptiveLinkKey
MessageXml
ExceptionFieldURI
Attachments

Remarks
If multiple attachments are attached to an item in a single round trip, the
RootItemChangeKey in the last response message is the one that represents the new
change key of the item that has the attachments.

See also
DeleteAttachment operation
GetAttachment operation
CreateFolder operation
Article • 03/29/2023 • 2 minutes to read

The CreateFolder operation creates folders, calendar folders, contacts folders, tasks
folders, and search folders.

CreateFolder request example

Description
The following example of a CreateFolder request shows how to form a request to create
two new folders in the mailbox root.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<CreateFolder
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ParentFolderId>

<t:DistinguishedFolderId Id="msgfolderroot"/>

</ParentFolderId>
<Folders>

<t:Folder>

<t:DisplayName>Folder1</t:DisplayName>

</t:Folder>

<t:Folder>

<t:DisplayName>Folder2</t:DisplayName>

</t:Folder>

</Folders>

</CreateFolder>

</soap:Body>

</soap:Envelope>

Request elements
The following elements are used in the request:

CreateFolder
ParentFolderId (TargetFolderIdType)

DistinguishedFolderId

Folders

Folder

DisplayName (string)

7 Note

The schema that describes these elements is located in the EWS virtual directory of
the computer that is running MicrosoftExchange Server 2007 that has the Client
Access server role installed.

To find other options for the request message of the CreateFolder operation, explore the
schema hierarchy. Start at the CreateFolder element.

7 Note

If you create a search folder with a restriction by using the calendar:Organizer


property, a subsequent get folder call will return the restriction with the
message:from property in its place. These two properties map to the same
underlying MAPI property.

The CreateFolder operation supports the creation of a custom folder class only when
you create the folder by using a generic folder type element and set the FolderClass
element.

Successful CreateFolder response example

Description
The following example shows a successful response to the CreateFolder request. In this
example, the response returns the identifiers of the new folders.

7 Note

The folder ID and the change key have been shortened to preserve readability.
Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="595" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<CreateFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CreateFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Folders>

<t:Folder>

<t:FolderId Id="AS4AUn==" />

</t:Folder>

</m:Folders>

</m:CreateFolderResponseMessage>

<m:CreateFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Folders>

<t:Folder>

<t:FolderId Id="AS4AUn==" />

</t:Folder>

</m:Folders>

</m:CreateFolderResponseMessage>

</m:ResponseMessages>

</CreateFolderResponse>

</soap:Body>

</soap:Envelope>

Successful response elements


The following elements are used in the response:

ServerVersionInfo

CreateFolderResponse
ResponseMessages

CreateFolderResponseMessage

ResponseCode

Folders

Folder

FolderId

To find other options for the response message of the CreateFolder operation, explore
the schema hierarchy. Start at the CreateFolderResponse element.

CreateFolder error response

Description
The following example shows an error response to a CreateFolder request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="595" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<CreateFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CreateFolderResponseMessage ResponseClass="Error">

<m:MessageText>A folder with the specified name already exists.


</m:MessageText>

<m:ResponseCode>ErrorFolderExists</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:Folders />
</m:CreateFolderResponseMessage>

</m:ResponseMessages>

</CreateFolderResponse>

</soap:Body>

</soap:Envelope>

Error response elements


The following elements are used in the error response:

ServerVersionInfo

CreateFolderResponse

ResponseMessages

CreateFolderResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

Folders

To find other options for the error response message of the CreateFolder operation,
explore the schema hierarchy. Start at the CreateFolderResponse element.

See also
FindItem operation

FindFolder operation

CreateFolderType

EWS XML elements in Exchange

Creating Folders (Exchange Web Services)


CreateFolderPath operation
Article • 03/29/2023 • 2 minutes to read

Find information about the CreateFolderPath EWS operation.

The CreateFolderPath operation creates a folder hierarchy.

This operation was introduced in Exchange Server 2013.

Using the CreateFolderPath operation


The CreateFolderPath operation request takes an array of folders and a parent folder
identifier and creates a folder hierarchy based on the order of the folders in the array.

CreateFolderPath operation SOAP headers


The CreateFolderPath operation can use the SOAP headers that are listed in the
following table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

MailboxCulture
MailboxCulture Identifies the culture, as defined in RFC 3066,
"Tags for the Identification of Languages", to be
used to access the mailbox. This header is
applicable to a request.

RequestVersion
RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded
to the request. This header is applicable to a
response.

TimeZoneContext TimeZoneContext
Identifies the time zone scope for DateTime
properties. This header is applicable to a request.

CreateFolderPath operation request example:


Create a folder hierarchy
The following example of a CreateFolderPath operation request shows how to create a
folder hierarchy that is three folders deep in the default Inbox folder.

7 Note

All item identifiers and change keys in this article have been shortened to preserve
readability.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:MailboxCulture>en-US</t:MailboxCulture>

<t:TimeZoneContext>

<t:TimeZoneDefinition Id="GMT Standard Time"/>

</t:TimeZoneContext>

</soap:Header>

<soap:Body >

<m:CreateFolderPath>

<m:ParentFolderId>

<t:DistinguishedFolderId Id="inbox"/>

</m:ParentFolderId>

<m:RelativeFolderPath>

<t:Folder>

<t:DisplayName>MyFirstLevelFolder</t:DisplayName>

</t:Folder>

<t:Folder>

<t:DisplayName>MySecondLevelFolder</t:DisplayName>

</t:Folder>

<t:Folder>

<t:DisplayName>MyThirdLevelFolder</t:DisplayName>

</t:Folder>

</m:RelativeFolderPath>

</m:CreateFolderPath>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

CreateFolderPath

ParentFolderId (TargetFolderIdType)
DistinguishedFolderId

RelativeFolderPath

Folder

DisplayName (string)

Successful CreateFolderPath operation


response
The following example shows a successful response to a CreateFolderPath operation
request to create a folder hierarchy three folders deep in the default Inbox folder.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="526"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:CreateFolderPathResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:CreateFolderPathResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Folders>

<t:Folder>

<t:FolderId Id="AAMkADEzOTExYisXAAA="
ChangeKey="AQAAABYAABq6Wxb"/>

<t:DisplayName>MyFirstLevelFolder</t:DisplayName>

<t:TotalCount>0</t:TotalCount>

<t:ChildFolderCount>0</t:ChildFolderCount>

<t:UnreadCount>0</t:UnreadCount>

</t:Folder>

</m:Folders>

</m:CreateFolderPathResponseMessage>

<m:CreateFolderPathResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Folders>

<t:Folder>

<t:FolderId Id="AAMkADEzOTExm4QrAABqxisYAAA="
ChangeKey="AQAAABYAAAm4QrAABq6Wxg"/>

<t:DisplayName>MySecondLevelFolder</t:DisplayName>

<t:TotalCount>0</t:TotalCount>

<t:ChildFolderCount>0</t:ChildFolderCount>

<t:UnreadCount>0</t:UnreadCount>

</t:Folder>

</m:Folders>

</m:CreateFolderPathResponseMessage>

<m:CreateFolderPathResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Folders>

<t:Folder>

<t:FolderId Id="AAMkADEzOTAABqxisZAAA="
ChangeKey="AQAAABYAA6Wxl"/>

<t:DisplayName>MyThirdLevelFolder</t:DisplayName>

<t:TotalCount>0</t:TotalCount>

<t:ChildFolderCount>0</t:ChildFolderCount>

<t:UnreadCount>0</t:UnreadCount>

</t:Folder>

</m:Folders>

</m:CreateFolderPathResponseMessage>

</m:ResponseMessages>

</m:CreateFolderPathResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

CreateFolderPathResponse

ResponseMessages

CreateFolderPathResponseMessage

ResponseCode

Folders

Folder

FolderId

DisplayName (string)
TotalCount

ChildFolderCount

UnreadCount

CreateFolderPath operation error response


The following example shows an error response to a CreateFolderPath operation
request. This is a response to a request to create two folders, the first of which does not
have a display name property set. The first folder in the hierarchy cannot be created
without a display name property, and the second folder cannot be created because the
parent folder in the hierarchy was not created.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"

MajorBuildNumber="556"

MinorBuildNumber="14"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:CreateFolderPathResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:CreateFolderPathResponseMessage ResponseClass="Error">

<m:MessageText>The folder save operation failed due to


invalid property values.</m:MessageText>

<m:ResponseCode>ErrorFolderSavePropertyError</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:MessageXml>

<t:FieldURI FieldURI="folder:DisplayName"/>

</m:MessageXml>

<m:Folders/>

</m:CreateFolderPathResponseMessage>

<m:CreateFolderPathResponseMessage ResponseClass="Error">

<m:MessageText>The specified parent folder could not be


found.</m:MessageText>

<m:ResponseCode>ErrorParentFolderNotFound</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:Folders/>

</m:CreateFolderPathResponseMessage>

</m:ResponseMessages>

</m:CreateFolderPathResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

CreateFolderPathResponse

ResponseMessages

CreateFolderPathResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

MessageXml

FieldURI

Folders

For additional error codes that are generic to EWS and specific to this operation, see
ResponseCode.

See also
EWS operations in Exchange

FindFolder operation
CreateItem operation
Article • 03/29/2023 • 2 minutes to read

The CreateItem operation creates items in the Exchange store.

Using the CreateItem Operation


You can use the CreateItem operation to create the following:

Calendar items

E-mail messages

Meeting requests

Tasks

Contacts

For more information, see CreateItem operation (calendar item), CreateItem operation
(email message), CreateItem operation (meeting request), CreateItem operation (task),
and CreateItem operation (contact).

The CreateItem operation supports the use of response objects. Response objects
support the acceptance and rejection of meetings and the handling of voting buttons
that are included in a standard e-mail message. The following table lists the response
objects that are handled in the CreateItem operation.

Response object Action

AcceptItem Accept a meeting request.

CancelCalendarItem Cancel a meeting. This differs from deleting all attendees because it
deletes the meeting for the organizer also.

DeclineItem Decline a meeting request.

ForwardItem Send a meeting request to another person as a meeting request.

RemoveItem Remove a canceled meeting from the calendar.

ReplyAllToItem Send a message that includes the body of the original meeting request to
all attendees of the meeting.

ReplyToItem Send a message that includes the body of the original meeting request to
the sender of the meeting request.
Response object Action

SendReadReceipt Send a read receipt to the sender of the meeting request.

TentativelyAcceptItem Tentatively accept a meeting request.

The CreateItem operation also supports additional meeting objects. The following table
lists additional objects that the CreateItem operation supports.

Meeting Description
object

Meeting Represents a meeting message in the Exchange store. This is the base object for
Message the other meeting objects.

Meeting Represents a meeting request in the Exchange store.


Request

Meeting Represents a meeting response in the Exchange store.


Response

Meeting Represents a meeting cancellation in the Exchange store.


Cancellation

See also
CreateItem operation (calendar item)

CreateItem operation (contact)

CreateItem operation (email message)

CreateItem operation (meeting request)

CreateItem operation (task)

CreateItemType
CreateItem operation (email message)
Article • 03/29/2023 • 2 minutes to read

The CreateItem operation is used to create e-mail messages.

CreateItem request example

Description
The following example of a CreateItem request shows how to create a new e-mail
message, send the message, and save a copy of it in the drafts folder.

Code
XML

<?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>

<CreateItem MessageDisposition="SendAndSaveCopy"
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<SavedItemFolderId>

<t:DistinguishedFolderId Id="drafts" />

</SavedItemFolderId>

<Items>

<t:Message>

<t:ItemClass>IPM.Note</t:ItemClass>

<t:Subject>Project Action</t:Subject>

<t:Body BodyType="Text">Priority - Update specification</t:Body>

<t:ToRecipients>

<t:Mailbox>
<t:EmailAddress>[email protected]</t:EmailAddress>

</t:Mailbox>

</t:ToRecipients>

<t:IsRead>false</t:IsRead>

</t:Message>

</Items>

</CreateItem>

</soap:Body>

</soap:Envelope>

Request elements
The following elements are used in the request:

CreateItem

SavedItemFolderId

Items (NonEmptyArrayOfAllItemsType)

Message

ItemClass

Subject

Body

ToRecipients

Mailbox

EmailAddress (NonEmptyStringType)

IsRead

To find other options for the request message of the CreateItem operation, explore the
schema hierarchy. Start at the CreateItem element.

Successful CreateItem Response

Description
The following example shows a successful response to the CreateItem request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="595" MinorBuildNumber="0"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<CreateItemResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items />

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</CreateItemResponse>

</soap:Body>

</soap:Envelope>

Successful response elements


The following elements are included in the response:

CreateItemResponse

ResponseMessages

CreateItemResponseMessage

ResponseCode

Items

To find other options for the response message of the CreateItem operation, explore the
schema hierarchy. Start at the CreateItemResponse element.

Error CreateItem Response

Description
The following example shows an error response to a CreateItem request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="595" MinorBuildNumber="0"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<CreateItemResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Error">

<m:MessageText>The user account which was used to submit this


request does not have the right to send mail on behalf of the specified
sending account.</m:MessageText>

<m:ResponseCode>ErrorSendAsDenied</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:Items />

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</CreateItemResponse>

</soap:Body>

</soap:Envelope>

Error response elements


The following elements are used in the error response:

CreateItemResponse

ResponseMessages

CreateItemResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

Items

To find other options for the error response message of the CreateItem operation,
explore the schema hierarchy. Start at the CreateItemResponse element.

See also
CreateItem operation
CreateItem operation (calendar item)
Article • 03/29/2023 • 2 minutes to read

The CreateItem operation creates calendar items in the Exchange store.

Remarks
The CreateItem operation creates appointments, meetings, and meeting requests. If a
calendar item is created without attendees, it is considered an appointment. If attendees
are specified, the calendar item is a meeting. When a meeting is created by using the
CreateItem operation, meeting requests are automatically sent to the identified
attendees if the SendMeetingInvitations attribute is set to send the meeting requests.

CreateItem (Calendar Item) request example

Description
The following example of a CreateItem request shows how to create a meeting with two
required attendees. This request will send the meeting requests to the two attendees.

Code
XML

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<CreateItem
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

SendMeetingInvitations="SendToAllAndSaveCopy" >

<SavedItemFolderId>

<t:DistinguishedFolderId Id="calendar"/>

</SavedItemFolderId>

<Items>

<t:CalendarItem
xmlns="http://schemas.microsoft.com/exchange/services/2006/types">

<Subject>Planning Meeting</Subject>

<Body BodyType="Text">Plan the agenda for next week's meeting.


</Body>

<ReminderIsSet>true</ReminderIsSet>

<ReminderMinutesBeforeStart>60</ReminderMinutesBeforeStart>

<Start>2006-11-02T14:00:00</Start>

<End>2006-11-02T15:00:00</End>

<IsAllDayEvent>false</IsAllDayEvent>

<LegacyFreeBusyStatus>Busy</LegacyFreeBusyStatus>

<Location>Conference Room 721</Location>

<RequiredAttendees>

<Attendee>

<Mailbox>
<EmailAddress>[email protected]</EmailAddress>

</Mailbox>

</Attendee>

<Attendee>

<Mailbox>
<EmailAddress>[email protected]</EmailAddress>

</Mailbox>

</Attendee>

</RequiredAttendees>

</t:CalendarItem>

</Items>

</CreateItem>

</soap:Body>

</soap:Envelope>

Comments
For an example of how to respond to a meeting request, see the CreateItem operation
(meeting request) topic.

Request elements
The following elements are used in the request:

CreateItem

SavedItemFolderId

DistinguishedFolderId

Items (NonEmptyArrayOfAllItemsType)

CalendarItem

Subject

Body

ReminderIsSet
ReminderMinutesBeforeStart

Start

End

IsAllDayEvent

LegacyFreeBusyStatus

Location

RequiredAttendees

Attendee

Mailbox

EmailAddress (NonEmptyStringType)

Successful CreateItem (Calendar Item)


Response

Description
The following example shows a successful response to the CreateItem request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="685" MinorBuildNumber="8"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<CreateItemResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="AAAlAFV" ChangeKey="DwAAABYA" />

</t:CalendarItem>

</m:Items>

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</CreateItemResponse>

</soap:Body>

</soap:Envelope>

Comments
The ItemId element Id and ChangeKey attributes have been shortened to preserve
readability.

Successful response elements


The following elements are used in the response:

ServerVersionInfo

CreateItemResponse

ResponseMessages

CreateItemResponseMessage

ResponseCode

Items

CalendarItem

ItemId

See also
CreateItem operation
CreateItem operation (meeting request)
Article • 03/29/2023 • 2 minutes to read

The CreateItem operation is used to respond to meeting requests.

Remarks
The CreateItem operation provides three options for responding to a meeting request:
accept, tentatively accept, or decline.

Accept Meeting request example

Description
The following example shows how to accept a meeting request invitation.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<CreateItem
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

MessageDisposition="SendAndSaveCopy">

<Items>

<AcceptItem
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<ReferenceItemId Id="AAAlAFVzZ"

ChangeKey="CwAAABYAA"/>

</AcceptItem>

</Items>

</CreateItem>

</soap:Body>

</soap:Envelope>

Comments
To tentatively accept or to decline the meeting request, use the TentativelyAcceptItem or
DeclineItem elements in place of the AcceptItem element.

The item identifier and change key have been shortened to preserve readability.

Accepting Meeting Request Elements


The following elements are used in the request:

CreateItem

Items (NonEmptyArrayOfAllItemsType)

AcceptItem

ReferenceItemId

Successful Accept Meeting response example

Description
The following example shows a successful response to the CreateItem request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="685" MinorBuildNumber="8"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<CreateItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items />

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</CreateItemResponse>

</soap:Body>

</soap:Envelope>

Successful response elements


The following elements are used in the response:

ServerVersionInfo

CreateItemResponse

ResponseMessages

CreateItemResponseMessage

ResponseCode

Items

Accept Meeting Error response example

Description
The following example shows an error response to CreateItem request. The error is
caused by an attempt to accept a meeting request that cannot be found in the
Exchange store.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="685" MinorBuildNumber="8"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<CreateItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Error">

<m:MessageText>The specified object was not found in the store.


</m:MessageText>

<m:ResponseCode>ErrorItemNotFound</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:Items />

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</CreateItemResponse>

</soap:Body>

</soap:Envelope>

Error response elements


The following elements are used in the error response:

ServerVersionInfo

CreateItemResponse

ResponseMessages

CreateItemResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

Items

See also
CreateItem operation

CreateItem operation (calendar item)


CreateItem operation (task)
Article • 03/29/2023 • 2 minutes to read

The CreateItem operation creates task items in the Exchange store.

Task CreateItem Request

Description
The following example of a CreateItem request shows how to create a task item in a
mailbox.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<CreateItem
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

MessageDisposition="SaveOnly">

<Items>

<t:Task>

<t:Subject>My task</t:Subject>

<t:DueDate>2006-10-26T21:32:52</t:DueDate>

<t:Status>NotStarted</t:Status>

</t:Task>

</Items>

</CreateItem>

</soap:Body>

</soap:Envelope>

Comments
Requests for recurring tasks are altered when they are received by the computer that is
running Microsoft Exchange Server 2007 that has the Client Access server role installed.
The following changes occur:
Only the date is saved for the StartDate (Recurrence) property of the recurrence
range of the task. The time part is truncated.

The StartDate (Recurrence) property may be adjusted, depending on the


recurrence pattern. For example, if the recurrence pattern is specified as every
Monday and the StartDate is set to October 26, 2006, which is a Thursday,
StartDate is adjusted to October 30, 2006, which is the next Monday.

If the StartDate property of the task is set, it is updated to match the StartDate
(Recurrence) of the recurrence range. The DueDate property of the task is also
updated based on the new StartDate.

If the StartDate is not set, only the DueDate property is updated to match the
StartDate (Recurrence) of the recurrence range.

The following table shows the changes that the Client Access server makes to a
recurring task that has a Task.Recurrence.Pattern of every Monday.

Changes to a recurring task

Property Original Value Updated Value

Task.StartDate January 1, 2006 October 30, 2006

Task.DueDate January 3, 2006 November 1, 2006

Task.Recurrence.Range.StartDate October 26, 2006 October 30, 2006

By default, if a destination folder is not specified, task items are created in the Tasks
folder.

Request elements
The following elements are used in the request:

CreateItem

Items (NonEmptyArrayOfAllItemsType)

Task

Subject

DueDate

Status
Successful Task CreateItem Response

Description
The following example shows a successful response to the CreateItem request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="653" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"/>

</soap:Header>

<soap:Body>

<CreateItemResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Task>

<t:ItemId Id="AAAtAE=" ChangeKey="EwAAABYA"/>

</t:Task>

</m:Items>

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</CreateItemResponse>

</soap:Body>

</soap:Envelope>

Successful response elements


The following elements are included in the response:

ServerVersionInfo

CreateItemResponse
ResponseMessages

CreateItemResponseMessage

ResponseCode

Items (NonEmptyArrayOfAllItemsType)

Task

ItemId

See also
CreateItem operation

Creating Tasks

Updating Tasks

Deleting Tasks
CreateItem operation (contact)
Article • 03/29/2023 • 2 minutes to read

The CreateItem operation is used to create contacts in the Exchange store.

Remarks
The creation of private distribution lists is not supported. All properties within the
CompleteName container are read-only and cannot be set on a contact item.

CreateItem request example

Description
The following example of a valid CreateItem SOAP request shows how to create a
contact in the default Contacts folder.

Code
XML

<soap:Envelope

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<CreateItem
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" >

<SavedItemFolderId>

<t:DistinguishedFolderId Id="contacts"/>

</SavedItemFolderId>

<Items>

<t:Contact>

<t:FileAs>SampleContact</t:FileAs>

<t:GivenName>Tanja</t:GivenName>

<t:CompanyName>Blue Yonder Airlines</t:CompanyName>

<t:EmailAddresses>

<t:Entry Key="EmailAddress1">[email protected]</t:Entry>

</t:EmailAddresses>

<t:PhysicalAddresses>

<t:Entry Key="Business">

<t:Street>1234 56th Ave</t:Street>

<t:City>La Habra</t:City>

<t:State>CA</t:State>

<t:CountryOrRegion>USA</t:CountryOrRegion>

</t:Entry>

</t:PhysicalAddresses>

<t:PhoneNumbers>

<t:Entry Key="BusinessPhone">4255550199</t:Entry>

</t:PhoneNumbers>

<t:JobTitle>Manager</t:JobTitle>

<t:Surname>Plate</t:Surname>

</t:Contact>

</Items>

</CreateItem>

</soap:Body>

</soap:Envelope>

Request elements
The following elements are used in the response:

CreateItem

SavedItemFolderId

DistinguishedFolderId

Items (NonEmptyArrayOfAllItemsType)

Contact

FileAs

GivenName

CompanyName

EmailAddresses

Entry (EmailAddress)

PhysicalAddresses

Entry (PhysicalAddress)

Street

City

State

CountryOrRegion
PhoneNumbers

Entry (PhoneNumber)

JobTitle

Surname

Successful CreateItem Request

Description
The following example shows a successful response to the CreateItem request that
created a contact. In this example, the response contains the identifier of the newly
created item.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="602" MinorBuildNumber="0"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<CreateItemResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Contact>
<t:ItemId Id="AAAtA=" ChangeKey="EQAAAB" />

</t:Contact>

</m:Items>

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</CreateItemResponse>

</soap:Body>

</soap:Envelope>

Comments
The item identifier has been shortened to preserve readability.

Successful response elements


The following elements are used in the response:

ServerVersionInfo

CreateItemResponse

ResponseMessages

CreateItemResponseMessage

ResponseCode

Items (NonEmptyArrayOfAllItemsType)

Contact

ItemId

Invalid CreateItem request example

Description
The following example shows a request that contains valid XML but incompatible
instructions. A contact cannot be created in a search folder.

Code
XML

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<CreateItem
xmlns='http://schemas.microsoft.com/exchange/services/2006/messages'>

<SavedItemFolderId>

<t:DistinguishedFolderId Id='searchfolders'/>

</SavedItemFolderId>

<Items>

<t:Contact>

<t:ItemClass>IPM.Contact</t:ItemClass>

</t:Contact>

</Items>

</CreateItem>

</soap:Body>

</soap:Envelope>

CreateItem (Contact) error response

Description
The following example shows an error response to a CreateItem (Contact) request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="602" MinorBuildNumber="0"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<CreateItemResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Error">

<m:MessageText>Cannot create a contact in a non-contact Folder.


</m:MessageText>

<m:ResponseCode>ErrorCannotCreateContactInNonContactFolder</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:Items />

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</CreateItemResponse>

</soap:Body>

</soap:Envelope>

Error response elements


The following elements are used in the error response:

ServerVersionInfo

CreateItemResponse

ResponseMessages

CreateItemResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

Items (NonEmptyArrayOfAllItemsType)

See also
CreateItem operation
CreateItem (AcceptSharingInvitation)
Article • 03/29/2023 • 2 minutes to read

The CreateItem operation is used to accept an invitation to share another user's


calendar or contacts data.

Accept Sharing Invitation request example

Description
The following example shows how to accept a sharing invitation.

Code
XML

<?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>

<CreateItem
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<Items
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<AcceptSharingInvitation
xmlns="http://schemas.microsoft.com/exchange/services/2006/types">

<ReferenceItemId Id="AAAlAFVzZ" ChangeKey="CwAAABYAA" />

</AcceptSharingInvitation>

</Items>

</CreateItem>

</soap:Body>

</soap:Envelope>

Request elements
The following elements are used in the request:

CreateItem

Items

AcceptSharingInvitation
ReferenceItemId

Comments
The item identifier and change key have been shortened to preserve readability.

Successful Accept Sharing Invitation response


example

Description
The following example shows a successful response to a CreateItem request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="11"

Version="Exchange2010"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<CreateItemResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items />

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</CreateItemResponse>

</soap:Body>

</soap:Envelope>

Successful response elements


The following elements are used in the response:

ServerVersionInfo

CreateItemResponse

ResponseMessages

CreateItemResponseMessage

ResponseCode

Items

Accept Sharing Invitation Error response


example

Description
The following example shows an error response to a CreateItem request. The error is
caused by an attempt to accept a sharing invitation that cannot be found in the
Exchange store.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="11"

Version="Exchange2010"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<CreateItemResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CreateItemResponseMessage ResponseClass="Error">

<m:MessageText>The specified object was not found in the store.


</m:MessageText>

<m:ResponseCode>ErrorItemNotFound</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:Items />

</m:CreateItemResponseMessage>

</m:ResponseMessages>

</CreateItemResponse>

</soap:Body>

</soap:Envelope>

Error response elements


The following elements are used in the error response:

ServerVersionInfo

CreateItemResponse

ResponseMessages

CreateItemResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

Items

See also
CreateItem operation
CreateManagedFolder operation
Article • 03/29/2023 • 2 minutes to read

The CreateManagedFolder operation creates a managed folder in the Exchange store.

Using the CreateManagedFolder Operation


The CreateManagedFolder operation adds a managed custom folder to a user's mailbox.
You can use the Exchange Management Shell Get-ManagedFolder cmdlet to find
available managed folders to add. Although this cmdlet returns both managed custom
folders and managed default folders, only managed custom folders can be added.
Managed custom folders are identified by the ManagedCustomFolder folder type. The
System.DirectoryServices namespace also includes types that can be used to discover
the names of available managed folders.

7 Note

You cannot use Exchange Web Services to find the names of available managed
folders to add to a mailbox.

You can use the FindFolder and GetFolder operations to access managed folders.
FindFolder is used to search for folders in a specified parent folder. This can be used so
that managed folders can be discovered in a folder before trying to add a duplicate
managed custom folder to the same directory. GetFolder is used after the FindFolder
operation to get more information about a managed custom folder.

Remarks
For information about how to set up messaging records management (MRM) policy, see
How to Create a Managed Folder Mailbox Policy .

For information about how to remove managed custom folders from a mailbox, see
Remove-ManagedFolder .

CreateManagedFolder request example

Description
The following example of a CreateManagedFolder request shows how to add a
managed folder named Test Managed Folder to a mailbox.

7 Note

You can also use delegate access to add managed custom folders.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<CreateManagedFolder
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<FolderNames>

<t:FolderName>Test Managed Folder</t:FolderName>

</FolderNames>

</CreateManagedFolder>

</soap:Body>

</soap:Envelope>

Request elements
The following elements are used in the request:

CreateManagedFolder

FolderNames

FolderName

To find other options for the request message of the CreateManagedFolder operation,
explore the schema hierarchy. Start at the CreateManagedFolder element.

Successful CreateManagedFolder Response

Description
The following code example shows a successful response to a CreateManagedFolder
request.

7 Note

The Id and ChangeKey attribute values have been shortened to preserve


readability.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="598" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"/>

</soap:Header>

<soap:Body>

<CreateManagedFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CreateManagedFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Folders>

<t:Folder>

<t:FolderId Id="AS0AdX=" ChangeKey="AACADA=="/>

</t:Folder>

</m:Folders>

</m:CreateManagedFolderResponseMessage>

</m:ResponseMessages>

</CreateManagedFolderResponse>

</soap:Body>

</soap:Envelope>

Successful response elements


The following elements are used in the response:
CreateManagedFolderResponse

ResponseMessages

CreateManagedFolderResponseMessage

ResponseCode

Folders

Folder

FolderId

To find other options for the response messages of the CreateManagedFolder


operation, explore the schema hierarchy. Start at the CreateManagedFolderResponse
element.

CreateManagedFolder error response

Description
The following code example shows an error response to a CreateManagedFolder
request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="598" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"/>

</soap:Header>

<soap:Body>

<CreateManagedFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:CreateManagedFolderResponseMessage ResponseClass="Error">

<m:MessageText>A specified managed folder already exists in the


mailbox.</m:MessageText>

<m:ResponseCode>ErrorManagedFolderAlreadyExists</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:Folders/>

</m:CreateManagedFolderResponseMessage>

</m:ResponseMessages>

</CreateManagedFolderResponse>

</soap:Body>

</soap:Envelope>

Error response elements


The following elements are used in the error response:

CreateManagedFolderResponse

ResponseMessages

CreateManagedFolderResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

Folders

See also
GetFolder operation

FindFolder operation

Finding Folders

Adding Managed Folders


CreateUserConfiguration operation
Article • 03/29/2023 • 2 minutes to read

The CreateUserConfiguration operation creates a user configuration object on a folder.

CreateUserConfiguration request example

Description
The following example of a CreateUserConfiguration request shows how to form a
request to create a user configuration object on the Drafts folder.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xs="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:CreateUserConfiguration>

<m:UserConfiguration>

<t:UserConfigurationName Name="TestConfig">

<t:DistinguishedFolderId Id="drafts">

</t:DistinguishedFolderId>

</t:UserConfigurationName>

<t:Dictionary>

<t:DictionaryEntry>

<t:DictionaryKey>

<t:Type>String</t:Type>

<t:Value>PhoneNumber</t:Value>

</t:DictionaryKey>

<t:DictionaryValue>

<t:Type>String</t:Type>

<t:Value>555-555-1111</t:Value>

</t:DictionaryValue>

</t:DictionaryEntry>

</t:Dictionary>

</m:UserConfiguration>

</m:CreateUserConfiguration>

</soap:Body>

</soap:Envelope>

CreateUserConfiguration response example

Description
The following example shows a successful response to the CreateUserConfiguration
request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="20"

Version="Exchange2010"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:CreateUserConfigurationResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:CreateUserConfigurationResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

</m:CreateUserConfigurationResponseMessage>

</m:ResponseMessages>

</m:CreateUserConfigurationResponse>

</s:Body>

</s:Envelope>

See also
EWS operations in Exchange

EWS XML elements in Exchange


DeleteAttachment operation
Article • 03/29/2023 • 2 minutes to read

The DeleteAttachment operation is used to delete file and item attachments from an
existing item in the Exchange store.

Remarks
This operation allows you to delete one or more attachments by ID.

DeleteAttachment request example

Description
The following example of a DeleteAttachment request shows how to delete an item
attachment.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<DeleteAttachment
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<AttachmentIds>

<t:AttachmentId Id="AAAtAEFkbWluaX"/>

</AttachmentIds>

</DeleteAttachment>

</soap:Body>

</soap:Envelope>

Comments
The attachment identifier has been shortened to preserve readability.
Request elements
The following elements are used in the request:

DeleteAttachment

AttachmentIds

AttachmentId

DeleteAttachment response example

Description
The following example shows a successful response to a DeleteAttachment request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="662" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"/>

</soap:Header>

<soap:Body>

<DeleteAttachmentResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:DeleteAttachmentResponseMessage
xsi:type="m:DeleteAttachmentResponseMessageType" ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootItemId RootItemId="AAAtAEFkbWluaXN..."
RootItemChangeKey="CQAAABYAA..."/>

</m:DeleteAttachmentResponseMessage>

</m:ResponseMessages>

</DeleteAttachmentResponse>

</soap:Body>

</soap:Envelope>

Comments
The CreateAttachment operation returns an element of AttachmentIdType type that
includes a RootItemId and RootItemChangeKey. These attributes are not permitted for
identifiers within a DeleteAttachment request. DeleteAttachment uses elements of type
RequestAttachmentIdType, which does not include these attributes.

The DeleteAttachment response includes the ID of the parent item. When attachments
are removed from an item, the item's change key is modified. The new item change key
can be obtained from the DeleteAttachment response.

7 Note

The RootItemId identifier and ChangeKey have been shortened to preserve


readability.

Successful response elements


The following elements are used in the response:

ServerVersionInfo

DeleteAttachmentResponse

ResponseMessages

DeleteAttachmentResponseMessage

ResponseCode

RootItemId

See also
CreateAttachment operation
GetAttachment operation
DeleteFolder operation
Article • 03/29/2023 • 2 minutes to read

The DeleteFolder operation deletes folders from a mailbox.

DeleteFolder request example

Description
This following example of a DeleteFolder request shows how to form a request to
delete a folder.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<DeleteFolder
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

DeleteType="HardDelete" >

<FolderIds>

<t:FolderId Id="AS4AUnVz=" />

</FolderIds>

</DeleteFolder>

</soap:Body>

</soap:Envelope>

Comments
This example performs a hard delete on the folder.

7 Note

The folder ID has been shortened to preserve readability.


Request elements
The following elements are used in the request:

DeleteFolder

FolderIds

FolderId

7 Note

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

To find other options for the request message of the DeleteFolder operation, explore
the schema hierarchy. Start at the DeleteFolder element.

Successful DeleteFolder response

Description
The following example shows a successful response to the DeleteFolder request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="595" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<DeleteFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:DeleteFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

</m:DeleteFolderResponseMessage>

</m:ResponseMessages>

</DeleteFolderResponse>

</soap:Body>

</soap:Envelope>

Response elements
The following elements are used in the response:

ServerVersionInfo

DeleteFolderResponse

ResponseMessages

DeleteFolderResponseMessage

ResponseCode

To find other options for the response message of the DeleteFolder operation, explore
the schema hierarchy. Start at the DeleteFolderResponse element.

DeleteFolder error response

Description
The following example shows an error response to a DeleteFolder request. The error
was caused by a request to delete a folder that was not present in the mailbox.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="595" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<DeleteFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:DeleteFolderResponseMessage ResponseClass="Error">

<m:MessageText>The specified object was not found in the store.


</m:MessageText>

<m:ResponseCode>ErrorItemNotFound</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:DeleteFolderResponseMessage>

</m:ResponseMessages>

</DeleteFolderResponse>

</soap:Body>

</soap:Envelope>

Comments
The DeleteFolder operation cannot be used on distinguished folders.

Error response elements


The following elements are used in the error response:

ServerVersionInfo

DeleteFolderResponse

ResponseMessages

DeleteFolderResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

To find other options for the error response message of the DeleteFolder operation,
explore the schema hierarchy. Start at the DeleteFolderResponse element.

See also
EWS XML elements in Exchange
Deleting Folders
DeleteItem operation
Article • 03/29/2023 • 2 minutes to read

The DeleteItem operation deletes items in the Exchange store.

7 Note

An error response that includes the ErrorCannotDeleteObject error code will be


returned for a DeleteItem operation when a delegate tries to delete an item in the
principal's mailbox by setting the DisposalType to MoveToDeletedItems. To delete
an item by moving it to the Deleted Items folder, a delegate must use the
MoveItem operation.

DeleteItem request example

Description
The following example of a DeleteItem request shows how to perform a hard delete of
an item from a mailbox.

7 Note

The item ID has been shortened to preserve readability.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<DeleteItem DeleteType="HardDelete"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ItemIds>

<t:ItemId Id="AS4AUn=="/>

</ItemIds>

</DeleteItem>

</soap:Body>

</soap:Envelope>

Request elements
The following elements are used in the request:

DeleteItem

ItemIds

ItemId

To find other options for the request message of the DeleteItem operation, explore the
schema hierarchy. Start at the DeleteItem element.

Successful DeleteItem response

Description
The following example shows a successful response to the DeleteItem request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="595" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<DeleteItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:DeleteItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

</m:DeleteItemResponseMessage>

</m:ResponseMessages>

</DeleteItemResponse>

</soap:Body>

</soap:Envelope>

Successful response elements


The following elements are used in the response:

ServerVersionInfo

DeleteItemResponse

ResponseMessages

DeleteItemResponseMessage

ResponseCode

To find other options for the response message of the DeleteItem operation, explore
the schema hierarchy. Start at the DeleteItemResponse element.

DeleteItem error response

Description
The following example shows an error response to a DeleteItem request. The error was
created because the operation tried to delete an item that was not found in the
Exchange store.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="595" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<DeleteItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:DeleteItemResponseMessage ResponseClass="Error">

<m:MessageText>The specified object was not found in the store.


</m:MessageText>

<m:ResponseCode>ErrorItemNotFound</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:DeleteItemResponseMessage>

</m:ResponseMessages>

</DeleteItemResponse>

</soap:Body>

</soap:Envelope>

Error response elements


The following elements are used in the error response:

ServerVersionInfo

DeleteItemResponse

ResponseMessages

DeleteItemResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

To find other options for the error response message of the DeleteItem operation,
explore the schema hierarchy. Start at the DeleteItemResponse element.

See also
EWS XML elements in Exchange
Deleting Contacts
Deleting E-mail Messages
Deleting Tasks
DeleteUserConfiguration operation
Article • 03/29/2023 • 2 minutes to read

The DeleteUserConfiguration operation deletes a user configuration object on a folder.

) Important

The DeleteUserConfiguration operation will trigger a move event for the event
notification system. The user configuration object will be moved to the dumpster.

DeleteUserConfiguration request example

Description
The following example of a DeleteUserConfiguration request shows how to form a
request to delete a user configuration object on the Drafts folder.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xs="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:DeleteUserConfiguration>

<m:UserConfigurationName Name="TestConfig">

<t:DistinguishedFolderId Id="drafts"/>

</m:UserConfigurationName>

</m:DeleteUserConfiguration>

</soap:Body>

</soap:Envelope>

DeleteUserConfiguration response example


Description
The following example shows a successful response to the DeleteUserConfiguration
request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="20"

Version="Exchange2010"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:DeleteUserConfigurationResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:DeleteUserConfigurationResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

</m:DeleteUserConfigurationResponseMessage>

</m:ResponseMessages>

</m:DeleteUserConfigurationResponse>

</s:Body>

</s:Envelope>

See also
EWS operations in Exchange
EWS XML elements in Exchange
DisableApp operation
Article • 03/29/2023 • 2 minutes to read

Find information about the DisableApp EWS operation.

The DisableApp operation disables a mail app for Outlook.

This operation was introduced in Exchange Server 2013.

Using the DisableApp operation


The DisableApp operation takes two arguments in the request that identify the mail app
to disable and the reason why it was disabled.

DisableApp operation SOAP headers


The DisableApp operation can use the SOAP headers that are listed in the following
table.

Header name Element Description

RequestVersion RequestServerVersion Identifies the schema version for the operation request.
This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

DisableApp operation request example: Disable


a mail app installed in a mailbox
The following example of a DisableApp operation request shows how to a disable a mail
app. The app identifier can be found in the app manifest that is returned in a
GetAppManifests operation response.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:MailboxCulture>en-US</t:MailboxCulture>

<t:TimeZoneContext>

<t:TimeZoneDefinition Id="GMT Standard Time"/>

</t:TimeZoneContext>

</soap:Header>

<soap:Body >

<m:DisableApp>

<m:ID>1C50226D-04B5-4AB2-9FCD-42E236B59E4B</m:ID>

<m:DisableReason>NoReason</m:DisableReason>

</m:DisableApp>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

DisableApp

ID (String)

DisableReason

Successful DisableApp operation response


The following example shows a successful response to a DisableApp operation request
to disable a mail app.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="556"

MinorBuildNumber="14"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<DisableAppResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

</DisableAppResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

DisableAppResponse

ResponseCode

DisableApp operation error response


The following example shows an error response to a DisableApp operation request. This
is a response to a request to disable a mail app that is not installed in a mailbox.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="556" MinorBuildNumber="14" Version="Exchange2013"
xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<DisableAppResponse ResponseClass="Error"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>Extension ID 1C50226D-04B5-4AB2-9FCD-42E236B59E4A
can't be found.</MessageText>

<ResponseCode>ErrorExtensionNotFound</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</DisableAppResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

DisableAppResponse

MessageText

ResponseCode

DescriptiveLinkKey
For additional error codes that are generic to EWS and specific to this operation, see
ResponseCode.

See also
EWS operations in Exchange
InstallApp operation
UninstallApp operation
GetAppManifests
GetAppMarketplaceUrl operation
Outlook add-ins
DisconnectPhoneCall operation
Article • 03/29/2023 • 2 minutes to read

The DisconnectPhoneCall operation terminates the telephone call.

DisconnectPhoneCall request example

Description
The following example of a DisconnectPhoneCall request shows how to form a request
to disconnect a telephone call.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xs="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:DisconnectPhoneCall>

<m:PhoneCallId Id="OWVl4NWb3N29t"/>

</m:DisconnectPhoneCall>

</soap:Body>

</soap:Envelope>

DisconnectPhoneCall response example

Description
The following example shows a successful response to the DisconnectPhoneCall
request.
Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="20"

Version="Exchange2010"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<DisconnectPhoneCallResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

</DisconnectPhoneCallResponse>

</s:Body>

</s:Envelope>

See also
EWS operations in Exchange
EWS XML elements in Exchange
EmptyFolder operation
Article • 03/29/2023 • 2 minutes to read

The EmptyFolder operation empties folders in a mailbox. Optionally, this operation


enables you to delete the subfolders of the specified folder. When a subfolder is
deleted, the subfolder and the messages within the subfolder are deleted.

EmptyFolder request example

Description
This following example of an EmptyFolder request shows how to form a request to
empty a folder. This example deletes all subfolders of the identified folder.

7 Note

The values of the Id and the ChangeKey attributes of the FolderId element have
been shortened for readability.

Code
XML

<soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version ="Exchange2010_SP1"/>

</soap:Header>

<soap:Body>

<m:EmptyFolder DeleteType="HardDelete" DeleteSubFolders="true">

<m:FolderIds>

<t:FolderId Id="AQMkADhhOGU0" ChangeKey="AQAAABYAAABsMB" />

</m:FolderIds>

</m:EmptyFolder>

</soap:Body>

</soap:Envelope>

Comments
This example performs a hard delete on the folder.

Folders can be identified by either the DistinguishedFolderId element or the FolderId


element for use in the FolderIds element.

Request elements
The following elements are used in the request:

EmptyFolder

FolderIds

FolderId

Successful EmptyFolder response

Description
The following example shows a successful response to the EmptyFolder request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="1"

MajorBuildNumber="164"

MinorBuildNumber="0"

Version="Exchange2010_SP1"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:EmptyFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:EmptyFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

</m:EmptyFolderResponseMessage>

</m:ResponseMessages>

</m:EmptyFolderResponse>

</s:Body>

</s:Envelope>

Successful response elements


The following elements are used in the response:

ServerVersionInfo

EmptyFolderResponse

ResponseMessages

EmptyFolderResponseMessage

ResponseCode

EmptyFolder error response

Description
The following example shows an error response to an Emptyfolder request. The error
was created because the operation tried to empty a folder that was not found in the
Exchange store.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="1"

MajorBuildNumber="164"

MinorBuildNumber="0"

Version="Exchange2010_SP1"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetFolderResponse

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetFolderResponseMessage ResponseClass="Error">

<m:MessageText>Id is malformed.</m:MessageText>

<m:ResponseCode>ErrorInvalidIdMalformed</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:Folders />
</m:GetFolderResponseMessage>

</m:ResponseMessages>

</m:GetFolderResponse>

</s:Body>

</s:Envelope>

Error response elements


The following elements are used in the response:

ServerVersionInfo

GetFolderResponse

ResponseMessages

GetFolderResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

Folders

See also
EWS XML elements in Exchange
ExpandDL operation
Article • 03/29/2023 • 4 minutes to read

The ExpandDL operation exposes the full membership of distribution lists.

Using the ExpandDL Web Method


The ExpandDL operation uses the Web service that is located in Exchange.asmx. This
Web service method accepts a Mailbox element that can contain either an EmailAddress
(NonEmptyStringType) child element for an expansion of a public distribution list or an
ItemId child element for the expansion of a private distribution list.

Public distribution lists can be expanded by using one of the following:

1. Distribution list alias

2. The Simple Mail Transfer Protocol (SMTP) address

3. X400

4. X500

5. Exchange Legacy address

6. The distribution list name

7. The display name

) Important

Display names are not unique. Multiple accounts can share the same display name.

Remarks
Recursive expansion is not supported. Only one distribution list can be expanded in a
single call. If more than one distribution list match the criteria, the Web service reports
an error. A client application can use ambiguous name resolution (ANR) to find
ambiguous distribution lists and then chose the correct e-mail address of the required
distribution list as a parameter for the ExpandDL operation. For more information, see
ResolveNames operation.
Public distribution lists are located in Active Directory. They can be any mail-enabled or
dynamic distribution group. The group should not be hidden from the address list and
each member should have a non-empty e-mail address. Members of the distribution list
can be mail-enabled users and contacts, public folders, and mail-enabled distribution
lists and dynamic groups.

Private distribution lists are located in the Contacts folder of a user's mailbox. Private
distribution lists do not have e-mail addresses so their store item identifiers are used in
an ExpandDL request. Members of a private distribution list can be any mail-enabled
user, contacts or distribution lists from Active Directory, or contacts or private
distribution lists from a user's Contacts folder.

For contacts or private distribution lists, the item identifiers are returned in the response.
This can be used to get information about the object or to expand membership in a
private distribution list.

ExpandDL Private Distribution List request


example

Description
The following example of an ExpandDL request shows how to form a request to expand
a private distribution list.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013_SP1" />

</soap:Header>

<soap:Body>

<m:ExpandDL>

<m:Mailbox>

<t:EmailAddress>test</t:EmailAddress>

</m:Mailbox>

</m:ExpandDL>

</soap:Body>

</soap:Envelope>

Comments
To expand a private distribution list, the Mailbox element will contain the ItemId element
that identifies a private distribution list in the user's mailbox.

ExpandDL Public Distribution List request


example

Description
The following example of an ExpandDL request shows how to form a request to expand
a public distribution list. The example shows the use of a display name to expand a
distribution list.

Code
XML

<?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>

<ExpandDL
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">

<t:Mailbox>

<t:EmailAddress>TheDistributionList</t:EmailAddress>

</t:Mailbox>

</ExpandDL>

</soap:Body>

</soap:Envelope>

Comments
The response to this request will contain Mailbox elements that identify each mailbox in
the distribution list. If a distribution list is contained within a distribution list, a separate
distribution list expansion must be performed on the embedded distribution list. If the
distribution list has no members or the requested distribution list does not exist, the
ResponseClass attribute will contain a value equal to Success.
Request elements
The following elements are used in the request:

ExpandDL

Mailbox

EmailAddress (NonEmptyStringType) is used to identify public distribution lists. The


ItemId element is used to identify private distribution lists.

7 Note

The schema that describes these elements is located in the EWS virtual directory of
the computer that is running MicrosoftExchange Server 2007 that has the Client
Access server role installed.

Successful ExpandDL response example

Description
The following example of an ExpandDL response shows a response to the request
described above. The distribution list expansion describes the following:

The number of members of the distribution list that are returned in the response.

Whether the response contains all the members of the distribution list.

The name of the mailbox.

The e-mail address of the mailbox.

The routing type for the mailbox.

The type of mailbox.

7 Note

The distribution list name is not included in the response; therefore, you must keep
track of the name from the request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"

MajorBuildNumber="628" MinorBuildNumber="0"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<ExpandDLResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:ExpandDLResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:DLExpansion TotalItemsInView="3"
IncludesLastItemInRange="true">

<t:Mailbox>
<t:Name>Dan Park</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Mailbox>

<t:Mailbox>
<t:Name>Jeff Price</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Mailbox>

<t:Mailbox>
<t:Name>Tanja Plate</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Mailbox>

</m:DLExpansion>

</m:ExpandDLResponseMessage>

</m:ResponseMessages>

</ExpandDLResponse>

</soap:Body>

</soap:Envelope>

Successful response elements


The following elements are used in the response:
ServerVersionInfo

ExpandDLResponse

ResponseMessages

ExpandDLResponseMessage

ResponseCode

DLExpansion

Mailbox

Name (EmailAddressType)

EmailAddress (NonEmptyStringType)

RoutingType (EmailAddressType)

MailboxType

To find other options for the response message of the ExpandDL operation, explore the
schema hierarchy. Start at the ExpandDLResponse element.

ExpandDL error response

Description
The following example shows an error response to an ExpandDL request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"

MajorBuildNumber="628" MinorBuildNumber="0"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<ExpandDLResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:ExpandDLResponseMessage ResponseClass="Error">

<m:MessageText>No results are found.</m:MessageText>

<m:ResponseCode>ErrorNameResolutionNoResults</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:ExpandDLResponseMessage>

</m:ResponseMessages>

</ExpandDLResponse>

</soap:Body>

</soap:Envelope>

Error response elements


The following elements are used in the error response:

ServerVersionInfo

ExpandDLResponse

ResponseMessages

ExpandDLResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

To find other options for the response message of the ExpandDL operation, explore the
schema hierarchy. Start at the ExpandDLResponse element.

See also
ResolveNames operation
EWS XML elements in Exchange
ExportItems operation
Article • 03/29/2023 • 2 minutes to read

The ExportItems operation exports items out of a mailbox.

ExportItems request example

Description
The following example of an ExportItems request shows how to form a request to get
three items exported from a mailbox.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010_SP1" />

</soap:Header>

<soap:Body>

<m:ExportItems>

<m:ItemIds>

<t:ItemId Id="AAMkAGYzZjZmRiUsidkC+NAAAAY89GAAA="/>

<t:ItemId Id="AAMkAGYzZjZmRiUsidkC+NAAAAY89FAAA="/>

<t:ItemId Id="AAMkAGYzZjZmRiUsidkC+NAAAAY87NAAA="/>

</m:ItemIds>

</m:ExportItems>

</soap:Body>

</soap:Envelope>

Comment
The item identifiers in the example have been shortened to preserve readability.

Request elements
The following elements are used in the request:

RequestServerVersion

ExportItems

ItemIds (NonEmptyArrayOfItemIdsType)

ItemId

Successful ExportItems response example

Description
The following example shows a successful response to an ExportItems request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<t:ServerVersionInfo MajorVersion="14"

MinorVersion="1"

MajorBuildNumber="139"

MinorBuildNumber="0"

Version="Exchange2010_SP1"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:ExportItemsResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:ExportItemsResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:ItemId Id="AAMkAGYzZjZmRiUsidkC+NAAAAY89GAAA="
ChangeKey="FwAAAA=="/>

<m:Data>

AQAAAAgAAAAAAAAALgBlAHgAdABlAHMAdAAuAG0AaQBjAHIAbwBzAG8AZgB0AC4A

YwBvAG0AAABTAE0AVABQAAAAVQBzAGUAcgAyAEAAYQB1AGoAaQBuAGcALQBkAG8AbQAuAGUA

eAB0AGUAcwB0AC4AbQBpAGMAcgBvAHMAbwBmAHQALgBjAG8AbQAAALCE/jlMAAAAVQBzAGUA

cgAyAEAAYQB1AGoAaQBuAGcALQBkAG8AbQAuAGUAeAB0AGUAcwB0AC4AbQBpAGMAcgBvAHMA

bwBmAHQALgBjAG8AbQAAAAMAADkAAAAAAwD+DwYAAAADAARAAwACQAMADkA=

</m:Data>

</m:ExportItemsResponseMessage>

<m:ExportItemsResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:ItemId Id="AAMkAGYzZjZmRiUsidkC+NAAAAY89FAAA="
ChangeKey="FwAAAA=="/>

<m:Data>

AQAAAAgAAAAAAAAAAQAAAAMAAAAYAAAAAQAAAAcDAgAAAAAAwAAAAAAAAEYAJACA

QAAyAAAh9SpR08oBAwAEQAMAFkANABMOAwAAQAMAIQ4AAAAAsIQSN0oAAAAyAGEAYgAxADYA

MQA2ADYALQBhAGUANQBkAC0ANAAyAGUAZgAtAGEANQA1ADkALQBjADgAOQAwADgANwBkADIA

MwBkADgANAAAAAMACzf/////AwAgDmQEAAADAPcPAAAAAEAABzBPMXstUdPKAUAACDBPMXst

UdPKAQMABTcFAAAAsIQONx4AAABtAGUAcwBzAGEAZwBlAC8AcgBmAGMAOAAyADIAAACwhAEw

IgAAAE0AbwBzAHQAIABmAGEAcwBjAGkAbgBhAHQAaQBuAGcAAAACAfkPBAAAAAAAAAADAAFA

FABKZ3QrAAAAZF2mAwAXAAEAAACwhBoAEgAAAEkAUABNAC4ATgBvAHQAZQAAAAMANgAAAAAA

sIQ3ACIAAABNAG8AcwB0ACAAZgBhAHMAYwBpAG4AYQB0AGkAbgBnAAAAQAA5AACq+za80coB

AgE7AGUAAABFWDovTz1GSVJTVCBPUkdBTklaQVRJT04vT1U9RVhDSEFOR0UgQURNSU5JU1RS

QVRJVkUgR1JPVVAgKEZZRElCT0hGMjNTUERMVCkvQ049UkVDSVBJRU5UUy9DTj1VU0VST05F

ALCEPQACAAAAAAACAUEAfgAAAAAAAADcp0DIwEIQGrS5CAArL+GCAQAAAAAAAAAvTz1GSVJT

VCBPUkdBTklaQVRJT04vT1U9RVhDSEFOR0UgQURNSU5JU1RSQVRJVkUgR1JPVVAgKEZZRElC

T0hGMjNTUERMVCkvQ049UkVDSVBJRU5UUy9DTj1VU0VST05FALCEQgAQAAAAVQB

</m:Data>

</m:ExportItemsResponseMessage>

<m:ExportItemsResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:ItemId Id="AAMkAGYzZjZmRiUsidkC+NAAAAY87NAAA="
ChangeKey="CQAAAA=="/>

<m:Data>

AQAAAAgAAAAAAAAAAQAAAAMAAAAYAAAAAQAAAAcDAgAAAAAAwAAAAAAAAEYAJACA

BAAAAAYAAAABDouAAAACAAAAEiAAAOSECEBbAAAAL089RklSU1QgT1JHQU5JWkFUSU9OL09V

PUVYQ0hBTkdFIEFETUlOSVNUUkFUSVZFIEdST1VQIChGWURJQk9IRjIzU1BETFQpL0NOPVJF

Q0lQSUVOVFMvQ049AAMAFwABAAAAsIQaABIAAABJAFAATQAuAE4AbwB0AGUAAAALACMAAAAL

ACkAAAADADYAAAAAALCENwAyAAAASQBuAHQAZQByAGUAcwB0AGkAbgBnACAALQAgAGYAcgBv

AG0AIABFAFcAUwBNAEEAAABAADkAAHZeFxfRygECATsAZQAAAEVYOi9PPUZJUlNUIE9SR0FO

SVpBVElPTi9PVT1FWENIQU5HRSBBRE1JTklTVFJBVElWRSBHUk9VUCAoRllESUJPSEYyM1NQ

RExUKS9DTj1SRUNJUElFTlRTL0NOPVVTRVJPTkUAsIQ9AAIAAAAAAAIBPwB+AAAAAAAAANyn

QMjAQhAatLkIACsv4YIBAAAAAAAAAC9PPUZJUlNUIE9SR0FOSVpBVElPTi9PVT1FWENIQU5H

</m:Data>

</m:ExportItemsResponseMessage>

</m:ResponseMessages>

</m:ExportItemsResponse>

</s:Body>

</s:Envelope>

Comment
The item identifiers and change keys in the example have been shortened to preserve
readability.

Response elements
The following elements are used in the response:

ServerVersionInfo

ExportItemsResponse

ResponseMessages

ExportItemsResponseMessage

ResponseCode

ItemId

Data (base64Binary)

ExportItems Error response example

Description
The following example shows a response to the ExportItems request that contains two
errors and one successfully exported item. The first item in the example is successfully
exported. The second item contains an incorrect change key. The third item represents
an attempt to export an item from the wrong mailbox.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="1"

MajorBuildNumber="164"

MinorBuildNumber="0"

Version="Exchange2010_SP1"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:ExportItemsResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:ExportItemsResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:ItemId Id="AAMkADhhOGU0oMf0GPIQeAAAAUC8iAABseAAAAUFZ7AAA="
ChangeKey="CQAAAA=="/>

<m:Data>

AQAAAAgAAAAAAAAALgBlAHgAdABlAHMAdAAuAG0AaQBjAHIAbwBzAG8AZgB0AC4A

YwBvAG0AAABTAE0AVABQAAAAVQBzAGUAcgAyAEAAYQB1AGoAaQBuAGcALQBkAG8AbQAuAGUA

eAB0AGUAcwB0AC4AbQBpAGMAcgBvAHMAbwBmAHQALgBjAG8AbQAAALCE/jlMAAAAVQBzAGUA

cgAyAEAAYQB1AGoAaQBuAGcALQBkAG8AbQAuAGUAeAB0AGUAcwB0AC4AbQBpAGMAcgBvAHMA

bwBmAHQALgBjAG8AbQAAAAMAADkAAAAAAwD+DwYAAAADAARAAwACQAMADkA=

</m:Data>

</m:ExportItemsResponseMessage>

<m:ExportItemsResponseMessage ResponseClass="Error">

<m:MessageText>The change key is invalid.</m:MessageText>

<m:ResponseCode>ErrorInvalidChangeKey</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:ExportItemsResponseMessage>

<m:ExportItemsResponseMessage ResponseClass="Error">

<m:MessageText>No mailbox with such guid.</m:MessageText>

<m:ResponseCode>ErrorNonExistentMailbox</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:MessageXml>

<t:Value Name="MailboxGuid">f3f6f699-2254-40ce-9994-
388d9d98419e</t:Value>

</m:MessageXml>

</m:ExportItemsResponseMessage>

</m:ResponseMessages>

</m:ExportItemsResponse>

</s:Body>

</s:Envelope>

Comments
The item identifiers, change keys, and data in the example have been shortened to
preserve readability.

Error response elements


The following elements are used in the error response:

ServerVersionInfo

ExportItemsResponse

ResponseMessages

ExportItemsResponseMessage

ResponseCode

ItemId

Data (base64Binary)

MessageText

DescriptiveLinkKey

MessageXml

Value

7 Note

The Value element does not exist in the schema. This element is valid because the
MessageXml element, in which the Value instance element occurs, can contain any
well-formed XML.

See also
UploadItems operation

EWS operations in Exchange

EWS XML elements in Exchange


FindConversation operation
Article • 03/29/2023 • 2 minutes to read

The FindConversation operation enumerates a list of conversations in a folder.

FindConversation request example

Description
The following example of a FindConversation request shows how to form a request to
find the first conversation in the Inbox folder.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010_SP1" />

</soap:Header>

<soap:Body>

<m:FindConversation>

<m:IndexedPageItemView BasePoint="Beginning" MaxEntriesReturned="1"


Offset="0"/>

<m:ParentFolderId>

<t:DistinguishedFolderId Id ="inbox"/>

</m:ParentFolderId>

</m:FindConversation>

</soap:Body>

</soap:Envelope>

Request elements
The following elements are used in the request:

RequestServerVersion
FindConversation

IndexedPageItemView

ParentFolderId

DistinguishedFolderId

Successful FindConversation response example

Description
The following example shows a successful response to a FindConversation request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="1"

MajorBuildNumber="91"

MinorBuildNumber="0"

Version="Exchange2010_SP1"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<FindConversationResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<Conversations>

<t:Conversation
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<t:ConversationId Id="AAQkADRlZDhjZDVlLzYtNDcyZi1i32hHpdc="/>

<t:ConversationTopic>Have you heard about EWS?


</t:ConversationTopic>

<t:UniqueRecipients>

<t:String>User1First User1Last</t:String>

</t:UniqueRecipients>

<t:GlobalUniqueRecipients>

<t:String>User2First User2Last</t:String>

<t:String>User1First User1Last</t:String>

</t:GlobalUniqueRecipients>

<t:UniqueSenders>

<t:String>User2First User2Last</t:String>

</t:UniqueSenders>

<t:GlobalUniqueSenders>

<t:String>User1First User1Last</t:String>

<t:String>User2First User2Last</t:String>

</t:GlobalUniqueSenders>

<t:LastDeliveryTime>2010-02-09T02:20:49Z</t:LastDeliveryTime>

<t:GlobalLastDeliveryTime>2010-02-
09T02:21:01Z</t:GlobalLastDeliveryTime>

<t:HasAttachments>false</t:HasAttachments>

<t:GlobalHasAttachments>false</t:GlobalHasAttachments>

<t:MessageCount>2</t:MessageCount>

<t:GlobalMessageCount>5</t:GlobalMessageCount>

<t:UnreadCount>0</t:UnreadCount>

<t:Size>6474</t:Size>

<t:GlobalSize>14497</t:GlobalSize>

<t:ItemClasses>

<t:ItemClass>IPM.Note</t:ItemClass>

</t:ItemClasses>

<t:GlobalItemClasses>

<t:ItemClass>IPM.Note</t:ItemClass>

</t:GlobalItemClasses>

<t:Importance>Normal</t:Importance>

<t:GlobalImportance>Normal</t:GlobalImportance>

<t:ItemIds>

<t:ItemId
Id="AAMkADRlZDhjZDVlLTU3qaTQvcFtnmUZQY2FuFP93qPtAAAADXWyAAA="
ChangeKey="CQAAAA=="/>

<t:ItemId
Id="AAMkADRlZDhjZDVFtnmUZQY2vcFtnmUZQY2FuFP93qPtAAAADXWxAAA="
ChangeKey="CQAAAA=="/>

</t:ItemIds>

<t:GlobalItemIds>

<t:ItemId
Id="AAMkADRlZDhCQvcFtnmADU5PAACQvcFtnmUZQsdfFPPtAAAADad4AAA="
ChangeKey="CQAAAA=="/>

<t:ItemId
Id="AAqaTXQvcFtnmUZQAADU5NAACQvcFmUZQY2FuFP93qPtAAAADXWyAAA="
ChangeKey="CQAAAA=="/>

<t:ItemId
Id="AAMkFtnmUZQY2FuFP93qPtAAAADU5vcFtY2FuFP93qPtAAAADad3AAA="
ChangeKey="CQAAAA=="/>

<t:ItemId
Id="AAMkLTU3YzQvcFtnmUZQY2FuFP93qPtnmU2FuFP93qPtAAAADXWxAAA="
ChangeKey="CQAAAA=="/>

<t:ItemId
Id="AAMkADlLTU3YzYtNDAAAAAB1aGnYmUZQY2FPAmUZQY2FuqPtAAd2AAA="
ChangeKey="CQAAAA=="/>

</t:GlobalItemIds>

</t:Conversation>

</Conversations>

</FindConversationResponse>

</s:Body>

</s:Envelope>

Comment
The item and conversation identifiers in the example have been shortened to preserve
readability.

Successful response elements


The following elements are used in the response:

ServerVersionInfo

FindConversationResponse

ResponseCode

Conversation (ConversationType)

ConversationId

ConversationTopic

UniqueRecipients

String

GlobalUniqueRecipients

UniqueSenders

GlobalUniqueSenders

LastDeliveryTime

GlobalLastDeliveryTime

HasAttachments

GlobalHasAttachments

MessageCount

GlobalMessageCount
UnreadCount

Size

GlobalSize

ItemClasses (ArrayOfItemClassType)

ItemClass

GlobalItemClasses

Importance

GlobalImportance

ItemIds

ItemId

GlobalItemIds

FindConversation Error response example

Description
The following example shows an error response to the FindConversation request that
was caused by a schema validation error.

Code

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Body>

<s:Fault>

<faultcode
xmlns:a="https://schemas.microsoft.com/exchange/services/2006/types">a:Error
SchemaValidation</faultcode>

<faultstring xml:lang="en-US">The request failed schema validation:


The 'Id' attribute is invalid - The value 'inbox1' is invalid according to
its datatype
'https://schemas.microsoft.com/exchange/services/2006/types:DistinguishedFol
derIdNameType' - The Enumeration constraint failed.</faultstring>

<detail>

<e:ResponseCode
xmlns:e="https://schemas.microsoft.com/exchange/services/2006/errors">ErrorS
chemaValidation</e:ResponseCode>

<e:Message
xmlns:e="https://schemas.microsoft.com/exchange/services/2006/errors">The
request failed schema validation.</e:Message>

<t:MessageXml
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<t:LineNumber>14</t:LineNumber>

<t:LinePosition>34</t:LinePosition>

<t:Violation>The 'Id' attribute is invalid - The value 'inbox1' is


invalid according to its datatype
'https://schemas.microsoft.com/exchange/services/2006/types:DistinguishedFol
derIdNameType' - The Enumeration constraint failed.</t:Violation>

</t:MessageXml>

</detail>

</s:Fault>

</s:Body>

</s:Envelope>

Error response elements


The following elements are used in the error response:

faultcode

faultstring

detail

ResponseCode

Message

MessageXml

LineNumber

LinePosition

Violation

See also
ApplyConversationAction operation

EWS operations in Exchange

EWS XML elements in Exchange


Conversations in EWS
FindFolder operation
Article • 03/29/2023 • 2 minutes to read

The FindFolder operation uses Exchange Web Services to find subfolders of an


identified folder and returns a set of properties that describe the set of subfolders.

FindFolder returns only the first 512 bytes of any streamable property. For Unicode, it
returns the first 255 characters by using a null-terminated Unicode string.

Deep traversal queries cannot be performed on public folders.

Restrictions are permitted and should use only the folder properties, not the item
properties. Sorting functionality is not available for FindFolder responses. Grouped
queries are not available for FindFolder queries.

[!NOTE}
The FindFolder operation is also used to find managed folders.

SOAP Headers
The FindFolder operation can use the SOAP headers that are listed and described in the
following table.

Header Element Description

Impersonation ExchangeImpersonation Identifies the user whom the client application is


impersonating.

MailboxCulture MailboxCulture Identifies the RFC3066 culture to be used to access


the mailbox.

RequestVersion RequestServerVersion Identifies the schema version for the operation


request.

ServerVersion ServerVersionInfo Identifies the version of the server that responded


to the request.

TimeZoneContext TimeZoneContext Identifies the time zone to be used for all


responses from the server.

FindFolder request example


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

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://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>

Using the Default value for the BaseShape, the response returns the folder name, the
folder ID, the number of subfolders, the number of child folders found in the folder, and
the count of unread items.

FindFolder request elements


This FindFolder request includes the following elements:

FindFolder
FolderShape
BaseShape
ParentFolderIds
DistinguishedFolderId

For additional FindFolder request elements, see the schema.

FindFolder response example


The following Simple Object Access Protocol (SOAP) body example shows a successful
response to the FindFolder request. The response contains the elements that are
returned when the Default value for the BaseShape is used.

7 Note

The folder ID and the change key have been shortened to preserve readability.
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="652" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<FindFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:FindFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder TotalItemsInView="1" IncludesLastItemInRange="true">

<t:Folders>
<t:Folder>

<t:FolderId Id="AQAnAH" ChangeKey="AQAAABY" />

<t:DisplayName>TestFolder</t:DisplayName>

<t:TotalCount>0</t:TotalCount>

<t:ChildFolderCount>0</t:ChildFolderCount>

<t:UnreadCount>0</t:UnreadCount>

</t:Folder>

</t:Folders>

</m:RootFolder>

</m:FindFolderResponseMessage>

</m:ResponseMessages>

</FindFolderResponse>

</soap:Body>

</soap:Envelope>

FindFolder response elements


The properties that are returned in the response are determined by the BaseShape and
the AdditionalProperties if they are used. A successful FindFolder response includes the
following elements:

ServerVersionInfo
FindFolderResponse
ResponseMessages
FindFolderResponseMessage
ResponseCode
RootFolder (FindItemResponseMessage)
Folders
Folder
FolderId
DisplayName (string)
TotalCount
ChildFolderCount
UnreadCount

FindFolder responses to a request with the AllProperties response shape will not return
the TotalCount and UnreadCount elements for public folder searches.

FindFolder Error response example


The following SOAP body example shows an error response that occurs when you
search for a folder that is identified by a malformed folder identifier.

XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="652" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<FindFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:FindFolderResponseMessage ResponseClass="Error">

<m:MessageText>Id is malformed.</m:MessageText>

<m:ResponseCode>ErrorInvalidIdMalformed</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:FindFolderResponseMessage>

</m:ResponseMessages>

</FindFolderResponse>

</soap:Body>

</soap:Envelope>

FindFolder error response elements


The FindFolder error response includes the following elements:

FindFolderResponse
ResponseMessages
MessageText
ResponseCode
DescriptiveLinkKey

Additional Information
The folder DisplayName (string) element is always included in the default shape.
The UnreadCount element is included in Tasks and Notes folders.
Use the PropertyTag value of 0x672D with a property type of Integer to identify a
managed folder by using the ExtendedFieldURI element.

See also
Finding Folders
FindItem operation
Article • 03/29/2023 • 4 minutes to read

Find information about the FindItem EWS operation.

The FindItem operation searches for items that are located in a user's mailbox. This
operation provides many ways to filter and format how search results are returned to
the caller.

Using the FindItem operation


The FindItem operation request provides many ways for you to search a mailbox and
format how the data is returned in a response. You can specify the following in a
FindItem request:

Whether the search is a shallow or soft-deleted traversal. Specifying this is


required. Note that a soft-deleted traversal combined with a search restriction will
result in zero items returned, even if there are items that match the search criteria.

The response shape of items. This identifies the properties that are returned in the
response. Specifying this is required.

The folders from which to perform the search. Specifying this is required.

The paging mechanism and view types for returning view data in pages. Specifying
this is optional.

Options for grouping and sorting the items that are returned. Specifying this is
optional.

Search restrictions or Advanced Query Syntax (AQS) strings for filtering the items
that are returned. For more information about using AQS for content index
searches, see QueryString (String). Specifying this is optional.

The sort order for items returned in the response. Specifying this is optional.

The FindItem operation returns only the first 512 bytes of any streamable property. For
Unicode, it returns the first 255 characters by using a null-terminated Unicode string. It
does not return any of the message body formats or the recipient lists. FindItem will
return a recipient summary. You can use the GetItem operation to get the details of an
item.
FindItem returns only the Name (EmailAddressType) element and does not return the
EmailAddress (NonEmptyStringType) element in the Mailbox element for the following
fields:

The From field for messages

The Sender field for messages

The Organizer field for calendar items

7 Note

The FindItem operation can return results in a CalendarView element. The


CalendarView element returns single calendar items and all occurrences of
recurring meetings. If a CalendarView element is not used, single calendar items
and recurring master calendar items are returned. The occurrences must be
expanded from the recurring master if a CalendarView element is not used.

The FindItem operation can use the SOAP headers that are listed in the following table.

Table 1. FindItem operation SOAP headers

Header Element Description

DateTimePrecision DateTimePrecision
Specifies the resolution of data/time values in
responses from the server, either in seconds or in
milliseconds. This is applicable to a request.

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This is applicable to a request.

MailboxCulture
MailboxCulture Identifies the RFC3066 culture to be used to
access the mailbox. This is applicable to a
request.

RequestVersion
RequestServerVersion
Identifies the schema version for the operation
request. This is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that
responded to the request. This is applicable to a
response.

TimeZoneContext
TimeZoneContext
Identifies the time zone to be used for all
responses from the server. This is applicable to a
request.
FindItem operation request example
The following example of a FindItem request shows how to obtain the item identifier
that is defined by the IdOnly enumeration of the BaseShape element for items that are
found in the Deleted Items folder.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<FindItem
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

Traversal="Shallow">

<ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

</ItemShape>

<ParentFolderIds>
<t:DistinguishedFolderId Id="deleteditems"/>

</ParentFolderIds>

</FindItem>

</soap:Body>

</soap:Envelope>

The following elements are used in the request:

FindItem

ItemShape

BaseShape

ParentFolderIds

DistinguishedFolderId

For more options for a FindItem request message, explore the schema hierarchy. Start at
the FindItem element.

Successful FindItem operation response


The following example shows a successful response to the FindItem request.
Message elements represent email messages and all other items that are not strongly
typed by the EWS schema. Items such as IPM.Sharing and IPM.InfoPath are returned as
Message elements. Exchange does not return the base Item element in responses.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="595" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<FindItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:FindItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder TotalItemsInView="10"
IncludesLastItemInRange="true">

<t:Items>

<t:Message>

<t:ItemId Id="AS4AUn=" ChangeKey="fsVU4==" />

</t:Message>

<t:Message>

<t:ItemId Id="AS4AUM=" ChangeKey="fsVUA==" />

</t:Message>

</t:Items>

</m:RootFolder>

</m:FindItemResponseMessage>

</m:ResponseMessages>

</FindItemResponse>

</soap:Body>

</soap:Envelope>

The following elements are used in the response:

ServerVersionInfo

FindItemResponse

ResponseMessages
FindItemResponseMessage

ResponseCode

RootFolder (FindItemResponseMessage)

Items

Message

ItemId

For more options for a FindItem response message, explore the schema hierarchy. Start
at the FindItemResponse element.

FindItem operation error response


The following example shows an error response to a FindItem request.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="595" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<FindItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:FindItemResponseMessage ResponseClass="Error">

<m:MessageText>Id is malformed.</m:MessageText>

<m:ResponseCode>ErrorInvalidIdMalformed</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:FindItemResponseMessage>

</m:ResponseMessages>

</FindItemResponse>

</soap:Body>

</soap:Envelope>

The following elements are used in the error response:


ServerVersionInfo

FindItemResponse

ResponseMessages

FindItemResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

For more options for a FindItem error response message, explore the schema hierarchy.
Start at the FindItemResponse element.

Version differences
Versions of Exchange starting with major version 15 and ending with build 15.0.898.11
return an ErrorInvalidOperation value in the ResponseCode element when the FindItem
operation is used to search multiple folders in an archive mailbox.

See also
Finding Items

EWS XML elements in Exchange

FindItemType
FindMessageTrackingReport operation
Article • 03/29/2023 • 2 minutes to read

The FindMessageTrackingReport operation finds messages that meet the specified


criteria.

See also
EWS operations in Exchange

EWS XML elements in Exchange


FindPeople operation
Article • 03/29/2023 • 2 minutes to read

Find information about the FindPeople EWS operation.

The FindPeople operation returns all persona objects from a specified Contacts folder or
retrieves contacts that match a specified query string.

This operation was introduced in Exchange Server 2013.

Using the FindPeople operation


The FindPeople operation returns aggregated contact information.

The FindPeople operation builds on the existing functionality of the Restriction and
BaseShape complex types by adding an aggregation restriction and the ability to return
additional properties. By using a restriction, a client can specify filters such as "only
return results that have an IM address". The default search behavior targets both the
specified user's personal mailbox and the global address list (GAL). When searching the
GAL as the primary search folder, you must specify a query string instead of a restriction,
because this operation does not allow for browsing of the GAL.

FindPeople operation SOAP headers


The FindPeople operation can use the SOAP headers that are listed in the following
table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

FindPeople operation request example


The following example of a FindPeople operation request shows how to return the first
100 contacts from the Contacts folder.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:FindPeople>

<m:IndexedPageItemView BasePoint="Beginning"
MaxEntriesReturned="100" Offset="0"/>

<m:ParentFolderId>

<t:DistinguishedFolderId Id="contacts"/>

</m:ParentFolderId>

</m:FindPeople>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

FindPeople

IndexedPageItemView

ParentFolderId (TargetFolderIdType)

DistinguishedFolderId

The following example of a FindPeople operation request shows how to return the first
100 contacts from the GAL by using a query string. Setting the DistinguishedFolderId to
"directory" will search the GAL as the primary source of personas.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:FindPeople>

<m:PersonaShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="persona:DisplayName"/>

<t:FieldURI FieldURI="persona:Title"/>

</t:AdditionalProperties>

</m:PersonaShape>
<m:IndexedPageItemView BasePoint="Beginning" MaxEntriesReturned="100"
Offset="0"/>

<m:ParentFolderId>

<t:DistinguishedFolderId Id="directory"/>

</m:ParentFolderId>

<m:QueryString>adams</m:QueryString>

</m:FindPeople>

</soap:Body>

</soap:Envelope>

Successful FindPeople operation response


The following example shows a successful response to a FindPeople operation request.

XML

<?xml version="1.0" encoding="utf-8"?><s:Envelope

xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="349"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<FindPeopleResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<People>

<Persona
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<PersonaId
Id="AAQkAGQ1MjJjMTBkLTc4Y2UtNDA5Ny04ZjU5LWI3MTYzNGNkZmRkYQAQAOjFqObcLmtOlzlR
nHdXQjo=" />

<CreationTime>2012-01-11T22:25:37Z</CreationTime>

<DisplayName>Terry Adams</DisplayName>

<DisplayNameFirstLast>Terry Adams</DisplayNameFirstLast>

<DisplayNameLastFirst>Adams Terry</DisplayNameLastFirst>

<FileAs>Adams, Terry</FileAs>

<GivenName>Terry</GivenName>

<Surname>Adams</Surname>

<EmailAddress>

<Name>[email protected]</Name>

<EmailAddress>[email protected]</EmailAddress>

<RoutingType>SMTP</RoutingType>

</EmailAddress>

<EmailAddresses>

<EmailAddress>

<Name>[email protected]</Name>

<EmailAddress>[email protected]</EmailAddress>

<RoutingType>SMTP</RoutingType>

</EmailAddress>

<EmailAddress>

<Name>[email protected]</Name>

<EmailAddress>[email protected]</EmailAddress>

<RoutingType>SMTP</RoutingType>

</EmailAddress>

</EmailAddresses>

<RelevanceScore>2147483647</RelevanceScore>

</Persona>

</People>

<TotalNumberOfPeopleInView>1</TotalNumberOfPeopleInView>

</FindPeopleResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

FindPeopleResponse

ResponseCode

People

Persona

PersonaId

CreationTime

DisplayName (string)

DisplayNameFirstLast

DisplayNameLastFirst
FileAs

GivenName

Surname

EmailAddresses (ArrayOfEmailAddressesType)

EmailAddress (EmailAddressType)

Name (EmailAddressType)

EmailAddress (EmailAddressType)

RoutingType (EmailAddressType)

RelevanceScore

TotalNumberOfPeopleInView

FindPeople operation error response


For error codes that are generic to EWS, see ResponseCode.

See also
People and contacts in EWS in Exchange

GetPersona operation
GetAppManifests operation
Article • 03/29/2023 • 2 minutes to read

Find information about the GetAppManifests EWS operation.

The GetAppManifests operation retrieves app manifests.

This operation was introduced in Exchange Server 2013.

Using the GetAppManifests operation


The GetAppManifests operation does not take any arguments to request the app
manifests for a mailbox. The response will contain base64-encoded XML manifest files
for each app that is installed in a mailbox.

GetAppManifests operation SOAP headers


The GetAppManifests operation can use the SOAP headers that are listed in the
following table.

Header name Element Description

RequestVersion RequestServerVersion Identifies the schema version for the operation request.
This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

GetAppManifests operation request example:


Get the app manifests for a mailbox
The following example of a GetAppManifests operation request shows how to get the
app manifests for a mailbox. The ApiVersionSupported element and the
SchemaVersionSupported element are optional.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013_SP1" />

<t:MailboxCulture>en-US</t:MailboxCulture>

<t:TimeZoneContext>

<t:TimeZoneDefinition Id="GMT Standard Time"/>

</t:TimeZoneContext>

</soap:Header>

<soap:Body >

<m:GetAppManifests>

<m:ApiVersionSupported>1.1</m:ApiVersionSupported>

<m:SchemaVersionSupported>1.1</m:SchemaVersionSupported>

</m:GetAppManifests>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following element:

GetAppManifests

ApiVersionSupported

SchemaVersionSupported

Successful GetAppManifests operation


response
The following example shows a successful response to a GetAppManifests operation
request to get the app manifests for a mailbox.

7 Note

All base64 app manifests have been arbitrarily truncated to preserve readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="918"

MinorBuildNumber="07"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetAppManifestsResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<m:Apps
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<t:App
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<t:Manifest>WNlQXBwPg==</t:Manifest>

</t:App>

</m:Apps>

</GetAppManifestsResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

GetAppManifestsResponse

ResponseCode

Apps

App

Manifest

The response SOAP body can also contain the following element:

Manifests

GetAppManifests operation error response


Errors returned for this operation are related to an invalid format of the input
parameters or are generic EWS errors. For error codes that are generic to EWS and
specific to this operation, see ResponseCode.

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="918"

MinorBuildNumber="07"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<GetAppManifestsResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>The apiVersionSupported parameter is invalid.

It should be in the form of major version, minor

version, separated by '.', for example '2.34'.


</MessageText>

<ResponseCode>ErrorInvalidRequest</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</GetAppManifestsResponse>

</s:Body>

</s:Envelope>

See also
EWS operations in Exchange

DisableApp operation

InstallApp operation

UninstallApp operation

GetAppMarketplaceUrl operation
GetAppMarketplaceUrl operation
Article • 03/29/2023 • 2 minutes to read

Find information about the GetAppMarketplaceUrl EWS operation.

The GetAppMarketplaceUrl operation retrieves the URL for the app marketplace that a
client can visit to acquire apps to install in a mailbox.

This operation was introduced in Exchange Server 2013.

Using the GetAppMarketplaceUrl operation


The GetAppMarketplaceUrl operation does not take any arguments to request the URL
for the marketplace from which a client can install apps. The response will contain a URL
to the app marketplace.

GetAppMarketplaceUrl operation SOAP headers


The GetAppMarketplaceUrl operation can use the SOAP headers that are listed in the
following table.

Header name Element Description

RequestVersion RequestServerVersion Identifies the schema version for the operation request.
This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

GetAppMarketplaceUrl operation request


example: Get the app marketplace URL for a
mailbox
The following example of a GetAppMarketplaceUrl operation request shows how to get
the app marketplace URL for a mailbox.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013_SP1" />

<t:MailboxCulture>en-US</t:MailboxCulture>

<t:TimeZoneContext>

<t:TimeZoneDefinition Id="GMT Standard Time"/>

</t:TimeZoneContext>

</soap:Header>

<soap:Body >

<m:GetAppMarketplaceUrl>

<m:ApiVersionSupported>1.0</m:ApiVersionSupported>

<m:SchemaVersionSupported>1.0</m:SchemaVersionSupported>

</m:GetAppMarketplaceUrl>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

GetAppMarketplaceUrl

ApiVersionSupported

SchemaVersionSupported

Successful GetAppMarketplaceUrl operation


response
The following example shows a successful response to a GetAppMarketplaceUrl
operation request to get the app marketplace URL for a mailbox.

7 Note

The app marketplace URL has been altered to preserve readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="918"

MinorBuildNumber="7"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetAppMarketplaceUrlResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<AppMarketplaceUrl>http://marketplace.contoso.com</AppMarketplaceUrl>

</GetAppMarketplaceUrlResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

GetAppMarketplaceUrlResponse

ResponseCode

AppMarketplaceUrl

GetAppMarketPlaceUrl operation error


response
Errors returned for this operation are either related to an incorrect service configuration
or are generic EWS errors. For error codes that are generic to EWS and specific to this
operation, see ResponseCode.

The following example shows an error response that is returned when external Exchange
Control Panel (ECP) is not configured.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="918"

MinorBuildNumber="7"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetAppMarketplaceUrlResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>Cannot get external ECP URL. This might happen if


external ECP URL isn't configured.</MessageText>

<ResponseCode>ErrorCannotGetExternalEcpUrl</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</GetAppMarketplaceUrlResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

GetAppMarketplaceUrlResponse

MessageText

ResponseCode

DescriptiveLinkKey

See also
EWS operations in Exchange

DisableApp operation

InstallApp operation

UninstallApp operation

GetAppManifests operation
GetAttachment operation
Article • 03/29/2023 • 2 minutes to read

The GetAttachment operation is used to retrieve existing attachments on items in the


Exchange store.

GetAttachment request example

Description
The following example of GetAttachment request shows how to get an attachment.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<GetAttachment
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<AttachmentShape/>

<AttachmentIds>

<t:AttachmentId Id="AAAtAEFkbWluaX..."/>

</AttachmentIds>

</GetAttachment>

</soap:Body>

</soap:Envelope>

Comments
The AttachmentShape element allows you to specify which attachment information
should be returned. An empty AttachmentShape element is valid and will render your
attachments without MIME content for item attachments, with a text body type, and
without any additional properties.

The AttachmentIds collection allows you to specify one or more attachment identifiers
to return. Note that these are of type RequestAttachmentIdType, so any AttachmentIds
that you receive from CreateAttachment must have the RootItemId and
RootItemChangeKey attributes removed before passing them to GetAttachment.

7 Note

The attachment identifier and change key have been shortened to preserve
readability.

Request elements
The following elements are used in the request:

GetAttachment

AttachmentShape

AttachmentIds

AttachmentId (GetAttachment and DeleteAttachment)

GetAttachment response example

Description
The following example shows a successful response to a GetAttachment request. This
example returns a file attachment.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="662" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"/>

</soap:Header>

<soap:Body>

<GetAttachmentResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetAttachmentResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Attachments>

<t:FileAttachment>

<t:AttachmentId Id="AAAtAEFkbWluaX..."/>

<t:Name>SomeFile</t:Name>

<t:Content>AQIDBAU=</t:Content>

</t:FileAttachment>

</m:Attachments>

</m:GetAttachmentResponseMessage>

</m:ResponseMessages>

</GetAttachmentResponse>

</soap:Body>

</soap:Envelope>

Comments
The response messages for GetAttachment will always contain the full attachment; that
is, all properties will always be included. For file attachments, those properties are Name
(AttachmentType), ContentType, ContentId, ContentLocation, and Content. For item
attachments, those properties are Name (AttachmentType), ContentType, ContentId,
ContentLocation and all of the item's properties, as if the AllProperties shape had been
used in a GetItem call. The AttachmentShape element, if present, will allow a consumer
application to request additional extended properties for item attachments.

Successful response elements


The following elements are used in the response:

ServerVersionInfo

GetAttachmentResponse

ResponseMessages

GetAttachmentResponseMessage

ResponseCode

Attachments

FileAttachment
AttachmentId (GetAttachment and DeleteAttachment)

Name (AttachmentType)

Content

See also
CreateAttachment operation

DeleteAttachment operation
GetClientAccessToken operation
Article • 03/29/2023 • 2 minutes to read

Find information about the GetClientAccessToken EWS operation.

The GetClientAccessToken operation gets a client access token for a mail app for
Outlook.

This operation was introduced in Exchange Server 2013.

Using the GetClientAccessToken operation


The GetClientAccessToken operation request takes two required arguments: the
identifier of the app, and the token type. You can use the GetAppManifests operation to
request the app identifier.

GetClientAccessToken operation SOAP headers


The GetClientAccessToken operation can use the SOAP headers that are listed in the
following table.

Header name Element Description

RequestVersion RequestServerVersion Identifies the schema version for the operation request.
This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

GetClientAccessToken operation request


example: Get a caller identity token
The following example of a GetClientAccessToken operation request shows how to get
a caller identity token for an app.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body >

<m:GetClientAccessToken>

<m:TokenRequests>

<t:TokenRequest>

<t:Id>1C50226D-04B5-4AB2-9FCD-42E236B59E4B</t:Id>

<t:TokenType>CallerIdentity</t:TokenType>

</t:TokenRequest>

</m:TokenRequests>

</m:GetClientAccessToken>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

GetClientAccessToken

TokenRequests

TokenRequest

ID (String)

TokenType

Successful GetClientAccessToken operation


response
The following example shows a successful response to a GetClientAccessToken
operation request to get a caller identity token for an app.

7 Note

The token values in this article have been shortened to preserve readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="556"

MinorBuildNumber="14"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:GetClientAccessTokenResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetClientAccessTokenResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Token>

<t:Id>1C50226D-04B5-4AB2-9FCD-42E236B59E4B</t:Id>

<t:TokenType>CallerIdentity</t:TokenType>

<t:TokenValue>eyJ0eXAmv0QitaJg</t:TokenValue>

<t:TTL>479</t:TTL>

</m:Token>

</m:GetClientAccessTokenResponseMessage>

</m:ResponseMessages>

</m:GetClientAccessTokenResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

GetClientAccessTokenResponse

ResponseMessages

GetClientAccessTokenResponseMessage

ResponseCode

Token (ClientAccessTokenType)

ID (String)

TokenType (ClientAccessTokenType)

TokenValue

TTL (ClientAccessTokenTypeType)
GetClientAccessToken operation error response
The following example shows an error response to a GetClientAccessToken operation
request. This is a response to a request to get an extension callback token without the
appropriate permissions.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="556"

MinorBuildNumber="14"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:GetClientAccessTokenResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetClientAccessTokenResponseMessage ResponseClass="Error">

<m:MessageText>The caller does not have enough permission for


this token request.</m:MessageText>

<m:ResponseCode>ErrorInvalidClientAccessTokenRequest</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:GetClientAccessTokenResponseMessage>

</m:ResponseMessages>

</m:GetClientAccessTokenResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

GetClientAccessTokenResponse

ResponseMessages

GetClientAccessTokenResponseMessage
MessageText

ResponseCode

DescriptiveLinkKey

For additional error codes that are generic to EWS and specific to this operation, see
ResponseCode.

See also
EWS operations in Exchange

GetAppManifests operation

Outlook add-ins
GetConversationItems operation
Article • 03/29/2023 • 3 minutes to read

Find information about the GetConversationItems operation.

The GetConversationItems operation gets one or more sets of items that are organized
in to nodes in a conversation.

This operation was introduced in Exchange Server 2013.

Using the GetConversationItems operation


You can use the GetConversationItems operation to get items in conversations for both
primary and archive mailboxes.

GetConversationItems operation SOAP headers


The GetConversationItems operation can use the SOAP headers that are listed in the
following table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. The minimum value for this element is
Exchange2013. This header is applicable to a
request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

GetConversationItems operation request


example: Get items in a single conversation
The following example of a GetConversationItems operation request shows how to get
all conversation items in a single conversation, with the exception of items located in the
Deleted Items and Drafts folders. Each item returned in the response will contain an
item identifier, a subject, and the time that the item was received in the mailbox.
7 Note

All item identifiers and change keys in this article have been shortened to preserve
readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:GetConversationItems>

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

<t:FieldURI FieldURI="item:DateTimeReceived" />

</t:AdditionalProperties>

</m:ItemShape>
<m:FoldersToIgnore>

<t:DistinguishedFolderId Id="deleteditems" />

<t:DistinguishedFolderId Id="drafts" />

</m:FoldersToIgnore>

<m:SortOrder>TreeOrderDescending</m:SortOrder>

<m:Conversations>

<t:Conversation>

<t:ConversationId Id="AAQkADEzOTExYjJkakJCs=" />

</t:Conversation>

</m:Conversations>

</m:GetConversationItems>

</soap:Body>

</soap:Envelope>

This example of a GetConversationItems request does not include the following


options:

The MaxItemsToReturn element, which sets the maximum number of items to


return in the response.

The MailboxScope element, which sets the mailbox scope by indicating whether
the GetConversationItems operation is to be performed on the primary mailbox,
the archive mailbox, or both mailboxes.
The SyncState (base64Binary) element, which sets the synchronization state to only
get conversation items that are new or updated in the conversation. This element
is set for each conversation.

The request SOAP body contains the following elements:

GetConversationItems

ItemShape

BaseShape

AdditionalProperties

FieldURI

FoldersToIgnore

DistinguishedFolderId

SortOrder (ConversationNodeSortOrder)

Conversations

Conversation (ConversationRequestType)

ConversationId

Successful GetConversationItems operation


response
The following example shows a successful response to a GetConversationItems
operation request to get items in a single conversation.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="545"

MinorBuildNumber="11"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:GetConversationItemsResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetConversationItemsResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Conversation>

<t:ConversationId Id="AAQkADEzOTExYjJkakJCs=" />

<t:SyncState>AQIAAABNVkUwAgIAAABhHqHUAwIAAABNVkUxBAIAAABhHqHfBAIAAABhHqHV</t
:SyncState>

<t:ConversationNodes>

<t:ConversationNode>

<t:InternetMessageId>[email protected]</t:Interne
tMessageId>

<t:ParentInternetMessageId>[email protected]</t:P
arentInternetMessageId>

<t:Items>

<t:Message>

<t:ItemId Id="AAMkADEzOTQrAABhHqHfAAA="
ChangeKey="CQAAABYAAACYAABhPpaq" />

<t:Subject>RE: Daily issue scrub</t:Subject>

<t:DateTimeReceived>2012-10-
30T18:42:27Z</t:DateTimeReceived>

</t:Message>

</t:Items>

</t:ConversationNode>

<t:ConversationNode>

<t:InternetMessageId>[email protected]</t:Interne
tMessageId>

<t:ParentInternetMessageId>[email protected]</t:P
arentInternetMessageId>

<t:Items>

<t:Message>

<t:ItemId Id="AAMkADEzOTExYjJkLTYxZDAt"
ChangeKey="CQAAABQrAABhPpaP" />

<t:Subject>RE: Daily issue scrub</t:Subject>

<t:DateTimeReceived>2012-10-
30T17:38:26Z</t:DateTimeReceived>

</t:Message>

</t:Items>

</t:ConversationNode>

<t:ConversationNode>

<t:InternetMessageId>[email protected]</t:Interne
tMessageId>

<t:ParentInternetMessageId>[email protected]</t:P
arentInternetMessageId>

<t:Items>

<t:Message>

<t:ItemId Id="AAMkADEzOTFNVkUxAAA="
ChangeKey="CQAAABY4QrAABhPvYK" />

<t:Subject>RE: Daily issue scrub</t:Subject>

<t:DateTimeReceived>2012-10-
30T17:37:00Z</t:DateTimeReceived>

</t:Message>

</t:Items>

</t:ConversationNode>

<t:ConversationNode>

<t:InternetMessageId>[email protected]</t:Interne
tMessageId>

<t:ParentInternetMessageId>[email protected]</t:P
arentInternetMessageId>

<t:Items>

<t:Message>

<t:ItemId Id="AAMkm4QrAABhHqHUAAA="
ChangeKey="CQAAABQrAABhPpaN" />

<t:Subject>RE: Daily issue scrub</t:Subject>

<t:DateTimeReceived>2012-10-
30T17:37:05Z</t:DateTimeReceived>

</t:Message>

</t:Items>

</t:ConversationNode>

<t:ConversationNode>

<t:InternetMessageId>[email protected]</t:Interne
tMessageId>

<t:Items>

<t:Message>

<t:ItemId Id="AAMkArAABNVkUwAAA="
ChangeKey="CQAAABm4QrAABhPvYJ" />

<t:Subject>Daily issue scrub</t:Subject>

<t:DateTimeReceived>2012-10-
30T17:36:00Z</t:DateTimeReceived>

</t:Message>

</t:Items>

</t:ConversationNode>

</t:ConversationNodes>

</m:Conversation>

</m:GetConversationItemsResponseMessage>

</m:ResponseMessages>

</m:GetConversationItemsResponse>

</s:Body>

</s:Envelope>

We recommend that you save the SyncState for subsequent GetConversationItems


operation requests.

The response SOAP body contains the following elements:

GetConversationItemsResponse

ResponseMessages

GetConversationItemsResponseMessage

ResponseCode

Conversation (ConversationResponseType)

ConversationId

SyncState (base64Binary)

ConversationNodes

ConversationNode

InternetMessageId

Items (NonEmptyArrayOfAllItemsType)

Message

ItemId

Subject

DateTimeReceived

GetConversationItems operation error response


The following example shows an error response to a GetConversationItems operation
request to get items in a conversation that either no longer exists in the mailbox, or for
which all the conversation items are located in folders that are ignored.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="556" MinorBuildNumber="8" Version="Exchange2013"
xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetConversationItemsResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetConversationItemsResponseMessage ResponseClass="Error">

<m:MessageText>The specified object was not found in the store.


</m:MessageText>

<m:ResponseCode>ErrorItemNotFound</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:GetConversationItemsResponseMessage>

</m:ResponseMessages>

</m:GetConversationItemsResponse>

</s:Body>

</s:Envelope>

See also
EWS operations in Exchange

ApplyConversationAction operation

FindConversation operation
GetDelegate operation
Article • 03/29/2023 • 2 minutes to read

The GetDelegate operation retrieves the delegate settings for a specified mailbox.

SOAP Headers
The GetDelegate operation can use the SOAP headers that are listed and described in
the following table.

Header Element Description

Impersonation ExchangeImpersonation Identifies the user whom the client application is


impersonating.

MailboxCulture MailboxCulture Identifies the RFC3066 culture to be used to access


the mailbox.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request.

ServerVersion ServerVersionInfo
Identifies the version of the server that responded to
the request.

GetDelegate request example

Description
The following code example shows how to retrieve the delegate settings for all the
delegates that are set on user3's mailbox. All the permissions for each user are returned
in the response.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1"/>

</soap:Header>

<soap:Body>

<GetDelegate
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

IncludePermissions="true">

<Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</Mailbox>

</GetDelegate>

</soap:Body>

</soap:Envelope>

Comments
You can use the UserId element to specify individual users instead of returning all users
who have delegate access permissions on the mailbox.

7 Note

Exchange Web Services (EWS) does not support managing group delegates. EWS
will return an error if the GetDelegate operation is called for a principal that has a
security group delegate.

GetDelegate response example

Description
The following example of a GetDelegate response shows a successful response to a
GetDelegate request. The response contains information about the delegate access
permissions, whether the delegate can view private items, whether the delegate receives
copies of meeting messages, and to whom meeting requests were delivered.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8"

MinorVersion="1"

MajorBuildNumber="206"

MinorBuildNumber="0"

Version="Exchange2007_SP1"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<m:GetDelegateResponse
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

ResponseClass="Success"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseCode>NoError</m:ResponseCode>
<m:ResponseMessages>

<m:DelegateUserResponseMessageType ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:DelegateUser>

<t:UserId>

<t:SID>S-1-5-21-1333220396-2200287332-232816053-1116</t:SID>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

<t:DisplayName>User1</t:DisplayName>

</t:UserId>

<t:DelegatePermissions>

<t:CalendarFolderPermissionLevel>Author</t:CalendarFolderPermissionLevel>

<t:ContactsFolderPermissionLevel>Reviewer</t:ContactsFolderPermissionLevel>

</t:DelegatePermissions>

<t:ReceiveCopiesOfMeetingMessages>false</t:ReceiveCopiesOfMeetingMessages>

<t:ViewPrivateItems>false</t:ViewPrivateItems>

</m:DelegateUser>

</m:DelegateUserResponseMessageType>

</m:ResponseMessages>

<m:DeliverMeetingRequests>DelegatesAndMe</m:DeliverMeetingRequests>

</m:GetDelegateResponse>

</soap:Body>

</soap:Envelope>

See also
EWS XML elements in Exchange
GetDiscoverySearchConfiguration
operation
Article • 03/29/2023 • 3 minutes to read

Find information about the GetDiscoverySearchConfiguration EWS operation.

The GetDiscoverySearchConfiguration operation returns configuration information for


in-place holds, saved discovery searches, and the mailboxes that are enabled for
discovery search.

This operation was introduced in Exchange Server 2013.

Using the GetDiscoverySearchConfiguration


operation
The GetDiscoverySearchConfiguration operation provides configuration information for
discovery search. Requests can contain one or more of the following arguments:

1. SearchId — Identifies a saved discovery search. If this argument is sent in the


request, the values of the other arguments are ignored.

2. ExpandGroupMembership — Indicates whether group membership is expanded in


the response. A value of true indicates that group membership is expanded so that
all searchable mailboxes are returned in the response. A value of false indicates
that only the group is returned in the response.

3. InPlaceHoldConfigurationOnly — Indicates whether all searchable mailboxes are


returned in addition to the in-place hold configuration. A value of true indicates
that only the in-place hold configurations are returned. A value of false indicates
that all searchable mailbox identifiers are returned in addition to the in-place hold
identifiers. If this element is not present, the default behavior is the equivalent of
the value false.

GetDiscoverySearchConfiguration operation SOAP


headers
The GetDiscoverySearchConfiguration operation can use the SOAP headers that are
listed in the following table.
Header name Element Description

ManagementRole ManagementRole
Identifies the server roles that are necessary in order
for the caller to make the request. This header is
applicable to a request.

RequestVersion
RequestServerVersion Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

GetDiscoverySearchConfiguration operation
request example: Get the discovery search
configuration for a saved search
The following example of a GetDiscoverySearchConfiguration operation request shows
how to request the configuration of a saved search called "MyDiscSearchFor-sbrown".
The arguments for the ExpandGroupMembership and InPlaceHoldConfigurationOnly
elements are ignored.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body >

<m:GetDiscoverySearchConfiguration>

<m:SearchId>MyDiscSearchFor-sbrown</m:SearchId>

<m:ExpandGroupMembership>true</m:ExpandGroupMembership>

<m:InPlaceHoldConfigurationOnly>false</m:InPlaceHoldConfigurationOnly>

</m:GetDiscoverySearchConfiguration>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

GetDiscoverySearchConfiguration
SearchId

ExpandGroupMembership

InPlaceHoldConfigurationOnly

Successful GetDiscoverySearchConfiguration
operation response: Request for a single saved
search
The following example shows a successful response to a
GetDiscoverySearchConfiguration operation request to get the configuration of a
saved search called "MyDiscSearchFor-sbrown".

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="526" MinorBuildNumber="0" Version="Exchange2013"
xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<GetDiscoverySearchConfigurationResponse ResponseClass="Success"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<DiscoverySearchConfigurations>

<DiscoverySearchConfiguration
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<SearchId>MyDiscSearchFor-sbrown</SearchId>

<SearchQuery>test item</SearchQuery>
<SearchableMailboxes>

<SearchableMailbox>

<Guid>3c620d04-8b22-432e-92be-5b9321599576</Guid>

<PrimarySmtpAddress>[email protected]</PrimarySmtpAddress>

<IsExternalMailbox>false</IsExternalMailbox>

<ExternalEmailAddress/>

<DisplayName>Steven Brown</DisplayName>

<IsMembershipGroup>false</IsMembershipGroup>

<ReferenceId>/o=First/ou=Exchange(FYDILT)/cn=Recipients/cn=313ecf-
Steve</ReferenceId>

</SearchableMailbox>

</SearchableMailboxes>

</DiscoverySearchConfiguration>

</DiscoverySearchConfigurations>

</GetDiscoverySearchConfigurationResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

GetDiscoverySearchConfigurationResponse

ResponseCode

DiscoverySearchConfigurations

DiscoverySearchConfiguration

SearchId

SearchQuery

SearchableMailboxes

SearchableMailbox

Guid

PrimarySmtpAddress (string)

IsExternalMailbox

ExternalEmailAddress

DisplayName (string)

IsMembershipGroup

ReferenceId

Successful GetDiscoverySearchConfiguration
operation response: Request for in-place holds
The following example shows a successful response to a
GetDiscoverySearchConfiguration operation request to only get in-place holds.

XML
<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="526"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetDiscoverySearchConfigurationResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<DiscoverySearchConfigurations>

<DiscoverySearchConfiguration
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<SearchId>MyDiscSearchFor-sbrown</SearchId>

<SearchQuery>test item</SearchQuery>

<InPlaceHoldIdentity>3f37d90f53144558a80814ef0272749a9</InPlaceHoldIdentity>

<ManagedByOrganization/>

</DiscoverySearchConfiguration>

<DiscoverySearchConfiguration
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<SearchId>MyDiscSearch</SearchId>

<SearchQuery>test</SearchQuery>

<InPlaceHoldIdentity>6ea486f0f3f140efb044682a2e782abdf</InPlaceHoldIdentity>

<ManagedByOrganization/>

</DiscoverySearchConfiguration>

</DiscoverySearchConfigurations>

</GetDiscoverySearchConfigurationResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

GetDiscoverySearchConfigurationResponse

ResponseCode

DiscoverySearchConfigurations
DiscoverySearchConfiguration

SearchId

SearchQuery

InPlaceHoldIdentity

ManagedByOrganization

Successful GetDiscoverySearchConfiguration
operation response: Request for all saved
discovery search configurations
The following example shows a successful response to a
GetDiscoverySearchConfiguration operation request to get all saved discovery
searches.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="526"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetDiscoverySearchConfigurationResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<DiscoverySearchConfigurations>

<DiscoverySearchConfiguration
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<SearchId>MyDiscSearchFor-sbrown</SearchId>

<SearchQuery>test item</SearchQuery>

<SearchableMailboxes>

<SearchableMailbox>

<Guid>3c620d04-8b33-435e-95be-5b9351599576</Guid>

<PrimarySmtpAddress>[email protected]</PrimarySmtpAddress>

<IsExternalMailbox>false</IsExternalMailbox>

<ExternalEmailAddress/>

<DisplayName>Steven Brown</DisplayName>

<IsMembershipGroup>false</IsMembershipGroup>

<ReferenceId>/o=First/ou=Exchange
(FYLT)/cn=Recipients/cn=35381a742f0e47e395c8601a60d13ecz-Steve</ReferenceId>

</SearchableMailbox>

</SearchableMailboxes>

</DiscoverySearchConfiguration>

<DiscoverySearchConfiguration
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<SearchId>MyDiscSearch</SearchId>

<SearchQuery>test</SearchQuery>
<SearchableMailboxes>

<SearchableMailbox>

<Guid>e788c4b0-54a2-458c-83b2-22d5bb02b23f</Guid>

<PrimarySmtpAddress>[email protected]</PrimarySmtpAddress>

<IsExternalMailbox>false</IsExternalMailbox>

<ExternalEmailAddress/>

<DisplayName>Administrator</DisplayName>

<IsMembershipGroup>false</IsMembershipGroup>

<ReferenceId>/o=First/ou=Exchange
(FYLT)/cn=Recipients/cn=ebez7871332d4595abe1c62962911a58-Admin</ReferenceId>

</SearchableMailbox>

<SearchableMailbox>

<Guid>6f6cff39-8967-4a60-b43f-328413c25199</Guid>

<PrimarySmtpAddress>[email protected]</PrimarySmtpAddress>

<IsExternalMailbox>false</IsExternalMailbox>

<ExternalEmailAddress/>

<DisplayName>Anthony Davis</DisplayName>

<IsMembershipGroup>false</IsMembershipGroup>

<ReferenceId>/o=First/ou=Exchange
(FYLT)/cn=Recipients/cn=f10c9f70519844beb04101d8f40c572z-Antho</ReferenceId>

</SearchableMailbox>

</SearchableMailboxes>

</DiscoverySearchConfiguration>

</DiscoverySearchConfigurations>

</GetDiscoverySearchConfigurationResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

GetDiscoverySearchConfigurationResponse

ResponseCode

DiscoverySearchConfigurations
DiscoverySearchConfiguration

SearchId

SearchQuery

SearchableMailboxes

SearchableMailbox

Guid

PrimarySmtpAddress (string)

IsExternalMailbox

ExternalEmailAddress

DisplayName (string)

IsMembershipGroup

ReferenceId

GetDiscoverySearchConfiguration operation
error response
The following example shows an error response to a GetDiscoverySearchConfiguration
operation request. This is a response to a request to get a saved search that is not found
on the server.

XML

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="526"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetDiscoverySearchConfigurationResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>Search configuration corresponding to the search id


was not found.</MessageText>

<ResponseCode>ErrorInvalidArgument</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

<DiscoverySearchConfigurations/>

</GetDiscoverySearchConfigurationResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

GetDiscoverySearchConfigurationResponse

MessageText

ResponseCode

DescriptiveLinkKey

DiscoverySearchConfigurations

For additional error codes that are generic to EWS and specific to this operation, see
ResponseCode.

See also
EWS operations in Exchange

GetSearchableMailboxes

SearchMailboxes

GetHoldOnMailboxes

SetHoldOnMailboxes

GetNonIndexableItemDetails

GetNonIndexableItemStatistics
GetEvents operation
Article • 03/29/2023 • 3 minutes to read

The GetEvents operation is used by pull subscription clients to request notifications


from the Client Access server. The GetEvents operation response returns an array of
items and events that have occurred in a mailbox since the last the notification.

) Important

The DeleteUserConfiguration operation will trigger a move event for the event
notification system. The user configuration object will be moved to the dumpster.

Notes
Changes to Calendar items may result in the generation of multiple events. These events
are the result of temporary items being created in the mailbox, free/busy data storage
items being changed as part of the normal Calendar operations, or both. Events for item
class "IPM.SchedulePlus.FreeBusy.BinaryData" should be ignored by Web service clients.
These temporary items are deleted after they are created; therefore, if an attempt is
made to retrieve these items, an error will be returned that states that the item was not
found.

GetEvents request example

Description
The following example shows how to request the events and items that are associated
with a subscription that is identified by the subscription identifier and watermark.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<GetEvents
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<SubscriptionId>f6bc657d-dde1-4f94-952d-143b95d6483d</SubscriptionId>

<Watermark>AAAAAMAGAAAAAAAAAQ==</Watermark>

</GetEvents>

</soap:Body>

</soap:Envelope>

GetEvents Request Elements


The following elements are used in the request:

GetEvents

SubscriptionId (GetEvents)

Watermark

Successful GetEvents response example

Description
The following example of a response shows a notification of the existence of two new
mail messages since the last notification request was sent to the server.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="628" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<GetEventsResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetEventsResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Notification>

<t:SubscriptionId>f6bc657d-dde1-4f94-952d-
143b95d6483d</t:SubscriptionId>

<t:PreviousWatermark>AAAAAMAGAAAAAAAAAQ==</t:PreviousWatermark>

<t:MoreEvents>false</t:MoreEvents>

<t:NewMailEvent>

<t:Watermark>AAAAAM4GAAAAAAAAAQ==</t:Watermark>

<t:TimeStamp>2006-08-22T00:36:29Z</t:TimeStamp>

<t:ItemId Id="AQApAHR" ChangeKey="CQAAAA==" />

<t:ParentFolderId Id="AQApAH" ChangeKey="AQAAAA==" />

</t:NewMailEvent>

<t:NewMailEvent>

<t:Watermark>AAAAAOQGAAAAAAAAAQ==</t:Watermark>

<t:TimeStamp>2006-08-22T01:00:50Z</t:TimeStamp>

<t:ItemId Id="AQApAHRw" ChangeKey="CQAAAA==" />

<t:ParentFolderId Id="AQApAH" ChangeKey="AQAAAA==" />

</t:NewMailEvent>

</m:Notification>

</m:GetEventsResponseMessage>

</m:ResponseMessages>

</GetEventsResponse>

</soap:Body>

</soap:Envelope>

Comments

7 Note

The item and folder identifiers have been shortened to preserve readability.

GetEvents response elements


The following elements are used in the response:

ServerVersionInfo

GetEventsResponse

ResponseMessages

GetEventsResponseMessage

ResponseCode

Notification

SubscriptionId (GetEvents)
PreviousWatermark

MoreEvents

NewMailEvent

Watermark

TimeStamp

ItemId

ParentFolderId

To find other options for the response message of the GetEvents operation, explore the
schema hierarchy. Start at the Notification element.

GetEvents Error response example

Description
The following example shows an error response to a GetEvents request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="628" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<GetEventsResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetEventsResponseMessage ResponseClass="Error">

<m:MessageText>Access is denied. Only the subscription owner may


access the subscription.</m:MessageText>

<m:ResponseCode>ErrorSubscriptionAccessDenied</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:GetEventsResponseMessage>

</m:ResponseMessages>

</GetEventsResponse>

</soap:Body>

</soap:Envelope>

Remarks
When processing a GetEvents request, the Client Access server performs the following
steps:

1. The SubscriptionID of the request is confirmed to be a valid subscription that is


hosted on the Client Access server. If it is not, the GetEvents call fails.

2. The SMTP address of the authenticated user for the request is compared to the
SMTP address of the user who created the subscription. If they do not match, the
GetEvents request fails.

3. The subscription queue is queried for events that are waiting to be sent to the
client. If the queue is not empty, the first 50 events from the queue are pulled from
the queue and encoded into a notification.

4. If no events are found in the queue, a StatusEvent is generated and encoded into a
notification response.

5. The notification response is returned to the client.

6. The events that are included in the notification are removed from the subscription
queue and the Client Access server local last watermark for the subscription is set
to the watermark of the last event that is returned.

7. The timeout timer for the subscription is reset.

See also
Subscribe operation

Unsubscribe operation

Using Pull Subscriptions


GetFolder operation
Article • 03/29/2023 • 2 minutes to read

The GetFolder operation gets folders from the Exchange store.

GetFolder request example

Description
The following example of a GetFolder request shows how to obtain a folder identifier,
display name, the count of items in that folder, the count of child folders, and the
number of unread items in the folder.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<GetFolder
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<FolderShape>

<t:BaseShape>Default</t:BaseShape>

</FolderShape>

<FolderIds>

<t:DistinguishedFolderId Id="inbox"/>

</FolderIds>

</GetFolder>

</soap:Body>

</soap:Envelope>

Request elements
This GetFolder request includes the following elements:

GetFolder

FolderShape
BaseShape

FolderIds

DistinguishedFolderId

See the schema for additional elements that you can use to form a GetFolder request.

7 Note

The schema that describes this element is located in the IIS virtual directory that
hosts Exchange Web Services.

GetFolder response example

Description
The following Simple Object Access Protocol (SOAP) body example shows a successful
response to the GetFolder request.

7 Note

The folder ID and the change key have been shortened to preserve readability.

Code
XML

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="628" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<GetFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Folders>

<t:Folder>

<t:FolderId Id="AQApA=" ChangeKey="AQAAAB" />

<t:DisplayName>Inbox</t:DisplayName>

<t:TotalCount>2</t:TotalCount>

<t:ChildFolderCount>0</t:ChildFolderCount>

<t:UnreadCount>2</t:UnreadCount>

</t:Folder>

</m:Folders>

</m:GetFolderResponseMessage>

</m:ResponseMessages>

</GetFolderResponse>

</soap:Body>

</soap:Envelope>

Response elements
This GetFolder response includes the following elements:

GetFolderResponse

ResponseMessages

GetFolderResponseMessage

Folders

Folder

FolderId

DisplayName (string)

TotalCount

ChildFolderCount

UnreadCount

GetFolder Error response example

Description
The following SOAP body example shows an error response that is caused by an
incorrect FolderId in the request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="628" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<GetFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetFolderResponseMessage ResponseClass="Error">

<m:MessageText>Id is malformed.</m:MessageText>

<m:ResponseCode>ErrorInvalidIdMalformed</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:Folders />
</m:GetFolderResponseMessage>

</m:ResponseMessages>

</GetFolderResponse>

</soap:Body>

</soap:Envelope>

Response elements
This GetFolder error response includes the following elements:

GetFolderResponse

ResponseMessages

GetFolderResponseMessage

MessageText

ResponseCode
DescriptiveLinkKey

Folders

Version differences
For applications that target Exchange Online, Exchange Online as part of Office 365, or
an on-premises version of Exchange starting with Exchange 2013, folder permissions are
not returned when the BaseShape element has a value of AllProperties in the GetFolder
operation request. To retrieve folder permissions, add the PermissionSet
(PermissionSetType) element to the AdditionalProperties element in the GetFolder
request.

See also
EWS XML elements in Exchange
GetHoldOnMailboxes operation
Article • 03/29/2023 • 2 minutes to read

) Important

Starting on April 1, 2020, the GetHoldOnMailboxes operation will no longer be


available in Exchange Online. This operation won't be affected in on-premises
versions of Exchange Server. For more information, see Retirement of legacy
eDiscovery tools in Exchange Online.

Find information about the GetHoldOnMailboxes EWS operation.

The GetHoldOnMailboxes operation gets the mailboxes that are under a specific hold
and the associated hold query.

This operation was introduced in Exchange Server 2013.

Using the GetHoldOnMailboxes operation


The GetHoldOnMailboxes operation gives the client information about which mailboxes
are placed under a specific hold, information about the hold query associated with each
hold, if applicable, and information about the hold status for each mailbox. For more
information about mailbox holds, including query-based holds, see In-Place Hold on
TechNet.

GetHoldOnMailboxes operation SOAP headers


The GetHoldOnMailboxes operation can use the SOAP headers that are listed in the
following table.

Header name Element Description

ManagementRole ManagementRole
Identifies the server roles that are necessary in order
for the caller to make the request. This header is
applicable to a request.

RequestVersion
RequestServerVersion Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.
GetHoldOnMailboxes operation request
example: Get mailbox hold information
The following example of a GetHoldOnMailboxes operation request shows how to get
the mailbox hold information for the HoldId2 mailbox hold.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body >

<m:GetHoldOnMailboxes>

<m:HoldId>HoldId2</m:HoldId>

</m:GetHoldOnMailboxes>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

GetHoldOnMailboxes

HoldId

Successful GetHoldOnMailboxes operation


response
The following example shows a successful response to a GetHoldOnMailboxes
operation request to get the mailbox hold information for the HoldId2 mailbox hold.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="526"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetHoldOnMailboxesResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<MailboxHoldResult>

<HoldId
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">HoldId2</
HoldId>

<Query
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">test</Que
ry>

<MailboxHoldStatuses
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<MailboxHoldStatus>

<Mailbox>/o=First Organization/ou=Exchange Administrative


Group (FYDIBPDLT)/cn=Recipients/cn=ecc0fd98c2cadf-Willi</Mailbox>

<Status>OnHold</Status>

<AdditionalInfo/>

</MailboxHoldStatus>

<MailboxHoldStatus>

<Mailbox>/o=First Organization/ou=Exchange Administrative


Group (FYDIBPDLT)/cn=Recipients/cn=dasdat341q8de95-Micha</Mailbox>
<Status>OnHold</Status>

<AdditionalInfo/>

</MailboxHoldStatus>

</MailboxHoldStatuses>

</MailboxHoldResult>

</GetHoldOnMailboxesResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

GetHoldOnMailboxesResponse

ResponseCode

MailboxHoldResult

HoldId

Query
MailboxHoldStatuses

MailboxHoldStatus

Mailbox (string)

Status (HoldStatusType)

AdditionalInfo

GetHoldOnMailboxes operation error response


The following example shows an error response to a GetHoldOnMailboxes operation
request. This is a response to a request to get a hold that has been deleted.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="526"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetHoldOnMailboxesResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>The specific query-based hold is not found.


</MessageText>

<ResponseCode>ErrorMailboxHoldNotFound</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</GetHoldOnMailboxesResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

GetHoldOnMailboxesResponse
MessageText

ResponseCode

DescriptiveLinkKey

For additional error codes that are generic to EWS and specific to this operation, see
ResponseCode.

See also
EWS operations in Exchange

GetSearchableMailboxes operation

SearchMailboxes operation

SetHoldOnMailboxes operation

GetDiscoverySearchConfiguration operation

GetNonIndexableItemDetails operation

GetNonIndexableItemStatistics operation
GetImItemList operation
Article • 03/29/2023 • 4 minutes to read

Find information about the GetImItemList EWS operation.

Using the GetImItemList operation


The GetImItemList operation retrieves the list of instant messaging (IM) groups and IM
contact personas in a mailbox. The GetImItemList operation does not take any
arguments.

This operation was introduced in Exchange Server 2013.

GetImItemList operation SOAP headers


The GetImItemList operation can use the SOAP headers that are listed in the following
table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, "Tags


for the Identification of Languages", to be used to
access the mailbox. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

GetImItemList operation request example:


Request your IM items list
The following example of a GetImItemList operation request shows how to request the
list of IM groups and IM contact personas in a mailbox. The GetImItemList element is
the only element option in the SOAP body.
XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:MailboxCulture>en-US</t:MailboxCulture>

</soap:Header>

<soap:Body >

<m:GetImItemList/>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following element:

GetImItemList

Successful GetImItemList operation response


The following example shows a successful response to a GetImItemList operation
request. The response contains four IM groups. Three of the IM groups — Other
Contacts, Tagged, and Favorites — are default groups in the Exchange store. The
MyCustomGroup2 group is a custom user-created group. The Other Contacts and
Tagged groups do not have members. The Favorites group has a single contact member.
The MyCustomGroup2 has two member contacts. The item identifiers are provided so
that subsequent GetItem requests can be performed to get more information about the
IM contacts.

This example returns two personas. The first persona represents two contact items:
Anthony Smith and Tony Smith. The combined contact information is returned in the
Persona object. The second persona represents a single contact with the display name
of Terence Adams.

7 Note

The Exchange store identifiers, item identifiers, source identifiers, folder identifiers,
and persona identifiers have been shortened to preserve readability.

XML
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="349"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetImItemListResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<ImItemList>

<Groups
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<ImGroup>

<DisplayName>Other Contacts</DisplayName>

<GroupType>IPM.DistList.MOC.OtherContacts</GroupType>

<ExchangeStoreId Id="AAMkAGQ1MjJjMTBkLThQoTbWAAAAAAQUAAA="

ChangeKey="EgAAAA==" />

</ImGroup>

<ImGroup>

<DisplayName>Tagged</DisplayName>

<GroupType>IPM.DistList.MOC.Tagged</GroupType>

<ExchangeStoreId Id="AAMkAGQ1MjJAAQTAAA="

ChangeKey="EgAAAA==" />

</ImGroup>

<ImGroup>

<DisplayName>Favorites</DisplayName>

<GroupType>IPM.DistList.MOC.Favorites</GroupType>

<ExchangeStoreId Id="AAMkAGQ1MjJjMTAAAAAQSAAA="

ChangeKey="EgAAAA==" />

<MemberCorrelationKey>

<ItemId Id="AAMkAGQ1MjJtt/bhQoTbWAAAAAAvcAAA="

ChangeKey="EQAAAA==" />

</MemberCorrelationKey>

</ImGroup>

<ImGroup>

<DisplayName>MyCustomGroup2</DisplayName>

<GroupType>IPM.DistList.MOC.UserGroup</GroupType>

<ExchangeStoreId Id="AAMkAGQ1MjJjKAAA="

ChangeKey="EgAAAA==" />

<MemberCorrelationKey>

<ItemId Id="AAMkAGQ1Matt/bhQoTbWAAAAAAvcAAA="

ChangeKey="EQAAAA==" />

<ItemId Id="AAMkAGQ1MjJjMTBkTbWAAAAAAveAAA="

ChangeKey="EQAAAA==" />

</MemberCorrelationKey>

</ImGroup>

</Groups>

<Personas
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Persona>

<PersonaId
Id="AAQkAGQ1MjJjMTBkLTc4YkZmRkYQAQAFgxE1nBcqRGgYWWorM9/+s=" />

<PersonaType>Person</PersonaType>

<CreationTime>2012-01-12T22:14:36Z</CreationTime>

<DisplayName>Anthony Smith</DisplayName>

<DisplayNameFirstLast>Anthony Smith</DisplayNameFirstLast>

<DisplayNameLastFirst>Smith Anthony</DisplayNameLastFirst>

<FileAs>Smith, Anthony</FileAs>

<FileAsId>LastCommaFirst</FileAsId>

<GivenName>Anthony</GivenName>

<Surname>Smith</Surname>

<EmailAddress>

<Name>[email protected]</Name>

<EmailAddress>[email protected]</EmailAddress>

<RoutingType>SMTP</RoutingType>

</EmailAddress>

<EmailAddresses>

<EmailAddress>

<Name>[email protected]</Name>

<EmailAddress>[email protected]</EmailAddress>

<RoutingType>SMTP</RoutingType>

</EmailAddress>

</EmailAddresses>

<ImAddress>[email protected]</ImAddress>

<RelevanceScore>2147483647</RelevanceScore>

<Attributions>

<Attribution>

<Id>0</Id>

<SourceId
Id="AQMkAGQ1MjIAYzEwZC03OGNlLTQ5Bq239uFChNtYAAAIvDAAAAA=="

ChangeKey="EQAAABYAAABtF8oI7iVOQatt/bhQoTbWAAAAADB3" />

<DisplayName>Outlook</DisplayName>

<IsWritable>true</IsWritable>

<IsQuickContact>false</IsQuickContact>

<IsHidden>false</IsHidden>

<FolderId
Id="AQMkAGQ1MjIAYzEMikE3AQBtF8oI7iVOQatt/bhQoTbWAAADEAAAAA=="

ChangeKey="AQAAAA==" />

</Attribution>

<Attribution>

<Id>1</Id>

<SourceId
Id="AAMkAGQ1MjJjMTBkLTc4Y2UtNDA5Ny04/bhQoTbWAAAAAAveAAA="

ChangeKey="EQAAABYAAABtF8oI7iVOQatt/bhQoTbWAAAAAAym" />

<DisplayName>Outlook</DisplayName>

<IsWritable>true</IsWritable>

<IsQuickContact>true</IsQuickContact>

<IsHidden>false</IsHidden>

<FolderId
Id="AAMkAGQ1MjJjMTBkLTc4Y2UtNDA5Qatt/bhQoTbWAAAAAAvZAAA="

ChangeKey="AQAAAA==" />

</Attribution>

</Attributions>

<DisplayNames>

<StringAttributedValue>

<Value>Anthony Smith</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

<StringAttributedValue>

<Value>Tony Smith</Value>

<Attributions>

<Attribution>1</Attribution>

</Attributions>

</StringAttributedValue>

</DisplayNames>

<FileAses>

<StringAttributedValue>

<Value>Smith, Anthony</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</FileAses>

<FileAsIds>

<StringAttributedValue>

<Value>LastCommaFirst</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

<StringAttributedValue>

<Value>None</Value>

<Attributions>

<Attribution>1</Attribution>

</Attributions>

</StringAttributedValue>

</FileAsIds>

<GivenNames>

<StringAttributedValue>

<Value>Anthony</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</GivenNames>

<Surnames>

<StringAttributedValue>

<Value>Smith</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</Surnames>

<HomePhones>

<PhoneNumberAttributedValue>

<Value>

<Number>4255550110</Number>

<Type>Home</Type>

</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</PhoneNumberAttributedValue>

</HomePhones>

<MobilePhones>

<PhoneNumberAttributedValue>

<Value>

<Number>4255550120</Number>

<Type>Mobile</Type>
</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</PhoneNumberAttributedValue>

</MobilePhones>

<Emails1>

<EmailAddressAttributedValue>

<Value>

<Name>[email protected]</Name>

<EmailAddress>[email protected]</EmailAddress>

<RoutingType>SMTP</RoutingType>

</Value>

<Attributions>

<Attribution>0</Attribution>

<Attribution>1</Attribution>

</Attributions>

</EmailAddressAttributedValue>

</Emails1>

<ImAddresses>

<StringAttributedValue>

<Value>[email protected]</Value>

<Attributions>

<Attribution>1</Attribution>

</Attributions>

</StringAttributedValue>

</ImAddresses>

</Persona>

<Persona>

<PersonaId
Id="AAQkAGQ1MjJjMTBkLkYQAQAJ3EkhEEXN5KufGbSYJanZk=" />

<PersonaType>Person</PersonaType>

<CreationTime>2012-01-05T23:06:58Z</CreationTime>

<DisplayName>Terence Adams</DisplayName>

<DisplayNameFirstLast>Terence Adams</DisplayNameFirstLast>

<DisplayNameLastFirst>Terence Adams</DisplayNameLastFirst>

<FileAsId>None</FileAsId>

<EmailAddress>

<Name>Terence Adams</Name>

<EmailAddress>[email protected]</EmailAddress>

<RoutingType>SMTP</RoutingType>

</EmailAddress>

<EmailAddresses>

<EmailAddress>

<Name>Terence Adams</Name>

<EmailAddress>[email protected]</EmailAddress>

<RoutingType>SMTP</RoutingType>

</EmailAddress>

</EmailAddresses>

<ImAddress>[email protected]</ImAddress>

<RelevanceScore>2147483647</RelevanceScore>

<Attributions>

<Attribution>

<Id>0</Id>

<SourceId
Id="AAMkAGQ1MjVOQatt/bhQoTbWAAAA7iVOQatt/bhQoTbWAAAAAAvcAAA="

ChangeKey="EQAAABYAAABtF8oI7iVOQatt/bhQoTbWAAAAAAyg" />

<DisplayName>Outlook</DisplayName>

<IsWritable>true</IsWritable>

<IsQuickContact>true</IsQuickContact>

<IsHidden>false</IsHidden>

<FolderId
Id="AAMkAGQ1MjJjMTBkLTc4Y2rBtF8oI7iVOQatt/bhQoTbWAAAAAAvZAAA="

ChangeKey="AQAAAA==" />

</Attribution>

</Attributions>

<DisplayNames>

<StringAttributedValue>

<Value>Terence Adams</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</DisplayNames>

<FileAsIds>

<StringAttributedValue>

<Value>None</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</FileAsIds>

<Emails1>

<EmailAddressAttributedValue>

<Value>

<Name>Terence Adams</Name>

<EmailAddress>[email protected]</EmailAddress>

<RoutingType>SMTP</RoutingType>

</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</EmailAddressAttributedValue>

</Emails1>

<ImAddresses>

<StringAttributedValue>

<Value>[email protected]</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</ImAddresses>

</Persona>

</Personas>

</ImItemList>

</GetImItemListResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

GetImItemListResponse

ResponseCode

ImItemList

DisplayName (string)

GroupType

ExchangeStoreId

MemberCorrelationKey

ItemId

Personas

PersonaId

PersonaType

CreationTime

DisplayNameFirstLast

DisplayNameLastFirst
FileAs

FileAsId

GivenName

Surname

EmailAddress (NonEmptyStringType)

Name (EmailAddressType)

RoutingType (EmailAddressType)

EmailAddresses (ArrayOfEmailAddressesType)

ImAddress (String)

RelevanceScore

Attributions (ArrayOfPersonaAttributionsType)

Attribution (PersonaAttributionType)

ID (String)

SourceId

IsWritable

IsQuickContact

IsHidden

FolderId

StringAttributedValue

FileAses

FileAsIds

GivenNames

Surnames

HomePhones

PhoneNumberAttributedValue
MobilePhones

Emails1

EmailAddressAttributedValue

ImAddresses

Value (ExtendedPropertyType)

GetImItemList operation error response


The following example shows an error response to a GetImItemList operation request.
This is a response to a request that contains an incorrect requested server version in the
SOAP header. This error response is a SOAP fault and is not represented in the EWS
schema.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Body>

<s:Fault>

<faultcode
xmlns:a="https://schemas.microsoft.com/exchange/services/2006/types">a:Error
IncorrectSchemaVersion</faultcode>

<faultstring xml:lang="en-US">The request is valid but does not


specify the correct server version in the RequestServerVersion SOAP header.
Ensure that the RequestServerVersion SOAP header is set with the correct
RequestServerVersionValue.</faultstring>

<detail>

<e:ResponseCode
xmlns:e="https://schemas.microsoft.com/exchange/services/2006/errors">ErrorI
ncorrectSchemaVersion</e:ResponseCode>

<e:Message
xmlns:e="https://schemas.microsoft.com/exchange/services/2006/errors">The
request is valid but does not specify the correct server version in the
RequestServerVersion SOAP header. Ensure that the RequestServerVersion SOAP
header is set with the correct RequestServerVersionValue.</e:Message>

</detail>

</s:Fault>

</s:Body>

</s:Envelope>

See also
AddImGroup operation
People and contacts in EWS in Exchange

GetImItems operation
GetImItems operation
Article • 03/29/2023 • 3 minutes to read

Find information about the GetImItems EWS operation.

The GetImItems operation retrieves information about instant messaging (IM) groups
and IM contact personas.

This operation was introduced in Exchange Server 2013.

Using the GetImItems operation


The GetImItems operation accepts group and contact item identifiers and returns a set
of information about the groups and contacts. The property sets returned in the
response are identified by extended properties, multiple contact identifiers, group
identifiers, and extended property definitions as arguments.

GetImItems operation SOAP headers


The GetImItems operation can use the SOAP headers that are listed in the following
table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, "Tags


for the Identification of Languages", to be used to
access the mailbox. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

GetImItems operation request example: Get


detailed information about IM contacts and
groups
The following example of a GetImItems operation request shows how to request
detailed information about IM contacts and groups. A GetImItems operation can
request one or more contact or group details. You can also use extended properties to
get custom properties on groups and contacts. If a requested extended property does
not exist on an item, the response will ignore the requested property and return the
response for the default property set. This example shows you how to get the display
name by using extended properties.

7 Note

All item identifiers and change keys in this article have been shortened to preserve
readability. Note that change keys are ignored by the service for this operation.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:MailboxCulture>en-US</t:MailboxCulture>

</soap:Header>

<soap:Body >

<m:GetImItems>

<m:ContactIds>
<t:ItemId Id="AAMkADEzOTExYACABmEhpSAAA="
ChangeKey="EQAAABBmNDjF"/>

</m:ContactIds>

<m:GroupIds>

<t:ItemId Id="AAMkADEzOTExYjJkBY7+0EAAA=" ChangeKey="EgAAAA=="/>

</m:GroupIds>

<m:ExtendedProperties>

<t:ExtendedProperty PropertyTag="0x3001" PropertyType="String"/>

</m:ExtendedProperties>

</m:GetImItems>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

GetImItems
ContactIds

ItemId

GroupIds

ExtendedProperties (NonEmptyArrayOfExtendedFieldURIs)

ExtendedProperty (PathToExtendedFieldType)

Successful GetImItems operation response


The following example shows a successful response to a GetImItems request to get an
IM contact and group. The display name is requested in an extended property. IM
contacts are returned in the form of a persona.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="556"

MinorBuildNumber="8"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetImItemsResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<ImItemList>

<Groups
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<ImGroup>

<DisplayName>Exchange SDK Team</DisplayName>

<GroupType>IPM.DistList.MOC.UserGroup</GroupType>

<ExchangeStoreId Id="AAMkADEzQrAABY7+0EAAA="
ChangeKey="EgAAAA=="/>

<MemberCorrelationKey>

<ItemId Id="AAMkADEzOTExYjeGgGqm4QrAABmEhpSAAA="
ChangeKey="EQAAAA=="/>

</MemberCorrelationKey>

<ExtendedProperties>

<ExtendedProperty>

<ExtendedFieldURI PropertyTag="0x3001"
PropertyType="String"/>

<Value>Exchange SDK Team</Value>


</ExtendedProperty>

</ExtendedProperties>

</ImGroup>

</Groups>

<Personas
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Persona>

<PersonaId Id="AAQkADEzOTBZImBzN5J/uHXc="/>

<PersonaType>Person</PersonaType>

<CreationTime>2012-11-07T00:10:35Z</CreationTime>

<DisplayName>Tony Smith</DisplayName>

<DisplayNameFirstLast>Tony Smith</DisplayNameFirstLast>

<DisplayNameLastFirst>Tony Smith</DisplayNameLastFirst>

<FileAs/>

<FileAsId>None</FileAsId>

<ImAddress>[email protected]</ImAddress>

<RelevanceScore>2147483647</RelevanceScore>

<Attributions>

<Attribution>

<Id>0</Id>

<SourceId Id="AAMkADEzhQaoeGgGqm4QrAABmEhpSAAA="
ChangeKey="EQArAABmNDjF"/>

<DisplayName>Lync Contacts</DisplayName>

<IsWritable>false</IsWritable>

<IsQuickContact>true</IsQuickContact>

<IsHidden>false</IsHidden>

</Attribution>

</Attributions>

<DisplayNames>

<StringAttributedValue>

<Value>Tony Smith</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</DisplayNames>

<FileAsIds>

<StringAttributedValue>

<Value>None</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</FileAsIds>

<ImAddresses>

<StringAttributedValue>

<Value>[email protected]</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</ImAddresses>

<ExtendedProperties>

<ExtendedPropertyAttributedValue>

<Value>

<ExtendedFieldURI PropertyTag="0x3001"
PropertyType="String"/>

<Value>Tony Smith</Value>

</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</ExtendedPropertyAttributedValue>

</ExtendedProperties>

</Persona>

</Personas>

</ImItemList>

</GetImItemsResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

GetImItemsResponse

ResponseCode

ImItemList

Groups (ArrayOfImGroupType)

ImGroup

DisplayName (string)

GroupType

ExchangeStoreId

MemberCorrelationKey

ItemId

ExtendedProperties (NonEmptyArrayOfExtendedFieldURIs)

ExtendedProperty (PathToExtendedFieldType)

Personas

PersonaId
PersonaType

CreationTime

DisplayNameFirstLast

DisplayNameLastFirst

FileAs

FileAsId FileAsId

ImAddress (String)

RelevanceScore

Attributions (ArrayOfPersonaAttributionsType)

Attribution (PersonaAttributionType)

ID (String)

SourceId

IsWritable

IsQuickContact

IsHidden

StringAttributedValue

FileAsIds

ImAddresses

Value (ExtendedPropertyType)

GetImItems operation error response


The GetImItems operation does not validate identifiers and will not return the expected
ErrorInvalidImContactId or ErrorInvalidImGroupId error response if an invalid contact
or group identifier is provided to the service.

See also
EWS operations in Exchange
GetImItemList operation
GetInboxRules operation
Article • 03/29/2023 • 2 minutes to read

The GetInboxRules operation uses Exchange Web Services to retrieve Inbox rules in the
identified user's mailbox.

GetInboxRules request example

Description
The following example shows the request XML that the client sends to the server. The
request identifies the user in the MailboxSmtpAddress element. All Inbox rules for the
identified user are to be returned in the response.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010_SP1" />

</soap:Header>

<soap:Body>

<m:GetInboxRules>

<m:MailboxSmtpAddress>[email protected]</m:MailboxSmtpAddress>

</m:GetInboxRules>

</soap:Body>

</soap:Envelope>

Request elements
The request includes the following optional element:

MailboxSmtpAddress

Successful GetInboxRules response example


Description
The following Simple Object Access Protocol (SOAP) body example shows a successful
response to the GetInboxRules request. In this example, the response includes one rule.

7 Note

The values of the Id and the ChangeKey attributes of the FolderId element have
been shortened to preserve readability.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="1" MajorBuildNumber="139"

MinorBuildNumber="0"

Version="Exchange2010_SP1"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<GetInboxRulesResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<OutlookRuleBlobExists>true</OutlookRuleBlobExists>

<InboxRules>

<Rule
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<RuleId>dCsAAABjzvA=</RuleId>

<DisplayName>MoveInterestingToJunk</DisplayName>

<Priority>1</Priority>

<IsEnabled>true</IsEnabled>

<Conditions>

<ContainsSubjectStrings>

<String>Interesting</String>

</ContainsSubjectStrings>

</Conditions>

<Actions>

<MoveToFolder>

<FolderId ChangeKey="AQAAAA==" Id="AAMkAGYzZjZm" />

</MoveToFolder>

</Actions>

</Rule>

</InboxRules>

</GetInboxRulesResponse>

</s:Body>

</s:Envelope>

Response elements
The following elements are included in the response:

GetInboxRulesResponse

ResponseCode

OutlookRuleBlobExists

InboxRules

See also
UpdateInboxRules operation
GetItem operation
Article • 03/29/2023 • 2 minutes to read

Find information about the GetItem EWS operation.

The GetItem operation gets items from the Exchange store.

Using the GetItem operation


The GetItem operation returns many item properties. The properties that are returned in
a GetItem response vary based on the requested shape, requested additional properties,
and the type of item returned.

Message elements represent email messages and all other items that are not strongly
typed by the Exchange Web Services (EWS) schema. Items such as IPM.Sharing and
IPM.InfoPath are returned as Message elements. Exchange does not return the base
Item element in responses.

The GetItem operation does not return attachments. It does return metadata about an
attached item or file. To return an attachment, use the GetAttachment operation.

GetItem operation SOAP headers


The GetItem operation can use the SOAP headers that are listed in the following table.

Header Element Description

DateTimePrecision DateTimePrecision
Specifies the resolution of data/time values in
responses from the server, either in seconds or in
milliseconds.

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating.

MailboxCulture
MailboxCulture Identifies the culture, as defined in RFC 3066,
"Tags for the Identification of Languages", to be
used to access the mailbox.

RequestVersion
RequestServerVersion
Identifies the schema version for the operation
request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that
responded to the request.
Header Element Description

TimeZoneContext
TimeZoneContext
Identifies the time zone to be used for all
responses from the server.

In This Section
GetItem operation (email message)

GetItem operation (calendar item)

GetItem operation (task)

GetItem operation (contact)

See also
EWS reference for Exchange
GetItem operation (email message)
Article • 03/29/2023 • 2 minutes to read

The GetItem operation allows the user to access information about e-mail messages.

Using the GetItem Operation for Messages


The GetItem request must have the following information:

The ItemId element to identify the item information to return.

The ItemShape element to identify the item properties to return.

GetItem request example

Description
The following example of a GetItem request shows how to access information about e-
mail messages.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<GetItem

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<ItemShape>

<t:BaseShape>Default</t:BaseShape>

<t:IncludeMimeContent>true</t:IncludeMimeContent>

</ItemShape>

<ItemIds>

<t:ItemId Id="AAAlAF" ChangeKey="CQAAAB" />

</ItemIds>

</GetItem>

</soap:Body>

</soap:Envelope>

Request elements
The following elements are used in the request:

GetItem

ItemShape

BaseShape

IncludeMimeContent

ItemIds

ItemId

Successful GetItem (E-mail Message) response


example

Description
The following example shows a successful response to the GetItem request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="685" MinorBuildNumber="8"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Message>
<t:MimeContent CharacterSet="UTF-8">UmVjZWl</t:MimeContent>

<t:ItemId Id="AAAlAFVz" ChangeKey="CQAAAB" />

<t:Subject />

<t:Sensitivity>Normal</t:Sensitivity>

<t:Body BodyType="HTML">

<html dir="ltr">

<head>

<meta http-equiv="Content-Type" content="text/html;


charset=utf-8">

<meta content="MSHTML 6.00.3790.2759"


name="GENERATOR">

<style title="owaParaStyle">P { MARGIN-TOP: 0px;


MARGIN-BOTTOM: 0px } </style>

</head>

<body ocsi="x">

<div dir="ltr">

<font face="Tahoma" color="#000000" size="2">


</font>&amp;nbsp;

</div>

</body>

</html>

</t:Body>
<t:Size>881</t:Size>

<t:DateTimeSent>2006-10-28T01:37:06Z</t:DateTimeSent>

<t:DateTimeCreated>2006-10-28T01:37:06Z</t:DateTimeCreated>

<t:ResponseObjects>

<t:ReplyToItem />

<t:ReplyAllToItem />

<t:ForwardItem />

</t:ResponseObjects>

<t:HasAttachments>false</t:HasAttachments>
<t:ToRecipients>

<t:Mailbox>

<t:Name>User1</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Mailbox>

</t:ToRecipients>

<t:IsReadReceiptRequested>false</t:IsReadReceiptRequested>

<t:IsDeliveryReceiptRequested>false</t:IsDeliveryReceiptRequested>

<t:From>

<t:Mailbox>

<t:Name>User2</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Mailbox>

</t:From>
<t:IsRead>false</t:IsRead>

</t:Message>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</GetItemResponse>

</soap:Body>

</soap:Envelope>

Comments
The MIME content, folder, and item identifiers have been shortened to preserve
readability.

Successful response elements


The following elements are used in the response:

ServerVersionInfo

GetItemResponse

ResponseMessages

GetItemResponseMessage

ResponseCode

Items

Message

MimeContent

ItemId

Subject

Sensitivity

Body

Size

DateTimeSent

DateTimeCreated

ResponseObjects

ReplyToItem
ReplyAllToItem

ForwardItem

HasAttachments

ToRecipients

Mailbox

Name (EmailAddressType)

EmailAddress (NonEmptyStringType)

RoutingType (EmailAddressType)

IsReadReceiptRequested

IsDeliveryReceiptRequested

From

IsRead

GetItem (E-mail Message) Error response


example

Description
The following example shows an error response to a GetItem request. The error was
caused by an attempt to get an invalid additional property.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="685" MinorBuildNumber="8"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Error">
<m:MessageText>Property is not valid for this object type.
</m:MessageText>

<m:ResponseCode>ErrorInvalidPropertyRequest</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:MessageXml>

<t:FieldURI FieldURI="meeting:AssociatedCalendarItemId" />

</m:MessageXml>

<m:Items />

</m:GetItemResponseMessage>

</m:ResponseMessages>

</GetItemResponse>

</soap:Body>

</soap:Envelope>

Error response elements


The following elements are used in the error response:

ServerVersionInfo

GetItemResponse

ResponseMessages

GetItemResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

MessageXml

FieldURI

See also
GetItem operation
GetItem operation (calendar item)
Article • 03/29/2023 • 2 minutes to read

The GetItem operation gets calendar items from the Exchange store.

GetItem request example

Description
The following example of a GetItem request shows how to form a request to get the
identity and subject of an item.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<GetItem
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject"/>

</t:AdditionalProperties>

</ItemShape>

<ItemIds>

<t:ItemId Id="AsdD89=" ChangeKey="Jajs3=="/>

</ItemIds>

</GetItem>

</soap:Body>

</soap:Envelope>

Request elements
The following elements are used in the request:

GetItem

ItemShape

BaseShape
AdditionalProperties

FieldURI

ItemIds

ItemId

7 Note

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

To find other options for the request message of the GetItem operation, explore the
schema hierarchy. Start at the GetItem element.

Successful GetItem Response

Description
The following example shows a successful response to the GetItem request. The request
that created this response used the IdOnly baseshape. In this example, the response
returns only the ID of the item.

7 Note

The item ID and the change key have been shortened to preserve readability.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="602" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"/>

</soap:Header>

<soap:Body>

<GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="ASUAd" ChangeKey="otlIqB=="/>

</t:CalendarItem>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</GetItemResponse>

</soap:Body>

</soap:Envelope>

Description
The following example shows a successful response to the GetItem request. The request
that created this response used the Default baseshape. In this example, the response
returns the Default shape for a calendar item.

7 Note

The item ID and the change key have been shortened to preserve readability.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="602" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"/>

</soap:Header>

<soap:Body>

<GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="ASUAdTB" ChangeKey="otlIqBwrt=="/>

<t:ResponseObjects>

<t:ForwardItem/>

</t:ResponseObjects>

<t:Start>2006-06-16T00:30:00Z</t:Start>

<t:End>2006-06-16T01:00:00Z</t:End>

<t:LegacyFreeBusyStatus>Busy</t:LegacyFreeBusyStatus>

<t:CalendarItemType>Single</t:CalendarItemType>

<t:Organizer>

<t:Mailbox>

<t:Name>Bob</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Mailbox>

</t:Organizer>

</t:CalendarItem>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</GetItemResponse>

</soap:Body>

</soap:Envelope>

Description
The following example shows a successful response to the GetItem request. The request
that created this response used the AllProperties baseshape. In this example, the
response returns the AllProperties shape for a calendar item.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="602" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"/>

</soap:Header>

<soap:Body>

<GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:CalendarItem>

<t:ItemId Id="ASUAdT" ChangeKey="otlIqB=="/>

<t:ParentFolderId Id="ASUAdT=="/>

<t:ItemClass>IPM.Appointment</t:ItemClass>

<t:Sensitivity>Normal</t:Sensitivity>

<t:Body BodyType="Text"/>

<t:DateTimeReceived>2006-06-16T00:12:41Z</t:DateTimeReceived>

<t:Size>374</t:Size>

<t:Importance>Normal</t:Importance>

<t:IsSubmitted>false</t:IsSubmitted>

<t:IsDraft>false</t:IsDraft>

<t:IsFromMe>false</t:IsFromMe>

<t:IsResend>false</t:IsResend>

<t:IsUnmodified>false</t:IsUnmodified>

<t:DateTimeSent>2006-06-16T00:12:41Z</t:DateTimeSent>

<t:DateTimeCreated>2006-06-16T00:12:41Z</t:DateTimeCreated>

<t:ResponseObjects>

<t:ForwardItem/>

</t:ResponseObjects>

<t:ReminderDueBy>2006-06-16T00:30:00Z</t:ReminderDueBy>

<t:ReminderIsSet>true</t:ReminderIsSet>

<t:ReminderMinutesBeforeStart>15</t:ReminderMinutesBeforeStart>

<t:DisplayCc/>

<t:DisplayTo/>

<t:HasAttachments>false</t:HasAttachments>
<t:Culture>en-US</t:Culture>

<t:Start>2006-06-16T00:30:00Z</t:Start>

<t:End>2006-06-16T01:00:00Z</t:End>

<t:IsAllDayEvent>false</t:IsAllDayEvent>

<t:LegacyFreeBusyStatus>Busy</t:LegacyFreeBusyStatus>

<t:IsMeeting>false</t:IsMeeting>
<t:IsCancelled>false</t:IsCancelled>

<t:IsRecurring>false</t:IsRecurring>

<t:MeetingRequestWasSent>false</t:MeetingRequestWasSent>

<t:CalendarItemType>Single</t:CalendarItemType>

<t:MyResponseType>Organizer</t:MyResponseType>

<t:Organizer>

<t:Mailbox>

<t:Name>Bob</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Mailbox>

</t:Organizer>

<t:ConflictingMeetingCount>2</t:ConflictingMeetingCount>

<t:AdjacentMeetingCount>0</t:AdjacentMeetingCount>

<t:ConflictingMeetings>

<t:CalendarItem>

<t:ItemId Id="ASUAdTB" ChangeKey="otlIqBwr=="/>

<t:Subject/>

<t:Start>2006-06-16T00:30:00Z</t:Start>

<t:End>2006-06-16T01:00:00Z</t:End>

<t:LegacyFreeBusyStatus>Busy</t:LegacyFreeBusyStatus>

<t:Location/>

</t:CalendarItem>

<t:CalendarItem>

<t:ItemId Id="ASUAd" ChangeKey="otlIqBw=="/>

<t:Subject/>

<t:Start>2006-06-16T00:30:00Z</t:Start>

<t:End>2006-06-16T01:00:00Z</t:End>

<t:LegacyFreeBusyStatus>Busy</t:LegacyFreeBusyStatus>

<t:Location/>

</t:CalendarItem>

</t:ConflictingMeetings>

<t:Duration>PT30M</t:Duration>

<t:TimeZone>Pacific Standard Time</t:TimeZone>

<t:AppointmentSequenceNumber>0</t:AppointmentSequenceNumber>

<t:AppointmentState>0</t:AppointmentState>

</t:CalendarItem>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</GetItemResponse>

</soap:Body>

</soap:Envelope>

Comments
To find other options for the response message of the GetItem operation, explore the
schema hierarchy. Start at the GetItemResponse element.

Successful response elements


The following elements are used in the response:

ServerVersionInfo

GetItemResponse

ResponseMessages

GetItemResponseMessage
ResponseCode

Items

CalendarItem

ItemId

ParentFolderId

ItemClass

Sensitivity

Body

DateTimeReceived

Size

Importance

IsSubmitted

IsDraft

IsFromMe

IsResend

IsUnmodified

DateTimeSent

DateTimeCreated

ResponseObjects

ForwardItem

ReminderDueBy

ReminderIsSet

ReminderMinutesBeforeStart

DisplayCc

DisplayTo
HasAttachments

Culture

Start

End

IsAllDayEvent

LegacyFreeBusyStatus

IsMeeting

IsCancelled

IsRecurring

MeetingRequestWasSent

CalendarItemType

MyResponseType

Organizer

Mailbox

Name (EmailAddressType)

EmailAddress (NonEmptyStringType)

RoutingType (EmailAddressType)

ConflictingMeetingCount

AdjacentMeetingCount

ConflictingMeetings

Location

Duration (Items)

TimeZone (Item)

AppointmentSequenceNumber

AppointmentState
See also
GetItem operation
GetItem operation (task)
Article • 03/29/2023 • 2 minutes to read

The GetItem operation is used to get tasks from the Exchange store.

Remarks
The format of the GetItem request for tasks is the same as GetItem for any other item
type. The only difference is in which additional properties can be requested within the
response shape. Such additional properties must either be task-related properties or
extended properties.

Task GetItem request example

Description
The following example of a GetItem request shows how to get a task item.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<GetItem
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<ItemShape>

<t:BaseShape>AllProperties</t:BaseShape>

</ItemShape>

<ItemIds>

<t:ItemId Id="AAAtAEFkb..."/>

</ItemIds>

</GetItem>

</soap:Body>

</soap:Envelope>

Comments
7 Note

The item identifier and change key have been shortened to preserve readability.

Request elements
The following elements are used in the request:

GetItem

ItemShape

BaseShape

ItemIds

ItemId

Task GetItem response example

Description
The following example shows a successful response to a GetItem request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="662" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"/>

</soap:Header>

<soap:Body>

<GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Task>

<t:ItemId Id="AAAtAEA=" ChangeKey="EwAAAB"/>

<t:ParentFolderId Id="AAAtAEFkbWl=" ChangeKey="AQAAAA=="/>

<t:ItemClass>IPM.Task</t:ItemClass>

<t:Subject>Buy new shoes</t:Subject>

<t:Sensitivity>Normal</t:Sensitivity>

<t:Body BodyType="Text"/>

<t:DateTimeReceived>2006-09-15T15:23:08Z</t:DateTimeReceived>

<t:Size>153</t:Size>

<t:Importance>Normal</t:Importance>

<t:IsSubmitted>false</t:IsSubmitted>

<t:IsDraft>true</t:IsDraft>

<t:IsFromMe>false</t:IsFromMe>

<t:IsResend>false</t:IsResend>

<t:IsUnmodified>false</t:IsUnmodified>

<t:DateTimeSent>2006-09-15T15:23:08Z</t:DateTimeSent>

<t:DateTimeCreated>2006-09-15T15:23:08Z</t:DateTimeCreated>

<t:HasAttachments>false</t:HasAttachments>
<t:Culture>en-US</t:Culture>

<t:ChangeCount>1</t:ChangeCount>

<t:IsComplete>false</t:IsComplete>

<t:IsRecurring>false</t:IsRecurring>

<t:PercentComplete>0</t:PercentComplete>

<t:Status>NotStarted</t:Status>

<t:StatusDescription>Not Started</t:StatusDescription>

</t:Task>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</GetItemResponse>

</soap:Body>

</soap:Envelope>

Comments

7 Note

The item and folder identifiers and change keys have been shortened to preserve
readability.

Successful response elements


The following elements are used in the response:
ServerVersionInfo

GetItemResponse

ResponseMessages

GetItemResponseMessage

ResponseCode

Items

Task

ItemId

ParentFolderId

ItemClass

Subject

Sensitivity

Body

DateTimeReceived

Size

Importance

IsSubmitted

IsDraft

IsFromMe

IsResend

IsUnmodified

DateTimeSent

DateTimeCreated

HasAttachments

Culture
ChangeCount

IsComplete

IsRecurring

PercentComplete

Status

StatusDescription

See also
GetItem operation

Creating Tasks

Updating Tasks

Deleting Tasks
GetItem operation (contact)
Article • 03/29/2023 • 2 minutes to read

The GetItem operation is used to get contact items from the Exchange store.

GetItem (Contact) request example

Description
The following example shows how to get an item from the Exchange store.

Code
XML

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<GetItem
xmlns='https://schemas.microsoft.com/exchange/services/2006/messages'>

<ItemShape>

<t:BaseShape>AllProperties</t:BaseShape>

</ItemShape>

<ItemIds>

<t:ItemId Id="AAAtAE=" ChangeKey="EQAAABY" />

</ItemIds>

</GetItem>

</soap:Body>

</soap:Envelope>

Comments
The request to get an item from the Exchange store takes the same form for all item
types. The responses to requests for different items will be different because different
items return different information based on the response shapes.

7 Note

The item identifier has been shortened to preserve readability.


Request elements
The following elements are used in the request:

GetItem

ItemShape

BaseShape

ItemIds

ItemId

Successful GetItem (Contact) Response

Description
The following code example shows a successful GetItem response for the
AllPropertiesBaseShape.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="602" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Contact>
<t:ItemId Id="AAAtAEA=" ChangeKey="EQAAABYq" />

<t:ParentFolderId Id="AQAtAEFk==" ChangeKey="AQAAAA==" />

<t:ItemClass>IPM.Contact</t:ItemClass>

<t:Sensitivity>Normal</t:Sensitivity>

<t:Body BodyType="Text" />

<t:DateTimeReceived>2006-08-18T17:31:18Z</t:DateTimeReceived>

<t:Size>382</t:Size>

<t:Importance>Normal</t:Importance>

<t:IsSubmitted>false</t:IsSubmitted>

<t:IsDraft>true</t:IsDraft>

<t:IsFromMe>false</t:IsFromMe>

<t:IsResend>false</t:IsResend>

<t:IsUnmodified>false</t:IsUnmodified>

<t:DateTimeSent>2006-08-18T17:31:18Z</t:DateTimeSent>

<t:DateTimeCreated>2006-08-18T17:31:18Z</t:DateTimeCreated>

<t:HasAttachments>false</t:HasAttachments>
<t:Culture>en</t:Culture>

<t:FileAs>SampleContact</t:FileAs>

<t:FileAsMapping>None</t:FileAsMapping>

<t:DisplayName>Tanja Plate</t:DisplayName>

<t:GivenName>Tanja</t:GivenName>
<t:Initials>T.P.</t:Initials>

<t:CompleteName>

<t:FirstName>Tanja</t:FirstName>

<t:LastName>Plate</t:LastName>

<t:Initials>T.P.</t:Initials>

<t:FullName>Tanja Plate</t:FullName>

</t:CompleteName>

<t:CompanyName>Northwind Traders</t:CompanyName>

<t:EmailAddresses>

<t:Entry Key="EmailAddress1">[email protected]</t:Entry>

<t:Entry Key="EmailAddress2">[email protected]</t:Entry>

</t:EmailAddresses>

<t:PhysicalAddresses>

<t:Entry Key="Business">

<t:Street>12345 67th Ave</t:Street>

<t:City>Whittier</t:City>

<t:State>CA</t:State>

<t:Country>USA</t:Country>

</t:Entry>

</t:PhysicalAddresses>

<t:PhoneNumbers>

<t:Entry Key="BusinessPhone">5625550199</t:Entry>

</t:PhoneNumbers>

<t:JobTitle>Project Manager</t:JobTitle>

<t:Surname>Plate</t:Surname>

</t:Contact>

</m:Items>

</m:GetItemResponseMessage>

</m:ResponseMessages>

</GetItemResponse>

</soap:Body>

</soap:Envelope>

Comments
The item identifier has been shortened to preserve readability.

Successful response elements


The following elements are used in the response for a GetItem request with a response
shape of AllProperties for a contact item.

ServerVersionInfo

GetItemResponse

ResponseMessages

GetItemResponseMessage

ResponseCode

Items

Contact

ItemId

ParentFolderId

ItemClass

Sensitivity

Body

DateTimeReceived

Size

Importance

IsSubmitted

IsDraft

IsFromMe

IsResend

IsUnmodified
DateTimeSent

DateTimeCreated

HasAttachments

Culture

FileAs

FileAsMapping

DisplayName (string)

GivenName

Initials

CompleteName

FirstName

LastName

FullName

CompanyName

EmailAddresses

Entry (EmailAddress)

PhysicalAddresses

Entry (PhysicalAddress)

Street

City

State

CountryOrRegion

PhoneNumbers

Entry (PhoneNumber)

JobTitle
Surname

Invalid GetItem (Contact) request example

Description
The following code example shows an invalid request.

Code
XML

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<GetItem
xmlns='https://schemas.microsoft.com/exchange/services/2006/messages'>

<ItemShape>

<t:BaseShape>AllProperties</t:BaseShape>

<t:IncludeMimeContent>true</t:IncludeMimeContent>

</ItemShape>

<ItemIds>

<t:ItemId Id="AAAtAEF=" ChangeKey="EQAAABq" />

</ItemIds>

</GetItem>

</soap:Body>

</soap:Envelope>

Comments
Item identifiers have been shortened to preserve readability.

GetItem (Contact) error response

Description
The following code example shows an error response to a GetItem (Contact) request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="602" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<GetItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetItemResponseMessage ResponseClass="Error">
<m:MessageText>Mime conversion is not supported for this item
type.</m:MessageText>

<m:ResponseCode>ErrorUnsupportedMimeConversion</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:Items />

</m:GetItemResponseMessage>

</m:ResponseMessages>

</GetItemResponse>

</soap:Body>

</soap:Envelope>

Error response elements


The following elements are used in the error response:

ServerVersionInfo

GetItemResponse

ResponseMessages

GetItemResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey
Items

See also
GetItem operation

EWS XML elements in Exchange


GetMailTips operation
Article • 03/29/2023 • 2 minutes to read

The GetMailTips operation gets the mail tips information for the specified mailbox.

GetMailTips request example

Description
The client constructs the request XML and sends it to the server. The request identifies
who the client is sending as, the mailbox to retrieve the mail tips for, and what mail tips
are requested. In this example, the client requests that all mail tips be returned for the
selected mailbox.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<GetMailTips
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<SendingAs>

<t:EmailAddress> [email protected] </t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</SendingAs>

<Recipients>

<t:Mailbox>

<t:EmailAddress> [email protected] </t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Mailbox>

</Recipients>

<MailTipsRequested>All</MailTipsRequested>

</GetMailTips>

</soap:Body>

</soap:Envelope>

Request elements
The following elements are included in the request:

GetMailTips

SendingAs

Recipients (ArrayOfRecipientsType)

MailTipsRequested

Successful GetMailTips response example

Description
The following Simple Object Access Protocol (SOAP) body example shows a successful
response to the GetMailTips request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14" MinorVersion="0"


MajorBuildNumber="536" MinorBuildNumber="0" Version="Exchange2010"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<GetMailTipsResponse ResponseClass="Success"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<ResponseMessages>

<MailTipsResponseMessageType ResponseClass="Success">

<ResponseCode>NoError</ResponseCode>

<m:MailTips
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"> 20
/ 29 [MS-OXWMT] — v20100517 Mail Tips Web Service Extensions Copyright ©
2010 Microsoft Corporation. Release: Monday, May 17, 2010

<t:RecipientAddress
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<t:Name/>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:RecipientAddress>

<t:PendingMailTips
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"/>

<t:OutOfOffice
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<t:ReplyBody>

<t:Message/>

</t:ReplyBody>

</t:OutOfOffice>

<t:MailboxFull
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">false</
t:MailboxFull>

<t:CustomMailTip
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">Hello
World Mailtips</t:CustomMailTip>

<t:TotalMemberCount
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">1</t:To
talMemberCount>

<t:ExternalMemberCount
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">0</t:Ex
ternalMemberCount>

<t:MaxMessageSize
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">1048576
0</t:MaxMessageSize>

<t:DeliveryRestricted
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">false</
t:DeliveryRestricted>

<t:IsModerated
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">false</
t:IsModerated>

<t:InvalidRecipient
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">false</
t:InvalidRecipient>

</m:MailTips>

</MailTipsResponseMessageType>

</ResponseMessages>

</GetMailTipsResponse>

</s:Body>

</s:Envelope>

Response elements
The following elements are included in the response:

ResponseCode

MailTips
See also
EWS operations in Exchange

EWS XML elements in Exchange


GetMessageTrackingReport operation
Article • 03/29/2023 • 2 minutes to read

The GetMessageTrackingReport operation gets tracking information about the


specified messages.

See also
EWS operations in Exchange
EWS XML elements in Exchange
GetNonIndexableItemDetails operation
Article • 03/29/2023 • 2 minutes to read

Find information about the GetNonIndexableItemDetails EWS operation.

The GetNonIndexableItemDetails operation retrieves details about items that cannot be


indexed. This includes, but is not limited to, the item identifier, an error code, an error
description, when an attempt was made to index the item, and additional information
about the file.

7 Note

Although the schema indicates that more than one mailbox can be searched, in the
initial release version of Exchange 2013, the service only supports getting item
details for nonindexable items in a single mailbox.

This operation was introduced in Exchange Server 2013.

Using the GetNonIndexableItemDetails


operation
The GetNonIndexableItemDetails operation identifies mailbox items that cannot be
indexed and provides information about why the items cannot be indexed. Items that
cannot be indexed are not searched during a discovery search.

GetNonIndexableItemDetails operation SOAP headers


The GetNonIndexableItemDetails operation can use the SOAP headers that are listed in
the following table.

Header name Element Description

ManagementRole ManagementRole
Identifies the server roles that are necessary in order
for the caller to make the request. This header is
applicable to a request.

RequestVersion
RequestServerVersion Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.
GetNonIndexableItemDetails operation request
example: Get the details of an item that cannot
be indexed
The following example of a GetNonIndexableItemDetails operation request shows how
to request the details for items that cannot be indexed for a single mailbox. The search
is performed across both primary and archive mailboxes.

7 Note

All legacy domain names in this example have be shortened to preserve readability.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body >

<m:GetNonIndexableItemDetails>

<m:Mailboxes>

<t:LegacyDN>/o=First Organization/ou=Exchange Administrative


Group (FYT)/cn=Recipients/cn=35-Steve</t:LegacyDN>

</m:Mailboxes>
<m:SearchArchiveOnly>false</m:SearchArchiveOnly>

</m:GetNonIndexableItemDetails>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

GetNonIndexableItemDetails

Mailboxes (NonEmptyArrayOfLegacyDNsType)

LegacyDN

SearchArchiveOnly
Successful GetNonIndexableItemDetails
operation response
The following example shows a successful response to a GetNonIndexableItemDetails
operation request to get items that cannot be indexed for a single mailbox. The item in
this example that cannot be indexed is the binaryfile.abc file, which is of an unknown
format.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="526"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetNonIndexableItemDetailsResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<NonIndexableItemDetailsResult>

<Items
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<NonIndexableItemDetail>

<ItemId Id="AQMkAGVmNDAyOQAAAY2fUAAAAA=="
ChangeKey="CQAAAA=="/>

<ErrorCode>DocumentParserFailure</ErrorCode>

<ErrorDescription>The document parser encountered a


processing error.</ErrorDescription>

<IsPartiallyIndexed>false</IsPartiallyIndexed>

<IsPermanentFailure>true</IsPermanentFailure>

<SortValue>502511175756</SortValue>

<AttemptCount>0</AttemptCount>

<LastAttemptTime>2012-11-15T01:56:11Z</LastAttemptTime>

<AdditionalInfo> 301002 Error parsing document


'exchange://localhost/Attachment/d987b1f4-9aa7-42b3-aa8c-
9515a35dfa1a/1f3047d4-c287-41e4-910c-feb70c1a59f0/ef402830-3d33-4a0d-a4e9-
d8576900060d/85b83861-0026-418f-8464-
be2036696333/502511175756.0/binaryfile.abc'. Document has an undetectable
format and will not be parsed.</AdditionalInfo>

</NonIndexableItemDetail>

</Items>

</NonIndexableItemDetailsResult>

</GetNonIndexableItemDetailsResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

GetNonIndexableItemDetailsResponse

ResponseCode

NonIndexableItemDetailsResult

NonIndexableItemDetail

ItemId

ErrorCode (ItemIndexErrorType)

ErrorDescription

IsPartiallyIndexed

IsPermanentFailure

SortValue

AttemptCount

LastAttemptTime

AdditionalInfo

GetNonIndexableItemDetails operation error


response
The following example shows an error response to a GetNonIndexableItemDetails
operation request. This is a response to a request to get item details for items that
cannot be indexed from more than one mailbox.

XML
<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="526"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<GetNonIndexableItemDetailsResponse ResponseClass="Error"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>Multiple mailboxes is currently not supported, only


single mailbox is supported.</MessageText>

<ResponseCode>ErrorInvalidArgument</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</GetNonIndexableItemDetailsResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

GetNonIndexableItemDetailsResponse

MessageText

ResponseCode

DescriptiveLinkKey

For additional error codes that are generic to EWS and specific to this operation, see
ResponseCode.

See also
EWS operations in Exchange

GetSearchableMailboxes operation

SearchMailboxes operation
GetHoldOnMailboxes operation

SetHoldOnMailboxes operation

GetDiscoverySearchConfiguration operation

GetNonIndexableItemStatistics operation
GetNonIndexableItemStatistics
operation
Article • 03/29/2023 • 2 minutes to read

Find information about the GetNonIndexableItemStatistics EWS operation.

The GetNonIndexableItemStatistics operation retrieves the count of items that cannot


be indexed in a mailbox.

This operation was introduced in Exchange Server 2013.

Using the GetNonIndexableItemStatistics


operation
The GetNonIndexableItemStatistics operation counts mailbox items that cannot be
indexed. Items that cannot be indexed are not searched during a discovery search.

GetNonIndexableItemStatistics operation SOAP headers


The GetNonIndexableItemStatistics operation can use the SOAP headers that are listed
in the following table.

Header name Element Description

ManagementRole ManagementRole
Identifies the server roles that are necessary in order
for the caller to make the request. This header is
applicable to a request.

RequestVersion
RequestServerVersion Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

GetNonIndexableItemStatistics operation
request example: Get the count of items that
cannot be indexed in a mailbox
The following example of a GetNonIndexableItemStatistics operation request shows
how to request the count of items that cannot be indexed in a mailbox.

7 Note

All legacy domain names in this example have be shortened to preserve readability.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body >

<m:GetNonIndexableItemStatistics>

<m:Mailboxes>

<t:LegacyDN>/o=First Organization/ou=Exchange Administrative


Group (FYDIDLT)/cn=Recipients/cn=3518cf-Steve</t:LegacyDN>

</m:Mailboxes>
<m:SearchArchiveOnly>false</m:SearchArchiveOnly>

</m:GetNonIndexableItemStatistics>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

GetNonIndexableItemStatistics

Mailboxes (NonEmptyArrayOfLegacyDNsType)

LegacyDN

SearchArchiveOnly

Successful GetNonIndexableItemStatistics
operation response
The following example shows a successful response to a GetNonIndexableItemStatistics
operation request to get the count of items that cannot be indexed in a mailbox.
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="526"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetNonIndexableItemStatisticsResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<NonIndexableItemStatistics>

<NonIndexableItemStatistic
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Mailbox>/o=First Organization/ou=Exchange Administrative


Group (FYT)/cn=Recipients/cn=35181acf-Steve</Mailbox>

<ItemCount>2</ItemCount>

</NonIndexableItemStatistic>

</NonIndexableItemStatistics>

</GetNonIndexableItemStatisticsResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

GetNonIndexableItemStatisticsResponse

ResponseCode

NonIndexableItemStatistics

NonIndexableItemStatistic

Mailbox (string)

ItemCount
GetNonIndexableItemStatistics operation error
response
The following example shows an error response to a GetNonIndexableItemStatistics
operation request. This is a response to a request to get the count of items that cannot
be indexed from more than one mailbox.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="526"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetNonIndexableItemStatisticsResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>Multiple mailboxes is currently not supported, only


single mailbox is supported.</MessageText>

<ResponseCode>ErrorInvalidArgument</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</GetNonIndexableItemStatisticsResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

GetNonIndexableItemStatisticsResponse

MessageText

ResponseCode

DescriptiveLinkKey
For additional error codes that are generic to EWS and specific to this operation, see
ResponseCode.

See also
EWS operations in Exchange

GetSearchableMailboxes operation

SearchMailboxes operation

GetHoldOnMailboxes operation

SetHoldOnMailboxes operation

GetDiscoverySearchConfiguration operation

GetNonIndexableItemDetails operation
GetPasswordExpirationDate operation
Article • 03/29/2023 • 2 minutes to read

The GetPasswordExpirationDate operation provides the email account password


expiration date for the current user.

This operation was introduced in Exchange Server 2010 Service Pack 1 (SP1).

GetPasswordExpirationDate operation SOAP


headers
The GetPasswordExpirationDate operation can use the SOAP headers that are listed in
the following table.

Header Element Description

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, "Tags for
the Identification of Languages", to be used to access
the mailbox. This is applicable to a request.

RequestVersion RequestServerVersion Identifies the schema for the operation request. This is
applicable to a request. This is applicable to a request.

GetPasswordExpirationDate operation request


example

Description
The following example of a GetPasswordExpirationDate operation request shows how
to get the password expiration date for an email account.

Code
XML

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Header>

</soap:Header>

<soap:Body>

<tns:GetPasswordExpirationDate>

<tns:MailboxSmtpAddress>user1@DTZMZX-
dom.extest.microsoft.com</tns:MailboxSmtpAddress>

</tns:GetPasswordExpirationDate>

</soap:Body>

</soap:Envelope>

Request elements
The following elements are used in the request:

GetPasswordExpirationDate

MailboxSmtpAddress

Successful GetPasswordExpirationDate
operation response
The following elements are used in the response:

GetPasswordExpirationDateResponse

PasswordExpirationDate
GetPersona operation
Article • 03/29/2023 • 2 minutes to read

Find information about the GetPersona EWS operation.

The GetPersona operation returns a set of properties that are associated with a persona.

This operation was introduced in Exchange Server 2013.

Using the GetPersona operation


The GetPersona operation provides access to aggregated contact information in the
form of a persona. The PersonaId element in the request identifies the persona to return
in the response. The response can contain a default set of persona properties or a
custom property set. We recommend that you specify a custom property set so that
unused properties are not processed and sent from the server to the client.

GetPersona operation SOAP headers


The GetPersona operation can use the SOAP headers that are listed in the following
table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

GetPersona operation request example: Return


a default set of properties for a persona
The following example of a GetPersona operation request shows how to return a default
set of properties that are associated with a persona.

XML
<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013"/>

</soap:Header>

<soap:Body
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<GetPersona>

<PersonaId Id="AAQkADEzAQAKtOtR/l4MlLqHWORfhSYKU="/>

</GetPersona>

</soap:Body>

</soap:Envelope>

The response SOAP body contains the following elements:

GetPersona

PersonaId

Successful GetPersona operation response


The following example shows a successful response to a GetPersona operation request.

7 Note

All item identifiers and change keys in this article have been shortened to preserve
readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="432"

MinorBuildNumber="5"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetPersonaResponseMessage ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<Persona>

<PersonaId Id="AAQkADEzAQAKtOtR="

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"/>

<PersonaType
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">Person</P
ersonaType>

<CreationTime
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">2012-06-
01T17:00:34Z</CreationTime>

<DisplayName
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">Brian
Johnson</DisplayName>

<DisplayNameFirstLast
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">Brian
Johnson</DisplayNameFirstLast>

<DisplayNameLastFirst
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">Johnson
Brian</DisplayNameLastFirst>

<FileAs
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">Johnson,
Brian</FileAs>

<FileAsId
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">None</Fil
eAsId>

<GivenName
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">Brian</Gi
venName>

<Surname
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">Johnsoon<
/Surname>

<CompanyName
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">Contoso</
CompanyName>

<RelevanceScore
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">425555011
0</RelevanceScore>

<Attributions
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Attribution>

<Id>0</Id>

<SourceId Id="AAMkA =" ChangeKey="EQAAABY+"/>

<DisplayName>Outlook</DisplayName>

<IsWritable>true</IsWritable>

<IsQuickContact>false</IsQuickContact>

<IsHidden>false</IsHidden>

<FolderId Id="AAMkA=" ChangeKey="AQAAAA=="/>

</Attribution>

</Attributions>

<DisplayNames
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<StringAttributedValue>

<Value>Brian Johnson</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</DisplayNames>

<FileAses
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<StringAttributedValue>

<Value>Johnson, Brian</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</FileAses>

<FileAsIds
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<StringAttributedValue>

<Value>None</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</FileAsIds>

<GivenNames
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<StringAttributedValue>

<Value>Brian</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</GivenNames>

<Surnames
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<StringAttributedValue>

<Value>Johnson</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</Surnames>

<MobilePhones
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<PhoneNumberAttributedValue>

<Value>

<Number>(425)555-0110</Number>

<Type>Mobile</Type>

</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</PhoneNumberAttributedValue>

</MobilePhones>

<CompanyNames
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<StringAttributedValue>

<Value>Contoso</Value>

<Attributions>

<Attribution>0</Attribution>

</Attributions>

</StringAttributedValue>

</CompanyNames>

</Persona>

</GetPersonaResponseMessage>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

GetPersonaResponseMessage

ResponseCode

Persona

PersonaId

PersonaType

CreationTime

DisplayNameFirstLast

DisplayNameLastFirst

FileAs

FileAsId

GivenName

Surname

CompanyName

RelevanceScore

Attributions (ArrayOfValueAttributionsType)

Attribution (string)
ID (String)

SourceId SourceId

DisplayName (string)

IsWritable

IsQuickContact

IsHidden

FolderId

DisplayNames

StringAttributedValue

Value (ArrayOfStringValueType)

Attributions (ArrayOfPersonaAttributionsType)

Attribution (PersonaAttributionType)

FileAses

FileAsIds

GivenNames

Surnames

MobilePhones

PhoneNumberAttributedValue

Value (PersonaPhoneNumberType)

Number

Type (string)

CompanyNames

GetPersona operation error response


The following example shows an error response to a GetPersona operation request. This
is a response to a request that contains an incorrectly specified persona identifier.
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="578"

MinorBuildNumber="11"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetPersonaResponseMessage ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>Id is malformed.</MessageText>

<ResponseCode>ErrorInvalidIdMalformed</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</GetPersonaResponseMessage>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

GetPersonaResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

For additional error codes that are generic to EWS and specific to this operation, see
ResponseCode.

See also
EWS operations in Exchange

People and contacts in EWS in Exchange

FindPeople operation
GetPhoneCallInformation operation
Article • 03/29/2023 • 2 minutes to read

The GetPhoneCallInformation operation returns information about the specified


telephone call.

GetPhoneCallInformation request example

Description
The following example of a GetPhoneCallInformation request shows how to form a
request to get information about a specific telephone call.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xs="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:GetPhoneCallInformation>

<m:PhoneCallId Id="NDDY5uY29y9t"/>

</m:GetPhoneCallInformation>

</soap:Body>

</soap:Envelope>

GetPhoneCallInformation response example

Description
The following example shows a successful response to the GetPhoneCallInformation
request. The response represents a telephone call that is currently connected.
Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="20"

Version="Exchange2010"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<GetPhoneCallInformationResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<m:PhoneCallInformation
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<t:PhoneCallState
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">Connect
ed</t:PhoneCallState>

<t:ConnectionFailureCause
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">None</t
:ConnectionFailureCause>

</m:PhoneCallInformation>

</GetPhoneCallInformationResponse>

</s:Body>

</s:Envelope>

See also
EWS operations in Exchange
EWS XML elements in Exchange
GetReminders operation
Article • 03/29/2023 • 3 minutes to read

Find information about the GetReminders EWS operation.

The GetReminders Exchange Web Services (EWS) operation retrieves reminders for
calendar and task items.

This operation was introduced in Exchange Server 2013.

Using the GetReminders operation


The GetReminders operation gets reminders for current and future calendar and task
items in the user's mailbox, depending on the element values passed in the request. The
operation can retrieve all current and future calendar items as well as tasks that have a
reminder set. Private calendar items are included in responses. Tasks without reminders
are not included in responses, nor are emails with reminders or follow up flags.

To retrieve all current reminders, we recommend setting the ReminderType to All and
the EndTime to the current time.

If the BeginTime and EndTime elements are included in the request, the response
includes reminders for any calendar and task items that occur between have a reminder
that occurs between the BeginTime and EndTime.

The following table describes the behavior of the ReminderType element when the
BeginTime and EndTime elements are included.

ReminderType Description
element value

All Reminders that occur between the BeginTime and EndTime.

Current Reminders returned by All, plus reminders that are earlier than the requested
time window if the event is still ongoing, plus all appointments regardless of
age.

Old Reminders returned by All, minus events that haven't completed yet, minus all
appointments. The BeginTime and EndTime elements must be set to use the
Old value.

GetReminders operation SOAP headers


The GetReminders operation can use the SOAP headers that are listed in the following
table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, "Tags


for the Identification of Languages", to be used to
access the mailbox. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

GetReminders operation request example


The following example of a GetReminders operation request shows how to retrieve the
first five calendar items that occur between the BeginTime and EndTime.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:GetReminders>

<m:EndTime>2014-04-16T21:00:00Z</m:EndTime>

<m:ReminderType>All</m:ReminderType>

</m:GetReminders>

</soap:Body>

</soap:Envelope>

The example request SOAP body contains the following elements:

GetReminders
EndTime

ReminderType

The SOAP body can also contain the following elements:

BeginTime

MaxItems

Successful GetReminders operation response


The following example shows a successful response to a GetReminders operation
request. The response contains a reminder for the "Team meeting" calendar item and a
reminder for the "Task to send meeting notes" task.

7 Note

Identifiers have been shortened to preserve readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="918"

MinorBuildNumber="7"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<GetRemindersResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<Reminders>

<Reminder
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Subject>Team meeting</Subject>

<Location />

<ReminderTime>2014-04-15T21:00:00Z</ReminderTime>

<StartDate>2014-04-15T21:00:00Z</StartDate>

<EndDate>2014-04-15T21:30:00Z</EndDate>

<ItemId Id="vQAAAA=="

ChangeKey="DwAAABYAAAB4to43JyybTYwHLBM1k8MxAAACRoV4" />

<RecurringMasterItemId Id="K7u5AAA="
ChangeKey="DwAAABYAAAB4to43JyybTYwHLBM1k8MxAAACRoV0" />

<ReminderGroup>Calendar</ReminderGroup>

<UID>6CF2FA62</UID>

</Reminder>

<Reminder
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Subject>Task to send meeting notes</Subject>

<Location />

<ReminderTime>2014-04-16T14:00:00Z</ReminderTime>

<StartDate>0001-01-02T00:00:00Z</StartDate>

<EndDate>0001-01-02T00:00:00Z</EndDate>

<ItemId Id="vAAAAA=="

ChangeKey="EwAAABQAAACOs0HEMq1WTKpI7sNu5qXNAAAIDg==" />

<ReminderGroup>Task</ReminderGroup>

<UID>vAAAAA==</UID>

</Reminder>

</Reminders>

</GetRemindersResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

GetRemindersResponse

Reminders

Reminder

Subject

Location

ReminderTime

StartDate

EndDate

ItemId

RecurringMasterItemId

ReminderGroup
UID

GetReminders operation error response


example
The following example shows an error response to a GetReminders operation request.
This is a response to a request in which the end date was earlier than the start date.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="918"

MinorBuildNumber="7"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<GetRemindersResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>EndDate is earlier than StartDate</MessageText>

<ResponseCode>ErrorInvalidOperation</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</GetRemindersResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

GetRemindersResponse

MessageText

ResponseCode

DescriptiveLinkKey
For additional error codes that are generic to EWS and specific to this operation, see
ResponseCode.

See also
PerformReminderAction
GetRoomLists operation
Article • 03/29/2023 • 2 minutes to read

The GetRoomLists operation gets the room lists that are available within the Exchange
organization.

SOAP Headers
The GetRoomLists operation can use the SOAP headers that are listed and described in
the following table.

Header Element Description

Impersonation ExchangeImpersonation Identifies the user whom the client application is


impersonating.

MailboxCulture MailboxCulture Identifies the RFC3066 culture to be used to access


the mailbox.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request.

ServerVersion ServerVersionInfo
Identifies the version of the server that responded to
the request.

GetRoomLists request example

Description
The following is an example of a GetRoomLists request that returns the room lists that
are available on the server.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version ="Exchange2010_SP1"/>

</soap:Header>

<soap:Body>

<m:GetRoomLists />

</soap:Body>

</soap:Envelope>

Request elements
The following element is used in the request:

GetRoomLists

Successful GetRoomLists response example

Description
The following is an example of a response to a GetRoomLists request. This response
shows one room list on the server.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14" MinorVersion="1"


MajorBuildNumber="164" MinorBuildNumber="0" Version="Exchange2010_SP1"
xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<GetRoomListsResponse ResponseClass="Success"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<m:RoomLists
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<t:Address
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<t:Name>Room List</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>PublicDL</t:MailboxType>

</t:Address>

</m:RoomLists>

</GetRoomListsResponse>

</s:Body>

</s:Envelope>

Successful GetRoomLists response elements


The following elements are used in the response:

ServerVersionInfo

GetRoomListsResponse

ResponseCode

RoomLists

EmailAddress (NonEmptyStringType)

RoutingType (EmailAddress)

MailboxType

GetRoomLists Error response example

Description

The following example shows the response to an attempt to get room lists from a server
that does not have any room lists defined.

Code

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14" MinorVersion="1"


MajorBuildNumber="164" MinorBuildNumber="0" Version="Exchange2010_SP1"
xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<GetRoomListsResponse ResponseClass="Success"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<m:RoomLists
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"/>

</GetRoomListsResponse>

</s:Body>

</s:Envelope>

GetRoomLists Error response elements


The following elements are used in the error response:

ServerVersionInfo

GetRoomListsResponse

ResponseCode

RoomLists

See also
EWS operations in Exchange

EWS XML elements in Exchange


GetRooms operation
Article • 03/29/2023 • 2 minutes to read

The GetRooms operation gets the rooms within the specified room list.

Note : Rooms which are marked "Hidden from GAL" can't be retrieved through this
method.

SOAP Headers
The GetRooms operation can use the SOAP headers that are listed and described in the
following table.

Header Element Description

Impersonation ExchangeImpersonation Identifies the user whom the client application is


impersonating.

MailboxCulture MailboxCulture Identifies the RFC3066 culture to be used to access


the mailbox.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request.

ServerVersion ServerVersionInfo
Identifies the version of the server that responded to
the request.

GetRooms request example

Description
The following is an example of a GetRooms request that gets the rooms that are
associated with a room list.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version ="Exchange2010_SP1"/>

</soap:Header>

<soap:Body>

<m:GetRooms>

<m:RoomList>

<t:EmailAddress>[email protected]</t:EmailAddress>

</m:RoomList>

</m:GetRooms>

</soap:Body>

Request elements
The following elements are used in the request:

RequestServerVersion

GetRooms

RoomList

EmailAddress (NonEmptyStringType)

Successful GetRooms response example

Description
The following response shows the email address information for the rooms that are
associated with the room list.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14" MinorVersion="1"


MajorBuildNumber="164" MinorBuildNumber="0" Version="Exchange2010_SP1"
xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<GetRoomsResponse ResponseClass="Success"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<m:Rooms
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<t:Room
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<t:Id>

<t:Name>Room01</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Id>

</t:Room>

<t:Room
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<t:Id>

<t:Name>Room02</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Id>

</t:Room>

</m:Rooms>

</GetRoomsResponse>

</s:Body>

</s:Envelope>

Successful GetRooms response elements


The following elements are used in the response:

ServerVersionInfo

GetRoomsResponse

ResponseCode

Rooms

Room

Name (EmailAddress)

EmailAddress (NonEmptyStringType)

RoutingType (EmailAddress)
MailboxType

GetRooms Error response example

Description
The following example shows an error response caused by an attempt to get room
information for a nonexistent room list.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14" MinorVersion="1"


MajorBuildNumber="164" MinorBuildNumber="0" Version="Exchange2010_SP1"
xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<GetRoomsResponse ResponseClass="Error"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>No results were found.</MessageText>

<ResponseCode>ErrorNameResolutionNoResults</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</GetRoomsResponse>

</s:Body>

</s:Envelope>

GetRooms Error response elements


The following elements are used in the response:

ServerVersionInfo

GetRoomsResponse

MessageText

ResponseCode
DescriptiveLinkKey

See also
EWS operations in Exchange
EWS XML elements in Exchange
GetSearchableMailboxes operation
Article • 03/29/2023 • 3 minutes to read

) Important

Starting on April 1, 2020, the GetSearchableMailboxes operation will no longer be


available in Exchange Online. This operation won't be affected in on-premises
versions of Exchange Server. For more information, see Retirement of legacy
eDiscovery tools in Exchange Online.

Find information about the GetSearchableMailboxes EWS operation.

The GetSearchableMailboxes operation gets a scoped set of searchable mailboxes for


discovery searches. The scope of searchable mailboxes returned in the response is
determined by the search filter and whether distribution group membership is
expanded.

7 Note

This operation is intended to be used with the search filter and to retrieve only the
first few thousands; it's not intended for exhaustive retrieval.

This operation was introduced in Exchange Server 2013.

Using the GetSearchableMailboxes operation


The GetSearchableMailboxes operation gets information about searchable mailboxes.
The following arguments can be passed in the request:

SearchFilter - Accepts a single email alias as an argument.

ExpandGroupMembership - Indicates whether the distribution group membership


is expanded in the results returned in the response.

If the email alias set in the search filter is a distribution group and the distribution group
membership is not expanded, the response will contain the mailbox information for the
distribution group. If the email alias set in the search filter is a distribution group and
the distribution group membership is expanded, the response will contain the mailbox
information for each mailbox that is a member of the distribution group. If the search
filter contains a single user's alias, the response will contain the mailbox information for
the single user. The response will contain all searchable mailboxes if the
GetSearchableMailboxes element is empty. This is the same as having an empty
SearchFilter element and the ExpandGroupMembership element set to false.

GetSearchableMailboxes operation SOAP headers


The GetSearchableMailboxes operation can use the SOAP headers that are listed in the
following table.

Header name Element Description

ManagementRole ManagementRole
Identifies the server roles that are necessary in order
for the caller to make the request. This header is
applicable to a request.

RequestVersion
RequestServerVersion Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

GetSearchableMailboxes operation request


example: Request information about a
distribution group
The following example of a GetSearchableMailboxes operation request shows how to
get the mailbox information for the lolgroup distribution group.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body >

<m:GetSearchableMailboxes>

<m:SearchFilter>lolgroup</m:SearchFilter>

<m:ExpandGroupMembership>false</m:ExpandGroupMembership>

</m:GetSearchableMailboxes>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

GetSearchableMailboxes
SearchFilter
ExpandGroupMembership

Successful GetSearchableMailboxes operation


response: Get information about a distribution
group
The following example shows a successful response to a GetSearchableMailboxes
operation request to get the discovery information for the lolgroup distribution group.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="526"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetSearchableMailboxesResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<SearchableMailboxes>

<SearchableMailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Guid>33a408fe-2574-4e3b-49f5-5e1e000a3035</Guid>

<PrimarySmtpAddress>[email protected]</PrimarySmtpAddress>

<IsExternalMailbox>false</IsExternalMailbox>

<ExternalEmailAddress/>

<DisplayName>LOLgroup</DisplayName>

<IsMembershipGroup>true</IsMembershipGroup>

<ReferenceId>/o=First/ou=Exchange(FYLT)/cn=Recipients/cn=81213b958a0b5295b13
b3f02b812bf1bc-LOLgroup</ReferenceId>

</SearchableMailbox>

</SearchableMailboxes>

</GetSearchableMailboxesResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

GetSearchableMailboxesResponse
ResponseCode
SearchableMailboxes
SearchableMailbox
Guid
PrimarySmtpAddress
IsExternalMailbox
ExternalEmailAddress
DisplayName (string)
IsMembershipGroup
ReferenceId

Successful GetSearchableMailboxes operation


response: Get information about an expanded
distribution group
The following example shows a successful response to a GetSearchableMailboxes
operation request to get the discovery information about members of the expanded
lolgroup distribution group.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"


MajorBuildNumber="526" MinorBuildNumber="0" Version="Exchange2013"
xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<GetSearchableMailboxesResponse ResponseClass="Success"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<SearchableMailboxes>

<SearchableMailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Guid>e2d42cdf-a227-1ec3-486b-6fa0ebaadb9f5</Guid>

<PrimarySmtpAddress>[email protected]</PrimarySmtpAddress>

<IsExternalMailbox>false</IsExternalMailbox>

<ExternalEmailAddress/>

<DisplayName>Julia Smith</DisplayName>

<IsMembershipGroup>false</IsMembershipGroup>

<ReferenceId>/o=First Organization/ou=Exchange Administrative


Group (FYDLT)/cn=Recipients/cn=0a1fc86f883846152405d60956dd02e7-
Julia</ReferenceId>

</SearchableMailbox>

<SearchableMailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Guid>45d0fff1-6541-459a-a343-52453b30e12ca</Guid>

<PrimarySmtpAddress>[email protected]</PrimarySmtpAddress>

<IsExternalMailbox>false</IsExternalMailbox>

<ExternalEmailAddress/>

<DisplayName>Laura Moore</DisplayName>

<IsMembershipGroup>false</IsMembershipGroup>

<ReferenceId>/o=First Organization/ou=Exchange Administrative


Group (FYDLT)/cn=Recipients/cn=2910d8f8316f4378bbf9338d8f9d714b-
Laura</ReferenceId>

</SearchableMailbox>

<SearchableMailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Guid>3c620d04-8b33-435a-95be-5b939375576</Guid>

<PrimarySmtpAddress>[email protected]</PrimarySmtpAddress>

<IsExternalMailbox>false</IsExternalMailbox>

<ExternalEmailAddress/>

<DisplayName>Steven Brown</DisplayName>

<IsMembershipGroup>false</IsMembershipGroup>

<ReferenceId>/o=First Organization/ou=Exchange Administrative


Group (FYDLT)/cn=Recipients/cn=90312341a742f0e47e392c80a60d13ecf-
Steve</ReferenceId>

</SearchableMailbox>

</SearchableMailboxes>

</GetSearchableMailboxesResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

GetSearchableMailboxesResponse
ResponseCode
SearchableMailboxes
SearchableMailbox
Guid
PrimarySmtpAddress
IsExternalMailbox
ExternalEmailAddress
DisplayName (string)
IsMembershipGroup
ReferenceId

GetSearchableMailboxes operation error


response
The following example shows an error response to a GetSearchableMailboxes operation
request. This is a response to a request to get all searchable mailboxes when the
ExpandGroupMembership argument is set to true.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="526"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetSearchableMailboxesResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>Cannot use wildcard or empty query when auto group


expansion is enabled.</MessageText>

<ResponseCode>ErrorInvalidArgument</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

<SearchableMailboxes/>

</GetSearchableMailboxesResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

GetSearchableMailboxesResponse
MessageText
ResponseCode
DescriptiveLinkKey
SearchableMailboxes

For additional error codes that are generic to EWS and specific to this operation, see
ResponseCode.

See also
EWS operations in Exchange
SetHoldOnMailboxes operation
SearchMailboxes operation
GetHoldOnMailboxes operation
GetDiscoverySearchConfiguration operation
GetNonIndexableItemDetails operation
GetNonIndexableItemStatistics operation
GetServerTimeZones operation
Article • 03/29/2023 • 2 minutes to read

The GetServerTimeZones operation returns information from time zone definitions that
are available on an Exchange server.

SOAP Headers
The GetServerTimeZones operation can use the SOAP headers that are listed and
described in the following table.

Header Element Description

MailboxCulture MailboxCulture Identifies the RFC3066 culture to be used to access the


mailbox.

RequestVersion RequestServerVersion Identifies the schema version for the operation request.

ServerVersion ServerVersionInfo
Identifies the version of the server that responded to
the request.

GetServerTimeZones request examples

Getting the Name and Identifier of Each Time Zone


The following code example shows how to retrieve the name and identifier for the
Eastern Standard Time and Pacific Standard Time time zones.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010"/>

</soap:Header>

<soap:Body>

<m:GetServerTimeZones ReturnFullTimeZoneData="false">

<m:Ids>

<t:Id>Eastern Standard Time</Id>

<t:Id>Pacific Standard Time</Id>

</m:Ids>

</m:GetServerTimeZones>

</soap:Body>

</soap:Envelope>

Comments
Each Id (TimeZone) element contains the identifier of a time zone definition that is being
requested. To request information for all time zones, omit the Ids element from the
request.

Getting the Full Definition of Each Time Zone


The following code example shows how to retrieve the full time zone definition for the
Eastern Standard Time time zone.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010"/>

</soap:Header>

<soap:Body>

<m:GetServerTimeZones ReturnFullTimeZoneData="true">

<m:Ids>

<t:Id>Eastern Standard Time</Id>

</m:Ids>

</m:GetServerTimeZones>

</soap:Body>

</soap:Envelope>

Comments
Each Id (TimeZone) element contains the identifier of a time zone definition that is being
requested. To request information for all time zones, omit the Ids element from the
request.

GetServerTimeZones response examples

Receiving the Time Zone Name and Identifier Only


The following example of a GetServerTimeZones response shows a successful response
to a GetServerTimeZones request in which the ReturnFullTimeZoneData attribute was
set to false. The response contains the name and identifier for the Eastern Standard
Time and Pacific Standard Time time zones.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="11"

Version="Exchange2010"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<GetServerTimeZonesResponse
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetServerTimeZonesResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</ResponseCode>

<m:TimeZoneDefinitions>

<t:TimeZoneDefinition Id="Eastern Standard Time" Name="(GMT-


05:00) Eastern Time (US &amp;amp; Canada)" />

<t:TimeZoneDefinition Id="Pacific Standard Time" Name="(GMT-


08:00) Pacific Time (US &amp;amp; Canada)" />

</m:TimeZoneDefinitions>

</m:GetServerTimeZonesResponseMessage>

</m:ResponseMessages>

</m:GetServerTimeZonesResponse>

</soap:Body>

</soap:Envelope>

Receiving a Full Time Zone Definition


The following example of a GetServerTimeZones response shows a successful response
to a GetServerTimeZones request in which the ReturnFullTimeZoneData attribute was
set to true. The response contains the full time zone definition for the Eastern Standard
Time time zone.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="11"

Version="Exchange2010"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<GetServerTimeZonesResponse
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetServerTimeZonesResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</ResponseCode>

<m:TimeZoneDefinitions>

<t:TimeZoneDefinition Id="Eastern Standard Time" Name="(GMT-


05:00) Eastern Time (US &amp;amp; Canada)">

<t:Periods>

<t:Period Bias="PT5H" Name="Standard"


Id="trule:Microsoft/Registry/EasternStandardTime/2006-Standard" />

<t:Period Bias="PT4H" Name="Daylight"


Id="trule:Microsoft/Registry/EasternStandardTime/2006-Daylight" />

<t:Period Bias="PT5H" Name="Standard"


Id="trule:Microsoft/Registry/EasternStandardTime/2007-Standard" />

<t:Period Bias="PT4H" Name="Daylight"


Id="trule:Microsoft/Registry/EasternStandardTime/2007-Daylight" />

</t:Periods>

<t:TransitionsGroups>

<t:TransitionsGroup Id="0">

<t:RecurringDayTransition>

<t:To
Kind="Period">trule:Microsoft/Registry/EasternStandardTime/2006-
Daylight</t:To>

<t:TimeOffset>PT2H</t:TimeOffset>

<t:Month>4</t:Month>

<t:DayOfWeek>Sunday</t:DayOfWeek>

<t:Occurrence>1</t:Occurrence>

</t:RecurringDayTransition>

<t:RecurringDayTransition>

<t:To
Kind="Period">trule:Microsoft/Registry/EasternStandardTime/2006-
Standard</t:To>

<t:TimeOffset>PT2H</t:TimeOffset>

<t:Month>10</t:Month>

<t:DayOfWeek>Sunday</t:DayOfWeek>

<t:Occurrence>-1</t:Occurrence>

</t:RecurringDayTransition>

</t:TransitionsGroup>

<t:TransitionsGroup Id="1">

<t:RecurringDayTransition>

<t:To
Kind="Period">trule:Microsoft/Registry/EasternStandardTime/2007-
Daylight</t:To>

<t:TimeOffset>PT2H</t:TimeOffset>

<t:Month>3</t:Month>

<t:DayOfWeek>Sunday</t:DayOfWeek>

<t:Occurrence>2</t:Occurrence>

</t:RecurringDayTransition>

<t:RecurringDayTransition>

<t:To
Kind="Period">trule:Microsoft/Registry/EasternStandardTime/2007-
Standard</t:To>

<t:TimeOffset>PT2H</t:TimeOffset>

<t:Month>11</t:Month>

<t:DayOfWeek>Sunday</t:DayOfWeek>

<t:Occurrence>1</t:Occurrence>

</t:RecurringDayTransition>

</t:TransitionsGroup>

</t:TransitionsGroups>

<t:Transitions>

<t:Transition>

<t:To Kind="Group">0</t:To>

</t:Transition>

<t:AbsoluteDateTransition>

<t:To Kind="Group">1</t:To>

<t:DateTime>2007-01-01T00:00:00</t:DateTime>

</t:AbsoluteDateTransition>

</t:Transitions>

</t:TimeZoneDefinition>

</m:TimeZoneDefinitions>

</m:GetServerTimeZonesResponseMessage>

</m:ResponseMessages>

</m:GetServerTimeZonesResponse>

</soap:Body>

</soap:Envelope>

See also
GetServerTimeZones

GetServerTimeZonesResponse

GetServerTimeZonesType

EWS operations in Exchange

EWS XML elements in Exchange


GetServiceConfiguration operation
Article • 03/29/2023 • 2 minutes to read

The GetServiceConfiguration operation gets configuration information for the specified


type of service. This operation can return configuration settings for the Unified
Messaging, Protection Rules, and Mail Tips services.

GetServiceConfiguration request example

Description
The following example of a GetServiceConfiguration request shows how to form a
request to get configuration information for the Unified Messaging service.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xs="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:GetServiceConfiguration>

<m:RequestedConfiguration>

<m:ConfigurationName>UnifiedMessagingConfiguration</m:ConfigurationName>

</m:RequestedConfiguration>

</m:GetServiceConfiguration>

</soap:Body>

</soap:Envelope>

GetServiceConfiguration response example

Description
The following example shows a successful response to the GetServiceConfiguration
request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="20"

Version="Exchange2010"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<GetServiceConfigurationResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<ResponseMessages>

<ServiceConfigurationResponseMessageType ResponseClass="Success">

<ResponseCode>NoError</ResponseCode>

<m:UnifiedMessagingConfiguration
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<t:UmEnabled
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">true</t
:UmEnabled>

<t:PlayOnPhoneDialString
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">user@co
ntoso.com</t:PlayOnPhoneDialString>

<t:PlayOnPhoneEnabled
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">true</t
:PlayOnPhoneEnabled>

</m:UnifiedMessagingConfiguration>

</ServiceConfigurationResponseMessageType>

</ResponseMessages>

</GetServiceConfigurationResponse>

</s:Body>

</s:Envelope>

GetServiceConfiguration Error response


example

Description
The following example shows an error response to the GetServiceConfiguration
request. This error was caused by an incorrect configuration name.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Body>

<s:Fault>

<faultcode
xmlns:a="https://schemas.microsoft.com/exchange/services/2006/types">a:Error
SchemaValidation</faultcode>

<faultstring xml:lang="en-US">The request failed schema validation:

The
'https://schemas.microsoft.com/exchange/services/2006/messages:Configuration
Name' element

is invalid - The value 'UUnifiedMessagingConfiguration' is invalid


according to its

datatype
'https://schemas.microsoft.com/exchange/services/2006/types:ServiceConfigura
tionType'

- The Enumeration constraint failed.</faultstring>

<detail>

<e:ResponseCode
xmlns:e="https://schemas.microsoft.com/exchange/services/2006/errors">ErrorS
chemaValidation</e:ResponseCode>

<e:Message
xmlns:e="https://schemas.microsoft.com/exchange/services/2006/errors">The
request failed schema validation.</e:Message>

<t:MessageXml
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<t:LineNumber>13</t:LineNumber>

<t:LinePosition>62</t:LinePosition>

<t:Violation>The
'https://schemas.microsoft.com/exchange/services/2006/messages:Configuration
Name' element

is invalid - The value 'UUnifiedMessagingConfiguration' is invalid


according to its

datatype
'https://schemas.microsoft.com/exchange/services/2006/types:ServiceConfigura
tionType'

- The Enumeration constraint failed.</t:Violation>

</t:MessageXml>

</detail>

</s:Fault>

</s:Body>

</s:Envelope>

See also
EWS operations in Exchange

EWS XML elements in Exchange


GetSharingFolder operation
Article • 03/29/2023 • 2 minutes to read

The GetSharingFolder operation gets the local folder identifier of a specified shared
folder.

SOAP Headers
The GetSharingFolder operation can use the SOAP headers that are listed and described
in the following table.

Header Element Description

RequestVersion RequestServerVersion Identifies the schema version for the operation request.

ServerVersion ServerVersionInfo
Identifies the version of the server that responded to
the request.

GetSharingFolder request example

Getting the Local Folder Identifier by Specifying the


SharedFolderId Element of the Folder Being Shared
The following code example shows how to form a request to get the identifier of the
local folder that corresponds to the folder that is being shared. The folder that is being
shared is identified by the SMTP address of the mailbox that contains the folder that is
being shared and by the SharedFolderId element that represents the identifier of that
folder. In this example, the folder that is being shared is owned by [email protected].

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010"/>

</soap:Header>

<soap:Body>

<m:GetSharingFolder>

<m:SmtpAddress>[email protected]</m:SmtpAddress>

<m:SharedFolderId>AAMkA=</m:SharedFolderId>

</m:GetSharingFolder>

</soap:Body>

</soap:Envelope>

Getting the Local Folder Identifier by Specifying the


DataType Element of the Folder Being Shared
The following code example shows how to form a request to get the identifier of the
local folder that corresponds to the folder that is being shared. The folder that is being
shared is identified by the SMTP address of the mailbox that contains the folder that is
being shared and by the DataType element that represents the type of data in that
folder. In this example, the folder that is being shared is the Contacts folder that is
owned by [email protected].

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010"/>

</soap:Header>

<soap:Body>

<m:GetSharingFolder>

<m:SmtpAddress>[email protected]</m:SmtpAddress>

<m:DataType>Contacts</m:DataType>

</m:GetSharingFolder>

</soap:Body>

</soap:Envelope>

Comments
For information about the possible values of the DataType element, see DataType.
Successful GetSharingFolder Response

Description
The following example shows a successful response to a GetSharingFolder request. The
Id attribute of the SharingFolderId element represents the identifier of the local folder in
the sharing relationship.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="11"

Version="Exchange2010"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<GetSharingFolderResponseMessage ResponseClass="Success"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseCode>NoError</m:ResponseCode>
<m:SharingFolderId Id="AAMkAD=" ChangeKey="AwAAA=" />

</GetSharingFolderResponseMessage>

</soap:Body>

</soap:Envelope>

GetSharingFolder error response

Description
The following example shows an error response to a GetSharingFolder request. In this
example, the error occurred because the request specified both the SharingFolderId and
DataType elements. Note that only one or the other of those two elements can be
specified, but not both.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="11"

Version="Exchange2010"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<GetSharingFolderResponseMessage ResponseClass="Error"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:MessageText>Either DataType or SharedFolderId must be specified,


but not both.</m:MessageText>

<m:ResponseCode>ErrorInvalidGetSharingFolderRequest</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</GetSharingFolderResponseMessage>

</soap:Body>

</soap:Envelope>

See also
GetSharingFolder

GetSharingFolderType

GetSharingFolderResponseMessage

GetSharingFolderResponseMessageType

EWS operations in Exchange

EWS XML elements in Exchange


GetSharingMetadata operation
Article • 03/29/2023 • 2 minutes to read

The GetSharingMetadata operation gets an opaque authentication token that identifies


a sharing invitation.

SOAP Headers
The GetSharingMetadata operation can use the SOAP headers that are listed and
described in the following table.

Header Element Description

RequestVersion RequestServerVersion Identifies the schema version for the operation request.

ServerVersion ServerVersionInfo
Identifies the version of the server that responded to
the request.

GetSharingMetadata request example

Description
The following example shows how to form a request to get an opaque authentication
token that identifies a sharing invitation. In this example, [email protected] wants to
share the folder that is specified by the IdOfFolderToShare element with
[email protected] and [email protected].

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010"/>

</soap:Header>

<soap:Body>

<m:GetSharingMetadata>

<m:IdOfFolderToShare Id="AAMkAD=" ChangeKey="AwAAA=" />

<m:SenderSmtpAddress>[email protected]</m:SenderSmtpAddress>

<m:Recipients>

<t:SmtpAddress>[email protected]</t:SmtpAddress>

<t:SmtpAddress>[email protected]</t:SmtpAddress>

</m:Recipients>

</m:GetSharingMetadata>

</soap:Body>

</soap:Envelope>

Comments
The Recipients (ArrayOfSmtpAddressType) element contains one SmtpAddress element
for each intended recipient of the sharing invitation.

Successful GetSharingMetadata Response

Description
The following example shows a successful response to a GetSharingMetadata request.
In this example, two recipients were specified in the corresponding
GetSharingMetadata request: [email protected] and [email protected].

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="11"

Version="Exchange2010"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<GetSharingMetadataResponseMessage ResponseClass="Success"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseCode>NoError</ResponseCode>

<m:EncryptedSharedFolderDataCollection>

<t:EncryptedSharedFolderData>

<t:Token>

<EncryptedData Id="Assertion0"
Type="http://www.w3.org/2001/04/xmlenc#Element"
xmlns="http://www.w3.org/2001/04/xmlenc#">

<EncryptionMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc">
</EncryptionMethod>

<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">

<EncryptedKey>

<EncryptionMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
</EncryptionMethod>

<ds:KeyInfo Id="keyinfo">

<wsse:SecurityTokenReference
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
wssecurity-secext-1.0.xsd">

<wsse:KeyIdentifier

EncodingType="http://docs.oasis-
open.org/wss/2004/01/oasis-200401-wss-soap-message-security-
1.0#Base64Binary"

ValueType="http://docs.oasis-
open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-
1.0#X509SubjectKeyIdentifier">

B4VEEAf=

</wsse:KeyIdentifier>

</wsse:SecurityTokenReference>

</ds:KeyInfo>

<CipherData>

<CipherValue>GI/Dxqvw2na==</CipherValue>

</CipherData>

</EncryptedKey>

</ds:KeyInfo>

<CipherData>

<CipherValue>L77I7Hr06z</CipherValue>

</CipherData>

</EncryptedData>

</t:Token>

<t:Data>

<EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element"
xmlns="http://www.w3.org/2001/04/xmlenc#">

<EncryptionMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc" />

<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">

<EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#">

<EncryptionMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#kw-tripledes" />

<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">

<KeyName>key</KeyName>

</KeyInfo>

<CipherData>

<CipherValue>9UgtjrHiU</CipherValue>

</CipherData>

</EncryptedKey>

</KeyInfo>

<CipherData>

<CipherValue>NCNsJoGtQ==</CipherValue>

</CipherData>

</EncryptedData>

</t:Data>

</t:EncryptedSharedFolderData>

</m:EncryptedSharedFolderDataCollection>

<m:InvalidRecipients>

<t:InvalidRecipient>

<t:SmtpAddress>[email protected]</t:SmtpAddress>

<t:ResponseCode>RecipientOrganizationNotFederated</t:ResponseCode>

<m:MessageText>The organization of these recipients is not


federated for external sharing.</m:MessageText>

</t:InvalidRecipient>

</m:InvalidRecipients>

</GetSharingMetadataResponseMessage>

</soap:Body>

</soap:Envelope>

Comments
The response contains one EncryptedSharedFolderData element for each organization
that is represented by valid recipients that are specified in the GetSharingMetadata
request.

The GetSharingMetadata request will succeed even if invalid recipients are specified in
the request. The InvalidRecipients element contains information about invalid recipients.
For information about the reasons why a recipient might be invalid, see ResponseCode
(InvalidRecipientResponseCodeType).

If all intended recipients are invalid, the EncryptedSharedFolderDataCollection element


will be empty.

GetSharingMetadata error response

Description
The following example shows an error response to a GetSharingMetadata request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="11"

Version="Exchange2010"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<GetSharingMetadataResponseMessage ResponseClass="Error"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:MessageText>The SMTP address format is invalid.</MessageText>

<m:ResponseCode>ErrorInvalidSmtpAddress</ResponseCode>

<m:DescriptiveLinkKey>0</DescriptiveLinkKey>

</GetSharingMetadataResponseMessage>

</soap:Body>

</soap:Envelope>

See also
GetSharingMetadata

GetSharingMetadataType

GetSharingMetadataResponseMessage

GetSharingMetadataResponseMessageType

EWS operations in Exchange

EWS XML elements in Exchange


GetStreamingEvents operation
Article • 03/29/2023 • 2 minutes to read

Find information about the GetStreamingEvents EWS operation.

The GetStreamingEvents operation is used by streaming subscription clients to request


notifications from the Client Access server. The GetStreamingEvents response returns an
array of items and events that have occurred in a mailbox since the last the notification.

GetStreamingEvents request example

Description
The following example of a GetStreamingEvents operation shows how to request the
events and items that are associated with a subscription that is identified by the
subscription identifier.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Body>

<GetStreamingEvents
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<SubscriptionIds>
<SubscriptionId>f6bc657d-dde1-4f94-952d-
143b95d6483d</SubscriptionId>

</SubscriptionIds>

<ConnectionTimeout>30</ConnectionTimeout>

</GetStreamingEvents>

</soap:Body>

</soap:Envelope>

GetStreamingEvents request elements


The following elements are used in the request:

GetStreamingEvents
SubscriptionIds

ConnectionTimeout

Successful GetStreamingEvents response


example

Description
The following example of a GetStreamingEvents response shows the notifications that
are sent to the client when a new email message is received. It includes notifications for
the following events: CreatedEvent, NewMail, and ModifiedEvent.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<ServerVersionInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" MajorVersion="15"
MinorVersion="0" MajorBuildNumber="775" MinorBuildNumber="7" Version="V2_4"
xmlns="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<m:GetStreamingEventsResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetStreamingEventsResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Notifications>

<m:Notification>

<t:SubscriptionId>f6bc657d-dde1-4f94-952d-
143b95d6483d</t:SubscriptionId>

<t:CreatedEvent>

<t:TimeStamp>2013-09-16T04:31:29Z</t:TimeStamp>

<t:ItemId
Id="AAMkADkzNjJjODUzLWZhMDMtNDVkMS05ZDdjLWVmMDlkYjQ1Zjc4MwBGAAAAAABSSWVKrmGU
TJE+MVIvofglBwDZGACZQpSgSpyNkexYe2b7AAAAAAENAADZGACZQpSgSpyNkexYe2b7AAANGFYw
AAA=" ChangeKey="CQAAAA==" />

<t:ParentFolderId
Id="AQMkADkzNjJjODUzLWZhMDMtNDVkMS05ZDdjLWVmMDlkYjQ1Zjc4MwAuAAADUkllSq5hlEyR
PjFSL6H4JQEA2RgAmUKUoEqcjZHsWHtm+wAAAgENAAAA" ChangeKey="AQAAAA==" />

</t:CreatedEvent>

<t:NewMailEvent>

<t:TimeStamp>2013-09-16T04:31:29Z</t:TimeStamp>

<t:ItemId
Id="AAMkADkzNjJjODUzLWZhMDMtNDVkMS05ZDdjLWVmMDlkYjQ1Zjc4MwBGAAAAAABSSWVKrmGU
TJE+MVIvofglBwDZGACZQpSgSpyNkexYe2b7AAAAAAENAADZGACZQpSgSpyNkexYe2b7AAANGFYw
AAA=" ChangeKey="CQAAAA==" />

<t:ParentFolderId
Id="AQMkADkzNjJjODUzLWZhMDMtNDVkMS05ZDdjLWVmMDlkYjQ1Zjc4MwAuAAADUkllSq5hlEyR
PjFSL6H4JQEA2RgAmUKUoEqcjZHsWHtm+wAAAgENAAAA" ChangeKey="AQAAAA==" />

</t:NewMailEvent>

<t:ModifiedEvent>

<t:TimeStamp>2013-09-16T04:31:29Z</t:TimeStamp>

<t:FolderId
Id="AQMkADkzNjJjODUzLWZhMDMtNDVkMS05ZDdjLWVmMDlkYjQ1Zjc4MwAuAAADUkllSq5hlEyR
PjFSL6H4JQEA2RgAmUKUoEqcjZHsWHtm+wAAAgENAAAA" ChangeKey="AQAAAA==" />

<t:ParentFolderId
Id="AQMkADkzNjJjODUzLWZhMDMtNDVkMS05ZDdjLWVmMDlkYjQ1Zjc4MwAuAAADUkllSq5hlEyR
PjFSL6H4JQEA2RgAmUKUoEqcjZHsWHtm+wAAAgEJAAAA" ChangeKey="AQAAAA==" />

<t:UnreadCount>1</t:UnreadCount>

</t:ModifiedEvent>

</m:Notification>

</m:Notifications>

</m:GetStreamingEventsResponseMessage>

</m:ResponseMessages>

</m:GetStreamingEventsResponse>

</soap:Body>

GetStreamingEvents response elements


The following elements are used in the response:

GetStreamingEventsResponse

ResponseMessages

GetStreamingEventsResponseMessage

NotesFolderPermissionLevel

Notification

SubscriptionId (GetStreamingEvents)

To find other options for the response message of the GetStreamingEvents operation,
explore the schema hierarchy. Start at the Notification element.

GetStreamingEvents error response example

Description
The following example shows an error response to a GetStreamingEvents request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="628" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<GetStreamingEventsResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:GetStreamingEventsResponseMessage ResponseClass="Error">

<m:MessageText></m:MessageText>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:ResponseCode>ErrorInvalidSubscription</m:ResponseCode>

<m:ConnectionStatus>Closed</m:ConnectionStatus>

</m:ResponseMessages>

</GetStreamingEventsResponse>

</soap:Body>

</soap:Envelope>

Remarks
When processing a GetStreamingEvents request, the Client Access server performs the
following steps:

1. The SubscriptionId (GetStreamingEvents) of the request is confirmed to be a valid


subscription that is hosted on the Client Access server. If it is not, the
GetStreamingEvents call fails.

2. The SMTP address of the authenticated user for the request is validated to have
impersonation rights. If they do not, the GetStreamingEvents request fails.

3. The subscription queue is queried for events that are waiting to be sent to the
client. If the queue is not empty, the first 50 events from the queue are pulled from
the queue and encoded into a notification.

4. If no events are found in the queue, a StatusEvent is generated and encoded into a
notification response.

5. The notification response is returned to the client.

6. The events that are included in the notification are removed from the subscription
queue and the Client Access server-local last watermark for the subscription is set
to the watermark of the last event that is returned.

7. The timeout timer for the subscription is reset.

See also
Subscribe operation

Unsubscribe operation
GetUserAvailability operation
Article • 03/29/2023 • 4 minutes to read

Find information about the GetUserAvailability EWS operation.

The GetUserAvailability operation provides detailed information about the availability of


a set of users, rooms, and resources within a specified time period.

Using the GetUserAvailability operation


The GetUserAvailability operation provides current user availability information at a
specified level of detail. Client applications such as Outlook, Outlook Web Access,
Outlook Mobile Access, and others use SMTP addresses to identify the requested user
information.

The Availability service expands distribution lists to retrieve the free/busy status for each
member of the list, as long as the number of mailboxes in the distribution list is less
than 100, which is the maximum number of identities that the GetUserAvailability
operation can request. The free/busy statuses of the members of the distribution list are
merged into a single free/busy status for the whole distribution list.

Client application requests specify the time period of the availability query. The default
time period for the requested information is 42 days. If the user's calendar contains
appointments or meetings that are both within and outside the defined time period for
the query, the appointment is returned.

The appointment and meeting times that are returned are in the same time zone as the
client application that is requesting the meeting.

The Availability service processes the request for each client. The service expands all the
recurring appointments and returns the maximum number of calendar details that the
requesting client has permission to receive.

7 Note

If the target mailbox is unavailable or cannot be found, a


MailRecipientNotFoundException exception is thrown. The client receives an error
message that states that the mail recipient is not found in the Active Directory
directory service or Active Directory Domain Services (AD DS).
GetUserAvailability operation SOAP headers
The GetUserAvailability operation can use the SOAP headers that are listed in the
following table.

Header Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client is
impersonating. This header is applicable to a
request.

RequestVersion
RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded
to the request. This header is applicable to a
response.

TimeZoneContext TimeZoneContext
Specifies a SOAP header that identifies the time
zone to be used for all responses from the server.
All times that are returned from the server will be
converted to the specified time zone. This header
is applicable to a response.

GetUserAvailability request example: Get


availability information
The following example of a GetUserAvailability operation request shows how to get
detailed availability information for two users in the Pacific Time time zone.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<GetUserAvailabilityRequest
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<t:TimeZone
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Bias>480</Bias>

<StandardTime>

<Bias>0</Bias>

<Time>02:00:00</Time>

<DayOrder>5</DayOrder>

<Month>10</Month>

<DayOfWeek>Sunday</DayOfWeek>

</StandardTime>

<DaylightTime>

<Bias>-60</Bias>

<Time>02:00:00</Time>

<DayOrder>1</DayOrder>

<Month>4</Month>

<DayOfWeek>Sunday</DayOfWeek>

</DaylightTime>

</t:TimeZone>

<MailboxDataArray>

<t:MailboxData>

<t:Email>

<t:Address>[email protected]</t:Address>

</t:Email>

<t:AttendeeType>Required</t:AttendeeType>

<t:ExcludeConflicts>false</t:ExcludeConflicts>
</t:MailboxData>

<t:MailboxData>

<t:Email>

<t:Address>[email protected]</t:Address>

</t:Email>

<t:AttendeeType>Required</t:AttendeeType>

<t:ExcludeConflicts>false</t:ExcludeConflicts>
</t:MailboxData>

</MailboxDataArray>

<t:FreeBusyViewOptions>

<t:TimeWindow>

<t:StartTime>2006-10-16T00:00:00</t:StartTime>

<t:EndTime>2006-10-16T23:59:59</t:EndTime>

</t:TimeWindow>

<t:MergedFreeBusyIntervalInMinutes>60</t:MergedFreeBusyIntervalInMinutes>

<t:RequestedView>DetailedMerged</t:RequestedView>

</t:FreeBusyViewOptions>

</GetUserAvailabilityRequest>

</soap:Body>

</soap:Envelope>

For more information about retrieving suggested meetings by using the


SuggestionsViewOptions element, see the schema in the EWS virtual directory.

The request SOAP body contains the following elements:

GetUserAvailabilityRequest

TimeZone (Availability)

Bias (UTC)
StandardTime

Bias

Time

DayOrder

Month

DayOfWeek (TimeZone)

DaylightTime

MailboxDataArray

MailboxData

Email (EmailAddressType)

Address (string)

AttendeeType

ExcludeConflicts

FreeBusyViewOptions

TimeWindow

StartTime

EndTime

Successful GetUserAvailability operation


response
The following example shows a successful response to the GetUserAvailability operation
request.

7 Note

The calendar event identifiers have been shortened to preserve readability.

XML
<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="665" MinorBuildNumber="7"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<GetUserAvailabilityResponse
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<FreeBusyResponseArray>

<FreeBusyResponse>

<ResponseMessage ResponseClass="Success">

<ResponseCode>NoError</ResponseCode>

</ResponseMessage>

<FreeBusyView>

<FreeBusyViewType
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">DetailedM
erged</FreeBusyViewType>

<MergedFreeBusy
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">000002220
220000000000000</MergedFreeBusy>

<CalendarEventArray
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<CalendarEvent>

<StartTime>2006-10-16T06:00:00-07:00</StartTime>

<EndTime>2006-10-16T06:30:00-07:00</EndTime>

<BusyType>Busy</BusyType>

<CalendarEventDetails>

<ID>14B6414B0</ID>

<Subject>Meet with Contoso Account Executives</Subject>

<Location />

<IsMeeting>false</IsMeeting>

<IsRecurring>false</IsRecurring>

<IsException>false</IsException>

<IsReminderSet>false</IsReminderSet>

<IsPrivate>false</IsPrivate>

</CalendarEventDetails>

</CalendarEvent>

<CalendarEvent>

<StartTime>2006-10-16T07:00:00-07:00</StartTime>

<EndTime>2006-10-16T08:00:00-07:00</EndTime>

<BusyType>Busy</BusyType>

<CalendarEventDetails>

<ID>E14B6414B0B</ID>

<Subject>Pick up my groceries</Subject>

<Location />

<IsMeeting>false</IsMeeting>

<IsRecurring>false</IsRecurring>

<IsException>false</IsException>

<IsReminderSet>false</IsReminderSet>

<IsPrivate>false</IsPrivate>

</CalendarEventDetails>

</CalendarEvent>

<CalendarEvent>

<StartTime>2006-10-16T09:40:00-07:00</StartTime>

<EndTime>2006-10-16T10:10:00-07:00</EndTime>

<BusyType>Busy</BusyType>

<CalendarEventDetails>

<ID>14B6414B0B1</ID>

<Subject>Meet with doctor</Subject>

<Location>Kirkland</Location>

<IsMeeting>false</IsMeeting>

<IsRecurring>false</IsRecurring>

<IsException>false</IsException>

<IsReminderSet>false</IsReminderSet>

<IsPrivate>false</IsPrivate>

</CalendarEventDetails>

</CalendarEvent>

</CalendarEventArray>

<WorkingHours
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<TimeZone>

<Bias>480</Bias>

<StandardTime>

<Bias>0</Bias>

<Time>02:00:00</Time>

<DayOrder>5</DayOrder>

<Month>10</Month>

<DayOfWeek>Sunday</DayOfWeek>

</StandardTime>

<DaylightTime>

<Bias>-60</Bias>

<Time>02:00:00</Time>

<DayOrder>1</DayOrder>

<Month>4</Month>

<DayOfWeek>Sunday</DayOfWeek>

</DaylightTime>

</TimeZone>

<WorkingPeriodArray>

<WorkingPeriod>

<DayOfWeek>Monday Tuesday Wednesday Thursday


Friday</DayOfWeek>

<StartTimeInMinutes>480</StartTimeInMinutes>

<EndTimeInMinutes>1020</EndTimeInMinutes>

</WorkingPeriod>

</WorkingPeriodArray>

</WorkingHours>

</FreeBusyView>

</FreeBusyResponse>

<FreeBusyResponse>

<ResponseMessage ResponseClass="Success">

<ResponseCode>NoError</ResponseCode>

</ResponseMessage>

<FreeBusyView>

<FreeBusyViewType
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">FreeBusyM
erged</FreeBusyViewType>

<MergedFreeBusy
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">000000001
100000000000000</MergedFreeBusy>

<CalendarEventArray
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<CalendarEvent>

<StartTime>2006-10-16T09:00:00-07:00</StartTime>

<EndTime>2006-10-16T10:00:00-07:00</EndTime>

<BusyType>Tentative</BusyType>

</CalendarEvent>

</CalendarEventArray>

<WorkingHours
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<TimeZone>

<Bias>480</Bias>

<StandardTime>

<Bias>0</Bias>

<Time>02:00:00</Time>

<DayOrder>5</DayOrder>

<Month>10</Month>

<DayOfWeek>Sunday</DayOfWeek>

</StandardTime>

<DaylightTime>

<Bias>-60</Bias>

<Time>02:00:00</Time>

<DayOrder>1</DayOrder>

<Month>4</Month>

<DayOfWeek>Sunday</DayOfWeek>

</DaylightTime>

</TimeZone>

<WorkingPeriodArray>

<WorkingPeriod>

<DayOfWeek>Monday Tuesday Wednesday Thursday


Friday</DayOfWeek>

<StartTimeInMinutes>480</StartTimeInMinutes>

<EndTimeInMinutes>1020</EndTimeInMinutes>

</WorkingPeriod>

</WorkingPeriodArray>

</WorkingHours>

</FreeBusyView>

</FreeBusyResponse>

</FreeBusyResponseArray>

</GetUserAvailabilityResponse>

</soap:Body>

</soap:Envelope>

The availability information for each user appears in a unique FreeBusyResponse


element. The order of users in the GetUserAvailability operation request determines the
order of availability data for each user in the response.
An error will be returned to the client if the number of appointments in the time period
that is defined in the query is greater than the administrator-specified maximum
number. The default maximum number of appointments is 10,000 single instances and
expanded recurrence items. This property can be configured only by an administrator.

The following elements are used in the response:

ServerVersionInfo

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

ResponseMessage

ResponseCode

FreeBusyView

FreeBusyViewType

MergedFreeBusy

CalendarEventArray

CalendarEvent

StartTime

EndTime

BusyType

CalendarEventDetails

ID

Subject (CalendarEventDetails)

Location (CalendarEventDetails)

IsMeeting (CalendarEventDetails)

IsRecurring (CalendarEventDetails)

IsException
IsReminderSet

IsPrivate

WorkingHours

TimeZone (Availability)

Bias (UTC)

StandardTime

Bias

Time

DayOrder

Month

DayOfWeek (TimeZone)

DaylightTime

WorkingPeriodArray

WorkingPeriod

DayOfWeek (WorkingPeriod)

StartTimeInMinutes

EndTimeInMinutes

See also
EWS operations in Exchange

Getting User Availability


GetUserConfiguration operation
Article • 03/29/2023 • 2 minutes to read

The GetUserConfiguration operation gets a user configuration object from a folder.

GetUserConfiguration request example

Description
The following example of a GetUserConfiguration request shows how to form a request
to get a user configuration object on the Drafts folder.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xs="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:GetUserConfiguration>

<m:UserConfigurationName Name="TestConfig">

<t:DistinguishedFolderId Id="drafts"/>

</m:UserConfigurationName>

<m:UserConfigurationProperties>Dictionary</m:UserConfigurationProperties>

</m:GetUserConfiguration>

</soap:Body>

</soap:Envelope>

GetUserConfiguration response example

Description
The following example shows a successful response to the GetUserConfiguration
request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="20"

Version="Exchange2010"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:GetUserConfigurationResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:GetUserConfigurationResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:UserConfiguration>

<t:UserConfigurationName Name="TestConfig">

<t:DistinguishedFolderId Id="drafts">

</t:DistinguishedFolderId>

</t:UserConfigurationName>

<t:Dictionary>

<t:DictionaryEntry>

<t:DictionaryKey>

<t:Type>String</t:Type>

<t:Value>PhoneNumber</t:Value>

</t:DictionaryKey>

<t:DictionaryValue>

<t:Type>String</t:Type>

<t:Value>555-555-1111</t:Value>

</t:DictionaryValue>

</t:DictionaryEntry>

</t:Dictionary>

</m:UserConfiguration>

</m:GetUserConfigurationResponseMessage>

</m:ResponseMessages>

</m:GetUserConfigurationResponse>

</s:Body>

</s:Envelope>

See also
EWS operations in Exchange

EWS XML elements in Exchange


GetUserOofSettings operation
Article • 03/29/2023 • 2 minutes to read

The GetUserOofSettings operation gets a mailbox user's Out of Office (OOF) settings
and messages.

SOAP Headers
The GetUserOofSettings operation can use the SOAP headers that are listed and
described in the following table.

Header Element Description

Impersonation ExchangeImpersonation Identifies the user whom the client application is


impersonating.

ServerVersion ServerVersionInfo
Identifies the version of the server that responded to
the request.

Using the GetUserOofSettings Operation


The GetUserOofSettings operation provides access to a user's OOF settings. A user is
identified by the user's email address. If the OOF message is null and OOF is enabled, no
OOF message is sent.

) Important

If the OOF messages are set by MicrosoftOfficeOutlook, this operation will return
the OOF messages in HTML format.

GetUserOofSettings request example

Description
The following example shows a GetUserOofSettings request that gets a single user's
OOF information.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<GetUserOofSettingsRequest
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<Mailbox xmlns
="https://schemas.microsoft.com/exchange/services/2006/types">

<Address>[email protected]</Address>

</Mailbox>

</GetUserOofSettingsRequest>

</soap:Body>

</soap:Envelope>

Request elements
The following elements are used in the request:

GetUserOofSettingsRequest

Mailbox (Availability)

Address (string)

Successful GetUserOofSettings response


example

Description
The following example shows a disabled OOF state with the OOF messages.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="685" MinorBuildNumber="8"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<GetUserOofSettingsResponse
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseMessage ResponseClass="Success">

<ResponseCode>NoError</ResponseCode>

</ResponseMessage>

<OofSettings
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<OofState>Disabled</OofState>

<ExternalAudience>All</ExternalAudience>

<Duration>

<StartTime>2006-11-03T23:00:00</StartTime>

<EndTime>2006-11-04T23:00:00</EndTime>

</Duration>

<InternalReply>

<Message>I am out of office. This is my internal reply.</Message>

</InternalReply>

<ExternalReply>

<Message>I am out of office. This is my external reply.</Message>

</ExternalReply>

</OofSettings>

<AllowExternalOof>All</AllowExternalOof>

</GetUserOofSettingsResponse>

</soap:Body>

</soap:Envelope>

Successful GetUserOofSettings response elements


The following elements are used in the response:

ServerVersionInfo

GetUserOofSettingsResponse

ResponseMessage

ResponseCode

OofSettings

OofState

ExternalAudience

Duration (UserOofSettings)

StartTime
EndTime

InternalReply

ExternalReply

Message

AllowExternalOof

GetUserOofSettings Error response example

Description
The following example shows an error response caused by an attempt to access another
user's OOF information.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="685" MinorBuildNumber="8"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<soap:Fault>

<faultcode>soap:Client</faultcode>

<faultstring>Microsoft.Exchange.Data.Storage.AccessDeniedException:
User is not mailbox owner. User = S-1-5-21-3642464542-282065186-3871681729-
1155, MailboxGuid = S-1-5-21-3642464542-282065186-3871681729-1156 ---> User
is not mailbox owner. </faultstring>

<faultactor>https://CAS01.example.com/EWS/Exchange.asmx</faultactor>

<detail>

<ErrorCode
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">-21462
33088</ErrorCode>

</detail>

</soap:Fault>

</soap:Body>

</soap:Envelope>

See also
EWS XML elements in Exchange
GetUserPhoto operation
Article • 03/29/2023 • 2 minutes to read

Find information about the GetUserPhoto EWS operation.

The GetUserPhoto operation gets a user photo from Active Directory Domain Services
(AD DS).

This operation was introduced in Exchange Server 2013.

Using the GetUserPhoto operation


The RemoveContactFromImList operation is a simple operation that accepts a user's
email address and the requested photo size and returns the photo stream in the
response.

7 Note

EWS has both a SOAP and a REST-based operation to get user photos. For
information about the REST interface, see Get user photos by using EWS in
Exchange .

GetUserPhoto operation SOAP headers


The GetUserPhoto operation can use the SOAP headers that are listed in the following
table.

Header name Element Description

RequestVersion RequestServerVersion Identifies the schema version for the operation request.
This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

GetUserPhoto operation request example: Get


a user's photo
The following example of a GetUserPhoto operation request shows how to get a user's
photo. This example requests a user photo that is 48x48 pixels.
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013"/>

</soap:Header>

<soap:Body>

<m:GetUserPhoto>

<m:Email>[email protected]</m:Email>

<m:SizeRequested>HR48x48</m:SizeRequested>

</m:GetUserPhoto>
</soap:Body>

</soap:Envelope>

The following elements are used in the request SOAP body:

GetUserPhoto

Email (String)

SizeRequested

Successful GetUserPhoto operation response


The following example shows a successful response to a GetUserPhoto operation to get
a user's photo.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="556"

MinorBuildNumber="8"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetUserPhotoResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<HasChanged>true</HasChanged>

<PictureData>/9j/4AAQSkZJRgABAQEAYABgAAD/02</PictureData>

</GetUserPhotoResponse>

</s:Body>

</s:Envelope>

The following elements are used in the response SOAP body:

GetUserPhotoResponse

ResponseCode

HasChanged

GetUserPhotoResponse

GetUserPhoto operation error response


The SOAP envelope will not return an error code if an attempt is made to get a user
photo for an email address that doesn't exist in the organization. A 500 HTTP status
code will be returned in the response to indicate that the request was unsuccessful.

See also
EWS operations in Exchange
Get user photos by using EWS in Exchange
GetUserRetentionPolicyTags operation
Article • 03/29/2023 • 2 minutes to read

Find information about the GetUserRetentionPolicyTags EWS operation.

The GetUserRetentionPolicyTags operation gets a list of all default, system folder, and
personal tags that are associated with a user by means of a system policy or that were
applied by the user.

This operation was introduced in Exchange Server 2013.

Using the GetUserRetentionPolicyTags


operation
This operation returns the display name, retention ID, retention period, retention type,
retention action, and description tags, and the values for the IsVisible, OptedInto, and
IsArchive properties.

GetUserRetentionPolicyTags operation SOAP headers


The GetUserRetentionPolicyTags operation can use the SOAP headers that are listed in
the following table.

Header name Element Description

RequestVersion RequestServerVersion Identifies the schema version for the operation request.
This is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This is applicable to a response.

GetUserRetentionPolicyTags operation request


example
The following example of a GetUserRetentionPolicyTags operation request shows how
to get a list of tags for the current user.

XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:GetUserRetentionPolicyTags />

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following element:

GetUserRetentionPolicyTags

Successful GetUserRetentionPolicyTags
operation response
The following example shows a successful response to a GetUserRetentionPolicyTags
operation request.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="179"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetUserRetentionPolicyTagsResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<RetentionPolicyTags>

<RetentionPolicyTag
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<DisplayName>1 Year Delete</DisplayName>

<RetentionId>e66252f9-794f-4b36-b55e-
d6d95fdf87a3</RetentionId>

<RetentionPeriod>365</RetentionPeriod>

<Type>Personal</Type>

<RetentionAction>DeleteAndAllowRecovery</RetentionAction>

<Description/>

<IsVisible>true</IsVisible>

<OptedInto>false</OptedInto>

<IsArchive>false</IsArchive>

</RetentionPolicyTag>

<RetentionPolicyTag
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<DisplayName>Personal 1 year move to archive</DisplayName>

<RetentionId>b2a29464-649c-4174-932b-
6aaac9811c89</RetentionId>

<RetentionPeriod>365</RetentionPeriod>

<Type>Personal</Type>

<RetentionAction>MoveToArchive</RetentionAction>

<Description/>

<IsVisible>true</IsVisible>

<OptedInto>false</OptedInto>

<IsArchive>true</IsArchive>

</RetentionPolicyTag>

<RetentionPolicyTag
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<DisplayName>Sent Items</DisplayName>

<RetentionId>b0d32f1b-fbd0-4c1d-ba3e-
ddd1086ea1d3</RetentionId>

<RetentionPeriod>365</RetentionPeriod>

<Type>SentItems</Type>

<RetentionAction>DeleteAndAllowRecovery</RetentionAction>

<Description/>

<IsVisible>false</IsVisible>

<OptedInto>false</OptedInto>

<IsArchive>false</IsArchive>

</RetentionPolicyTag>

<RetentionPolicyTag
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<DisplayName>Default 1 year delete</DisplayName>

<RetentionId>29fc9b9d-98b0-4c01-acf8-
3996e2afce98</RetentionId>

<RetentionPeriod>365</RetentionPeriod>

<Type>All</Type>

<RetentionAction>DeleteAndAllowRecovery</RetentionAction>

<Description/>

<IsVisible>false</IsVisible>

<OptedInto>false</OptedInto>

<IsArchive>false</IsArchive>

</RetentionPolicyTag>

<RetentionPolicyTag
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<DisplayName>Two Year Retention</DisplayName>

<RetentionId>a1a38957-2557-404e-9f32-
53d77c948f62</RetentionId>

<RetentionPeriod>730</RetentionPeriod>

<Type>Personal</Type>

<RetentionAction>DeleteAndAllowRecovery</RetentionAction>

<Description>Use this tag for all items to be retained for


two years.</Description>

<IsVisible>true</IsVisible>

<OptedInto>true</OptedInto>

<IsArchive>false</IsArchive>

</RetentionPolicyTag>

<RetentionPolicyTag
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<DisplayName>Default two year move to archive</DisplayName>

<RetentionId>75bc8dbe-a0e8-4e09-9fa3-
fd4c21f49318</RetentionId>

<RetentionPeriod>730</RetentionPeriod>

<Type>All</Type>

<RetentionAction>MoveToArchive</RetentionAction>

<Description/>

<IsVisible>false</IsVisible>

<OptedInto>false</OptedInto>

<IsArchive>true</IsArchive>

</RetentionPolicyTag>

</RetentionPolicyTags>

</GetUserRetentionPolicyTagsResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

GetUserRetentionPolicyTagsResponse

ResponseCode

RetentionPolicyTags

RetentionPolicyTag

DisplayName (string)

RetentionId

RetentionPeriod

Type (ElcFolderType)

RetentionAction

Description

IsVisible
OptedInto

IsArchive

GetUserRetentionPolicyTags operation error


response
For error codes that are generic to EWS, see ResponseCode.
InstallApp operation
Article • 03/29/2023 • 2 minutes to read

Find information about the InstallApp EWS operation.

The InstallApp operation installs a mail app for Outlook in a mailbox.

This operation was introduced in Exchange Server 2013.

Using the InstallApp operation


The InstallApp operation takes a single argument that identifies a mail app to install.
The argument contains the base64-encoded manifest for a mail app.

InstallApp operation SOAP headers


The InstallApp operation can use the SOAP headers that are listed in the following table.

Header name Element Description

RequestVersion RequestServerVersion Identifies the schema version for the operation request.
This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

InstallApp operation request example: Install a


mail app in a mailbox
The following example of an InstallApp operation request shows how to install a mail
app for Outlook. The app manifest can be found by using the GetAppManifests
operation.

7 Note

The base64-encoded app manifest has been arbitrarily truncated to preserve


readability and does not represent a valid manifest.

XML
<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body >

<m:InstallApp>

<m:Manifest>TUwiIC8+CiAgPC9SdWxlPgo8L09mZmljZUFwcD4=</m:Manifest>

</m:InstallApp>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

InstallApp

Manifest

Successful InstallApp operation response


The following example shows a successful response to an InstallApp operation request
to install a mail app.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="556"

MinorBuildNumber="14"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<InstallAppResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

</InstallAppResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

InstallAppResponse

ResponseCode

InstallApp operation error response


The following example shows an error response to an InstallApp operation request. This
is a response to a request that contains an invalid manifest.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="556"

MinorBuildNumber="14"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<InstallAppResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>This app can't be installed. Missing OfficeApp


element.</MessageText>

<ResponseCode>ErrorInternalServerError</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</InstallAppResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

InstallAppResponse

MessageText

ResponseCode

DescriptiveLinkKey

See also
EWS operations in Exchange

DisableApp operation

UninstallApp operation

GetAppManifests

GetAppMarketplaceUrl operation
MarkAllItemsAsRead operation
Article • 03/29/2023 • 3 minutes to read

Find information about the MarkAllItemsAsRead EWS operation.

The MarkAllItemsAsRead operation sets the IsRead property on all items, in one or
more folders, to indicate that all items are either read or unread.

This operation was introduced in Exchange Server 2013.

Using the MarkAllItemsAsRead operation


The MarkAllItemsAsRead operation can set the IsRead property on all items in folders
identified by either the Exchange Web Services (EWS) folder identifier or the default
Exchange folder name. The MarkAllItemsAsRead operation can also suppress the
sending of read receipts for items marked as read.

MarkAllItemsAsRead operation SOAP headers


The MarkAllItemsAsRead operation can use the SOAP headers that are listed in the
following table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, "Tags


for the Identification of Languages", to be used to
access the mailbox. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

MarkAllItemsAsRead operation request


example: Mark all items in a folder as read
The following example of a MarkAllItemsAsRead operation request shows how to set
the IsRead property, which is also called the read flag, to true on all items in a folder.
This example also shows that read receipts are not sent in response to any read receipt
requests.

7 Note

All item identifiers and change keys in this article have been shortened to preserve
readability. Change keys are not required for this operation.

XML

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:MarkAllItemsAsRead>

<m:ReadFlag>true</m:ReadFlag>

<m:SuppressReadReceipts>true</m:SuppressReadReceipts>

<m:FolderIds>

<t:FolderId Id="AAMkADEzOTExYZRAAA="

ChangeKey="AQAAAAA3vA==" />

</m:FolderIds>
</m:MarkAllItemsAsRead>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

MarkAllItemsAsRead

ReadFlag

SuppressReadReceipts

FolderIds

FolderId
Successful MarkAllItemsAsRead operation
response
The following example shows a successful response to a MarkAllItemsAsRead operation
request to mark all items in a folder as read.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="545"

MinorBuildNumber="11"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:MarkAllItemsAsReadResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:MarkAllItemsAsReadResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

</m:MarkAllItemsAsReadResponseMessage>

</m:ResponseMessages>

</m:MarkAllItemsAsReadResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

MarkAllItemsAsReadResponse

ResponseMessages

MarkAllItemsAsReadResponseMessage

ResponseCode
MarkAllItemsAsRead operation request
example: Mark all items in a folder as unread
The following example of a MarkAllItemsAsRead operation request shows how to set
the IsRead property to false on all items in a folder. This example also shows that read
receipts are not sent in response to any read receipt requests.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:MarkAllItemsAsRead>

<m:ReadFlag>false</m:ReadFlag>

<m:SuppressReadReceipts>true</m:SuppressReadReceipts>

<m:FolderIds>

<t:FolderId Id="AAMkADEzOTExYZRAAA="

ChangeKey="AQAAAAA3vA==" />

</m:FolderIds>
</m:MarkAllItemsAsRead>

</soap:Body>

</soap:Envelope>

A successful response to a request to mark all items as read is the same as the response
to a request to mark all items as unread.

The request SOAP body contains the following elements:

MarkAllItemsAsRead

ReadFlag

SuppressReadReceipts

FolderIds

FolderId

MarkAllItemsAsRead operation error response


The following example shows an error response to a MarkAllItemsAsRead operation
request to mark all items in a folder as read or unread when the folder does not exist in
the mailbox.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="545"

MinorBuildNumber="11"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:MarkAllItemsAsReadResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:MarkAllItemsAsReadResponseMessage ResponseClass="Error">

<m:MessageText>The specified object was not found in the


store.</m:MessageText>

<m:ResponseCode>ErrorItemNotFound</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:MarkAllItemsAsReadResponseMessage>

</m:ResponseMessages>

</m:MarkAllItemsAsReadResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

MarkAllItemsAsReadResponse

ResponseMessages

MarkAllItemsAsReadResponseMessage

MessageText
ResponseCode

DescriptiveLinkKey

See also
EWS operations in Exchange

FindFolder operation
MarkAsJunk operation
Article • 03/29/2023 • 5 minutes to read

Find information about the MarkAsJunk EWS operation.

The MarkAsJunk operation adds and removes users from the blocked email list and
moves email messages to the Junk Email folder.

This operation was introduced in Exchange Server 2013.

Using the MarkAsJunk operation


The MarkAsJunk operation contains two Boolean options to indicate whether an email
sender should be added to the blocked sender list and whether the target email
message should be moved to the default Junk Email folder or the Inbox folder. The
actions are determined by the values of the IsJunk and MoveItem attributes. The
following are the possible actions based on the value combinations for the IsJunk and
MoveItem attributes:

If the IsJunk attribute is set to true, and the MoveItem attribute is set to true, the
sender of the target email message is added to the blocked sender list and the
email message is moved to the Junk Dmail folder.

If the IsJunk attribute is set to true, and the MoveItem attribute is set to false, the
sender of the target email message is added to the blocked sender list and the
email message is not moved from the folder.

If the IsJunk attribute is set to false, and the MoveItem attribute is set to true, the
sender of the target email messageis removed from the blocked sender list and
the email message is moved to the Inbox folder.

If the IsJunk attribute is set to false, and the MoveItem attribute is set to false, the
sender of the target email message is removed from the blocked sender list and
the email message is not moved from the folder.

) Important

The contents of the blocked sender list are not discoverable from EWS. If a sender
is added to the blocked sender list, you need to keep a copy of an email message
sent by the blocked sender to unblock the sender in the future.
MarkAsJunk operation SOAP headers
The MarkAsJunk operation can use the SOAP headers that are listed in the following
table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, "Tags


for the Identification of Languages", to be used to
access the mailbox. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

MarkAsJunk operation request example: Add a


sender to the blocked sender list
The following example of a MarkAsJunk operation request shows how to add the
sender of an email to the blocked sender list and move the email to the junk mail folder.
The MarkAsJunk operation accepts the unique email message identifier to identify the
email that is used to reference the sender that is added to the blocked sender list.

7 Note

All item identifiers and change keys in this article have been shortened to preserve
readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:MarkAsJunk IsJunk="true" MoveItem="true">

<m:ItemIds>
<t:ItemId Id="AAMkAD=" ChangeKey="CQAAABYA" />

</m:ItemIds>

</m:MarkAsJunk>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

MarkAsJunk

ItemIds

ItemId

Successful MarkAsJunk operation response


The following example shows a successful response to a MarkAsJunk operation request
to add a sender to the blocked sender list and move the email message to the Junk
Email folder.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="545"

MinorBuildNumber="11"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:MarkAsJunkResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:MarkAsJunkResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:MovedItemId Id="AAMkAD=" ChangeKey="CQAAABYu" />

</m:MarkAsJunkResponseMessage>

</m:ResponseMessages>

</m:MarkAsJunkResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

MarkAsJunkResponse

ResponseMessages

MarkAsJunkResponseMessage

ResponseCode

MovedItemId

MarkAsJunk operation request example:


Remove a sender from the blocked sender list
The following example of a MarkAsJunk operation request shows how to remove the
sender of an email message from the blocked sender list and move the email message
to the Inbox folder. You need to keep an email message sent by the blocked sender to
remove the sender from the blocked sender list. The sender's email address is
associated with email messages that have been sent by the sender. Removing a sender
from the blocked sender list will not succeed if the reference email message no longer
exists in the user's mailbox. The item identifier used to associate an email message with
its sender must be associated with an item that exists in the Exchange mailbox. We
recommend that you create a hidden folder to store items sent by previously blocked
senders so that the senders can be unblocked from the client application. In the event
that an item has been removed from the Exchange mailbox, an administrator has to use
the Exchange Management Console to access the blocked sender list to remove a
sender from the list. For information about how to unblock a user by using the Exchange
Management Console, see How to configure the safe senders and blocked senders
settings in Office 365 .

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:MarkAsJunk IsJunk="false" MoveItem="true">

<m:ItemIds>

<t:ItemId Id="AAMkAD=" ChangeKey="CQAAABYu" />

</m:ItemIds>

</m:MarkAsJunk>

</soap:Body>

</soap:Envelope>

A successful response for removing a sender from the blocked sender list is the same as
the response for adding a sender to the blocked sender list.

The request SOAP body contains the following elements:

MarkAsJunk

ItemIds

ItemId

MarkAsJunk operation error response


The following example shows an error response to a MarkAsJunk operation request.
This is a response to a request to add or remove a sender from the blocked sender list
when the email message specified by the item identifier no longer exists in the mailbox.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="545"

MinorBuildNumber="11"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:MarkAsJunkResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:MarkAsJunkResponseMessage ResponseClass="Error">

<m:MessageText>The specified object was not found in the store.


</m:MessageText>

<m:ResponseCode>ErrorItemNotFound</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:MarkAsJunkResponseMessage>

</m:ResponseMessages>

</m:MarkAsJunkResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

MarkAsJunkResponse

ResponseMessages

MarkAsJunkResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

See also
EWS operations in Exchange

GetItem operation GetItem operation

FindItem operation
MoveFolder operation
Article • 03/29/2023 • 2 minutes to read

The MoveFolder operation moves folders from a specified folder and puts them in
another folder.

Remarks
The MoveFolder operation is similar to the CopyFolder operation. You cannot move
distinguished folders. You can move multiple folders at one time to the destination
folder.

MoveFolder request example

Description
The following example of a MoveFolder request shows how to form a request to move a
folder identified by the FolderId and put the folder in the Junk E-mail distinguished
folder.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<MoveFolder
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ToFolderId>

<t:DistinguishedFolderId Id="junkemail"/>

</ToFolderId>

<FolderIds>

<t:FolderId Id="AScAc"/>

</FolderIds>

</MoveFolder>

</soap:Body>

</soap:Envelope>

Comments
7 Note

The value of the ID attribute of the FolderId element has been shortened for
readability.

Request elements
This MoveFolder request includes the following elements:

MoveFolder

ToFolderId

DistinguishedFolderId

FolderIds

FolderId

See the schema for additional elements that you can use to form a MoveFolder request.

7 Note

The default location of the schema is in the EWS virtual directory on the computer
that has the Client Access server role installed.

Successful MoveFolder response example

Description
The following example shows a successful response to the MoveFolder request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="685" MinorBuildNumber="8"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<MoveFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:MoveFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Folders>

<t:Folder>

<t:FolderId Id="AAAlAFV" ChangeKey="AQAAAB" />

</t:Folder>

</m:Folders>

</m:MoveFolderResponseMessage>

</m:ResponseMessages>

</MoveFolderResponse>

</soap:Body>

</soap:Envelope>

Comments

7 Note

The folder ID and the change key have been shortened to preserve readability.

The FolderId that is returned in the response represents the folder that was moved to
the new the folder location.

Response elements
The MoveFolder response includes the following elements:

MoveFolderResponse

ResponseMessages

MoveFolderResponseMessage

ResponseCode

Folders
Folder

FolderId

MoveFolder Error response example

Description
The following example shows an error response that occurs when you try to move a
distinguished folder.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="685" MinorBuildNumber="8"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<MoveFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:MoveFolderResponseMessage ResponseClass="Error">

<m:MessageText>Cannot move distinguished folder.</m:MessageText>

<m:ResponseCode>ErrorMoveDistinguishedFolder</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:Folders />
</m:MoveFolderResponseMessage>

</m:ResponseMessages>

</MoveFolderResponse>

</soap:Body>

</soap:Envelope>

Error response elements


The MoveFolder error response includes the following elements:
MoveFolderResponse

ResponseMessages

MoveFolderResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

Folders

See also
CopyFolder operation
MoveItem operation
Article • 03/29/2023 • 2 minutes to read

The MoveItem operation is used to move one or more items to a single destination
folder.

MoveItem request example

Description
The following example of a MoveItem request shows how to move an item to the Drafts
folder.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<MoveItem
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">

<ToFolderId>

<t:DistinguishedFolderId Id="drafts"/>

</ToFolderId>

<ItemIds>

<t:ItemId Id="AAAtAEF/swbAAA=" ChangeKey="EwAAABYA/s4b"/>

</ItemIds>

</MoveItem>

</soap:Body>

</soap:Envelope>

Comments
The ToFolderId element specifies the folder to which the items will be moved. Note that
all items listed in the ItemIds collection will end up in the destination folder. You must
make separate MoveItem calls to place items in different destination folders.
7 Note

The item identifier and change key have been shortened to preserve readability.

Request elements
The following elements are used in the request:

MoveItem

ToFolderId

DistinguishedFolderId

ItemIds

ItemId

MoveItem response example

Description
The following example shows a successful response to a MoveItem request.

The item identifier of the new item is returned in the response message. Item identifiers
are not returned in responses for cross-mailbox or mailbox to public folder MoveItem
operations.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="662" MinorBuildNumber="0"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"/>

</soap:Header>

<soap:Body>

<MoveItemResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:MoveItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Message>
<t:ItemID Id="AAMkAd" ChangeKey="FwAAABY" />

</t:Message>

</m:Items>

</m:MoveItemResponseMessage>

</m:ResponseMessages>

</MoveItemResponse>

</soap:Body>

</soap:Envelope>

Comments
The MoveItem operation will indicate success if the move was successful.

Successful response elements


The following elements are used in the response:

ServerVersionInfo

MoveItemResponse

ResponseMessages

MoveItemResponseMessage

ResponseCode

Items

See also
EWS XML elements in Exchange
PerformReminderAction operation
Article • 03/29/2023 • 2 minutes to read

Find information about the PerformReminderAction EWS operation.

The PerformReminderAction Exchange Web Services (EWS) operation initiates a dismiss


or snooze action on a reminder.

This operation was introduced in Exchange Server 2013.

Using the PerformReminderAction operation


You can use the PerformReminderAction operation to dismiss or snooze (delay)
reminders returned by the GetReminders operation. To snooze a reminder, set the
ActionType to Snooze, and set the NewReminderTime value to a time later than the
current ReminderTime, otherwise the NewReminderTime is ignored by the server. If the
reminder is for an occurrence of a recurring meeting, and the Snooze action is taken on
the reminder with a NewReminderTime that is past the reminder of the next occurrence,
the reminder is effectively dismissed.

To dismiss a reminder, set the ActionType to Dismiss. When the server processes the
request, the server changes the IsReminderSet value for the item from True to False.

PerformReminderAction operation SOAP headers


The PerformReminderAction operation can use the SOAP headers that are listed in the
following table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, "Tags


for the Identification of Languages", to be used to
access the mailbox. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.
Header name Element Description

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

PerformReminderAction operation request


example
The following example of a PerformReminderAction operation request shows how to
snooze a current reminder and set a new reminder time. Note that you need to include
the ChangeKey for the ItemId and the NewReminderTime must be set to a time later
than the ReminderTime returned by the GetReminders operation.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:PerformReminderAction>

<m:ReminderItemActions>

<t:ReminderItemAction>

<t:ActionType>Snooze</t:ActionType>

<t:ItemId Id="vwAAAA=="

ChangeKey="DwAAABQAAACOs0HEMq1WTKpI7sNu5qXNAAAUDA=="/>

<t:NewReminderTime>2014-04-16T17:00:00Z</t:NewReminderTime>

</t:ReminderItemAction>

</m:ReminderItemActions>

</m:PerformReminderAction>

</soap:Body>

</soap:Envelope>

7 Note

The ItemId value has been shortened to preserve readability.

The request SOAP body contains the following elements:

PerformReminderAction
ReminderItemActions

ReminderItemAction

ActionType

ItemId

NewReminderTime

Successful PerformReminderAction operation


response
The following example shows a successful response to a PerformReminderAction
operation request. The UpdatedItemIds element contains the ItemIds of the updated
calendar item.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="921"

MinorBuildNumber="20"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<PerformReminderActionResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<UpdatedItemIds>

<ItemId Id="vwAAAA=="

ChangeKey="DwAAABYAAAB4to43JyybTYwHLBM1k8MxAAAJKP+S"/>

</UpdatedItemIds>
</PerformReminderActionResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

PerformReminderActionResponse

ResponseCode

UpdatedItemIds

ItemId

PerformReminderAction operation error


response example
The following example shows a response to a PerformReminderAction operation
request when no change was made on the server. This is a response in which a request
was sent, but no UpdatedItemIds were returned, meaning no reminders were changed.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="918"

MinorBuildNumber="7"

Version="V2_10"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<PerformReminderActionResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<UpdatedItemIds />

</PerformReminderActionResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:


PerformReminderActionResponse

ResponseCode

UpdatedItemIds

For additional error codes that are generic to EWS, see ResponseCode.

See also
GetReminders operation
PlayOnPhone operation (EWS)
Article • 03/29/2023 • 2 minutes to read

The PlayOnPhone operation initiates an outbound call and plays a message over the
telephone.

PlayOnPhone request example

Description
The following example of a PlayOnPhone request shows how to form a request to play
a message on a phone.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xs="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:PlayOnPhone>

<m:ItemId Id="AkAjzQTbY/i="/>

<m:DialString>5555551212</m:DialString>

</m:PlayOnPhone>

</soap:Body>

</soap:Envelope>

PlayOnPhone response example

Description
The following example shows a successful response to the PlayOnPhone request.
Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="20"

Version="Exchange2010"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<PlayOnPhoneResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<PhoneCallId Id="ZWMtWYtMY29t"/>

</PlayOnPhoneResponse>

</s:Body>

</s:Envelope>

See also
EWS operations in Exchange
EWS XML elements in Exchange
RefreshSharingFolder operation
Article • 03/29/2023 • 2 minutes to read

The RefreshSharingFolder operation refreshes the specified local folder with the latest
data from the folder that is being shared.

SOAP Headers
The RefreshSharingFolder operation can use the SOAP headers that are listed and
described in the following table.

Header Element Description

RequestVersion RequestServerVersion Identifies the schema version for the operation request.

ServerVersion ServerVersionInfo
Identifies the version of the server that responded to
the request.

RefreshSharingFolder request example

Description
The following example shows how to form a request to refresh the specified local folder
with the latest data from the folder that is being shared. The SharingFolderId element
specifies the identifier of the local folder to be refreshed.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010"/>

</soap:Header>

<soap:Body>

<RefreshSharingFolder
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:SharingFolderId Id="AAMkAD=" ChangeKey="AwAAA=" />

</RefreshSharingFolder>

</soap:Body>

</soap:Envelope>

Request elements
The following elements are used in the request:

RequestServerVersion

RefreshSharingFolder

SharingFolderId

Successful RefreshSharingFolder Response

Description
The following example shows a successful response to a RefreshSharingFolder request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="11"

Version="Exchange2010"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<RefreshSharingFolderResponseMessage ResponseClass="Success"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseCode>NoError</m:ResponseCode>
</RefreshSharingFolderResponseMessage>

</soap:Body>

</soap:Envelope>

Successful response elements


The following elements are used in the response:

ServerVersionInfo

RefreshSharingFolderResponseMessage

ResponseCode

RefreshSharingFolder error response

Description
The following example shows an error response to a RefreshSharingFolder request. In
this example, the RefreshSharingFolder request failed because a subscription that
corresponds to the specified local folder was not found.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="11"

Version="Exchange2010"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<RefreshSharingFolderResponseMessage ResponseClass="Error"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:MessageText>Failed to synchronize the sharing folder.


</m:MessageText>

<m:ResponseCode>ErrorSharingSynchronizationFailed</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:MessageXml>

<t:Value
Name="ErrorDetails">Microsoft.Exchange.InfoWorker.Common.Sharing.Subscriptio
nNotFoundException: The subscription wasn't found.;</t:Value>

</m:MessageXml>

</RefreshSharingFolderResponseMessage>

</soap:Body>

</soap:Envelope>

Error response elements


The following elements are used in the error response:

ServerVersionInfo

RefreshSharingFolderResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

MessageXml

See also
RefreshSharingFolder

RefreshSharingFolderType

RefreshSharingFolderResponseMessage

RefreshSharingFolderResponseMessageType

EWS operations in Exchange

EWS XML elements in Exchange


RemoveContactFromImList operation
Article • 03/29/2023 • 2 minutes to read

Find information about the RemoveContactFromImList EWS operation.

The RemoveContactFromImList operation removes contacts from the Lync instant


messaging (IM) list when Lync uses Exchange for the contact store.

This operation was introduced in Exchange Server 2013.

Using the RemoveContactFromImList operation


The RemoveContactFromImList operation accepts a single argument that identifies a
contact to remove from the Lync contact list stored on an Exchange server. The list of
contacts that this operation targets is called Lync Contacts in Outlook 2013.

U Caution

Do not use the DeleteItem operation to remove contacts from a contact list.
Additional server-side processing might have to occur to support removing a
contact from the Lync Contacts list. Note that the Lync Contacts list is the
conceptual equivalent of the default Lync Contacts mailbox folder.

RemoveContactFromImList operation SOAP headers


The RemoveContactFromImList operation can use the SOAP headers that are listed in
the following table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, "Tags


for the Identification of Languages", to be used to
access the mailbox. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.
Header name Element Description

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

RemoveContactFromImList operation request


example: Remove a contact from the Lync
Contacts list
The following example of a RemoveContactFromImList operation request shows how to
remove a contact from the Lync Contacts list. The RemoveContactFromImList operation
accepts a single unique contact identifier to identify the contact that is removed from
the Lync Contacts list.

7 Note

All item identifiers and change keys in this article have been shortened to preserve
readability.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body>

<m:RemoveContactFromImList>

<m:ContactId Id=""/>

</m:RemoveContactFromImList>

</soap:Body>

</soap:Envelope>

The following elements are used in the request SOAP body:

RemoveContactFromImList

ContactId
Successful RemoveContactFromImList
operation response
The following example shows a successful response to a RemoveContactFromImList
operation request to remove a contact from the Lync Contacts list.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="556"

MinorBuildNumber="8"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<RemoveContactFromImListResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

</RemoveContactFromImListResponse>

</s:Body>

</s:Envelope>

The following elements are used in the response SOAP body:

RemoveContactFromImListResponse

ResponseCode

RemoveContactFromImList operation error


response
The following example shows an error response to a RemoveContactFromImList
operation request. This is a response to a request to remove a contact from the Lync
Contacts list when the contact no longer exists in the list.
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="556"

MinorBuildNumber="8"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<RemoveContactFromImListResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>The specified object was not found in the store.


</MessageText>

<ResponseCode>ErrorItemNotFound</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</RemoveContactFromImListResponse>

</s:Body>

</s:Envelope>

The following elements are used in the error response SOAP body:

RemoveContactFromImListResponse

MessageText

ResponseCode

DescriptiveLinkKey

See also
EWS operations in Exchange

GetImItemList operation
RemoveDelegate operation
Article • 03/29/2023 • 2 minutes to read

The RemoveDelegate operation removes one or more delegates from a user's mailbox.

SOAP Headers
The RemoveDelegate operation can use the SOAP headers that are listed and described
in the following table.

Header Element Description

Impersonation ExchangeImpersonation Identifies the user whom the client application is


impersonating.

MailboxCulture MailboxCulture Identifies the RFC3066 culture to be used to access


the mailbox.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request.

ServerVersion ServerVersionInfo
Identifies the version of the server that responded to
the request.

RemoveDelegate request example

Description
The following code example shows how to remove two delegates from user1's mailbox.
In this example, one delegate is removed by using the delegate's primary SMTP address,
and the other one is removed by using the delegate's security identifier (SID).

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1"/>

</soap:Header>

<soap:Body>

<RemoveDelegate
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</Mailbox>

<UserIds>

<t:UserId>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

</t:UserId>

<t:UserId>

<t:SID>S-1-5-21-1333220396-2200287332-232816053-1118</t:SID>

</t:UserId>

</UserIds>

</RemoveDelegate>

</soap:Body>

</soap:Envelope>

Comments
The RemoveDelegate operation does not require the specified delegate user to have a
mailbox or to exist in the Active Directory directory service. The RemoveDelegate
operation will succeed if the delegate entry is orphaned.

RemoveDelegate response example

Description
The following example of a RemoveDelegate response shows a successful response to a
RemoveDelegate request. The response contains a
DelegateUserResponseMessageType element for each delegate that is removed from
the mailbox.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8"

MinorVersion="1"

MajorBuildNumber="206"

MinorBuildNumber="0"

Version="Exchange2007_SP1"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<m:RemoveDelegateResponse
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

ResponseClass="Success"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseCode>NoError</m:ResponseCode>
<m:ResponseMessages>

<m:DelegateUserResponseMessageType ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

</m:DelegateUserResponseMessageType>

<m:DelegateUserResponseMessageType ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

</m:DelegateUserResponseMessageType>

</m:ResponseMessages>

</m:RemoveDelegateResponse>

</soap:Body>

</soap:Envelope>

RemoveDelegate Error response example

Description
The following example of a RemoveDelegate error response shows the results of a
request to remove a delegate that does not exist.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8"

MinorVersion="1"

MajorBuildNumber="206"

MinorBuildNumber="0"

Version="Exchange2007_SP1"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<m:RemoveDelegateResponse
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

ResponseClass="Success"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseCode>NoError</m:ResponseCode>
<m:ResponseMessages>

<m:DelegateUserResponseMessageType ResponseClass="Error">

<m:MessageText>The user is not a delegate for the mailbox.


</m:MessageText>

<m:ResponseCode>ErrorNotDelegate</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:DelegateUserResponseMessageType>

</m:ResponseMessages>

</m:RemoveDelegateResponse>

</soap:Body>

</soap:Envelope>

See also
EWS XML elements in Exchange
RemoveDistributionGroupFromImList
operation
Article • 03/29/2023 • 2 minutes to read

Find information about the RemoveDistributionGroupFromImList EWS operation.

The RemoveDistributionGroupFromImList operation removes a distribution group from


the Lync instant messaging (IM) list when Lync uses Exchange for the contact store.

This operation was introduced in Exchange Server 2013.

Using the RemoveDistributionGroupFromImList


operation
The RemoveDistributionGroupFromImList operation accepts a single argument that
identifies a distribution group to remove from the Lync IM list stored on an Exchange
server.

RemoveDistributionGroupFromImList operation SOAP


headers
The RemoveDistributionGroupFromImList operation can use the SOAP headers that are
listed in the following table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, "Tags


for the Identification of Languages", to be used to
access the mailbox. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.
RemoveDistributionGroupFromImList
operation request example: Remove a
distribution group from an IM list
The following example of a RemoveDistributionGroupFromImList operation request
shows how to remove a distribution group from an IM group. The
RemoveDistributionGroupFromImList operation accepts the unique group identifier to
identify the distribution group to remove from the IM list. The ExchangeStoreId element
that is returned in the response for the GetImItemList operation and the
AddDistributionGroupToImList operation identifies distribution groups that can be
removed from the IM list.

7 Note

All item identifiers and change keys in this article have been shortened to preserve
readability.

XML

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:MailboxCulture>en-US</t:MailboxCulture>

</soap:Header>

<soap:Body >

<m:RemoveDistributionGroupFromImList>

<m:GroupId Id="AAMkADEzO4QrAABmEh5oAAA="/>

</m:RemoveDistributionGroupFromImList>

</soap:Body>

</soap:Envelope>

The following elements are used in the request SOAP body:

RemoveDistributionGroupFromImList

GroupId
Successful
RemoveDistributionGroupFromImList
operation response
The following example shows a successful response to a
RemoveDistributionGroupFromImList operation request to a remove a distribution
group from an IM group.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="556"

MinorBuildNumber="8"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<RemoveDistributionGroupFromImListResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

</RemoveDistributionGroupFromImListResponse>

</s:Body>

</s:Envelope>

The following elements are used in the response SOAP body:

RemoveDistributionGroupFromImListResponse

ResponseCode

RemoveDistributionGroupFromImList
operation error response example
The following example shows an error response to a
RemoveDistributionGroupFromImList operation request. This is a response to a request
to remove a distribution group that has already been removed from the mailbox.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="556"

MinorBuildNumber="8"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<RemoveDistributionGroupFromImListResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>The specified object was not found in the store.


</MessageText>

<ResponseCode>ErrorItemNotFound</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</RemoveDistributionGroupFromImListResponse>

</s:Body>

</s:Envelope>

The following elements are used in the error response SOAP body:

RemoveDistributionGroupFromImListResponse

MessageText

ResponseCode

DescriptiveLinkKey

See also
EWS operations in Exchange
GetImItemList operation

AddDistributionGroupToImList operation

People and contacts in EWS in Exchange


RemoveImContactFromGroup operation
Article • 03/29/2023 • 2 minutes to read

Find information about the RemoveImContactFromGroup EWS operation.

The RemoveImContactFromGroup operation removes a single IM contact from an IM


group.

This operation was introduced in Exchange Server 2013.

Using the RemoveImContactFromGroup


operation
The RemoveImContactFromGroup operation takes two arguments: a contact item
identifier, and the corresponding instant messaging (IM) group from which the contact
is removed.

RemoveImContactFromGroup operation SOAP headers


The RemoveImContactFromGroup operation can use the SOAP headers that are listed
in the following table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, "Tags


for the Identification of Languages", to be used to
access the mailbox. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

RemoveImContactFromGroup operation
request example
The following example of a RemoveImContactFromGroup operation request shows how
to remove an IM contact from an IM group.

7 Note

The group and contact identifiers have been shortened to preserve readability.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:MailboxCulture>en-US</t:MailboxCulture>

</soap:Header>

<soap:Body >

<m:RemoveImContactFromGroup>

<m:ContactId Id="AAMkAGQ1MjJjMTBkLTcAAAAvcAAA="

ChangeKey="EQAAABYAAABtF8oI7iVOQ"/>

<m:GroupId Id="AAMkAGQ1MjJjMTBkbWAAAAAAQKAAA="

ChangeKey="EgAAAA=="/>

</m:RemoveImContactFromGroup>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

RemoveImContactFromGroup

ContactId

GroupId

Successful RemoveImContactFromGroup
operation response
The following example shows a successful response to a RemoveImContactFromGroup
operation request.

XML
<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="349"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<RemoveImContactFromGroupResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

</RemoveImContactFromGroupResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

RemoveImContactFromGroupResponse

ResponseCode

RemoveImContactFromGroup operation
ErrorInvalidImContactId error response
The following example shows an error response to a RemoveImContactFromGroup
operation request. The following error response occurs when an attempt is made to
remove a contact item that does not exist in the IM group.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="349"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<RemoveImContactFromGroupResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>The specified Im Contact Id is invalid.</MessageText>

<ResponseCode>ErrorInvalidImContactId</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</RemoveImContactFromGroupResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

RemoveImContactFromGroupResponse

MessageText

ResponseCode

DescriptiveLinkKey

See also
People and contacts in EWS in Exchange

AddDistributionGroupToImList

AddImContactToGroup

AddImGroup operation

AddNewImContactToGroup operation

GetImItemList operation

GetImItems

RemoveContactFromImList
RemoveDistributionGroupFromImList

RemoveImGroup operation

SetImGroup operation

SetImListMigrationCompleted
RemoveImGroup operation
Article • 03/29/2023 • 2 minutes to read

Find information about the RemoveImGroup EWS operation.

The RemoveImGroup operation removes a single instant messaging (IM) group from a
mailbox.

This operation was introduced in Exchange Server 2013.

Using the RemoveImGroup operation


The RemoveImGroup operation only takes a single group identifier argument.

RemoveImGroup operation SOAP headers


The RemoveImGroup operation can use the SOAP headers that are listed in the
following table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, "Tags


for the Identification of Languages", to be used to
access the mailbox. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

RemoveImGroup operation request example


The following example of a RemoveImGroup operation request shows how to remove
an IM group.

7 Note
The group ID has been shortened to preserve readability.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:MailboxCulture>en-US</t:MailboxCulture>

</soap:Header>

<soap:Body >

<m:RemoveImGroup>
<m:GroupId Id="AAMkAGQ1MjJjMTBkLTc4Y2UtNDA5hQoTbWAAAAAAQRAAA="

ChangeKey="EgAAAA=="/>

</m:RemoveImGroup>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

RemoveImGroup

GroupId

Successful RemoveImGroup operation


response
The following example shows a successful response to a RemoveImGroup operation
request.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="349"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<RemoveImGroupResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

</RemoveImGroupResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

RemoveImGroupResponse

ResponseCode

RemoveImGroup operation
ErrorInvalidImGroupId error response
The following example shows an error response to a RemoveImGroup operation
request. The following error response occurs when an attempt is made to remove a
group that does not exist in the mailbox.

XML

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="349"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<RemoveImGroupResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>The specified Im Group Id is invalid.</MessageText>

<ResponseCode>ErrorInvalidImGroupId</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</RemoveImGroupResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

RemoveImGroupResponse

MessageText

ResponseCode

DescriptiveLinkKey

For additional error codes that are generic to EWS and specific to this operation, see
ResponseCode.

RemoveImGroup operation
ErrorInvalidIdMalformed error response
The following example shows an error response to a RemoveImGroup operation
request. The following error response occurs when an attempt is made to remove a
group with an incorrectly formatted group identifier.

XML

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="349"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<RemoveImGroupResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>Id is malformed.</MessageText>

<ResponseCode>ErrorInvalidIdMalformed</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</RemoveImGroupResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

RemoveImGroupResponse

MessageText

ResponseCode

DescriptiveLinkKey

See also
People and contacts in EWS in Exchange

AddImGroup operation

SetImGroup operation
ResolveNames operation
Article • 03/29/2023 • 3 minutes to read

The ResolveNames operation resolves ambiguous email addresses and display names.

Using the ResolveNames operation


This operation can be used to verify aliases and resolve display names to the
appropriate mailbox user. If ambiguous names exist, the ResolveNames operation
response provides information about each mailbox user so that the client application
can resolve the names.

Remarks
The ResolveNames response returns a maximum of 100 candidates. The 100 candidates
that are returned are the first 100 that are encountered in the lookup operation.

Email addresses with prefixed routing types, such as smtp or sip, are saved in a
multivalue array. The ResolveNames operation performs a partial match against each
value of that array when you add the routing type at the beginning of the unresolved
name, such as "sip:[email protected]". If you don't specify a routing type,
ResolveNames will default to the routing type of smtp, match it to a primary smtp
address property, and not search the multivalue array.

Only one ambiguous name can be specified in a single request. Active Directory is
searched first, and then the user's contact folder is searched. Resolved entries from a
user's contact folder have a non-null ItemId property, which can then be used in a
GetItem request. If it is the ID of a private distribution list, then it can be used in an
ExpandDL operation. If the ReturnFullContactData attribute is set to true, then Active
Directory entries found with the ResolveNames operation will return additional
properties that describe a Contact. The ReturnFullContactData attribute does not affect
the data that is returned for contacts and private distribution lists from the user's
contact folder.

ResolveNames request example

Description
The following example of a ResolveNames request shows how to resolve the entry of
User.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<ResolveNames
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

ReturnFullContactData="true">

<UnresolvedEntry>User2</UnresolvedEntry>

</ResolveNames>

</soap:Body>

</soap:Envelope>

Comments
The response to this request will return all entries that start with "Jo" or "Mi." The
returned items are public mailboxes, public and private distribution lists, and contacts.

7 Note

Only contacts in the default personal Contacts folder are searched.

The following are the possible results for a ResolveNames request:

Responses that do not contain a resolved entity will return a ResponseClass


attribute value equal to Error. The MessageText element will contain " No results
are found."

Responses that contain a single resolved entity will return a ResponseClass


attribute value equal to Success.

Responses that contain multiple possible entities will return a ResponseClass


attribute value equal to Warning. In this case, the entity could not be resolved to a
unique identity. The MessageText element will contain "Multiple results are found."
Request elements
The following elements are used in the request:

ResolveNames

UnresolvedEntry

Successful ResolveNames operation response


example

Description
The following example shows a successful response to a ResolveNames request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="685" MinorBuildNumber="8"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<ResolveNamesResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:ResolveNamesResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:ResolutionSet TotalItemsInView="1"
IncludesLastItemInRange="true">

<t:Resolution>

<t:Mailbox>

<t:Name>User2</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

<t:MailboxType>Mailbox</t:MailboxType>

</t:Mailbox>

<t:Contact>

<t:DisplayName>User2</t:DisplayName>

<t:EmailAddresses>

<t:Entry
Key="EmailAddress1">SMTP:[email protected]</t:Entry>

</t:EmailAddresses>

<t:ContactSource>ActiveDirectory</t:ContactSource>

</t:Contact>

</t:Resolution>

</m:ResolutionSet>

</m:ResolveNamesResponseMessage>

</m:ResponseMessages>

</ResolveNamesResponse>

</soap:Body>

</soap:Envelope>

Successful ResolveNames response elements


The following elements are used in the response:

ServerVersionInfo

ResolveNamesResponse

ResponseMessages

ResolveNamesResponseMessage

ResponseCode

ResolutionSet

Resolution

Mailbox

Name (EmailAddressType)

EmailAddress (NonEmptyStringType)

RoutingType (EmailAddressType)

MailboxType

Contact

DisplayName (string)

EmailAddresses
Entry (EmailAddress)

ContactSource

ResolveNames operation error response

Description
The following example shows an error response to a ResolveNames request. The error is
caused by trying to resolve a name that cannot be resolved.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="685" MinorBuildNumber="8"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<ResolveNamesResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:ResolveNamesResponseMessage ResponseClass="Error">

<m:MessageText>No results were found.</m:MessageText>

<m:ResponseCode>ErrorNameResolutionNoResults</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:ResolveNamesResponseMessage>

</m:ResponseMessages>

</ResolveNamesResponse>

</soap:Body>

</soap:Envelope>

Error response elements


The following elements are used in the error response:
ServerVersionInfo

ResolveNamesResponse

ResponseMessages

ResolveNamesResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

See also
ExpandDL operation

Using Name Resolution


SearchMailboxes operation
Article • 03/29/2023 • 3 minutes to read

7 Note

This operation is deprecated, and no longer supported by Microsoft. As a


replacement, please use the FindItem operation.

Find information about the SearchMailboxes EWS operation.

The SearchMailboxes operation searches mailboxes for occurrences of terms in mailbox


items.

This operation was introduced in Exchange Server 2013.

Using the SearchMailboxes operation


The SearchMailboxes operation can use many simultaneous search queries to perform
discovery search on multiple mailboxes. The results can be either statistical information
about the number of times search terms occur, or a preview of the items that contain
the search terms.

SearchMailboxes operation SOAP headers


The SearchMailboxes operation can use the SOAP headers that are listed in the
following table.

Header name Element Description

ManagementRole ManagementRole
Identifies the server roles that are necessary in order
for the caller to make the request. This header is
applicable to a request.

RequestVersion
RequestServerVersion Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.
SearchMailboxes operation request example:
Search mailboxes for number of search term
hits
The following example of a SearchMailboxes operation request shows how to use two
different queries to search three different mailboxes for statistical information about
how many times a term appears in each mailbox.

7 Note

In this example, the Query element is intentionaly left blank. This shows how a
successful request can contain error conditions on a per mailbox search basis.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body >

<m:SearchMailboxes>

<m:SearchQueries>

<t:MailboxQuery>

<t:Query>Test Item</t:Query>

<t:MailboxSearchScopes>

<t:MailboxSearchScope>

<t:Mailbox>/o=First Organization/ou=Exchange
Administrative Group
(FYDLT)/cn=Recipients/cn=12311a742f0e47e392c8201a60d13ecf-Steve</t:Mailbox>

<t:SearchScope>All</t:SearchScope>

</t:MailboxSearchScope>

<t:MailboxSearchScope>

<t:Mailbox>/o=First Organization/ou=Exchange
Administrative Group
(FYDLT)/cn=Recipients/cn=f00c9f70539844beb52341d8f40c572e-Antho</t:Mailbox>

<t:SearchScope>PrimaryOnly</t:SearchScope>

</t:MailboxSearchScope>

</t:MailboxSearchScopes>

</t:MailboxQuery>

<t:MailboxQuery>

<t:Query></t:Query>

<t:MailboxSearchScopes>

<t:MailboxSearchScope>

<t:Mailbox>/o=First Organization/ou=Exchange
Administrative Group
(FYDLT)/cn=Recipients/cn=accba4fd5ddf12214a0e82ce1645f4e-Danie</t:Mailbox>

<t:SearchScope>ArchiveOnly</t:SearchScope>

</t:MailboxSearchScope>

</t:MailboxSearchScopes>

</t:MailboxQuery>

</m:SearchQueries>

<m:ResultType>StatisticsOnly</m:ResultType>

</m:SearchMailboxes>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

SearchMailboxes

SearchQueries

MailboxQuery

Query

MailboxSearchScopes

MailboxSearchScope

Mailbox (string)

SearchScope

ResultType

Successful SearchMailboxes operation response


The following example shows a successful response to a SearchMailboxes operation
request to get statistical information about the number of times search terms are found
in the target mailboxes. The last query contains an empty Query element, which shows a
failed mailbox search.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="526"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:SearchMailboxesResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:SearchMailboxesResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:SearchMailboxesResult>

<t:SearchQueries>

<t:MailboxQuery>

<t:Query>Test Item</t:Query>

<t:MailboxSearchScopes>

<t:MailboxSearchScope>

<t:Mailbox>/o=First Organization/ou=Exchange
Administrative Group
(FYPDLT)/cn=Recipients/cn=35181a94327e392c8201a60d13ecf-Steve</t:Mailbox>

<t:SearchScope>All</t:SearchScope>

</t:MailboxSearchScope>

<t:MailboxSearchScope>

<t:Mailbox>/o=First Organization/ou=Exchange
Administrative Group (FYPDLT)/cn=Recipients/cn=f00c9f789572-
beb04001d8f40c572e-Antho</t:Mailbox>

<t:SearchScope>PrimaryOnly</t:SearchScope>

</t:MailboxSearchScope>

</t:MailboxSearchScopes>

</t:MailboxQuery>

</t:SearchQueries>

<t:ResultType>StatisticsOnly</t:ResultType>

<t:ItemCount>2</t:ItemCount>
<t:Size>20206</t:Size>

<t:PageItemCount>0</t:PageItemCount>

<t:PageItemSize>0</t:PageItemSize>

<t:KeywordStats>

<t:KeywordStat>

<t:Keyword>Test Item</t:Keyword>

<t:ItemHits>2</t:ItemHits>

<t:Size>20206</t:Size>

</t:KeywordStat>

</t:KeywordStats>

<t:FailedMailboxes>

<t:FailedMailbox>

<t:Mailbox>/o=First Organization/ou=Exchange
Administrative Group
(FYPDLT)/cn=Recipients/cn=accba4as3df234234a0e82ce1645f4e-Danie</t:Mailbox>

<t:ErrorCode>0</t:ErrorCode>

<t:ErrorMessage>The search query can't be empty.


</t:ErrorMessage>

<t:IsArchive>true</t:IsArchive>

</t:FailedMailbox>

</t:FailedMailboxes>

</m:SearchMailboxesResult>

</m:SearchMailboxesResponseMessage>

</m:ResponseMessages>

</m:SearchMailboxesResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

SearchMailboxesResponse

ResponseMessages

SearchMailboxesResponseMessage

ResponseCode

SearchMailboxesResult

SearchQueries

MailboxQuery

Query

MailboxSearchScopes

MailboxSearchScope

Mailbox (string)

SearchScope

ResultType

ItemCount

Size (long)

PageItemCount

KeywordStats
KeywordStat

Keyword

ItemHits

FailedMailboxes

FailedMailbox

Mailbox (string)

ErrorCode (int)

ErrorMessage

IsArchive

SearchMailboxes operation error response


The following example shows an error response to a SearchMailboxes operation
request. This is a response to a request to search a mailbox when the mailbox identifier
is incorrect.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="526"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:SearchMailboxesResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:SearchMailboxesResponseMessage ResponseClass="Error">

<m:MessageText>No mailbox is specified for search operation.


If specified in the request,

then it could be due to permission issue.</m:MessageText>

<m:ResponseCode>ErrorInvalidOperation</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:SearchMailboxesResult>

<t:SearchQueries>

<t:MailboxQuery>

<t:Query>subject:Test Item</t:Query>

<t:MailboxSearchScopes>

<t:MailboxSearchScope>

<t:Mailbox>[email protected]</t:Mailbox>

<t:SearchScope>All</t:SearchScope>

</t:MailboxSearchScope>

</t:MailboxSearchScopes>

</t:MailboxQuery>

</t:SearchQueries>

<t:ResultType>StatisticsOnly</t:ResultType>

<t:ItemCount>0</t:ItemCount>
<t:Size>0</t:Size>

<t:PageItemCount>0</t:PageItemCount>

<t:PageItemSize>0</t:PageItemSize>

<t:FailedMailboxes>

<t:FailedMailbox>

<t:Mailbox>[email protected]</t:Mailbox>

<t:ErrorCode>0</t:ErrorCode>

<t:ErrorMessage>No mailbox is specified for search


operation. If specified in the request,

then it could be due to permission issue.


</t:ErrorMessage>

<t:IsArchive>false</t:IsArchive>

</t:FailedMailbox>

</t:FailedMailboxes>

</m:SearchMailboxesResult>

</m:SearchMailboxesResponseMessage>

</m:ResponseMessages>

</m:SearchMailboxesResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

SearchMailboxesResponse

ResponseMessages

SearchMailboxesResponseMessage

ResponseCode

SearchMailboxesResult
SearchQueries

MailboxQuery

Query

MailboxSearchScopes

MailboxSearchScope

Mailbox (string)

SearchScope

ResultType

ItemCount

Size (long)

PageItemCount

PageItemSize

FailedMailboxes

FailedMailbox

Mailbox (string)

ErrorCode (int)

ErrorMessage

IsArchive

For additional error codes that are generic to EWS and specific to this operation, see
ResponseCode.

See also
EWS operations in Exchange

GetSearchableMailboxes operation

SetHoldOnMailboxes operation

GetHoldOnMailboxes operation
GetDiscoverySearchConfiguration operation

GetNonIndexableItemDetails operation

GetNonIndexableItemStatistics operation
SendItem operation
Article • 03/29/2023 • 2 minutes to read

The SendItem operation is used to send e-mail messages that are located in the
Exchange store.

SendItem (E-mail Message) request example

Description
The following example shows how to send an e-mail message.

Code
XML

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<SendItem
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

SaveItemToFolder="true">

<ItemIds>

<t:ItemId Id="AAAtAEF=" ChangeKey="CQAAABY+T" />

</ItemIds>

</SendItem>

</soap:Body>

</soap:Envelope>

Comments
The item identifier has been shortened to preserve readability.

Request elements
The following elements are used in the request:

SendItem
ItemIds

ItemId

Successful SendItem (E-mail Message)


Response

Description
The following example shows a successful SendItem response.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="602" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<SendItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:SendItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

</m:SendItemResponseMessage>

</m:ResponseMessages>

</SendItemResponse>

</soap:Body>

</soap:Envelope>

Successful response elements


The following elements are used in the response:

ServerVersionInfo
SendItemResponse

ResponseMessages

SendItemResponseMessage

ResponseCode

Comments
A delegate who tries to send an e-mail message that is located in the principal's Drafts
folder with the SendAndSaveCopy option set to save a copy in the Sent Items
distinguished folder will silently fail to move a copy of the sent item to the Sent Items
distinguished folder. The item will remain in the principal's Drafts folder. The
workaround for this issue is to specify the principal's mailbox in the
DistinguishedFolderId element.

An additional scenario to consider is when a delegate creates an e-mail message and


saves it to the Drafts folder of the delegate's mailbox. If the delegate tries to send the
item and save a copy to the principal's Sent Items distinguished folder, the message is
sent correctly, the draft message remains in the delegate's Drafts folder, the sent
message does not appear in either the delegate's or principal's Sent Items folder, and
the response is a success.

Invalid SendItem (E-mail Message) request


example

Description
The following code sample shows an example of a request with an invalid identifier.

Code
XML

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<SendItem
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

SaveItemToFolder="true">

<ItemIds>

<t:ItemId Id="%BadItemId%" ChangeKey="CQAAABYAAA" />

</ItemIds>

</SendItem>

</soap:Body>

</soap:Envelope>

SendItem (E-mail Message) error response

Description
The following example shows an error response to a SendItem request that contains an
invalid identifier.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="602" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<SendItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:SendItemResponseMessage ResponseClass="Error">

<m:MessageText>Id is malformed.</m:MessageText>

<m:ResponseCode>ErrorInvalidIdMalformed</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:SendItemResponseMessage>

</m:ResponseMessages>

</SendItemResponse>

</soap:Body>

</soap:Envelope>

Error response elements


The following elements are used in the error response:

ServerVersionInfo

SendItemResponse

ResponseMessages

SendItemResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

See also
SendItem operation

SendItemType

EWS XML elements in Exchange


SetHoldOnMailboxes operation
Article • 03/29/2023 • 2 minutes to read

) Important

Starting on April 1, 2020, the SetHoldOnMailboxes operation will no longer be


available in Exchange Online. This operation won't be affected in on-premises
versions of Exchange Server. For more information, see Retirement of legacy
eDiscovery tools in Exchange Online.

Find information about the SetHoldOnMailboxes EWS operation.

The SetHoldOnMailboxes operation sets a mailbox hold policy on mailboxes.

This operation was introduced in Exchange Server 2013.

Using the SetHoldOnMailboxes operation


The SetHoldOnMailboxes operation sets a mailbox hold on to one or more mailboxes.

SetHoldOnMailboxes operation SOAP headers


The SetHoldOnMailboxes operation can use the SOAP headers that are listed in the
following table.

Header name Element Description

ManagementRole ManagementRole
Identifies the server roles that are necessary in order
for the caller to make the request. This header is
applicable to a request.

RequestVersion
RequestServerVersion Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

SetHoldOnMailboxes operation request


example: Apply a hold on a mailbox
The following example of a SetHoldOnMailboxes operation request shows how to apply
a hold on two mailboxes. The mailbox hold was created by using the New-
MailboxSearch command.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body >

<m:SetHoldOnMailboxes>

<m:ActionType>Create</m:ActionType>

<m:HoldId>HoldId2</m:HoldId>

<m:Query>test</m:Query>

<m:Mailboxes>

<t:String>/o=First/ou=Exchange(DLT)/cn=Recipients/cn=1fa441ff5e4749ba43ecc0f
d94c21adf-Willi</t:String>

<t:String>/o=First/ou=Exchange(DLT)/cn=Recipients/cn=aed2346adaa34ffc9f0f339
917e8de95-Micha</t:String>

</m:Mailboxes>
<m:Language>English</m:Language>

<m:IncludeNonIndexableItems>false</m:IncludeNonIndexableItems>

<m:Deduplication>true</m:Deduplication>

</m:SetHoldOnMailboxes>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

SetHoldOnMailboxes

ActionType (HoldActionType)

HoldId

Query

Mailboxes (ArrayOfStringsType)

String

Language
IncludeNonIndexableItems

Deduplication

Successful SetHoldOnMailboxes operation


response
The following example shows a successful response to a SetHoldOnMailboxes
operation request to put two mailboxes on hold.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="526"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SetHoldOnMailboxesResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

<MailboxHoldResult>

<HoldId
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">HoldId2</
HoldId>

<Query
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">test</Que
ry>

<MailboxHoldStatuses
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<MailboxHoldStatus>

<Mailbox>o=First/ou=Exchange(DLT)/cn=Recipients/cn=1fa441ff5e4749ba43ecc0fd9
4c21adf-Willi</Mailbox>

<Status>Pending</Status>

<AdditionalInfo/>

</MailboxHoldStatus>

<MailboxHoldStatus>

<Mailbox>/o=First/ou=Exchange(DLT)/cn=Recipients/cn=aed2346adaa34ffc9f0f3399
17e8de95-Micha</Mailbox>

<Status>Pending</Status>

<AdditionalInfo/>

</MailboxHoldStatus>

</MailboxHoldStatuses>

</MailboxHoldResult>

</SetHoldOnMailboxesResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

SetHoldOnMailboxesResponse

ResponseCode

MailboxHoldResult

HoldId

Query

MailboxHoldStatuses

MailboxHoldStatus

Mailbox (string)

Status (HoldStatusType)

AdditionalInfo

SetHoldOnMailboxes operation error response


The following example shows an error response to a SetHoldOnMailboxes operation
request. This is a response to a request that contains an incorrectly specified mailbox
identifier.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="526"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SetHoldOnMailboxesResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>No mailbox is specified for hold operation. If


specified in the request, then it could be the object does not exist in AD
or is a Distribution Group.</MessageText>

<ResponseCode>ErrorInvalidOperation</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</SetHoldOnMailboxesResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

SetHoldOnMailboxesResponse

MessageText

ResponseCode

DescriptiveLinkKey

For additional error codes that are generic to EWS and specific to this operation, see
ResponseCode.

See also
EWS operations in Exchange

GetSearchableMailboxes operation

SearchMailboxes operation

GetHoldOnMailboxes operation

GetDiscoverySearchConfiguration operation
GetNonIndexableItemDetails operation

GetNonIndexableItemStatistics operation
SetImGroup operation
Article • 03/29/2023 • 2 minutes to read

Find information about the SetImGroup EWS operation.

The SetImGroup operation changes the display name of an instant messaging (IM)
group.

This operation was introduced in Exchange Server 2013.

Using the SetImGroup operation


The SetImGroup operation only takes a single display name argument.

SetImGroup operation SOAP headers


The SetImGroup operation can use the SOAP headers that are listed in the following
table.

Header name Element Description

Impersonation
ExchangeImpersonation Identifies the user whom the client application is
impersonating. This header is applicable to a
request.

MailboxCulture MailboxCulture Identifies the culture, as defined in RFC 3066, "Tags


for the Identification of Languages", to be used to
access the mailbox. This header is applicable to a
request.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request. This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

SetImGroup operation request example


The following example of a SetImGroup operation request shows how to change an IM
group display name to "MyNewGroupName".

7 Note
The Exchange store identifier has been shortened to preserve readability.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

<t:MailboxCulture>en-US</t:MailboxCulture>

</soap:Header>

<soap:Body >

<m:SetImGroup>

<m:GroupId Id="AAMkAGQ1MjJjMTBkQoTbWAAAAAAQRAAA="

ChangeKey="EgAAAA=="/>

<m:NewDisplayName>MyNewGroupName</m:NewDisplayName>

</m:SetImGroup>

</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

SetImGroup

GroupId

NewDisplayName

Successful SetImGroup operation response


The following example shows a successful response to a SetImGroup operation request.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="349"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SetImGroupResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

</SetImGroupResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:

SetImGroupResponse

ResponseCode

SetImGroup operation error response


The following example shows an error response to a SetImGroup operation request. The
following error response occurs when an attempt is made to change the group display
name to the existing group display name.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="349"

MinorBuildNumber="0"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SetImGroupResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>An IM group with the specified display name already


exists.</MessageText>

<ResponseCode>ErrorImGroupDisplayNameAlreadyExists</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</SetImGroupResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

SetImGroupResponse

MessageText

ResponseCode

DescriptiveLinkKey

For additional error codes that are generic to EWS and specific to this operation, see
ResponseCode.

See also
People and contacts in EWS in Exchange

AddImGroup operation

RemoveImGroup operation
SetImListMigrationCompleted operation
Article • 03/29/2023 • 2 minutes to read

The SetImListMigrationCompleted operation is not intended for public use.


SetUserOofSettings operation
Article • 03/29/2023 • 2 minutes to read

The SetUserOofSettings Web method sets a mailbox user's Out of Office (OOF) settings
and message.

SOAP Headers
The SetUserOofSettings operation can use the SOAP headers that are listed and
described in the following table.

Header Element Description

Impersonation ExchangeImpersonation Identifies the user whom the client application is


impersonating.

ServerVersion ServerVersionInfo
Identifies the version of the server that responded to
the request.

SetUserOofSettings request example

Description
The following example of a SetUserOofSettings request sets an OOF setting for 10 days.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<SetUserOofSettingsRequest
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<Mailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Name>User1</Name>

<Address>[email protected]</Address>

<RoutingType>SMTP</RoutingType>

</Mailbox>

<UserOofSettings
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<OofState>Enabled</OofState>

<ExternalAudience>All</ExternalAudience>

<Duration>

<StartTime>2006-10-05T00:00:00</StartTime>

<EndTime>2006-10-25T00:00:00</EndTime>

</Duration>

<InternalReply>

<Message>I am out of office. This is my internal reply.</Message>

</InternalReply>

<ExternalReply>

<Message>I am out of office. This is my external reply.</Message>

</ExternalReply>

</UserOofSettings>

</SetUserOofSettingsRequest>

</soap:Body>

</soap:Envelope>

Request elements
The following elements are used in the request:

SetUserOofSettingsRequest

Mailbox (Availability)

Name (EmailAddress)

Address (string)

RoutingType (EmailAddress)

UserOofSettings

OofState

ExternalAudience

Duration (UserOofSettings)

StartTime

EndTime

InternalReply

Message (Availability)

ExternalReply
Successful SetUserOofSettings response
example

Description
The following example shows a successful response to the SetUserOofSettings request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="685" MinorBuildNumber="8"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<SetUserOofSettingsResponse
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseMessage ResponseClass="Success">

<ResponseCode>NoError</ResponseCode>

</ResponseMessage>

</SetUserOofSettingsResponse>

</soap:Body>

</soap:Envelope>

Successful response elements


The following elements are used in the response:

ServerVersionInfo

SetUserOofSettingsResponse

ResponseMessage

ResponseCode

See also
EWS XML elements in Exchange
Subscribe operation
Article • 03/29/2023 • 3 minutes to read

The Subscribe operation is used to subscribe client applications to either push or pull
notifications. It is important to be aware that the structure of the request messages and
responses is different depending on the type of event notification.

Pull Subscription Subscribe request example

Description
The following code example shows how to subscribe to a pull event notification
subscription. The subscription informs the client application if new mail is added to the
Inbox and if an item is deleted from the Inbox. The subscription will time out if the client
does not request information about events within ten minutes. If the subscription
expires, a new subscription must be established to continue to request notifications.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<Subscribe
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<PullSubscriptionRequest>

<t:FolderIds>

<t:DistinguishedFolderId Id="inbox"/>

</t:FolderIds>

<t:EventTypes>

<t:EventType>NewMailEvent</t:EventType>

<t:EventType>DeletedEvent</t:EventType>

</t:EventTypes>

<t:Timeout>10</t:Timeout>

</PullSubscriptionRequest>

</Subscribe>

</soap:Body>

</soap:Envelope>

Pull Subscription Subscribe Request Elements


The following elements are used in the request:

Subscribe

PullSubscriptionRequest

FolderIds

DistinguishedFolderId

EventTypes

EventType

Timeout

To find other options for the request message of the Subscribe operation, explore the
schema hierarchy. Start at the PullSubscriptionRequest element.

Successful Pull Subscription Subscribe response


example

Description
The following example shows a successful pull subscription response. The response
contains the subscription identifier and watermark that is used to get the array of events
that are associated with a subscription. The subscription identifier is also used to
unsubscribe a client from a subscription.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="628" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<SubscribeResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:SubscribeResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:SubscriptionId>39ea5d0f-f062-455e-a1e9-
89c0304390f4</m:SubscriptionId>

<m:Watermark>AAAAAHgGAAAAAAAAAQ==</m:Watermark>

</m:SubscribeResponseMessage>

</m:ResponseMessages>

</SubscribeResponse>

</soap:Body>

</soap:Envelope>

Pull Subscription Subscribe response elements


The following elements are used in the response:

ServerVersionInfo

SubscribeResponse

ResponseMessages

SubscribeResponseMessage

ResponseCode

SubscriptionId (GetEvents)

Watermark

Pull Subscription Subscribe Error response


example

Description
The following example shows an error response to a Subscribe request. The error is
caused by an attempt to subscribe to notifications by using delegate access.

Code
XML
<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="685" MinorBuildNumber="8"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<SubscribeResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:SubscribeResponseMessage ResponseClass="Error">

<m:MessageText>Subscriptions are not supported for delegate user


access.</m:MessageText>

<m:ResponseCode>ErrorSubscriptionDelegateAccessNotSupported</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:SubscribeResponseMessage>

</m:ResponseMessages>

</SubscribeResponse>

</soap:Body>

</soap:Envelope>

Pull Subscription Error response elements


The following elements are used in the error response:

ServerVersionInfo

SubscribeResponse

ResponseMessages

SubscribeResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

Push Subscription request example


Description
The following code example shows how to subscribe to a push event notification
subscription. The request identifies the folders to monitor, the types of events to
monitor, the frequency of status notifications, and the URL of the client Web service that
listens for the push notifications.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<Subscribe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<PushSubscriptionRequest
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<FolderIds
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<DistinguishedFolderId Id="inbox" />

</FolderIds>

<EventTypes
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<EventType>NewMailEvent</EventType>

<EventType>CopiedEvent</EventType>

<EventType>CreatedEvent</EventType>

<EventType>DeletedEvent</EventType>

<EventType>ModifiedEvent</EventType>

<EventType>MovedEvent</EventType>

</EventTypes>

<StatusFrequency
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">1</Status
Frequency>

<URL
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">http://cl
ientWebService/Service.asmx</URL>

</PushSubscriptionRequest>

</Subscribe>

</soap:Body>

</soap:Envelope>

Comments
The client Web service must be set up before the push notification subscribe request is
sent; otherwise, the first notification will not be sent to a valid endpoint and the push
notification will fail. For more information, see Push Notification Sample Application .

A new SubscriptionId (GetEvents) is created when you resubscribe. Use the watermark of
a previous subscription to resubscribe at the point where the previous subscription
ended.

Push Subscription Request Elements


The following elements are used in the request:

Subscribe

PushSubscriptionRequest

FolderIds

DistinguishedFolderId

EventTypes

EventType

StatusFrequency

Url

Successful Push Subscription response example

Description
The following example shows a successful push subscription response.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="628" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<SubscribeResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseMessages>

<SubscribeResponseMessage ResponseClass="Success">

<ResponseCode>NoError</ResponseCode>

<SubscriptionId>83826921-afdf-48be-b469-
628cc02b5f49</SubscriptionId>

<Watermark>AQAAAOpvG0LURVdOhQkPOWZLPcI8EgAAAAAAAAE=</Watermark>

</SubscribeResponseMessage>

</ResponseMessages>

</SubscribeResponse>

</soap:Body>

</soap:Envelope>

Push Subscription response elements


The following elements are used in the response:

ServerVersionInfo

SubscribeResponse

ResponseMessages

SubscribeResponseMessage

ResponseCode

SubscriptionId (GetEvents)

Watermark

See also
Unsubscribe operation

GetEvents operation

Using Pull Subscriptions

Push Notification Sample Application


SyncFolderHierarchy operation
Article • 03/29/2023 • 2 minutes to read

The SyncFolderHierarchy operation synchronizes folders between the computer that is


running Microsoft Exchange Server 2010 and the client.

7 Note

The SyncFolderHierarchy operation does not return folders when the UnreadCount
or TotalCount properties have changed.

SyncFolderHierarchy request example

Description
The following example of a SyncFolderHierarchy request shows how to synchronize a
client folder hierarchy with the Exchange server. This example shows a folder hierarchy
that has already been synchronized at least one time. The SyncState element is not
included in the request for the first attempt to synchronize a client with the Exchange
server. The first request will return all the folders in the mailbox. The SyncState element
will be returned in the SyncFolderHierarchyResponse. This element is used to
synchronize the state for subsequent SyncFolderHierarchy requests.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<SyncFolderHierarchy
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<FolderShape>

<t:BaseShape>AllProperties</t:BaseShape>

</FolderShape>

<SyncState>H4sIA=</SyncState>

</SyncFolderHierarchy>

</soap:Body>

</soap:Envelope>

Comments
The SyncState element base64-encoded data has been shortened to preserve
readability.

Request elements
The following elements are used in the request:

SyncFolderHierarchy

FolderShape

BaseShape

SyncState

7 Note

The schema that describes these elements is located in the EWS virtual directory of
the computer that is running MicrosoftExchange Server 2007 that has the Client
Access server role installed.

Successful SyncFolderHierarchy Response

Description
The following example shows a successful response to the SyncFolderHierarchy request.
In this example, a new folder has been synchronized.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"

MajorBuildNumber="628" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<SyncFolderHierarchyResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:SyncFolderHierarchyResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:SyncState>H4sIAAA==</m:SyncState>
<m:IncludesLastFolderInRange>true</m:IncludesLastFolderInRange>

<m:Changes>

<t:Create>

<t:Folder>

<t:FolderId Id="AQApAHR=" ChangeKey="AQAAABY" />

<t:ParentFolderId Id="AQApA=" ChangeKey="AQAAAA==" />

<t:FolderClass>IPF.Note</t:FolderClass>

<t:DisplayName>NewFolder</t:DisplayName>
<t:TotalCount>0</t:TotalCount>

<t:ChildFolderCount>0</t:ChildFolderCount>

<t:UnreadCount>0</t:UnreadCount>

</t:Folder>

</t:Create>

</m:Changes>

</m:SyncFolderHierarchyResponseMessage>

</m:ResponseMessages>

</SyncFolderHierarchyResponse>

</soap:Body>

</soap:Envelope>

Comments
The SyncState element base64-encoded data and the folder identifier data have been
shortened to preserve readability.

Successful response elements


The following elements are used in the response:

ServerVersionInfo

SyncFolderHierarchyResponse

ResponseMessages

SyncFolderHierarchyResponseMessage
ResponseCode

SyncState

IncludesLastFolderInRange

Changes (Hierarchy)

Create (FolderSync)

Folder

FolderId

ParentFolderId

FolderClass

DisplayName (string)

TotalCount

ChildFolderCount

UnreadCount

SyncFolderHierarchy error response

Description
The following example shows an error response to a SyncFolderHierarchy request. This
error was caused by an invalid SyncState.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"

MajorBuildNumber="628" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<SyncFolderHierarchyResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:SyncFolderHierarchyResponseMessage ResponseClass="Error">

<m:MessageText>Synchronization state data is corrupted or


otherwise invalid.</m:MessageText>

<m:ResponseCode>ErrorInvalidSyncStateData</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:SyncState />

<m:IncludesLastFolderInRange>true</m:IncludesLastFolderInRange>

</m:SyncFolderHierarchyResponseMessage>

</m:ResponseMessages>

</SyncFolderHierarchyResponse>

</soap:Body>

</soap:Envelope>

Error response elements


The following elements are used in the error response:

ServerVersionInfo

SyncFolderHierarchyResponse

ResponseMessages

SyncFolderHierarchyResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

SyncState

IncludesLastFolderInRange

See also
EWS XML elements in Exchange
SyncFolderItems operation
Article • 03/29/2023 • 2 minutes to read

The SyncFolderItems operation synchronizes items between the Exchange server and the
client.

Remarks
The SyncFolderItems operation will return a maximum of 512 changes. Subsequent
SyncFolderItems requests must be performed to get additional changes.

SyncFolderItems is similar to the FindItem operation in that it cannot return properties


like Body or Attachments. If the SyncFolderItems operation does not return the
properties that you need, you can use the GetItem operation to get a specific set of
properties for each item that it returned by SyncFolderItems.

SyncFolderItems request example

Description
The following example of a SyncFolderItems request shows how to synchronize items in
a folder. This example shows a folder item's synchronization that is not the first
synchronization to have occurred for the Sent Items folder. The SyncState element is not
included in the request for the first attempt to synchronize a client with the Exchange
server. The first attempt to synchronize the items in a folder hierarchy will return all the
items in the mailbox, excluding items that are identified in the Ignore element. This
SyncFolderItems request will try to synchronize all changes to the folder items since the
last synchronization. This request will ignore the attempt to synchronize the one item
that is identified in the Ignore element.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<SyncFolderItems
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ItemShape>

<t:BaseShape>Default</t:BaseShape>

</ItemShape>

<SyncFolderId>

<t:DistinguishedFolderId Id="sentitems"/>

</SyncFolderId>

<SyncState>AEbJ94eMOAAA=</SyncState>

<Ignore>

<t:ItemId Id="AQApAHRAA==" ChangeKey="CQAAABY"/>

</Ignore>

<MaxChangesReturned>100</MaxChangesReturned>

</SyncFolderItems>

</soap:Body>

</soap:Envelope>

Comments
The SyncState element base64-encoded data and the ItemId element Id attribute have
been shortened to preserve readability.

Request elements
The following elements are used in the request:

SyncFolderItems

ItemShape

BaseShape

SyncFolderId

DistinguishedFolderId

SyncState

Ignore

ItemId

MaxChangesReturned

Successful SyncFolderItems Response

Description
The following example shows a successful response to the SyncFolderItems request. In
this example, a meeting request is synchronized from the Sent Items folder.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"

MajorBuildNumber="628" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
/>

</soap:Header>

<soap:Body>

<SyncFolderItemsResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:SyncFolderItemsResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:SyncState>H4sIAAAAA=</m:SyncState>

<m:IncludesLastItemInRange>true</m:IncludesLastItemInRange>

<m:Changes>

<t:Create>

<t:MeetingRequest>

<t:ItemId Id="AQApAHRwA==" ChangeKey="CwAAABYA" />

<t:Subject>Budget Q3</t:Subject>

<t:Sensitivity>Normal</t:Sensitivity>

<t:IsOutOfDate>false</t:IsOutOfDate>

<t:HasBeenProcessed>true</t:HasBeenProcessed>

<t:ResponseType>NoResponseReceived</t:ResponseType>

<t:IntendedFreeBusyStatus>Busy</t:IntendedFreeBusyStatus>

<t:Start>2006-08-02T17:30:00Z</t:Start>

<t:End>2006-08-02T19:30:00Z</t:End>

<t:Location>Conference Room 2</t:Location>

<t:Organizer>

<t:Mailbox>

<t:Name>Dan Park</t:Name>

<t:EmailAddress>[email protected]</t:EmailAddress>

<t:RoutingType>SMTP</t:RoutingType>

</t:Mailbox>

</t:Organizer>

</t:MeetingRequest>

</t:Create>

</m:Changes>

</m:SyncFolderItemsResponseMessage>

</m:ResponseMessages>

</SyncFolderItemsResponse>

</soap:Body>

</soap:Envelope>

Comments
The SyncState element base64-encoded data and the ItemId element Id attribute have
been shortened to preserve readability.

Successful response elements


The following elements are used in the response:

ServerVersionInfo

SyncFolderItemsResponse

ResponseMessages

SyncFolderItemsResponseMessage

ResponseCode

SyncState

IncludesLastItemInRange

Changes (Items)

Create (ItemSync)

MeetingRequest

ItemId

Subject

Sensitivity

IsOutOfDate

HasBeenProcessed

ResponseType
IntendedFreeBusyStatus

Start

End

Location

Organizer

Mailbox

Name (EmailAddressType)

EmailAddress (NonEmptyStringType)

RoutingType (EmailAddressType)

SyncFolderItems error response

Description
The following example shows an error response to a SyncFolderItems request. This error
was caused by an invalid SyncState.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"

MajorBuildNumber="628" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<SyncFolderItemsResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:SyncFolderItemsResponseMessage ResponseClass="Error">

<m:MessageText>Synchronization state data is corrupt or otherwise


invalid.</m:MessageText>

<m:ResponseCode>ErrorInvalidSyncStateData</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:SyncState />

<m:IncludesLastItemInRange>true</m:IncludesLastItemInRange>

</m:SyncFolderItemsResponseMessage>

</m:ResponseMessages>

</SyncFolderItemsResponse>

</soap:Body>

</soap:Envelope>

Error response elements


The following elements are used in the error response:

ServerVersionInfo

SyncFolderItemsResponse

ResponseMessages

SyncFolderItemsResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

SyncState

IncludesLastItemInRange

See also
EWS XML elements in Exchange
UninstallApp operation
Article • 03/29/2023 • 2 minutes to read

Find information about the UninstallApp EWS operation.

The UninstallApp operation uninstalls a mail app for Outlook.

This operation was introduced in Exchange Server 2013.

Using the UninstallApp operation


The UninstallApp operation takes one argument in the request that identifies the mail
app to uninstall.

UninstallApp operation SOAP headers


The UninstallApp operation can use the SOAP headers that are listed in the following
table.

Header name Element Description

RequestVersion RequestServerVersion Identifies the schema version for the operation request.
This header is applicable to a request.

ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to
the request. This header is applicable to a response.

UninstallApp operation request example:


Uninstall a mail app in a mailbox
The following example of an UninstallApp operation request shows how to a uninstall a
mail app by using the app identifier. The app identifier can be found in the app manifest
that is returned by the GetAppManifests operation.

XML

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2013" />

</soap:Header>

<soap:Body >

<m:UninstallApp>

<m:ID>1C50226D-04B5-4AB2-9FCD-42E236B59E4B</m:ID>

</m:UninstallApp>
</soap:Body>

</soap:Envelope>

The request SOAP body contains the following elements:

UninstallApp

ID (String)

Successful UninstallApp operation response


The following example shows a successful response to an UninstallApp operation
request to uninstall a mail app.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="556"

MinorBuildNumber="14"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UninstallAppResponse ResponseClass="Success"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

</UninstallAppResponse>

</s:Body>

</s:Envelope>

The response SOAP body contains the following elements:


UninstallAppResponse

ResponseCode

UninstallApp operation error response


The following example shows an error response to an UninstallApp operation request.
This is a response to a request to uninstall a mail app that has already been uninstalled.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="15"

MinorVersion="0"

MajorBuildNumber="556"

MinorBuildNumber="14"

Version="Exchange2013"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UninstallAppResponse ResponseClass="Error"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<MessageText>Extension ID 1c50226d-04b5-4ab2-9fcd-42e236b59e4b
can't be found.</MessageText>

<ResponseCode>ErrorInternalServerError</ResponseCode>

<DescriptiveLinkKey>0</DescriptiveLinkKey>

</UninstallAppResponse>

</s:Body>

</s:Envelope>

The error response SOAP body contains the following elements:

UninstallAppResponse

MessageText

ResponseCode

DescriptiveLinkKey
For additional error codes that are generic to EWS and specific to this operation, see
ResponseCode.

See also
EWS operations in Exchange

InstallApp operation

DisableApp operation

GetAppManifests

GetAppMarketplaceUrl operation
Unsubscribe operation
Article • 03/29/2023 • 2 minutes to read

The Unsubscribe operation is used to end a pull notification subscription. Use this
operation rather than letting a subscription timeout. This operation is only valid for pull
notifications.

Unsubscribe request example

Description
The following example shows the SOAP XML message that is sent to unsubscribe a
client from the Notification service.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<Unsubscribe
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<SubscriptionId>e6fbf5c1-7e26-4bc6-a5f2-882063d5e34e</SubscriptionId>

</Unsubscribe>

</soap:Body>

</soap:Envelope>

Unsubscribe request elements


The following elements are used in the request:

Unsubscribe

SubscriptionId (GetEvents)

Successful Unsubscribe response example

Description
The following example shows a successful response to an Unsubscribe request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="628" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<UnsubscribeResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:UnsubscribeResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

</m:UnsubscribeResponseMessage>

</m:ResponseMessages>

</UnsubscribeResponse>

</soap:Body>

</soap:Envelope>

Unsubscribe response elements


The following elements are used in the response:

ServerVersionInfo

Unsubscribe

ResponseMessages

UnsubscribeResponseMessage

ResponseCode

Unsubscribe Error response example


Description
The following example of an Unsubscribe error response occurs in response to an
attempt to unsubscribe by using a subscription identifier that cannot be located in the
Exchange store.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="628" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<UnsubscribeResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:UnsubscribeResponseMessage ResponseClass="Error">

<m:MessageText>The specified subscription was not found.


</m:MessageText>

<m:ResponseCode>ErrorSubscriptionNotFound</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:UnsubscribeResponseMessage>

</m:ResponseMessages>

</UnsubscribeResponse>

</soap:Body>

</soap:Envelope>

Unsubscribe Error response elements


The following elements are used in the error response:

ServerVersionInfo

UnsubscribeResponse

ResponseMessages
UnsubscribeResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

See also
Subscribe operation
GetEvents operation
Using Pull Subscriptions
UpdateDelegate operation
Article • 03/29/2023 • 2 minutes to read

The UpdateDelegate operation updates delegate permissions on a principal's mailbox.

SOAP Headers
The UpdateDelegate operation can use the SOAP headers that are listed and described
in the following table.

Header Element Description

Impersonation ExchangeImpersonation Identifies the user whom the client application is


impersonating.

MailboxCulture MailboxCulture Identifies the RFC3066 culture to be used to access


the mailbox.

RequestVersion RequestServerVersion
Identifies the schema version for the operation
request.

ServerVersion ServerVersionInfo
Identifies the version of the server that responded to
the request.

UpdateDelegate request example

Description
The following example of an UpdateDelegate request shows you how to update
delegate permissions on user1's account. User2 is granted the None permission level for
the Tasks folder and is granted permission to view private items. User3 is granted
Reviewer permissions for the Journal folder. Meeting requests are sent to the delegates,
and information about the request is sent to User1.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Header>

<t:RequestServerVersion Version="Exchange2007_SP1"/>

</soap:Header>

<soap:Body>

<UpdateDelegate
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<Mailbox>

<t:EmailAddress>[email protected]</t:EmailAddress>

</Mailbox>

<DelegateUsers>

<t:DelegateUser>

<t:UserId>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

</t:UserId>

<t:DelegatePermissions>

<t:TasksFolderPermissionLevel>None</t:TasksFolderPermissionLevel>

</t:DelegatePermissions>

<t:ViewPrivateItems>true</t:ViewPrivateItems>

</t:DelegateUser>

<t:DelegateUser>

<t:UserId>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

</t:UserId>

<t:DelegatePermissions>

<t:JournalFolderPermissionLevel>Reviewer</t:JournalFolderPermissionLevel>

</t:DelegatePermissions>

</t:DelegateUser>

</DelegateUsers>

<DeliverMeetingRequests>DelegatesAndSendInformationToMe</DeliverMeetingReque
sts>

</UpdateDelegate>

</soap:Body>

</soap:Envelope>

Comments
The UpdateDelegate request does not require that updates be applied to delegates.
Clients can change only the DeliverMeetingMessage setting.

UpdateDelegate response example

Description
The following example shows a successful response to an UpdateDelegate operation.
Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8"

MinorVersion="1"

MajorBuildNumber="206"

MinorBuildNumber="0"

Version="Exchange2007_SP1"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<m:UpdateDelegateResponse
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

ResponseClass="Success"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseCode>NoError</m:ResponseCode>
<m:ResponseMessages>

<m:DelegateUserResponseMessageType ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:DelegateUser>

<t:UserId>

<t:SID>S-1-5-21-1333220396-2200287332-232816053-1117</t:SID>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

<t:DisplayName>User2</t:DisplayName>

</t:UserId>

<t:ReceiveCopiesOfMeetingMessages>true</t:ReceiveCopiesOfMeetingMessages>

<t:ViewPrivateItems>true</t:ViewPrivateItems>

</m:DelegateUser>

</m:DelegateUserResponseMessageType>

<m:DelegateUserResponseMessageType ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:DelegateUser>

<t:UserId>

<t:SID>S-1-5-21-1333220396-2200287332-232816053-1118</t:SID>

<t:PrimarySmtpAddress>[email protected]</t:PrimarySmtpAddress>

<t:DisplayName>User3</t:DisplayName>

</t:UserId>

<t:ReceiveCopiesOfMeetingMessages>true</t:ReceiveCopiesOfMeetingMessages>

<t:ViewPrivateItems>false</t:ViewPrivateItems>

</m:DelegateUser>

</m:DelegateUserResponseMessageType>

</m:ResponseMessages>

</m:UpdateDelegateResponse>

</soap:Body>

</soap:Envelope>

UpdateDelegate Error response example

Description
The following example shows an error response to an UpdateDelegate request. The
error was generated because the delegate does not exist in the principal's delegate list.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8"

MinorVersion="1"

MajorBuildNumber="206"

MinorBuildNumber="0"

Version="Exchange2007_SP1"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<m:UpdateDelegateResponse
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

ResponseClass="Success"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseCode>NoError</m:ResponseCode>
<m:ResponseMessages>

<m:DelegateUserResponseMessageType ResponseClass="Error">

<m:MessageText>The user is not a delegate for the mailbox.


</m:MessageText>

<m:ResponseCode>ErrorNotDelegate</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:DelegateUserResponseMessageType>

</m:ResponseMessages>

</m:UpdateDelegateResponse>

</soap:Body>

</soap:Envelope>

See also
EWS XML elements in Exchange
UpdateFolder operation
Article • 03/29/2023 • 2 minutes to read

The UpdateFolder operation is used to modify properties of an existing item in the


Exchange store. Each UpdateFolder operation consists of the following:

A FolderId element that specifies a folder to update.

An internal path of an element in the folder, as specified by the folder shape, which
specifies the data to update.

A folder that contains the new value of the updated field, if the update is not a
deletion.

Remarks
Three basic update actions can be performed on an item. These actions are listed in the
following table.

Action Description

Append The append action adds data to an existing property. It preserves the data that is
currently there. Append is not applicable to all properties.

Set The set action replaces data for a property if it contains data, or creates the property
and sets its value if it does not exist. The set action is only applicable to writable
properties.

Delete The delete action removes a property from a folder. This is different than setting it to
an empty value. When complete, the property does not exist for the folder. Delete is
only applicable to writable properties.

UpdateFolder request example

Description
The following example of an UpdateFolder request shows how to update a folder
display name.

Code
XML
<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<UpdateFolder
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<FolderChanges>

<t:FolderChange>

<t:FolderId Id="AScA" ChangeKey="GO3u/"/>

<t:Updates>

<t:SetFolderField>

<t:FieldURI FieldURI="folder:DisplayName"/>

<t:Folder>

<t:DisplayName>NewFolderName</t:DisplayName>

</t:Folder>

</t:SetFolderField>

</t:Updates>

</t:FolderChange>

</FolderChanges>

</UpdateFolder>

</soap:Body>

</soap:Envelope>

Comments
This example changes the display name of the folder to NewFolderName.

7 Note

The values of the Id and ChangeKey attributes of the FolderId element have been
shortened for readability.

Request elements
The following elements are used in the request:

UpdateFolder

FolderChanges

FolderChange

FolderId
Updates (Folder)

SetFolderField

FieldURI

Folder

DisplayName (string)

See the schema for additional elements that you can use to form an UpdateFolder
request.

7 Note

The default location of the schema is in the EWS virtual directory on the computer
that has the Client Access server role installed.

UpdateFolder response example

Description
The following example shows a successful response to the UpdateFolder request. In this
example, the new change key is returned to reflect the updated status of the folder.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="685" MinorBuildNumber="8"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<UpdateFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:UpdateFolderResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Folders>

<t:Folder>

<t:FolderId Id="AAAlAFVz" ChangeKey="AQAAAB" />

</t:Folder>

</m:Folders>

</m:UpdateFolderResponseMessage>

</m:ResponseMessages>

</UpdateFolderResponse>

</soap:Body>

</soap:Envelope>

Comments

7 Note

The folder ID and the change key have been shortened to preserve readability.

The folder ID that is returned in the response represents the updated folder.

Successful response elements


The following elements are used in the response:

ServerVersionInfo

UpdateFolderResponse

ResponseMessages

UpdateFolderResponseMessage

ResponseCode

Folders

Folder

FolderId

UpdateFolder Error response example


Description
The following example shows an error response to an UpdateFolder request.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="685" MinorBuildNumber="8"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<UpdateFolderResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:UpdateFolderResponseMessage ResponseClass="Error">

<m:MessageText>The change key is invalid.</m:MessageText>

<m:ResponseCode>ErrorInvalidChangeKey</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

<m:Folders />
</m:UpdateFolderResponseMessage>

</m:ResponseMessages>

</UpdateFolderResponse>

</soap:Body>

</soap:Envelope>

Comments
This example shows an error response that is caused by an invalid ChangeKey attribute
in the request.

Error response elements


The following elements are used in the error response:

ServerVersionInfo
UpdateFolderResponse

ResponseMessages

UpdateFolderResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

Folders

See also
EWS XML elements in Exchange
UpdateInboxRules operation
Article • 03/29/2023 • 3 minutes to read

The UpdateInboxRules operation updates the authenticated user's Inbox rules by


applying the specified operations. UpdateInboxRules is used to create an Inbox rule, to
set an Inbox rule, or to delete an Inbox rule.

When you use the UpdateInboxRules operation, Exchange Web Services deletes client-
side send rules. Client-side send rules are stored on the client in the rule Folder
Associated Information (FAI) Message and nowhere else. EWS deletes this rule FAI
message by default, based on the expectation that Outlook will recreate it. However,
Outlook can't recreate rules that don't also exist as an extended rule, and client-side
send rules don't exist as extended rules. As a result, these rules are lost. We suggest you
consider this when designing your solution.

UpdateInboxRules (Create Rule) request


example
You can use Exchange Web Services to create an Inbox rule in a user's mailbox in the
Exchange store. Use the UpdateInboxRules element in conjunction with the
CreateRuleOperation element to create a rule.

Description
The client constructs the request XML and sends it to the server.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version ="Exchange2010_SP1"/>

</soap:Header>

<soap:Body>

<m:UpdateInboxRules>

<m:RemoveOutlookRuleBlob>true</m:RemoveOutlookRuleBlob>

<m:Operations>

<t:CreateRuleOperation>

<t:Rule>

<t:DisplayName>MoveInterestingToJunk</t:DisplayName>

<t:Priority>1</t:Priority>

<t:IsEnabled>true</t:IsEnabled>

<t:Conditions>

<t:ContainsSubjectStrings>

<t:String>Interesting</t:String>

</t:ContainsSubjectStrings>

</t:Conditions>

<t:Exceptions />

<t:Actions>

<t:MoveToFolder>

<t:DistinguishedFolderId Id="junkemail" />

</t:MoveToFolder>

</t:Actions>

</t:Rule>

</t:CreateRuleOperation>

</m:Operations>

</m:UpdateInboxRules>

</soap:Body>

</soap:Envelope>

Comments
This example builds a rule that will move an e-mail message to the Junk E-mail folder if
the e-mail subject contains a string that equals "Interesting".

Request elements
The UpdateInboxRules request includes the following elements:

MailboxSmtpAddress

RemoveOutlookRuleBlob

Operations

The Operations element contains the CreateRuleOperation element to create a rule.

UpdateInboxRules (Create Rule) response


example
Description
The following Simple Object Access Protocol (SOAP) body example shows a successful
response to the UpdateInboxRules request that creates a rule.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="1"

MajorBuildNumber="139"

MinorBuildNumber="0" Version="Exchange2010_SP1"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<UpdateInboxRulesResponse

ResponseClass="Success"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

</UpdateInboxRulesResponse>

</s:Body>

</s:Envelope>

Successful response elements


The following elements are used in the response:

ServerVersionInfo

UpdateInboxRulesResponse

ResponseMessages

ResponseCode

UpdateInboxRules (Set Rule) request example


You can use Exchange Web Services to modify an Inbox rule in a user's mailbox in the
Exchange store. Use the UpdateInboxRules element in conjunction with the
SetRuleOperation element to modify a rule.

Description
The client constructs the request XML and sends it to the server.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version ="Exchange2010_SP1"/>

</soap:Header>

<soap:Body>

<m:UpdateInboxRules>

<m:RemoveOutlookRuleBlob>true</m:RemoveOutlookRuleBlob>

<Operations
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<SetRuleOperation
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Rule>

<RuleId>Nh8AAAAwW/w=</RuleId>

<DisplayName>(Modified) This is Junk</DisplayName>

<Priority>1</Priority>

<IsEnabled>true</IsEnabled>

<Conditions>

<ContainsSubjectStrings>

<String>Interesting</String>
</ContainsSubjectStrings>

</Conditions>

<Actions>
<MoveToFolder>

<FolderId Id="AAMkADQ1YTE1" ChangeKey="AQAAAA==" />

</MoveToFolder>

</Actions>

</Rule>

</SetRuleOperation>

</Operations>

</m:UpdateInboxRules>

</soap:Body>

</soap:Envelope>

Comments
This example changes the display name to "(Modified) This is Junk".

7 Note

The values of the Id and ChangeKey attributes of the FolderId element have been
shortened for readability.

Request elements
The UpdateInboxRules request includes the following elements:

MailboxSmtpAddress

RemoveOutlookRuleBlob

Operations

The Operations element contains the SetRuleOperation element to modify a rule.

UpdateInboxRules (Set Rule) response example

Description
The following Simple Object Access Protocol (SOAP) body example shows a successful
response to the UpdateInboxRules request that modifies a rule.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="1"

MajorBuildNumber="139"

MinorBuildNumber="0"

Version="Exchange2010_SP1"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<UpdateInboxRulesResponse

ResponseClass="Success"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

</UpdateInboxRulesResponse>

</s:Body>

</s:Envelope>

Successful response elements


The following elements are used in the response:

ServerVersionInfo

UpdateInboxRulesResponse

ResponseMessages

ResponseCode

UpdateInboxRules (Delete Rule) request


example
You can use Exchange Web Services to delete an Inbox rule in a user's mailbox in the
Exchange store. Use the UpdateInboxRules in conjunction with the DeleteRuleOperation
element to delete a rule.

Description
The client constructs the request XML and sends it to the server.

Code
XML
<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version ="Exchange2010_SP1"/>

</soap:Header>

<soap:Body>

<m:UpdateInboxRules>

<m:RemoveOutlookRuleBlob>true</m:RemoveOutlookRuleBlob>

<m:Operations>

<t:DeleteRuleOperation>

<t:RuleId>Nh8AAAAwW/U=</t:RuleId>

</t:DeleteRuleOperation>

</m:Operations>

</m:UpdateInboxRules>

</soap:Body>

</soap:Envelope>

Comments
This example deletes the existing identified rule.

Request elements
The UpdateInboxRules request includes the following elements:

MailboxSmtpAddress

RemoveOutlookRuleBlob

Operations

The Operations element contains the DeleteRuleOperation element to delete a rule.

UpdateInboxRules (Delete Rule) response


example

Description
The following Simple Object Access Protocol (SOAP) body example shows a successful
response to the UpdateInboxRules request that deletes a rule.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="1"

MajorBuildNumber="139"

MinorBuildNumber="0"

Version="Exchange2010_SP1"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<UpdateInboxRulesResponse ResponseClass="Success"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ResponseCode>NoError</ResponseCode>

</UpdateInboxRulesResponse>

</s:Body>

</s:Envelope>

Successful response elements


The following elements are used in the response:

ServerVersionInfo

UpdateInboxRulesResponse

ResponseMessages

ResponseCode

See also
GetInboxRules operation
UpdateItem operation
Article • 03/29/2023 • 4 minutes to read

The UpdateItem operation is used to modify the properties of an existing item in the
Exchange store.

Remarks
You can perform three basic update actions on an item. The following table lists the
actions that you can perform.

Action Description

Append Adds data to an existing property. This action preserves the current data. Append does
not apply to all properties.

Set Replaces data for a property if the property contains data, or creates the property and
sets its value if the property does not exist. The set action is only applicable to writable
properties.

Delete Removes a property from an item. This differs from setting a property to an empty
value. When this action is finished, the property does not exist for the item. Delete is
only applicable to writable properties.

An UpdateItem call can be used to modify one or more items, and one or more
properties on each item. The ItemChanges element contains all the modifications that
are to be performed as part of this call. The ItemChange element, a child of the
ItemChanges element, represents the modifications to be performed on a single item.
The ItemChange element contains a set of update actions that can be performed on a
single item. These changes are contained in the Updates (Item) element. The ItemId
element identifies the item to update. To update more than one property on an item, a
SetItemField, AppendToItemField, or DeleteItemField must be provided for each
property that requires the update.

7 Note

Update actions are applied in the order in which they are specified.

For each change, you have to specify the path of the property to change and a
representation of that item with its new value. The delete action is slightly different in
that only the path of the property that should be deleted is required. For set and
append actions, the path that is specified must refer to the same property that is being
set in the item representation. If these differ, an error will be returned.

The UpdateItem operation can set the Start and End time of an Exchange store item. In
an UpdateItem request, the Start time can be set without also setting the End time. This
can cause an error if the Start time is later than the End time. Be aware that client
applications must adjust the End time when the Start time is changed in order to
preserve the duration.

When a single calendar item is updated to become a recurring master calendar item, the
MeetingTimeZone property must be set by the UpdateItem operation in order to
preserve the calendar item's original time zone.

SetItemField request example

Description
The following example of an UpdateItem request shows how to set the sensitivity
property on an item.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<UpdateItem MessageDisposition="SaveOnly"
ConflictResolution="AutoResolve"

xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<ItemChanges>

<t:ItemChange>

<t:ItemId Id="AAAtAEFkb..." ChangeKey="CQAAABYAAAB..."/>

<t:Updates>

<t:SetItemField>

<t:FieldURI FieldURI="item:Sensitivity"/>

<t:Message>

<t:Sensitivity>Normal</t:Sensitivity>

</t:Message>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

</ItemChanges>

</UpdateItem>

</soap:Body>

</soap:Envelope>

Comments
The item identifier and change key have been shortened to preserve readability.

SetItemField Request Elements


The following elements are used in the request:

UpdateItem

ItemChanges

ItemChange

ItemId

Updates (Item)

SetItemField

FieldURI

Message

Sensitivity

AppendToItemField request example

Description
The following example of an UpdateItem request shows how to append text to the
body property on an item.

Code
XML
<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<UpdateItem MessageDisposition="SaveOnly"
ConflictResolution="AutoResolve"

xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<ItemChanges>

<t:ItemChange>

<t:ItemId Id="AAAtAEFkbW..." ChangeKey="CQAAABYA..."/>

<t:Updates>

<t:AppendToItemField>

<t:FieldURI FieldURI="item:Body"/>

<t:Message>

<t:Body BodyType="Text">Some additional text to


append</t:Body>

</t:Message>

</t:AppendToItemField>

</t:Updates>

</t:ItemChange>

</ItemChanges>

</UpdateItem>

</soap:Body>

</soap:Envelope>

Comments
The following properties support the append action:

message:ReplyTo

item:Body

All the recipient and attendee collection properties

The item identifier and change key have been shortened to preserve readability.

AppendToItemField Request Elements


The following elements are used in the request:

UpdateItem

ItemChanges

ItemChange
ItemId

Updates (Item)

AppendToItemField

FieldURI

Message

Body

DeleteItemField request example

Description
The following example of an UpdateItem request shows how to delete a property on an
item.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<UpdateItem MessageDisposition="SaveOnly"
ConflictResolution="AutoResolve"

xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<ItemChanges>

<t:ItemChange>

<t:ItemId Id="AAAtAEFkbWluaXN0cm..." ChangeKey="CQAAABYAA..."/>

<t:Updates>

<t:DeleteItemField>

<t:FieldURI FieldURI="item:Body"/>

</t:DeleteItemField>

</t:Updates>

</t:ItemChange>

</ItemChanges>

</UpdateItem>

</soap:Body>

</soap:Envelope>

Comments
The item identifier and change key have been shortened to preserve readability.

DeleteItemField Request Elements


The following elements are used in the request:

UpdateItem

ItemChanges

ItemChange

ItemId

Updates (Item)

DeleteItemField

FieldURI

Successful response example

Description
The following example shows a successful response to an UpdateItem request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="664" MinorBuildNumber="0"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"/>

</soap:Header>

<soap:Body>

<UpdateItemResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"

xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:UpdateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Message>
<t:ItemId Id="AAAtAEFkbW..." ChangeKey="CQAAABYAAA..."/>

</t:Message>

</m:Items>

</m:UpdateItemResponseMessage>

</m:ResponseMessages>

</UpdateItemResponse>

</soap:Body>

</soap:Envelope>

Comments
The item identifier and change key have been shortened to preserve readability.

Successful response elements


The following elements are used in the response:

ServerVersionInfo

UpdateItemResponse

ResponseMessages

UpdateItemResponseMessage

ResponseCode

Items

Message

ItemId

See also
UpdateItem operation (task)

UpdateItem operation (contact)

EWS XML elements in Exchange


Updating Contacts

Updating Tasks
UpdateItem operation (task)
Article • 03/29/2023 • 2 minutes to read

The UpdateItem operation is used to update task item properties in the Exchange store.

Remarks
You cannot use Exchange Web Services to send task requests. Exchange Web Services
can return task requests that are created by MicrosoftOfficeOutlook. If a task request
has already been sent, a request to update the task will return an error.

Updating the Current Occurrence of a


Recurring Task
The result of an UpdateItem operation on recurring tasks differs from the result of the
UpdateItem operation on a single, nonrecurring task. Changes to an occurrence of a
recurring task cause one-off tasks to be generated when the following updates are
made:

1. The status property of a regenerating or nonregenerating recurrent task is set to


Completed.

2. The start date or end date of a nonregenerating recurrent task is changed.

For example, if an UpdateItem request sets the Completed value of a recurring task to
true, the UpdateItemResponse will include a new Id and ChangeKey that represent a
newly created one-off task. The Id that was included in the request is still valid and the
recurring task that is represented by that Id has been updated to represent the next
occurrence. The ChangeKey that was included in the request is no longer valid because
the recurring task has been updated.

You can use the GetItem operation to get the latest ChangeKey for the recurring task.

For nonrecurring tasks or for the last occurrence of a recurring task, the UpdateItem
response returns the same Id that was passed to it and returns the associated updated
ChangeKey.

See also
UpdateItem operation
UpdateItem operation (contact)
Article • 03/29/2023 • 2 minutes to read

The UpdateItem operation is used to update contact item properties in the Exchange
store.

UpdateItem (Contact) request example

Description
The following code example shows how to update the e-mail address of a contact.

Code
XML

<soap:Envelope

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<UpdateItem
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

ConflictResolution="AlwaysOverwrite">

<ItemChanges>

<t:ItemChange>

<t:ItemId Id="AAAtAA=" ChangeKey="EQAAABYi" />

<t:Updates>

<t:SetItemField>

<t:IndexedFieldURI FieldURI="contacts:EmailAddress"
FieldIndex="EmailAddress1"/>

<t:Contact>

<t:EmailAddresses>

<t:Entry
Key="EmailAddress1">[email protected]</t:Entry>

</t:EmailAddresses>

</t:Contact>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

</ItemChanges>

</UpdateItem>

</soap:Body>

</soap:Envelope>

Comments
The item identifier has been shortened to preserve readability.

Request elements
The following elements are used in the request:

UpdateItem

ItemChanges

ItemChange

ItemId

Updates (Item)

SetItemField

IndexedFieldURI

Contact

EmailAddresses

Entry (EmailAddress)

Successful UpdateItem (Contact) Response

Description
The following code example shows a successful UpdateItem response.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="602" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<UpdateItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:UpdateItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:Items>

<t:Contact>
<t:ItemId Id="AAAtAE=" ChangeKey="EQAAABYx" />

</t:Contact>

</m:Items>

</m:UpdateItemResponseMessage>

</m:ResponseMessages>

</UpdateItemResponse>

</soap:Body>

</soap:Envelope>

Comments
The item identifier has been shortened to preserve readability.

Successful response elements


The following elements are used in the response:

ServerVersionInfo

UpdateItemResponse

ResponseMessages

UpdateItemResponseMessage

ResponseCode

Items (NonEmptyArrayOfAllItemsType)

Contact

ItemId

Invalid UpdateItem (Contact) request example


Description
The following code example shows an invalid request.

Code
XML

<soap:Envelope

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<UpdateItem
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

ConflictResolution="AlwaysOverwrite">

<ItemChanges>

<t:ItemChange>

<t:ItemId Id="AAAtAEF=" ChangeKey="EQAAABYi" />

<t:Updates>

<t:SetItemField>

<t:IndexedFieldURI FieldURI="contacts:EmailAddress"
FieldIndex="EmailAddress4"/>

<t:Contact>

<t:EmailAddresses>

<t:Entry
Key="EmailAddress4">[email protected]</t:Entry>

</t:EmailAddresses>

</t:Contact>

</t:SetItemField>

</t:Updates>

</t:ItemChange>

</ItemChanges>

</UpdateItem>

</soap:Body>

</soap:Envelope>

Comments
The item identifier has been shortened to preserve readability.

UpdateItem (Contact) error response

Description
The following code example shows an error response to an UpdateItem (Contact)
request.

Code
XML

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="602" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<soap:Fault>

<soap:faultcode>Client</soap:faultcode>

<soap:faultstring>The request failed schema validation.


</soap:faultstring>

<detail>

<e:ResponseCode
xmlns:e="https://schemas.microsoft.com/exchange/services/2006/errors">ErrorS
chemaValidation</e:ResponseCode>

<e:Message
xmlns:e="https://schemas.microsoft.com/exchange/services/2006/errors">The
'Key' attribute is invalid - The value 'EmailAddress4' is invalid according
to its data type
'https://schemas.microsoft.com/exchange/services/2006/types:EmailAddressKeyT
ype' - The Enumeration constraint failed.</e:Message>

<e:Line
xmlns:e="https://schemas.microsoft.com/exchange/services/2006/errors">17</e:
Line>

<e:Position
xmlns:e="https://schemas.microsoft.com/exchange/services/2006/errors">19</e:
Position>

</detail>

</soap:Fault>

</soap:Body>

</soap:Envelope>

Comments
Some elements that are used in the SOAP body of an error response that is caused by a
schema validation error are not defined in the messages or types schemas. The detail
element contains information about the error. The ResponseCode element contains the
error code. The Message element contains an explanation for the error, if one is
available. The Line element describes the line number where the schema validation error
occurred. The Position element describes the position from the leftmost character of the
XML document.

See also
UpdateItem operation
UpdateUserConfiguration operation
Article • 03/29/2023 • 2 minutes to read

The UpdateUserConfiguration operation updates a user configuration object on a


folder.

UpdateUserConfiguration request example

Description
The following example of an UpdateUserConfiguration request shows how to form a
request to update a user configuration object on the Drafts folder.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xs="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:UpdateUserConfiguration>

<m:UserConfiguration>

<t:UserConfigurationName Name="TestConfig">

<t:DistinguishedFolderId Id="drafts"/>

</t:UserConfigurationName>

<t:Dictionary>

<t:DictionaryEntry>

<t:DictionaryKey>

<t:Type>String</t:Type>

<t:Value>PhoneNumber</t:Value>

</t:DictionaryKey>

<t:DictionaryValue>

<t:Type>String</t:Type>

<t:Value>111-111-5555</t:Value>

</t:DictionaryValue>

</t:DictionaryEntry>

</t:Dictionary>

</m:UserConfiguration>

</m:UpdateUserConfiguration>

</soap:Body>

</soap:Envelope>

UpdateUserConfiguration response example

Description
The following example shows a successful response to the UpdateUserConfiguration
request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="20"

Version="Exchange2010"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:UpdateUserConfigurationResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:UpdateUserConfigurationResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

</m:UpdateUserConfigurationResponseMessage>

</m:ResponseMessages>

</m:UpdateUserConfigurationResponse>

</s:Body>

</s:Envelope>

See also
EWS operations in Exchange

EWS XML elements in Exchange


UploadItems operation
Article • 03/29/2023 • 2 minutes to read

The UploadItems operation uploads a stream of items into an Exchange mailbox.

) Important

The UploadItems operation is restricted in MicrosoftExchange Server 2010 Service


Pack 1 (SP1) to a maximum import payload of 25MB of base64 encoded data. The
setting can be altered in the web.config file.

UploadItems request example

Description
The following example of an UploadItems request shows how to upload two items into
a mailbox. The first item is a new item. The second item is an updated version of an
existing item in the mailbox.

Code
XML

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010_SP1" />

</soap:Header>

<soap:Body>

<m:UploadItems>

<m:Items>

<t:Item CreateAction="CreateNew">

<t:ParentFolderId Id="AQMkADhhOGIgAAAA==" ChangeKey="AQAAAA=="/>

<t:Data>

AQAAAAgAAAAAAAAAAQAAAAMAAAAYAAAAAQAAAAcDAgAAAAAAwAAAAA

AAAEYAJACABAAAAAYAAAABDqSAAAACAAAAcSMAAOSECEBbAAAAL089

RklSU1QgT1JHQU5JWkFUSU9OL09VPUVYQ0hBTkdFIEFETUlOSVNUUk

FUSVZFIEdST1VQIChGWURJQk9IRjIzU1BETFQpL0NOPVJFQ0lQSUVO

VFMvQ049AAMAFwABAAAAsIQaABIAAABJAFAATQAuAE4AbwB0AGUAAA

ALACMAAAADACYAAAAAAAsAKQAAAAMALgAAAAAAAwA2AAAAAACwhw4=

</t:Data>

</t:Item>

<t:Item CreateAction="Update">

<t:ParentFolderId Id="AQMkADhhOGIgAAAB==" ChangeKey="AQAAAA=="/>

<t:ItemId Id="AAMkADhhOGU0MGM7AAA=" ChangeKey="CQAAAA=="/>

<t:Data>

AQAAAAgAAAAAAAAAAQAAAAMAAAAYAAAAAQAAAAcDAgAAAAAAwAAAAA

AAAEYAJACABAAAAAYAAAABDqSAAAACAAAANiAAAOSECEBbAAAAL089

RklSU1QgT1JHQU5JWkFUSU9OL09VPUVYQ0hBTkdFIEFETUlOSVNUUk

FUSVZFIEdST1VQIChGWURJQk9IRjIzU1BETFQpL0NOPVJFQ0lQSUVO

VFMvQ049AAMAFwABAAAAsIQaABIAAABJAFAATQAuAE4AbwB0AGUAAA

ALACMAAAALACkAAAADADYAAAAAALCENwAyAAAASQBuAHQAZQByAGUA

cwB0AGkAbgBnACAALQAgAGYAcgBvAG0AIABFAFcAUwBNAEEAAABAAD

kAgJ2chyHuygECATsAZQAAAEVYOi9PPUZJUlNUIE9SR0FOSVpBVBMO

</t:Data>

</t:Item>

</m:Items>

</m:UploadItems>

</soap:Body>

</soap:Envelope>

Comments
Identifiers and the item data have been shortened to preserve readability.

Request elements
The following elements are used in the request:

RequestServerVersion

UploadItems

Items (NonEmptyArrayOfUploadItemsType)

Item (UploadItemType)

ParentFolderId

Data (base64Binary)

ItemId

Successful UploadItems response example


Description
The following example shows a successful response to the UploadItems request.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="1"

MajorBuildNumber="164"

MinorBuildNumber="0"

Version="Exchange2010_SP1"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:UploadItemsResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:UploadItemsResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:ItemId Id="AAMkADhhUFZ/AAA="
ChangeKey="CQAAABYAAABsMBS3hrihS7voMf0GPIQeAAAAULQm"/>

</m:UploadItemsResponseMessage>

<m:UploadItemsResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:ItemId Id="AAMkADhhOGZ7AAA="
ChangeKey="CQAAABYAAABsMBS3hrihS7voMf0GPIQeAAAAULQn"/>

</m:UploadItemsResponseMessage>

</m:ResponseMessages>

</m:UploadItemsResponse>

</s:Body>

</s:Envelope>

Comments
Item identifiers have been shortened to preserve readability.
Response elements
The following elements are used in the response:

ServerVersionInfo

UploadItemsResponse

ResponseMessages

UploadItemsResponseMessage

ResponseCode

ItemId

UploadItems Error response example

Description
The following example shows a response to the UploadItems request that contains an
error caused by an attempt to update an item that cannot be found in the mailbox.

Code
XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="1"

MajorBuildNumber="164"

MinorBuildNumber="0"

Version="Exchange2010_SP1"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:UploadItemsResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:UploadItemsResponseMessage ResponseClass="Error">

<m:MessageText>The specified object was not found in the store.


</m:MessageText>

<m:ResponseCode>ErrorItemNotFound</m:ResponseCode>

<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

</m:UploadItemsResponseMessage>

</m:ResponseMessages>

</m:UploadItemsResponse>

</s:Body>

</s:Envelope>

Error response elements


The following elements are used in the error response:

ServerVersionInfo

UploadItemsResponse

ResponseMessages

UploadItemsResponseMessage

MessageText

ResponseCode

DescriptiveLinkKey

See also
ExportItems operation

EWS operations in Exchange

EWS XML elements in Exchange


EWS XML elements in Exchange
Article • 03/29/2023 • 2 minutes to read

Find reference information for the EWS XML elements in Exchange.

Exchange Web Services (EWS) is a SOAP-based web service, which means that the
request and response messages that are sent between the client and server are
comprised of XML elements. The documentation in this section is based on the XML
instances that are sent between the client and server. The XML instances are defined in
the WSDL and schema files that are located in the virtual directory that hosts EWS. If you
are an authenticated user, you can browse to the WSDL and schema files by using the
following URLs, where <yourclientaccessserver> is the name of your Client Access
server:

http://<yourclientaccessserver>.com/ews/services.wsdl — The location of the


WSDL file.

http://<yourclientaccessserver>.com/ews/messages.xsd — The location of the


messages schema.

http://<yourclientaccessserver>.com/ews/types.xsd — The location of the types


schema.

The schema files that describe the EWS XML elements provide a general roadmap of the
XML structure that is possible for request-response message interactions. The actual
XML structure that is sent between client and server varies according to the operation
that is called, the information requested, and the server-side settings.

The EWS WSDL file, services.wsdl, does not fully conform to the WSDL standard because
it does not include a WSDL service definition. This is because EWS is not designed to be
hosted on a computer that has a predefined address. You can use the Autodiscover
service to get the EWS endpoint address. Some client-side object model generators
parse the WSDL and can encounter an error condition because the WSDL file does not
contain a WSDL service definition. If your object model generator encounters an error,
you can insert a placeholder WSDL service definition.

 Tip

If you are using the .NET Framework to develop your application, we recommend
that you use the EWS Managed API , rather than an object model generator. The
EWS Managed API provides an easy-to-use object model to handle the serialization
and deserialization of the EWS XML. For more information, see Get started with
EWS Managed API client applications .

The messages.xsd schema file contains the element definitions for the top-level
elements in the SOAP body. With the exception of the error response codes, most of the
definitions in messages.xsd are specific to an operation. The types.xsd schema contains
the definitions for the SOAP headers and all the common definitions that are shared
across operations.

See also
EWS reference for Exchange
EWS operations in Exchange
Explore the EWS Managed API, EWS, and web services in Exchange
Start using web services in Exchange
Autodiscover for Exchange
AbsoluteDate
Article • 03/29/2023 • 2 minutes to read

The AbsoluteDate element represents the date when the time changes from standard or
daylight saving time.

XML

<AbsoluteDate/>

date

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Standard Represents the date and time when the time changes from daylight saving time to
standard time.

Daylight
Represents the date and time when the time changes from standard time to daylight
saving time.

Text value
The text value represents the date when the shift between standard or daylight saving
time occurs.
Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
AbsoluteDateTransition
Article • 03/29/2023 • 2 minutes to read

The AbsoluteDateTransition element represents a time zone transition that occurs on a


specific date and at a specific time.

XML

<AbsoluteDateTransition>

<To/>

<DateTime/>

</AbsoluteDateTransition>

AbsoluteDateTransitionType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

To
Specifies the Period or TransitionsGroup that is the target of the time zone transition.

DateTime
Represents the date and time at which the time zone transition occurs.

Parent elements

Element Description

Transitions
Represents a collection of time zone transitions.

TransitionsGroup
Represents a collection of time zone transitions.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
AbsoluteMonthlyRecurrence
Article • 03/29/2023 • 2 minutes to read

The AbsoluteMonthlyRecurrence element represents a monthly recurrence pattern.

XML

<AbsoluteMonthlyRecurrence>

<Interval/>

<DayOfMonth/>

</AbsoluteMonthlyRecurrence>

AbsoluteMonthlyRecurrencePatternType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

DayOfMonth Describes the day in a month that a recurring item occurs. The range of values for
this property is 1 to 31. If for a particular month this value is larger than the
number of days in the month, the last day of the month is assumed for this
property.

Interval
Defines the interval between two consecutive recurring items. For example, if the
Interval element has a value of 5, the recurring item occurs every 5 months. The
range of valid values is from 1 to 99.

Parent elements

Element Description

Recurrence Contains recurrence information for recurring tasks.


(TaskRecurrenceType)

Element Description

Recurrence (RecurrenceType)
Contains the recurrence pattern for calendar items and meeting
requests.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can Be Empty False

See also
EWS XML elements in Exchange
AbsoluteYearlyRecurrence
Article • 03/29/2023 • 2 minutes to read

The AbsoluteYearlyRecurrence element represents a yearly recurrence pattern.

XML

<AbsoluteYearlyRecurrence>

<DayOfMonth/>

<Month/>

</AbsoluteYearlyRecurrence>

AbsoluteYearlyRecurrencePatternType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

DayOfMonth Describes the day in a month on which a recurring item occurs. The range of
values for this property is 1 to 31. If for a particular month this value is larger than
the number of days in the month, the last day of the month is assumed for this
property.

Month (Item Describes the month in which a yearly recurring item occurs.
Recurrence)

Parent elements

Element Description

Recurrence Contains recurrence information for recurring tasks.


(TaskRecurrenceType)

Element Description

Recurrence (RecurrenceType)
Contains the recurrence pattern for calendar items and meeting
requests.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can Be Empty False

See also
EWS XML elements in Exchange
AcceptItem
Article • 03/29/2023 • 2 minutes to read

The AcceptItem element represents an Accept reply to a meeting request.

XML

<AcceptItem>

<ItemClass/>

<Sensitivity/>

<Body/>

<Attachments/>

<InternetMessageHeaders/>

<Sender/>

<ToRecipients/>

<CcRecipients/>

<BccRecipients/>

<IsReadReceiptRequested/>

<IsDeliveryReceiptRequested/>

<ReferenceItemId/>

<ReceivedBy/>

<ReceivedRepresenting/>

<ProposedStart/>

<ProposedEnd/>

</AcceptItem>

AcceptItemType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ItemClass
Represents the message class of an item.

Sensitivity
Indicates the sensitivity level of an item.

Body
Represents the actual body content of a message.

Attachments
Contains the item or file that is attached to an item in the Exchange store.

InternetMessageHeaders
Represents the Internet message header name for a given header within the headers collection.

Sender
Identifies the sender of an item.

ToRecipients
Contains a set of recipients of an item. These are the primary recipients of an item.

CcRecipients
Represents a collection of recipients that will receive a copy of the message.

BccRecipients
Represents a collection of recipients to receive a blind carbon copy (Bcc) of an e-mail.

IsReadReceiptRequested
Indicates whether the sender of an item requests a read receipt.
Element Description

IsDeliveryReceiptRequested Indicates whether the sender of an item requests a delivery receipt.

ReferenceItemId
Identifies the item to which the response object refers.

ReceivedBy
Identifies the delegate in a delegate access scenario. This element was introduced in Microsoft
Exchange Server 2007 Service Pack 1 (SP1).

ReceivedRepresenting
Identifies the principal in a delegate access scenario. This element was introduced in Exchange
2007 SP1.

ProposedStart
Specifies the proposed start time of the meeting.

ProposedEnd
Specifies the proposed end time of the meeting.

Parent elements

Element Description

AdjacentMeetings
Describes all items that are adjacent to a meeting time.

The following are some of the XPath expressions to this element:

/CalendarItem/AdjacentMeetings

/MeetingRequest/AdjacentMeetings

/SetItemField/CalendarItem/AdjacentMeetings

/AppendToItemField/CalendarItem/AdjacentMeetings

/AcceptItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/DeclineItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/TentativelyAcceptItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/SetItemField/CalendarItem/AdjacentMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/AppendToItemField/CalendarItem/AdjacentMeetings

/CreateAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/GetAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

ConflictingMeetings Describes all items that conflict with a meeting time.

The following are some of the XPath expressions to this element:

/CalendarItem/ConflictingMeetings

/MeetingRequest/ConflictingMeetings

/SetItemField/CalendarItem/ConflictingMeetings

/AppendToItemField/CalendarItem/ConflictingMeetings

/AcceptItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/DeclineItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/TentativelyAcceptItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/SetItemField/CalendarItem/ConflictingMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/AppendToItemField/CalendarItem/ConflictingMeetings
/CreateAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/GetAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

ResponseObjects
Contains a collection of all the response objects that are associated with an item in the Exchange
store.

Items Contains an array of items to create in the folder identified by the ParentFolderId
(NonEmptyArrayOfAllItemsType) (TargetFolderIdType) element.

Remarks
The schema that describes this element is located in the EWS directory of the Exchange server that has the Client
Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
AcceptSharingInvitation
Article • 03/29/2023 • 2 minutes to read

The AcceptSharingInvitation element is used to accept an invitation that allows access


to another user's calendar or contacts data.

XML

<AcceptSharingInvitation>

<ReferenceItemId/>

</AcceptSharingInvitation>

AcceptSharingInvitationType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ReferenceItemId
Identifies the item to which the response object refers.

Parent elements

Element Description

ResponseObjects
Contains a collection of all the response objects that are
associated with an item in the Exchange store.

Items Contains an array of items to create in the folder that is


(NonEmptyArrayOfAllItemsType) identified by the ParentFolderId (TargetFolderIdType) element.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
CreateItem (AcceptSharingInvitation)
EWS XML elements in Exchange
AccessLevel
Article • 03/29/2023 • 2 minutes to read

The AccessLevel element specifies the access level for an online meeting.

XML

<AccessLevel/>

OnlineMeetingSettingsType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

OnlineMeetingSettings
Specifies the settings for online meetings.

Text value
The following table lists the text values for the AccessLevel element.

AccessLevel element text values

Value Description

Everyone The access level is open to all.

Internal The access level is internal only.


Value Description

Invited The access level is invited participants only.

Locked The access level is locked.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

This element was introduced in Exchange Server 2013.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Type schema

Validation file Types.xsd

Can be empty

See also
EWS XML elements in Exchange
Accuracy
Article • 03/29/2023 • 2 minutes to read

The Accuracy element specifies the accuracy of the latitude and longitude of the
associated postal address.

XML

<Accuracy></Accuracy>

xs:double

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

PostalAddress (PersonaPostalAddressType)
Specifies the postal address for a persona.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ActingAs
Article • 03/29/2023 • 2 minutes to read

The ActingAs element identifies who the caller is sending as.

XML

<ActingAs>

<EmailAddress/>

<RoutingType/>

</ActingAs>

EmailAddressType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

EmailAddress Defines the Simple Mail Transfer Protocol (SMTP) address of a mailbox
(NonEmptyStringType)
user. This element is optional.

RoutingType Defines the routing that is used for the mailbox. The default is SMTP.
(EmailAddress)
This element is optional.

Parent elements

Element Description

GetServiceConfiguration
Defines a GetServiceConfiguration request.

Remarks
This element is optional. If this element is not present, the authenticated user is
assumed to be the sender. The ActingAs element must be included for requesting
sender hints. An ErrorInvalidArgument error can be returned in a response if the
ActingAs element is missing, does not include a routing type, does not include an e-
mail address, contains an invalid e-mail address, does not resolve to a user in Active
Directory Domain Services (AD DS), or resolves to multiple users in AD DS.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Action (ConversationActionTypeType)
Article • 03/29/2023 • 2 minutes to read

The Action element contains the action to perform on the conversation specified by the
ConversationId element.

ApplyConversationAction

ConversationActions

ConversationAction

Action (ConversationActionTypeType)

XML

<Action> AlwaysCategorize | AlwaysDelete | AlwaysMove | Delete | Move | Copy


| SetReadState </Action>

ConversationActionTypeType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ConversationAction
Contains a single action to be applied to a single conversation.

Text value
The text value of the Action element indicates which action will be performed on a
conversation. The following are the possible text values and the corresponding actions:

AlwaysCategorize - The current items and new items in the conversation will
automatically be set with the categories identified in the Categories element.

AlwaysDelete - The current items and new items in the conversation will
automatically be deleted. The deletion mode is set by the DeleteType element.

AlwaysMove - The current items and new items in the conversation will
automatically be moved to the folder identified by the DestinationFolderId
element.

Delete - The current items in the conversation will be deleted. Subsequent items in
the conversation will not be deleted. The deletion mode is set by the DeleteType
element.

Move - The current items in the conversation will be moved to the folder identified
by the DestinationFolderId element. Subsequent items in the conversation will not
be moved.

Copy - The current items in the conversation will be copied to the folder identified
by the DestinationFolderId element. Subsequent items in the conversation will not
be copied.

SetReadState - The current items in the conversation will have their read state set.
The read state is set by the IsRead element.

Flag - The current items in the conversation will have a flag set as defined by the
Flag element.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types
Element Example

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
ApplyConversationAction operation
EWS XML elements in Exchange
Action (ProtectionRuleActionType)
Article • 03/29/2023 • 2 minutes to read

The Action element identifies what action must be executed if the condition part of the
rule matches.

XML

<Action Name="">

<Argument/>

</Action>

ProtectionRuleActionType

Attributes and elements


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

Attributes

Attribute Description

Name
Identifies the name of the action.

Child elements

Element Description

Argument Specifies arguments to the action. This element will not occur if the specified action
does not require arguments to be specified. This element can occur one or more
times if an action requires one or more arguments. The RightsProtectMessage action
will contain a single argument.

Parent elements

Element Description

Rule
Contains a single protection rule.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Action (SetClientExtensionActionType)
Article • 03/29/2023 • 2 minutes to read

The Action element contains the action that the Exchange server should take on an app.

XML

<Action ActionId="" ExtensionId="">

<ClientExtension/>

</Action>

SetClientExtensionActionType

Attributes and elements


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

Attributes

Attribute Description

ActionId Specifies the identifier of the action. This attribute is required.

ExtensionId Specifies the identifier of the extension. This attribute is optional.

ActionId

Value Description

Configure Indicates a configuration action.

Install Indicates an installation action.

Uninstall Indicates an uninstallation action.

Child elements

Element Description

ClientExtension
Contains user and configuration information about an app.
Parent elements

Element Description

Actions (ArrayOfSetClientExtensionActionsType)
Specifies an array of Action elements.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ActionUrl
Article • 03/29/2023 • 2 minutes to read

The ActionUrl element identifies the URL that the user should navigate to, in order to fix
an issue indicated by the AppStatus element.

XML

<ActionUrl/>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
Metadata

Text value
The text value of the ActionUrl element identifies the URL that the user should navigate
to, in order to fix an issue indicated by the AppStatus element.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Not applicable

Can be Empty False

See also
Metadata
EWS XML elements in Exchange
Actions
Article • 03/29/2023 • 2 minutes to read

The Actions element represents the set of actions that are available to be taken on a
message when the conditions are fulfilled.

Rule (RuleType)

XML

<Actions>

<AssignCategories>

<CopyToFolder>

<Delete>

<ForwardAsAttachmentToRecipients>

<ForwardToRecipients>

<MarkImportance>

<MarkAsRead>

<MoveToFolder>

<PermanentDelete>

<RedirectToRecipients>

<SendSMSAlertToRecipients>

<ServerReplyWithMessage>

<StopProcessingRules>

</Actions>

RuleActionsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

AssignCategories
Represents the categories that are stamped on e-mail
messages.
Element Description

CopyToFolder
Identifies the ID of the folder that e-mail items will be
copied to.

Delete
Indicates whether messages are to be moved to the Deleted
Items folder.

ForwardAsAttachmentToRecipients Indicates the e-mail addresses to which messages are to be


forwarded as attachments.

ForwardToRecipients
Indicates the e-mail addresses to which messages are to be
forwarded.

MarkImportance Specifies the importance that is to be stamped on messages.

MarkAsRead
Indicates whether messages are to be marked as read.

MoveToFolder
Identifies the ID of the folder that e-mail items will be
moved to.

PermanentDelete
Indicates whether messages are to be permanently deleted
and not saved to the Deleted Items folder.

RedirectToRecipients Indicates the e-mail addresses to which messages are to be


redirected.

SendSMSAlertToRecipients
Indicates the mobile phone numbers to which a Short
Message Service (SMS) alert is to be sent.

ServerReplyWithMessage
Indicates. the ID of the template message that is to be sent
as a reply to incoming messages.

StopProcessingRules
Indicates whether subsequent rules are to be evaluated.

Parent elements

Element Description

Rule (RuleType)
Represents a single rule in a user's mailbox.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
Conditions
EWS XML elements in Exchange
Actions
(ArrayOfSetClientExtensionActionsType)
Article • 03/29/2023 • 2 minutes to read

The Actions element identifies an array of actions to perform on a client extension.

XML

<Actions>

<Action/>

<Actions>

ArrayOfSetClientExtensionActionsType

Attributes and elements


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

Attributes
None.

Child elements
Action (SetClientExtensionActionType)

Parent elements
SetClientExtension

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Type

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty
Actions (RuleActionsType)
Article • 03/29/2023 • 2 minutes to read

The Actions element contains a list of actions associated with Inbox rules.

XML

<Actions>

<AssignCategories/>

<CopyToFolder/>

<Delete/>

<ForwardAsAttachmentToRecipients/>

<ForwardToRecipients/>

<MarkImportance/>

<MarkAsRead/>

<MoveToFolder/>

<PermanentDelete/>

<RedirectToRecipients/>

<SendSMSAlertToRecipients/>

<ServerReplyWithMessage/>

<StopProcessingRules/>

</Actions>

RuleActionsType

Attributes and elements


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

Attributes
None.

Child elements
AssignCategories | CopyToFolder | Delete | ForwardAsAttachmentToRecipients |
ForwardToRecipients | MarkImportance | MarkAsRead | MoveToFolder | PermanentDelete
| RedirectToRecipients | SendSMSAlertToRecipients | ServerReplyWithMessage |
StopProcessingRules

Parent elements
Rule (RuleType)
Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


ActionType (HoldActionType)
Article • 03/29/2023 • 2 minutes to read

The ActionType element indicates the type of action for the hold.

XML

<ActionType> Create | Update | Remove </ActionType>

HoldActionType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
SetHoldOnMailboxes

Text value
The text value of the ActionType element is the type of hold set on a mailbox. A text
value of Create indicates that a mailbox hold will be created. A text value of Update
indicates that a mailbox hold will be updated. A text value of Remove indicates that a
mailbox hold will be removed.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


ActionType (ReminderActionType)
Article • 03/29/2023 • 2 minutes to read

The ActionType element specifies the action to take on the reminder.

XML

<ActionType> Dismiss | Snooze </ActionType>

ReminderActionType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
ReminderItemAction

Text value
The text value of the ActionType element specifies the action to take on the reminder.
The text value of Dismiss indicates the reminder should be dismissed. The text value of
Snooze indicates that the reminder should be delayed until the time specified by the
NewReminderTime element.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
ReminderItemAction
EWS XML elements in Exchange
ActualWork
Article • 03/29/2023 • 2 minutes to read

The ActualWork element represents the actual amount of time that is spent on a task.

XML

<ActualWork/>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Task
Represents a task in the Exchange store.

Text value
The text value for this element represents an integer.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
AddBlankTargetToLinks
Article • 03/29/2023 • 2 minutes to read

The AddBlankTargetToLinks element specifies that the target attribute in HTML links are
set to open a new window.

XML

<AddBlankTargetToLinks> true | false </AddBlankTargetToLinks>

xs:Boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ItemShape Identifies the item properties and content to include in a GetItem, FindItem,
GetConversationItems or SyncFolderItems response.

The following are the XPath expressions to this element:

/GetItem/ItemShape

/FindItem/ItemShape

/SyncFolderItems/ItemShape

/GetConversationItems/ItemShape

Text value
A text value of true for the AddBlankTargetToLinks element indicates that all HTML links
will be set to open a new window. A value of false indicates that HTML links will open in
the current window.

Remarks
This element is optional.

This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
AddDelegate
Article • 03/29/2023 • 2 minutes to read

The AddDelegate element defines a request to add delegates to a mailbox. This


element was introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

XML

<AddDelegate>

<DelegateUsers/>

<DeliverMeetingRequests/>

<Mailbox/>

</AddDelegate>

AddDelegateType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

DelegateUsers
Contains the identities of delegates to add to or update in a mailbox.
This element was introduced in Microsoft Exchange Server 2007
Service Pack 1 (SP1).

DeliverMeetingRequests Defines how meeting requests are handled between the delegate and
the principal. This element was introduced in Microsoft Exchange
Server 2007 Service Pack 1 (SP1).

Mailbox
Identifies a mail-enabled Active Directory directory service object.

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.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
AddDelegate operation
EWS XML elements in Exchange
Adding Delegates
AddDelegateResponse
Article • 03/29/2023 • 2 minutes to read

The AddDelegateResponse element contains the status and result of an AddDelegate


operation request.

XML

<AddDelegateResponse>

<ResponseMessages/>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</AddDelegateResponse>

AddDelegateResponseMessageType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages Contains the response messages for an Exchange


(ArrayOfDelegateUserResponseMessageType) Web Services delegate management request.

MessageText
Provides a text description of the status of the
response.

ResponseCode
Provides an error code that identifies the specific
error that the request encountered.

DescriptiveLinkKey
Currently unused and is reserved for future use. It
contains a value of 0.

MessageXml
Provides additional error response information.
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 2010 that has the Client Access
server role installed.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
AddDelegate operation
EWS XML elements in Exchange
Adding Delegates
AddDistributionGroupToImList
Article • 03/29/2023 • 2 minutes to read

The AddDistributionGroupToImList element defines a request to add a distribution list


to an instant message list.

XML

<AddDistributionGroupToImList>

<SmtpAddress/>

<DisplayName/>

</AddDistributionGroupToImList>

AddDistributionGroupToImListType

Attributes and elements


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

Attributes
None.

Child elements
SmtpAddress | DisplayName (NonEmptyStringType)

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


AddDistributionGroupToImListResponse
Article • 03/29/2023 • 2 minutes to read

The AddDistributionGroupToImListResponse element defines a response to a


AddDistributionGroupToImList request.

XML

<AddNewImContactToGroupResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<ImGroup/>

</AddNewImContactToGroupResponse>

AddDistributionGroupToImListResponseMessageType

Attributes and elements


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

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml | ImGroup

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Description

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

Schema name Messages schema

Validation file messages.xsd

Can be empty false


AddImContactToGroup
Article • 03/29/2023 • 2 minutes to read

The AddImContactToGroup element defines a request to add an existing instant


messaging contact to an instant messaging group.

XML

<AddImContactToGroup>

<ContactId/>

<GroupId/>

</AddImContactToGroup>

AddImContactToGroupType

Attributes and elements


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

Attributes
None.

Child elements
ContactId | GroupId

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema name Messages schema

Validation file messages.xsd

Can be empty false


AddImContactToGroupResponse
Article • 03/29/2023 • 2 minutes to read

The AddImContactToGroupResponse element defines a response to an


AddImContactToGroup request.

XML

<AddImContactToGroupResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</AddImContactToGroupResponse>

AddImContactToGroupResponseMessageType

Attributes and elements


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

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


AddImGroup
Article • 03/29/2023 • 2 minutes to read

The AddImGroup element defines a request to add a new instant messaging group.

XML

<AddImGroup>

<DisplayName/>

</AddImGroup>

AddImGroupType

Attributes and elements


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

Attributes
None.

Child elements
DisplayName

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

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

Schema name Messages schema

Validation file messages.xsd

Can be empty false


AddImGroupResponse
Article • 03/29/2023 • 2 minutes to read

The AddImGroupResponse defines a response to an AddImGroup request.

XML

<AddImGroupResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<ImGroup/>

</AddImGroupResponse>

AddImContactToGroupResponseMessageType

Attributes and elements


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

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml | ImGroup

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


AddItemToMyCalendar
Article • 03/29/2023 • 2 minutes to read

The AddItemToMyCalendar element is intended for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
AdditionalInfo
Article • 03/29/2023 • 2 minutes to read

The AdditionalInfo element specifies additional information about the hold status of a
mailbox.

XML

<AdditionalInfo></AdditionalInfo>

xs:string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

MailboxHoldStatus
Specifies the hold status of the mailbox.

NonIndexableItemDetail
Specifies detail for an item that cannot be indexed.

Text value
The text value of the AdditionalInfo element is additional information about the hold
status of a mailbox.

Remarks
This element is optional.

This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
AdditionalProperties
Article • 03/29/2023 • 2 minutes to read

The AdditionalProperties element identifies additional properties for use in GetItem,


UpdateItem, CreateItem, FindItem, or FindFolder requests.

XML

<AdditionalProperties>

<ExtendedFieldURI/>

<FieldURI/>

<IndexedFieldURI/>

</AdditionalProperties>

NonEmptyArrayOfPathsToElementType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ExtendedFieldURI
Identifies extended MAPI properties to get, set, or create.

FieldURI
Identifies frequently referenced properties by URI.

IndexedFieldURI
Identifies frequently referenced dictionary properties by URI.

Parent elements

Element Description
Element Description

FolderShape
Identifies the folder properties to include in a GetFolder, FindFolder, or
SyncFolderHierarchy response.

The following are the XPath expressions to this element:

/FindFolder/FolderShape

/GetFolder/FolderShape

/SyncFolderHierarchy/FolderShape

ItemShape
Identifies the item properties and content to include in a GetItem, FindItem,
or SyncFolderItems response.

The following are the XPath expressions to this element:

/GetItem/ItemShape

/FindItem/ItemShape

/SyncFolderItems/ItemShape

AttachmentShape Identifies additional extended item properties to return in a response to a


GetItem request.

The following is the XPath expression to this element:

/GetAttachment/AttachmentShape

Remarks
Not all the child elements can be used with GetItem, UpdateItem, CreateItem, FindItem,
or FindFolder requests. The property must be applicable to the folder or item that is
accessed. Use extended properties to access other properties. If the property does not
exist for a given item, no corresponding element will be emitted into the resulting XML.

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

This element is optional.

Example
The following request example shows how to get an item subject by using the
AdditionalProperties element.
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<GetItem
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject"/>

</t:AdditionalProperties>

</ItemShape>

<ItemIds>

<t:ItemId Id="ASkAS="/>

</ItemIds>

</GetItem>

</soap:Body>

</soap:Envelope>

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


AddNewImContactToGroup
Article • 03/29/2023 • 2 minutes to read

The AddNewImContactToGroup element defines a request to add a new instant


messaging contact to an instant messaging group.

XML

<AddNewImContactToGroup>

<ImAddress/>

<DisplayName/>

<GroupId/>

</AddNewImContactToGroup>

AddNewImContactToGroupType

Attributes and elements


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

Attributes
None.

Child elements
ImAddress (NonEmptyStringType) | DisplayName (NonEmptyStringType) | GroupId

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema name Messages schema

Validation file messages.xsd

Can be empty false


AddNewImContactToGroupResponse
Article • 03/29/2023 • 2 minutes to read

The AddNewImContactToGroupResponse element defines a response to an


AddNewImContactToGroup request.

XML

<AddNewImContactToGroupResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Persona/>

</AddNewImContactToGroupResponse>

AddNewImContactToGroupResponseMessageType

Attributes and elements


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

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml | Persona

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

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

Schema name Messages schema

Validation file messages.xsd

Can be empty false


AddNewTelUriContactToGroup
Article • 03/29/2023 • 2 minutes to read

The AddNewTelUriContactToGroup element specifies the input data for the


AddNewTelUriContactToGroup WSDL operation.

XML

<AddNewTelUriContactToGroup>

<TelUriAddress/>

<ImContactSipUriAddress/>

<ImTelephoneNumber/>
<GroupId/>

</AddNewTelUriContactToGroup>

AddNewTelUriContactToGroupType

Attributes and elements


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

Attributes
None.

Child elements
TelUriAddress | ImContactSipUriAddress | ImTelephoneNumber | GroupId

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
AddNewTelUriContactToGroup operation
EWS XML elements in Exchange
AddNewTelUriContactToGroupResponse
Article • 03/29/2023 • 2 minutes to read

The AddNewTelUriContactToGroupResponse element specifies the result data for the


AddNewTelUriContactToGroup WSDL operation.

XML

<AddNewTelUriContactToGroupResponse>

<Persona/>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

</AddNewTelUriContactToGroupResponse>

AddNewTelUriContactToGroupResponseMessageType

Attributes and elements


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

Attributes
None.

Child elements
Persona | MessageText | ResponseCode | DescriptiveLinkKey

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
AddNewTelUriContactToGroup operation
EWS XML elements in Exchange
Address (ContactType)
Article • 03/29/2023 • 2 minutes to read

The Address element specifies the address of a contact.

XML

<Address></Address>

xs:string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Addresses (ArrayOfAddressesType)
Specifies an array of Address elements.

Text value
The text value of the Address element is the contact's postal address.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Address (EmailAddressType)
Article • 03/29/2023 • 2 minutes to read

The Address element represents a fully resolved e-mail address.

XML

<Address>

<Name/>

<EmailAddress/>

<RoutingType/>

<MailboxType/>

<ItemId/>

</Address >

EmailAddressType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Name Defines the name of the mailbox user. This element is optional.
(EmailAddressType)

EmailAddress Defines the Simple Mail Transfer Protocol (SMTP) address of a mailbox
(NonEmptyStringType) user. This element is optional.

RoutingType Defines the routing that is used for the mailbox. The default is SMTP.
(EmailAddress)
This element is optional.

MailboxType
Defines the mailbox type of a mailbox user. This element is optional.

ItemId
Defines the item identifier of a contact or private distribution list for
recipients from a user's Contacts folder. This element is optional.
Parent elements

Element Description

OriginalRecipients Contains a collection of e-mail addresses that represent the original


recipients of a tracked message.

RoomLists
Contains a list of meeting rooms in an organization.

SentToAddresses
Contains a list of e-mail addresses that incoming messages have to have
been sent to in order for the condition or exception to apply.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetMessageTrackingReport operation
GetRoomLists operation
EWS XML elements in Exchange
Address (string)
Article • 03/29/2023 • 2 minutes to read

The Address element represents the e-mail address of the mailbox user.

XML

<Address>...</Address>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Email Specifies the e-mail address of the MailboxData object. This element is used
(EmailAddressType) in the GetUserAvailability operation.

The following is the XPath to this element:

/GetUserAvailabilityRequest/MailboxDataArray/MailboxData[i]/Email

Mailbox Represents the mailbox user for a SetUserOofSettings or


(Availability)
GetUserOofSettings request.

The following are the XPath expressions to this element:

/GetUserOofSettingsRequest/Mailbox

/SetUserOofSettingsRequest/Mailbox

Text value
A text value is required if this element is used.

Remarks
This element can occur at most one time in the Email (EmailAddressType) element and
the Mailbox (Availability) element.

7 Note

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
GetUserOofSettings operation
SetUserOofSettings operation
GetUserAvailabilityRequest
GetUserOofSettingsRequest
SetUserOofSettingsRequest
Getting User Availability
AddressEntity
Article • 03/29/2023 • 2 minutes to read

The AddressEntity element specifies a single address entity.

XML

<AddressEntity>

<Address></Address>

<Position></Position>

</AddressEntity>

AddressEntityType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Address (string)
Specifies an address.

Position
Specifies the position in an email message.

Parent elements

Element Description

Addresses (ArrayOfAddressEntitiesType)
Specifies an array of AddressEntity elements.

Text value
None.
Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Addresses (ArrayOfAddressEntitiesType)
Article • 03/29/2023 • 2 minutes to read

The Addresses element specifies an array of AddressEntity elements.

XML

<Addresses>

<AddressEntity/>

</Addresses>

ArrayOfAddressEntitiesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

AddressEntity
Specifies a single address entity.

Parent elements

Element Description

EntityExtractionResult
Specifies the EntityExtractionResult property of an item.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Addresses (ArrayOfAddressesType)
Article • 03/29/2023 • 2 minutes to read

The Addresses element specifies an array of Address elements.

XML

<Addresses>

<Address></Address>

</Addresses>

ArrayOfAddressesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Address (ContactType)
Specifies the address of a contact.

Parent elements

Element Description

Contact (ContactType)
Specifies a contact in the Unified Contact Store.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
AddressListId
Article • 03/29/2023 • 2 minutes to read

The AddressListId element specifies the identifier of an address list.

XML

<AddressListId Id="">

</AddressListId>

AddressListIdType

Attributes and elements


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

Attributes

Attribute Description

Id
A string address list identifier. This attribute is required.

Child elements
None.

Parent elements

Element Description

ContextFolderId
Indicates the folder that is targeted for actions that use folders. This
element must be present when copying, deleting, moving, and setting read
state on conversation items in a target folder.

CopyToFolder
Specifies the identifier of the folder to which email items are copied.

DestinationFolderId Indicates the destination folder for copy and move actions.

MoveToFolder
Specifies the identifier of the folder to which email items are moved

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
AdjacentMeetingCount
Article • 03/29/2023 • 2 minutes to read

The AdjacentMeetingCount element represents the total number of calendar items that
are adjacent to a meeting time.

XML

<AdjacentMeetingCount/>

Int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting in the Exchange store.

Text value
A text value that represents an integer is required.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
AdjacentMeetings
Article • 03/29/2023 • 2 minutes to read

The AdjacentMeetings element identifies all calendar items that are adjacent to a
meeting time.

XML

<AdjacentMeetings>

<CalendarItem/>

</AdjacentMeetings>

NonEmptyArrayOfAllItemsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

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

7 Note

Although additional child elements are valid per the schema, the CalendarItem
element is the only child element that Exchange Web Services (EWS) will return
within the AdjacentMeetings element. This topic does not list child elements that
are valid per the schema but will not be returned by EWS.

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
AggregateOn
Article • 03/29/2023 • 3 minutes to read

The AggregateOn element represents the property that is used to determine the order
of grouped items for a grouped FindItem result set.

FindItem
GroupBy
AggregateOn

XML

<AggregateOn>

<FieldURI/>

</AggregateOn>

XML

<AggregateOn>

<IndexedFieldURI/>

</AggregateOn>

XML

<AggregateOn>

<ExtendedFieldURI/>

</AggregateOn>

AggregateOnType

Attributes and elements


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

Attributes

Attribute Description
Attribute Description

Aggregate Indicates the maximum or minimum value of the property identified by the FieldURI
element that is used for ordering the groups of items.

The following are the possible values:

- Minimum
- Maximum

Child elements

Element Description

FieldURI
Identifies frequently referenced properties by URI.

IndexedFieldURI
Identifies individual members of a dictionary.

ExtendedFieldURI
Identifies extended MAPI properties to get, set, or create.

Parent elements

Element Description

GroupBy
Specifies arbitrary groupings for FindItem queries.
The following is the XPath expression to this element: /FindItem/GroupBy

Remarks
The FindItem operation can return grouped results. Within grouped results, all items
that have the same value for a given grouping property are gathered together and
presented as children of that group. For example, if you group by sender, all e-mails are
organized into separate groups based on whether they are from sender A, sender B, and
so on. These groups are children of the sender group.

Each of the groups within the sender group contains a collection of items, such as the
actual e-mails that came from each sender. You can use the SortOrder element to sort
the items within a group. To sort the groups based on an item's property values,
however, you must use aggregation.

With aggregation, the order of groups is based on a specific property of the items
within the group. When you use aggregation to sort items within a group, you must
identify a representative property by which to sort the groups. You can use the
AggregateOn element to specify the representative property.

When a representative property is identified, the Aggregate attribute is used to indicate


whether the groups are sorted according to the maximum or the minimum value of the
identified property. If the Aggregate attribute is set to Maximum, the groups are sorted
beginning with the largest value for the AggregateOn property. If the Aggregate
attribute is set to Minimum, the groups are sorted beginning with the smallest value for
the AggregateOn property.

For example, if you want to issue a FindItem grouped query, grouping by sender, but
you want to order the groups so that the group with the most recent e-mail message is
on top, you can group by sender and aggregate on date/time received with an
Aggregate attribute of Maximum.

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

Example
The following example shows a grouped FindItem request and response. The example
shows a request to return items grouped by the ConversationTopic property. Two
groups, A and B, are returned in descending order based on the maximum value of the
DateTimeReceived property.

XML

<!-- EXAMPLE REQUEST -->

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<FindItem
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

Traversal="Shallow">

<ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="message:ConversationTopic"/>

<t:FieldURI FieldURI="item:DateTimeReceived"/>
</t:AdditionalProperties>

</ItemShape>

<IndexedPageItemView BasePoint="Beginning" MaxEntriesReturned="20"


Offset="0"/>

<GroupBy Order="Ascending">

<t:FieldURI FieldURI="message:ConversationTopic"/>

<t:AggregateOn Aggregate="Maximum">

<t:FieldURI FieldURI="item:DateTimeReceived"/>
</t:AggregateOn>

</GroupBy>

<ParentFolderIds>
<t:DistinguishedFolderId Id="inbox"/>

</ParentFolderIds>

</FindItem>

</soap:Body>

</soap:Envelope>

<!-- EXAMPLE RESPONSE -->

<?xml version="1.0" encoding="utf-8" ?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<t:ServerVersionInfo MajorVersion="8" MinorVersion="0"


MajorBuildNumber="652" MinorBuildNumber="0"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />

</soap:Header>

<soap:Body>

<FindItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<m:ResponseMessages>

<m:FindItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder IndexedPagingOffset="8" TotalItemsInView="8"


IncludesLastItemInRange="true">

<t:Groups>

<t:GroupedItems>

<t:GroupIndex>B</t:GroupIndex>

<t:Items>

<t:Message>

<t:ItemId Id="AQAnAH=" ChangeKey="CQAAABY" />

<t:DateTimeReceived>2006-09-
14T23:59:18Z</t:DateTimeReceived>

<t:ConversationTopic>B</t:ConversationTopic>

</t:Message>

<t:Message>

<t:ItemId Id="AQAnAHR=" ChangeKey="CQAAAw" />

<t:DateTimeReceived>2006-09-
15T00:00:24Z</t:DateTimeReceived>

<t:ConversationTopic>B</t:ConversationTopic>

</t:Message>

<t:Message>

<t:ItemId Id="AQAnA==" ChangeKey="CQAAJXT" />

<t:DateTimeReceived>2006-09-
15T00:22:45Z</t:DateTimeReceived>

<t:ConversationTopic>B</t:ConversationTopic>

</t:Message>

</t:Items>

</t:GroupedItems>

<t:GroupedItems>

<t:GroupIndex>A</t:GroupIndex>

<t:Items>

<t:Message>

<t:ItemId Id="AQAnAAA==" ChangeKey="CQCJNe" />

<t:DateTimeReceived>2006-09-
14T23:56:12Z</t:DateTimeReceived>

<t:ConversationTopic>A</t:ConversationTopic>

</t:Message>

<t:Message>

<t:ItemId Id="AQWgAA==" ChangeKey="CQAACJV6" />

<t:DateTimeReceived>2006-09-
14T23:57:33Z</t:DateTimeReceived>

<t:ConversationTopic>A</t:ConversationTopic>

</t:Message>

<t:Message>

<t:ItemId Id="AAAA==" ChangeKey="CQA6CJXw" />

<t:DateTimeReceived>2006-09-
15T00:23:31Z</t:DateTimeReceived>

<t:ConversationTopic>A</t:ConversationTopic>

</t:Message>

</t:Items>

</t:GroupedItems>

</t:Groups>

</m:RootFolder>

</m:FindItemResponseMessage>

</m:ResponseMessages>

</FindItemResponse>

</soap:Body>

</soap:Envelope>

To sort the items in a group, use the SortOrder element.

7 Note

The item identifiers and change keys have been shortened to preserve readability.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types
Element Example

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
FindItem operation
EWS XML elements in Exchange
Finding Items
AggregationRestriction
Article • 03/29/2023 • 2 minutes to read

The AggregationRestriction element specifies a value that is applied to a set of Persona


properties resulting from a FindPeople request and filters the result according to the
specified restriction.

XML

<AggregationRestriction>

<SearchExpression/>

</AggregationRestriction>

RestrictionType

Attributes and elements


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

Attributes
None.

Child elements
SearchExpression

Parent elements
FindPeople

Remarks
The AggregationRestriction element can contain any child element that uses the
SearchExpression substitution group. The elements that are a part of the
SearchExpression substitution group are: Contains, Excludes, Exists, Not, Or, And,
IsEqualTo, IsNotEqualTo, IsGreaterThan, IsGreaterThanOrEqualTo, IsLessThan, and
IsLessThanOrEqualTo.

This element was introduced in Exchange Server 2013.


The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema name Messages schema

Validation file messages.xsd

Can be empty false


Alias
Article • 03/29/2023 • 2 minutes to read

The Alias element contains the email alias of a contact.

XML

<Alias/>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element name Description

Contact
Represents a contact item in the Exchange store.

Text value
The text value is a string that represents the email alias of a contact.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

This element was introduced in Exchange Server 2010 Service Pack 2 (SP2).
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Creating Contacts (Exchange Web Services)
Alias (FederatedDirectoryGroupType)
Article • 03/29/2023 • 2 minutes to read

The Alias (FederatedDirectoryGroupType) element is intended for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Alias (MasterMailboxType)
Article • 03/29/2023 • 2 minutes to read

The Alias (MasterMailboxType) element is intended for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
AllInternal
Article • 03/29/2023 • 2 minutes to read

The AllInternal element evaluates to true if all recipients of an e-mail message are
internal to the sender's organization.

XML

<AllInternal/>

ProtectionRuleAllInternalType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Condition
Identifies the condition that must be satisfied for the action part of the
rule to be executed.

And Specifies that all child elements must match to evaluate to true.
(ProtectionRuleAndType)

Text value
The AllInternal element must be empty.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
AllowExternalOof
Article • 03/29/2023 • 2 minutes to read

The AllowExternalOof element contains a value that identifies to whom external Out of
Office (OOF) messages are sent.

GetUserOofSettingsResponse

AllowExternalOof

XML

<AllowExternalOof>None or Known or All</AllowExternalOof>

ExternalAudience

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

GetUserOofSettingsResponse
Contains the response results and the OOF settings for a user.

Text value
A text value is required for this element. The following table lists the possible values for
this element.

Value Description
Value Description

None
E-mail senders outside the mailbox user's organization who send messages to the user
will not receive an external OOF message response.

Known E-mail senders outside the mailbox user's organization who send messages to the user
will only receive an external OOF message response if the sender is in the user's
Exchange store contact list.

All
E-mail senders outside the mailbox user's organization who send messages to the user
will receive an external OOF message response.

Remarks
This element shares the same type as the ExternalAudience element.

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

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetUserOofSettings operation
SetUserOofSettings operation
AllowNewTimeProposal
Article • 03/29/2023 • 2 minutes to read

The AllowNewTimeProposal element indicates whether a new meeting time can be


proposed for a meeting by an attendee.

XML

<AllowNewTimeProposal/>

Boolean

Attributes and elements


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

Attributes
None

Child elements
None.

Parent elements

Element Description

MeetingRequest
Represents a meeting in the Exchange store.

CalendarItem
Represents an Exchange calendar item.

Text value
A text value that represents a Boolean value is required. A value of true indicates that a
new proposal for the meeting time can be created; a value of false indicates that new
time proposals are not allowed. The organizer sets this value in the meeting request.

Remarks
The AllowNewTimeProposal property is read-writable for the organizer's calendar item.
It is read-only for meeting requests and for attendees' calendar items.

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

7 Note

Exchange Web Services does not support new time proposal messages. To get
properties that are related to new time proposal messages, use extended
properties.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
AlternateId
Article • 03/29/2023 • 2 minutes to read

The AlternateId element describes an identifier to convert in a request and the results of a converted identifier in the
response.

XML

<AlternateId Id="" Format="" Mailbox="" IsArchive=""/>

AlternateIdType

Attributes and elements


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

Attributes

Attribute Description

Id Describes the source identifier in a ConvertId operation request and describes the destination identifier in a ConvertId
operation response.

Format Describes the source format in a ConvertId operation request and describes the destination format in a ConvertId operation
response. The destination format is described by the DestinationFormat attribute of the ConvertId element in the request.
This attribute is of type IdFormatType.

Mailbox Describes the mailbox primary Simple Mail Transfer Protocol (SMTP) address that contains the identifiers to translate.

IsArchive Indicates whether the identifier represents an archived item or folder. A value of true indicates that the identifier represents
an archived item or folder. This attribute is optional.

Format attribute values

Value Description

EwsLegacyId Describes identifiers that are produced by Exchange Web Services in the initial release version of Exchange 2007.

EwsId Describes identifiers that are produced by Exchange Web Services starting with Exchange 2007 SP1.

EntryId Describes MAPI identifiers, as in the PR_ENTRYID property.

HexEntryId Describes a hexadecimal-encoded representation of the PR_ENTRYID property. This is the format of availability calendar
event identifiers.

StoreId Describes Exchange store identifiers.

OwaId Describes an Outlook Web App identifier.

Child elements
None.

Parent elements

Element Description

ConvertIdResponseMessage
Contains the status and result of a ConvertId operation request.
Element Description

SourceIds
Contains the source identifiers to convert.

Text value
None.

Remarks
The AlternateId element describes two identifiers, the source identifier that is to be converted in the ConvertId operation
request, and the converted identifier in the ConvertIdResponse element.

The schema that describes this element is located in the IIS virtual directory that hosts Exchange Web Services.

Element information
Element Example Type

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

Schema Messages schema Types schema


Name

Validation Messages.xsd Types.xsd


File

Can be False False


Empty

See also
ConvertId operation
EWS XML elements in Exchange
Converting Identifiers
AlternatePublicFolderId
Article • 03/29/2023 • 2 minutes to read

The AlternatePublicFolderId element describes a public folder identifier to convert to


another identifier format. This element was introduced in Microsoft Exchange Server
2007 Service Pack 1 (SP1).

ConvertId

SourceIds

AlternatePublicFolderId

XML

<AlternatePublicFolderId FolderId="" Format="" />

AlternatePublicFolderIdType

Attributes and elements


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

Attributes

Attribute Description

FolderId Contains the public folder identifier to convert. This attribute is required.

Format Identifies the format that describes the public folder identifier to convert. This
attribute is required.

Format attribute

Value Description

EwsLegacyId Describes identifiers that are produced by Exchange Web Services in the initial
release version of Exchange 2007.

EwsId Describes identifiers that are produced by Exchange Web Services starting with
Exchange 2007 SP1.

EntryId Describes MAPI identifiers, as in the PR_ENTRYID property.


Value Description

HexEntryId Describes a hexadecimal-encoded representation of the PR_ENTRYID property.


This is the format of availability calendar event identifiers.

StoreId Describes Exchange store identifiers.

OwaId Describes an Outlook Web Access identifier.

Child elements
None.

Parent elements

Element Description

SourceIds Contains the source identifiers to convert. This element was introduced in Microsoft
Exchange Server 2007 Service Pack 1 (SP1).

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
ConvertId operation
EWS XML elements in Exchange
Converting Identifiers
AlternatePublicFolderItemId
Article • 03/29/2023 • 2 minutes to read

The AlternatePublicFolderItemId element describes a public folder item identifier to


convert to another identifier format. This element was introduced in Microsoft Exchange
Server 2007 Service Pack 1 (SP1).

ConvertId

SourceIds

AlternatePublicFolderItemId

XML

<AlternatePublicFolderItemId FolderId="" Format="" ItemId=""/>

AlternatePublicFolderItemIdType

Attributes and elements


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

Attributes

Attribute Description

FolderId Identifies the public folder that contains the public folder item. This attribute is
required.

Format Identifies the format that describes the public folder item identifier to convert. This
attribute is required.

ItemId Identifier the public folder item to convert. This attribute is required.

Format attribute values

Value Description

EwsLegacyId Describes identifiers that are produced by Exchange Web Services in the initial
release version of Exchange 2007.
Value Description

EwsId Describes identifiers that are produced by Exchange Web Services starting with
Exchange 2007 SP1.

EntryId Describes MAPI identifiers, as in the PR_ENTRYID property.

HexEntryId Describes a hexadecimal-encoded representation of the PR_ENTRYID property.


This is the format of availability calendar event identifiers.

StoreId Describes Exchange store identifiers.

OwaId Describes an Outlook Web Access identifier.

Child elements
None.

Parent elements

Element Description

SourceIds Contains the source identifiers to convert. This element was introduced in Exchange
2007 SP1.

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.

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True


See also
ConvertId operation
EWS XML elements in Exchange
Converting Identifiers
Altitude
Article • 03/29/2023 • 2 minutes to read

The Altitude element specifies the altitude of a postal address.

XML

<Altitude></Altitude>

xs:double

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

PostalAddress (PersonaPostalAddressType)
Specifies the postal address of the location.

Text value
The text value of the Altitude element is the altitude of a postal address.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
AltitudeAccuracy
Article • 03/29/2023 • 2 minutes to read

The AltitudeAccuracy element specifies the accuracy of the altitude property for a
postal address.

XML

<AltitudeAccuracy></AltitudeAccuracy>

xs:double

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

PostalAddress (PersonaPostalAddressType)
Specifies the postal address of the location.

Text value
The text value of the AltitudeAccuracy element is the accuracy estimate for the altitude
property of a postal address.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
And
Article • 03/29/2023 • 2 minutes to read

The And element represents a search expression that allows you to perform a Boolean
AND operation between two or more search expressions. The result of the AND
operation is true if all the search expressions contained within the And element are true.

XML

<And>

<SearchExpression/>

<SearchExpression/>

</And>

AndType

Attributes and elements


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

Attributes
None.

Child elements

Element Description
Element Description

SearchExpression Represents the base class for expressions within a restriction. There must be
two or more search expressions in an And operation.

One of the following elements must be substituted for the SearchExpression


element:

Exists
Excludes
IsEqualTo
IsNotEqualTo
IsGreaterThan
IsGreaterThanOrEqualTo
IsLessThan
IsLessThanOrEqualTo
Contains
Not
And
Or

Parent elements

Element Description

Restriction Represents the restriction or query that is used to filter items or folders in
FindItem/FindFolder and search folder operations.

Not
Represents a search expression that negates the Boolean value of the search
expression that it contains.

And
Represents a search expression that allows you to perform a Boolean AND operation
between two or more search expressions. The result of the AND operation is true if
all of the search expressions contained within the And element are true.

Or
Represents a search expression that performs a logical OR operation on the search
expression that it contains. Or will return true if any of its children return true. Or
must have two or more children.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
And (ProtectionRuleAndType)
Article • 03/29/2023 • 2 minutes to read

The And element specifies that all child elements must match to evaluate to true.

XML

<And>

<AllInternal/>

<And/>

<RecipientIs/>

<SenderDepartments/>
<True/>

</And>

ProtectionRuleAndType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

AllInternal
Evaluates to true if all recipients of an e-mail message are internal to the
sender's organization.

And
Specifies that all child elements must match to evaluate to true.

RecipientIs
Specifies that any recipient of the e-mail message matches any of the
specified recipients in the child Value (ProtectionRuleValueType) elements.

SenderDepartments Specifies that the department of the sender matches any of the specified
departments in the child Value (ProtectionRuleValueType) elements.

True
Specifies a condition that always matches.

Parent elements
Element Description

Condition Identifies the condition that must be satisfied for the action part of the rule to be
executed.

And
Specifies that all child elements must match to evaluate to true.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Annotation
Article • 03/29/2023 • 2 minutes to read

The Annotation element contains optional notes added by a user.

XML

<Annotation></Annotation>

xs:string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

EnhancedLocation Specifies location information such as the name, address, and optional notes
about a location.

Text value
The text value of the Annotation element is a user added note about a location.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ApiVersionSupported
Article • 03/29/2023 • 2 minutes to read

The ApiVersionSupported element contains the version of the JavaScript API for Office
supported by the client.

XML

<ApiVersionSupported />

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
GetAppManifests

Text value
The text value of the ApiVersionSupported element contains the version of the
JavaScript API for Office supported by the client. This value indicates which app
manifests should be returned to the client in the response.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).
Element information
Element Description

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

Schema Name Messages schema

Validation File Not applicable

Can be Empty False

See also
GetAppManifests
EWS XML elements in Exchange
App
Article • 03/29/2023 • 2 minutes to read

The App element contains information about an XML manifest file for a mail app that is
installed in a mailbox.

XML

<App>

<Metadata/>

<Manifest/>

</App>

Attributes and elements


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

Attributes
None.

Child elements
Metadata | Manifest

Parent elements
Apps

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Not applicable

Can be Empty False

See also
Apps
Metadata
Manifest
EWS XML elements in Exchange
AppendToFolderField
Article • 03/29/2023 • 2 minutes to read

The AppendToFolderField element is not implemented. Any request that uses this
element will always return an error response.

AppendToFolderFieldType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd


Element Example

Can be Empty False

See also
EWS XML elements in Exchange
AppendToItemField
Article • 03/29/2023 • 2 minutes to read

The AppendToItemField element identifies data to append to a single property of an


item during an UpdateItem operation.

UpdateItem

ItemChanges

ItemChange

Updates (Item)

AppendToItemField

XML

<AppendToItemField>

<FieldURI/>

<Item/>

</AppendToItemField>

AppendToItemFieldType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

FieldURI
Identifies frequently referenced properties by URI.

IndexedFieldURI
Identifies individual members of a dictionary.

ExtendedFieldURI
Identifies extended MAPI properties to append.

Item
Represents an item in the Exchange store.
Element Description

Message
Represents an Exchange e-mail message.

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

Task
Represents a task in the Exchange store.

Parent elements

Element Description

Updates Contains an array that defines append, set, and delete changes to item properties.
(Item)
The following is the XPath expression to this element:
/UpdateItem/ItemChanges/ItemChange[i]/Updates

Remarks
Only certain properties support append operations. An attempt to append to a property
that does not support appending will result in an error.

For update operations, only one property can be modified within a single request. That
single property must be referenced in the Path element. The Item element in the derived
classes can then only hold a single property that is in agreement with the single Path
element.

7 Note

The Path element is abstract. It must be substituted by the FieldURI,


IndexedFieldURI, or ExtendedFieldURI element.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
UpdateItem operation
EWS XML elements in Exchange
ApplicationRoles
Article • 03/29/2023 • 2 minutes to read

The ApplicationRoles element specifies the application roles that the calling partner
application uses for the current call.

XML

<ApplicationRoles>

<Role></Role>

</ApplicationRoles>

NonEmptyArrayOfRoleType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Role
Specifies a string that represents a management role.

Parent elements

Element Description

ManagementRole
Specifies the management role.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ApplyConversationAction
Article • 03/29/2023 • 2 minutes to read

The ApplyConversationAction element defines a request to apply actions to items in a


conversation.

ApplyConversationAction

XML

<ApplyConversationAction>

<ConversationActions/>

</ApplyConversationAction>

ApplyConversationActionType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ConversationActions
Contains a collection of conversations and the actions to apply to them.

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
ApplyConversationAction operation
EWS XML elements in Exchange
ApplyConversationActionResponse
Article • 03/29/2023 • 2 minutes to read

The ApplyConversationActionResponse element defines a response to an


ApplyConversationAction operation request.

ApplyConversationActionResponse

XML

<ApplyConversationActionResponse>

<ResponseMessages/>

</ApplyConversationActionResponse>

ApplyConversationActionResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Text value
None.

Remarks
This element was introduced in Exchange Server 2010 Service Pack 1 (SP1).

Element information
Name Value

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
ApplyConversationAction operation
EWS XML elements in Exchange
ApplyConversationActionResponseMess
age
Article • 03/29/2023 • 2 minutes to read

The ApplyConversationActionResponseMessage element contains the status and


results of an ApplyConversationAction operation request.

ApplyConversationActionResponse
ResponseMessages
ApplyConversationActionResponseMessage

XML

<ApplyConversationActionResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</ApplyConversationActionResponseMessage>

ApplyConversationActionResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

Success
Warning
Error

ResponseClass attribute values

Value Description
Value Description

Success
Describes a request that is fulfilled.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

The Exchange store is offline during the batch.


Active Directory Domain Services (AD DS) is offline.
Mailboxes were moved.
The message database (MDB) is offline.
A password is expired.
A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

Invalid attributes or elements


Attributes or elements that are out of range
An unknown tag
An attribute or element that is not valid in the context
An unauthorized access attempt by any client
A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and reserved for future use. This element contains a value
of 0.

MessageXml
Provides additional error response information.

Parent elements
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Version differences
In versions of Exchange starting with build 15.00.0986.00, the
ApplyConversationActionResponseMessage element is of type
ApplyConversationActionResponseMessageType. In previous versions, the element is
of type ResponseMessageType.

Element information
Element Example

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

Schema Name Message schema

Validation File Messages.xsd

Can be Empty False

See also
ApplyConversationAction operation
EWS XML elements in Exchange
AppMarketplaceUrl
Article • 03/29/2023 • 2 minutes to read

The AppMarketplaceUrl element specifies the URL for the app marketplace.

XML

<AppMarketplaceUrl></AppMarketplaceUrl>

xs:string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

GetAppMarketplaceUrlResponse Specifies the response message for a GetAppMarketplaceUrl


request.

Text value
The text value of the AppMarketplaceUrl element is the URL for the app marketplace.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
AppointmentReplyTime
Article • 03/29/2023 • 2 minutes to read

The AppointmentReplyTime element represents the date and time that an attendee
replied to a meeting request.

XML

<AppointmentReplyTime/>

DateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting in the Exchange store.

Text value
A string that represents a date and time.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
AppointmentSequenceNumber
Article • 03/29/2023 • 2 minutes to read

The AppointmentSequenceNumber element specifies the sequence number of a


version of an appointment.

XML

<AppointmentSequenceNumber/>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Text value
The text value represents a version number.

Remarks
This value is updated when the appointment is updated with new information.
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
AppointmentState
Article • 03/29/2023 • 2 minutes to read

The AppointmentState element specifies the status of the appointment.

XML

<AppointmentState/>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting in the Exchange store.

Text value
This element contains a text value that represents set bits. This is in integer form. This
element is read-only. It will only be returned in a response.

Remarks
The integer value that is returned represents the appointment state bitmask. The
following table describes each bit.

Name Bit Description

None 0x0000 No flags have been set. This is only used for an appointment that does not
include attendees.

Meeting 0x0001 This appointment is a meeting.

Received 0x0002 This appointment has been received.

Canceled 0x0004 This appointment has been canceled.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
ApprovalDecision
Article • 03/29/2023 • 2 minutes to read

The ApprovalDecision element specifies the decision made on an approval request


message.

XML

<ApprovalDecision> 1 | 2 </ApprovalDecision>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
ApprovalRequestData

Text value
The text value of the ApprovalDecision element is 1 if approved and 2 if rejected.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
ApprovalRequestData
EWS XML elements in Exchange
ApprovalDecisionMaker
Article • 03/29/2023 • 2 minutes to read

The ApprovalDecisionMaker element specifies the display name of the person who
made the approval decision.

XML

<ApprovalDecisionMaker />

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
ApprovalRequestData

Text value
The text value of the ApprovalDecisionMaker element is a display name.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
ApprovalRequestData
EWS XML elements in Exchange
ApprovalDecisionTime
Article • 03/29/2023 • 2 minutes to read

The ApprovalDecisionTime element specifies the time at which the approval decision
was made.

XML

<ApprovalDecisionTime />

dateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
ApprovalRequestData

Text value
The text value of the ApprovalDecisionTime element represents the time and date at
which the approval decision was made.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
ApprovalRequestData
EWS XML elements in Exchange
ApprovalRequestData
Article • 03/29/2023 • 2 minutes to read

The ApprovalRequestData element specifies the approval state of an approval request


message.

XML

<ApprovalRequestData>

<IsUndecidedApprovalRequest/>

<ApprovalDecision/>

<ApprovalDecisionMaker/>

<ApprovalDecisionTime/>

</ApprovalRequestData>

ApprovalRequestDataType

Attributes and elements


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

Attributes
None.

Child elements
IsUndecidedApprovalRequest | ApprovalDecision | ApprovalDecisionMaker |
ApprovalDecisionTime

Parent elements
Message

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
Message
EWS XML elements in Exchange
Apps
Article • 03/29/2023 • 2 minutes to read

The Apps element contains information about all the XML manifest files for apps
installed in a mailbox.

XML

<Apps>

<App/>

</Apps>

Attributes and elements


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

Attributes
None.

Child elements
App

Parent elements
GetAppManifestsResponse

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Description
Element Description

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

Schema Name Messages schema

Validation File Not applicable

Can be Empty False

See also
App
GetAppManifestsResponse
EWS XML elements in Exchange
AppStatus
Article • 03/29/2023 • 2 minutes to read

The AppStatus element value indicates the status of the mail app.

XML

<AppStatus/>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
Metadata

Text value
The text value of the AppStatus element indicates the status of the mail app. If the user
can fix an issue related to the status of the mail app, the ActionUrl element provides the
URL to perform the fix.

Table 1. AppStatus values

Value Description

Null The mail app has a healthy status.


or 0
Value Description

1.0 The mail app could not be automatically updated. The mail app needs to be re-installed
from the Office Store.

1.1 The mail app could not be automatically updated. The mail app requires increased
permissions, and this requires your review and confirmation to install.

1.2 The mail app couldn't be updated automatically. The current license has expired or is
invalid. Please update the mail app from the Office Store.

2.0 The mail app license could not be automatically updated. The license for the mail app
needs to be recovered from the Office Store.

2.1 The mail app license could not be automatically updated. The current license has expired.
A new license for this app needs to be installed from the Office Store.

3.0 The Office Store status for the mail app has changed. This may indicate that there is a
problem with the mail app. Go to the mail app page in the Office Store for more
information.

3.1 The mail app has been removed from the Office Store.

3.2 A problem has been discovered with the mail app and it has temporarily been withdrawn
from the Office Store.

3.3 The mail app will be removed from the Office Store within 30 days.

4.0 The mail app has been automatically disabled by your mail client.

4.1 The mail app has been disabled by Outlook for performance reasons.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Not applicable


Element Example

Can be Empty False

See also
Metadata
EWS XML elements in Exchange
ArchiveItem
Article • 03/29/2023 • 2 minutes to read

The ArchiveItem element contains the source folder Id and an array of item Ids for the
associated archive item.

XML

<ArchiveItem>

<ArchiveSourceFolderId/>

<ItemIds/>

</ArchiveItem>

ArchiveItemType

Attributes and elements


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

Attributes
None.

Child elements
ArchiveSourceFolderId | ItemIds

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema name Messages schema

Validation file messages.xsd

Can be empty false


ArchiveItemResponse
Article • 03/29/2023 • 2 minutes to read

The ArchiveItemResponse element specifies the response to an ArchiveItem request.

XML

<ArchiveItemResponse>

<ResponseMessages></ResponseMessages>

</ArchiveItemResponse>

ArchiveItemResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages to an Exchange Web Services request.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ArchiveItemResponseMessage
Article • 03/29/2023 • 2 minutes to read

The ArchiveItemResponseMessage element specifies the response message to an


ArchiveItem request.

XML

<ArchiveItemResponseMessage ResponseClass="">

<MessageText></MessageText>

<ResponseCode></ResponseCode>

<DescriptiveLinkKey></DescriptiveLinkKey>

<MessageXml></MessageXml>

<Items></Items>

</ArchiveItemResponseMessage>

ItemInfoResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass Indicates the class of the response.

ResponseClass

Value Description

Success Indicates success.

Warning Indicates a warning.

Error Indicates an error.

Child elements

Element Description
Element Description

DescriptiveLinkKey
Currently unused and reserved for future use.

Items
Contains an array of items.

MessageText
Provides a text description of the status of the response.

MessageXml
Provides additional error response information.

ResponseCode
Provides status information about the request.

Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ArchiveSourceFolderId
Article • 03/29/2023 • 2 minutes to read

The ArchiveSourceFolderId element specifies the Id of the source folder for the archive
item.

XML

<ArchiveSourceFolderId>

<FolderId/>

<DistinguishedFolderId/>

<AddressListId/>

</ArchiveSourceFolderId>

TargetFolderIdType

Attributes and elements


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

Attributes
None.

Child elements
FolderId | DistinguishedFolderId | AddressListId

Parent elements
ArchiveItem

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema name Messages schema

Validation file messages.xsd

Can be empty false


ArchiveTag
Article • 03/29/2023 • 2 minutes to read

The ArchiveTag element specifies the retention identifier of the archive tag set on an
item or folder.

XML

<ArchiveTag IsExplicit=""></ArchiveTag>

RetentionTagType

Attributes and elements


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

Attributes

Attribute Description

IsExplicit Specifies whether the retention policy is explicitly set on an item or folder or whether
it is inherited from a parent folder.

Child elements
None.

Parent elements

Element Description

CalendarFolder
Represents a folder that primarily contains calendar items.

CalendarItem
Represents an Exchange calendar item.

Contact
Represents a contact item in the Exchange store.

ContactsFolder
Represents a contacts folder that is contained in a mailbox.

DistributionList
Represents a distribution list.

Folder
Defines a folder to create, get, find, synchronize, or update.
Element Description

Item
Represents a generic item in the Exchange store.

Message
Represents a Microsoft Exchange email message.

PostItem
Represents a post item in the Exchange store.

SearchFolder
Represents a search folder that is contained in a mailbox.

Task
Represents a task in the Exchange store.

TasksFolder
Represents a tasks folder that is contained in a mailbox.

Text value
The text value of the ArchiveTag element is a GUID that identifies the retention policy.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Argument
Article • 03/29/2023 • 2 minutes to read

The Argument element specifies arguments to the action.

XML

<Argument Value=""/>

ProtectionRuleArgumentType

Attributes and elements


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

Attributes

Attribute Description

Value
A non-empty string value that represents the value of an argument to the action part
of a protection rule. This attribute is required.

Child elements
None.

Parent elements

Element Description

Action Identifies what action must be executed if the condition part of the
(ProtectionRuleActionType)
rule matches.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
AssignCategories
Article • 03/29/2023 • 2 minutes to read

The AssignCategories element represents the categories that are stamped on e-mail
messages.

Rule (RuleType)

Actions

XML

<AssignCategories>

<String/>

</AssignCategories>

ArrayOfStringsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

String
Contains a string that identifies a single category.

Parent elements

Element Description

Actions
Represents the set of actions that are available to be taken on a message when the
conditions are fulfilled.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
AssignedTime
Article • 03/29/2023 • 2 minutes to read

The AssignedTime element represents the time when a task is assigned to a contact.

XML

<AssignedTime/>

DateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Task
Represents a task in the Exchange store.

Text value
This property is read-only.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Assignees
Article • 03/29/2023 • 2 minutes to read

The Assignees element specifies the people to whom a task is assigned.

XML

<Assignees>

<Name></Name>

<UserID></UserID>

</Assignees>

EmailUserType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Name (EmailAddress)
Represents the display name of the mailbox user.

UserId (string)
Specifies the user identifier of an email user.

Parent elements

Element Description

TaskSuggestion
Specifies a proposed task.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
AssistantName
Article • 03/29/2023 • 2 minutes to read

The AssitantName element represents an assistant to a contact.

XML

<AssistantName/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Text value
A text value that represents a string is required if this element is used.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
AssistantNames
Article • 03/29/2023 • 2 minutes to read

The AssistantNames element specifies an array of assistant names and the identifiers of
their source attributions for the associated persona.

XML

<AssistantNames>

<StringAttributedValue></StringAttributedValue>

</AssistantNames>

ArrayOfStringAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

StringAttributedValue Specifies an instance in an array of attributes associated with a persona


element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
AssistantPhoneNumbers
Article • 03/29/2023 • 2 minutes to read

The AssistantPhoneNumbers element specifies an array of assistant phone numbers


and the identifiers of their source attributions for the associated persona.

XML

<AssistantPhoneNumbers>

<PhoneNumberAttributedValue></PhoneNumberAttributedValue>

</AssistantPhoneNumbers>

ArrayOfPhoneNumberAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

PhoneNumberAttributedValue Specifies an instance of an array of phone numbers and their


associated attributions.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
AssociatedCalendarItemId
Article • 03/29/2023 • 2 minutes to read

The AssociatedCalendarItemId element represents the calendar item that is associated


with a MeetingMessage, MeetingRequest, MeetingResponse, MeetingCancellation, or
ReminderMessageData.

XML

<AssociatedCalendarItemId Id="" ChangeKey=""/>

ItemIdType

Attributes and elements


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

Attributes

Attribute Description

Id
Identifies the calendar item that is associated with meeting.

ChangeKey
Identifies a specific version of the calendar item that is associated with a meeting.

Child elements
None.

Parent elements
MeetingMessage | MeetingRequest | MeetingResponse | MeetingCancellation |
ReminderMessageData

Remarks
Versions of Exchange starting with build number 15.00.0913.09 can include the
AssociatedCalendarItemId element as a child element of the ReminderMessageData
element.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Association
Article • 03/29/2023 • 2 minutes to read

The Association element is intended for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
AttachLongPathName
Article • 03/29/2023 • 2 minutes to read

The AttachLongPathName element is intended for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
AttachmentId
Article • 03/29/2023 • 2 minutes to read

The AttachmentId element identifies an item or file attachment. This element is used in
CreateAttachment responses.

XML

<AttachmentId Id="" RootItemId="" RootItemChangeKey="" />

AttachmentIdType

Attributes and elements


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

Attributes

Attribute Description

Id
Identifies the unique identifier of the attachment.

RootItemId
Identifies the unique identifier of the root store item to which the
attachment is attached.

RootItemChangeKey Identifies the change key of the root store item to which the attachment is
attached.

Child elements
None.

Parent elements

Element Description

ItemAttachment
Represents an Exchange item that is attached to another Exchange item.

FileAttachment
Represents a file that is attached to an item in the Exchange store.
Remarks
It is important to note that when an attachment is created, the change key of the root
item is altered.

The AttachmentId (GetAttachment and DeleteAttachment) element is used in


DeleteAttachment and GetAttachment requests.

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

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
AttachmentId (GetAttachment and
DeleteAttachment)
Article • 03/29/2023 • 2 minutes to read

The AttachmentId element identifies a single attachment.

XML

<AttachmentId Id="" />

RequestAttachmentIdType

Attributes and elements


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

Attributes

Attribute Description

Id
Specifies the attachment identifier.

Child elements
None.

Parent elements

Element Description

AttachmentIds
Contains an array of attachment identifiers.

The following are the XPath expressions to this element:

/DeleteAttachment/AttachmentIds

/GetAttachment/AttachmentIds

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
DeleteAttachment operation
GetAttachment operation
AttachmentIds
Article • 03/29/2023 • 2 minutes to read

The AttachmentIds element contains an array of attachment identifiers.

XML

<AttachmentIds>

<AttachmentId Id=""/>

</AttachmentIds>

NonEmptyArrayOfRequestAttachmentIdsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

AttachmentId (GetAttachment and The element that identifies a single


DeleteAttachment)
attachment.

Parent elements

Element Description

DeleteAttachment The element that defines a request to delete an attachment from the
Exchange store.
The following is the XPath expression to this element:
/DeleteAttachment

GetAttachment
The element that defines a request to get an attachment from the Exchange
store.
The following is the XPath expression to this element:
/GetAttachment

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

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
DeleteAttachment operation
GetAttachment operation
Attachments
Article • 03/29/2023 • 2 minutes to read

The Attachments element contains the items or files that are attached to an item in the Exchange store.

XML

<Attachments>

<ItemAttachment/>

<FileAttachment/>

</Attachments>

ArrayOfAttachmentsType and NonEmptyArrayOfAttachmentsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ItemAttachment
Represents an Exchange item that is attached to another Exchange item.

FileAttachment
Represents a file that is attached to an item in the Exchange store.

Parent elements

Element Description

CreateAttachment
Defines a request to create an attachment to an item in the Exchange store.

The following is the XPath expression to this element: /CreateAttachment

AcceptItem
Represents an Accept reply to a meeting request.

The following are some of the XPath expressions to this element:

/CreateItem/Items
/MeetingRequest/ConflictingMeetings
/SetItemField/CalendarItem/ConflictingMeetings
/AppendToItemField/CalendarItem/ConflictingMeetings
/AcceptItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings
/DeclineItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings
/UpdateItem/ItemChanges/ItemChange/Updates/AppendToItemField/CalendarItem/AdjacentMeetings
/CreateAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings
/GetAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

DeclineItem
Represents a Decline reply to a meeting request.

TentativelyAcceptItem
Represents a Tentative reply to a meeting request.

RemoveItem
Removes an item from the Exchange store.
Element Description

Item
Represents a generic Exchange item.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

Message
Represents an Exchange e-mail message.

Task
Represents a task in the Exchange store.

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

CreateAttachmentResponseMessage Contains the status and result of a single CreateAttachment request.

GetAttachmentResponseMessage
Contains the status and result of a GetAttachment request.

Remarks
The Attachments elements have the same child elements but are based on different types: ArrayOfAttachmentsType
and NonEmptyArrayOfAttachmentsType. The types define whether a child element is required. The
ArrayOfAttachmentsType is only used in the response message. It is also important to note that these elements occur
in both the messages and types namespaces.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
AttachmentShape
Article • 03/29/2023 • 2 minutes to read

The AttachmentShape element identifies additional properties to return in a response


to a GetAttachment request.

GetAttachment

AttachmentShape

XML

<AttachmentShape>

<IncludeMimeContent/>

<BodyType/>

<FilterHtmlContent/>
<AdditionalProperties/>

</AttachmentShape>

AttachmentResponseShapeType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

IncludeMimeContent Specifies whether the Multipurpose Internet Mail Extensions (MIME)


content of an item or attachment is returned in the response. This element
is optional.

BodyType
Identifies how the body text is formatted in the response. This element is
optional.

FilterHtmlContent
Specifies whether potentially unsafe HTML content is filtered from an
attachment. This element is optional.
Element Description

AdditionalProperties Identifies additional properties to return in a response. This element is


optional.

Parent elements

Element Description

GetAttachment The element that defines a request to get an attachment from a mailbox in the
Exchange store.
The following is the XPath expression to this element:
/GetAttachment

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetAttachment operation
EWS XML elements in Exchange
AttemptCount
Article • 03/29/2023 • 2 minutes to read

The AttemptCount element represents the number of attempts that have been made to
index the item.

XML

<AttemptCount></AttemptCount>

integer

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
NonIndexableItemDetail

Text value
The value of the AttemptCount element is the number of attempts that have been
made to index an item.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Attendee
Article • 03/29/2023 • 2 minutes to read

The Attendee element represents attendees and resources for a meeting.

XML

<Attendee>

<Mailbox/>

<ResponseType/>

<LastResponseTime/>

</Attendee>

AttendeeType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Mailbox
Identifies a fully resolved e-mail address.

ResponseType
Represents the type of recipient response that is received for a meeting. This
property is only relevant to a meeting organizer's calendar item.

LastResponseTime Represents the date and time of the latest response that is received.

ProposedStart
Represents an attendee's proposed start time for a meeting.

ProposedEnd
Represents an attendee's proposed end time for a meeting.

Parent elements

Element Description

RequiredAttendees
Represents attendees that are required to attend a meeting.
Element Description

OptionalAttendees
Represents attendees that are not required to attend a meeting.

Resources
Represents a scheduled resource for a meeting.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
AttendeeConflictDataArray
Article • 03/29/2023 • 2 minutes to read

The AttendeeConflictDataArray element contains an array of conflict data for queried attendees identified in the
GetUserAvailability operation.

GetUserAvailabilityResponse

SuggestionsResponse

SuggestionDayResultArray

SuggestionDayResult

SuggestionArray

Suggestion

AttendeeConflictDataArray

XML

<ArrayOfAttendeeConflictData>

<UnknownAttendeeConflictData>...</UnknownAttendeeConflictData>

<IndividualAttendeeConflictData>...</IndividualAttendeeConflictData>

<TooBigGroupAttendeeConflictData>...</TooBigGroupAttendeeConflictData>

<GroupAttendeeConflictData>...</GroupAttendeeConflictData>

</ArrayOfAttendeeConflictData>

ArrayOfAttendeeConflictData

Attributes and elements


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

Attributes
None.

Child elements

Element Description

UnknownAttendeeConflictData
Represents an unresolvable attendee or an attendee that is not a user, distribution list, or contact.

IndividualAttendeeConflictData
Contains a user's or contact's free/busy status for a time window that occurs at the same time as the
suggested meeting time identified in the Suggestion element.

TooBigGroupAttendeeConflictData Represents an attendee that resolved as a distribution list that was too large to expand.

GroupAttendeeConflictData
Contains aggregate conflict information about the number of users available, the number of users who
have conflicts, and the number of users who do not have availability information in a distribution list
for a suggested meeting time.

Parent elements

Element Description

Suggestion Represents a single meeting time suggestion.


The following is the XPath expression to this element:
/GetUserAvailabilityResponse/SuggestionsResponse/SuggestionDayResultArray/SuggestionDayResult[i]/SuggestionArray/Suggestion[i]
Remarks
The position of each element in the AttendeeConflictDataArray corresponds to the position of the queried attendees in the
MailboxDataArray element. Each queried attendee must correspond to one of the AttendeeConflictDataArray child elements.
These elements represent a single conflict with the suggested meeting time identified in the Suggestion element.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
GetUserAvailabilityResponse
Getting User Availability
AttendeeLocation
Article • 03/29/2023 • 2 minutes to read

The AttendeeLocation element specifies the location of an attendee for a calendar item.

XML

<AttendeeLocation></AttendeeLocation>

xs:string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

LocationBasedStateDefinition
Specifies the state when it is based on location.

Text value
The text value of the AttendeeLocation element is the attendess location.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Attendees
Article • 03/29/2023 • 2 minutes to read

The Attendees element specifies the recipients of an invitation to a meeting.

XML

<Attendees>

<EmailUser></EmailUser>

</Attendees>

ArrayOfEmailUsersType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

EmailUser
Specifies an email recipient or Active Directory contact.

Parent elements

Element Description

MeetingSuggestion
Specifies a proposed meeting.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
AttendeeType
Article • 03/29/2023 • 2 minutes to read

The AttendeeType element represents the type of attendee that is identified in the
Email (EmailAddressType) element. This element is used in requests for meeting
suggestions.

GetUserAvailabilityRequest

MailboxDataArray

MailboxData

AttendeeType

XML

<AttendeeType>Organizer or Required or Optional or Room or


Resource</AttendeeType>

MeetingAttendeeType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

MailboxData Represents an individual mailbox user and options for the type of data to be
returned about the mailbox user.
The following is the XPath to this element:
/GetUserAvailabilityRequest/MailboxDataArray[i]/MailboxData

Text value
A text value is required for this element. The following table lists the possible values for
this element.

Value Description

Organizer The mailbox user and attendee who created the calendar item.

Required A mailbox user who is a required attendee to the meeting.

Optional A mailbox user who is an optional attendee to the meeting.

Room A mailbox entity that represents a room resource used for the meeting.

Resource A resource such as a TV or projector that is scheduled for use in the meeting.

Remarks
This element is a required child element of the MailboxData element. This element can
only occur once in the MailboxData element. The schema that describes this element is
located in the /EWS/ directory of the computer that is running MicrosoftExchange
Server 2007 that has the Client Access server role installed.

7 Note

The AttendeeType schema type is used to represent attendees to a calendar item.


Do not confuse this element with elements of the AttendeeType schema type.

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
GetUserAvailabilityRequest
Getting User Availability
Attribution (PersonaAttributionType)
Article • 03/29/2023 • 2 minutes to read

The Attribution element specifies an instance in an array of attributes for a PersonaType


element.

XML

<Attribution>

<Id></Id>

<SourceId></SourceId>

<DisplayName></DisplayName>

<IsWritable></IsWritable>

<IsQuickContact></IsQuickContact>

<IsHidden></IsHidden>

<FolderId></FolderId>

</Attribution>

PersonaAttributionType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ID (String)
Specifies a string that uniquely identifies an app or an attribution in a persona.

SourceId
Specifies the identifier of the contact or Active Directory recipient.

DisplayName Defines the display name of a folder, contact, distribution list, delegate user, or
(string)
rule.

IsWritable
Specifies whether the underlying contact or Active Directory recipient can be
written to.

IsQuickContact Specifies a Boolean value that indicates whether the underlying contact or
Active Directory recipient is a quick contact.
Element Description

IsHidden
Contains a Boolean value that indicates whether the underlying contact or
Active Directory recipient should be hidden or displayed as part of the persona.

FolderId
Contains the identifier and change key of a folder.

Parent elements

Element Description

Attributions Specifies an array of attribution information for one or more


(ArrayOfPersonaAttributionsType) of the contacts or active directory (AD) recipients aggregated
into the associated persona.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Attribution (string)
Article • 03/29/2023 • 2 minutes to read

The Attribution element specifies a string used to identify an attribute of a persona.

XML

<Attribution></Attribution>

xs:string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Attributions Specifies an array of attributions for its associated Value


(ArrayOfValueAttributionsType)
element.

Text value
The text value of the attribution element is a string value that attributes a property
value to the source contact.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Attributions
(ArrayOfPersonaAttributionsType)
Article • 03/29/2023 • 2 minutes to read

The Attributions element specifies an array of attribution information for one or more of
the contacts or Active Directory recipients aggregated into the associated persona.

XML

<Attributions>

<Attribution></Attribution>

</Attributions>

ArrayOfPersonaAttributionsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Attribution Specifies an instance in an array of attributes for a PersonaType


(PersonaAttributionType)
element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Attributions
(ArrayOfValueAttributionsType)
Article • 03/29/2023 • 2 minutes to read

The Attributions element specifies an array of attributions for its associated Value
element.

XML

<Attributions>

<Attribution></Attribution>

</Attribution>

ArrayOfValueAttributionsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Attribution (string)
Specifies a string used to identify an attribute.

Parent elements

Element Description

BodyContentAttributedValue
Specifies the body content of an item.

EmailAddressAttributedValue
Specifies an instance of an array of email addresses and their
associated attributions.

ExtendedPropertyAttributedValue Specifies extended properties for a persona.


Element Description

PhoneNumberAttributedValue
Specifies an instance of an array of phone numbers and their
associated attributions.

PostalAddressAttributedValue
Specifies an instance of an array of postal addresses and their
associated attributions.

StringArrayAttributedValue
Specifies an instance of an array of string data for a persona
element.

StringAttributedValue
Specifies an instance in an array of attributes associated with
a persona element.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
AudioData
Article • 03/29/2023 • 2 minutes to read

The AudioData element is intended for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Base64Binary
Article • 03/29/2023 • 2 minutes to read

The Base64Binary element contains a Base64-encoded value.

XML

<Base64Binary/>

Base64Binary

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element name Description

UserSMIMECertificate
Contains a value that encodes the SMIME certificate of a contact.

MSExchangeCertificate Contains a value that encodes the Microsoft Exchange certificate of a


contact.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

This element was introduced in Exchange Server 2010 Service Pack 2 (SP2).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)


BaseFolderIds
Article • 03/29/2023 • 2 minutes to read

The BaseFolderIds element represents the collection of folders that will be mined to
determine the contents of a search folder.

XML

<BaseFolderIds>

<FolderId/>

<DistinguishedFolderId/>

</BaseFolderIds>

NonEmptyArrayOfBaseFolderIdsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier and change key of a folder.

DistinguishedFolderId Identifies MicrosoftExchange Server 2007 folders that can be referenced


by name.

Parent elements

Element Description

SearchParameters
Represents the parameters that define a search folder.

Remarks
The BaseFolderIds element must contain at least one FolderId or DistinguishedFolderId
element.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
BaseItemId
Article • 03/29/2023 • 2 minutes to read

The BaseItemId element represents the base class for IDs that represent items in a
mailbox. This is an abstract class and therefore will not occur in an instance document.

XML

<BaseItemId/>

BaseItemIdType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element is an abstract base type for item identifiers. This element is not used in
Web service calls.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
BaseOffset
Article • 03/29/2023 • 2 minutes to read

The BaseOffset element represents the hourly offset from Coordinated Universal Time
(UTC) for the current time zone.

XML

<BaseOffset/>

duration

Attributes and elements


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

Attributes
None

Child elements
None.

Parent elements

Element Description

MeetingTimeZone
Represents the time zone of the location where the meeting is hosted.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
BaseShape
Article • 03/29/2023 • 2 minutes to read

The BaseShape element identifies the set of properties to return in an item or folder
response.

XML

<BaseShape>IdOnly or Default or AllProperties</BaseShape>

DefaultShapeNamesType

Attributes and elements


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

Attributes
None.

Child elements
None

Parent elements

Element Description

FolderShape Identifies the folder properties to include in the GetFolder, FindFolder, or


SyncFolderHierarchy response.

The following are the XPath expressions to this element:

/GetFolder/FolderShape

/FindFolder/FolderShape

/SyncFolderHierarchy/FolderShape

Element Description

ItemShape
Identifies the item properties and content to include in a GetItem, FindItem, or
SyncFolderItems response.

The following are the XPath expressions to this element:

/GetItem/ItemShape

/FindItem/ItemShape

/SyncFolderItems/ItemShape

Text value
A text value is required. The following table lists the possible text values.

Text values for the BaseShape element

Value Description

IdOnly Returns only the item or folder ID.

Default Returns a set of properties that are defined as the default for the item or folder.

AllProperties Returns all the properties used by the Exchange Business Logic layer to construct a
folder.

The following table lists the default properties that are returned for a FindFolder
request. All subfolders of a given folder are returned in order by name.

Default properties

Folder Default Properties

Inbox FolderId, display name, unread count, total count, subfolder count

Contacts FolderId, display name, total count, subfolder count

Calendar FolderId, display name, subfolder count

Drafts FolderId, display name, unread count, total count, subfolder count

Deleted items FolderId, display name, unread count, total count, subfolder count

Other folders FolderId, display name, unread count, total count, subfolder count

Outbox FolderId, display name, unread count, total count, subfolder count

Tasks FolderId, display name, past due count, total count, subfolder count
Folder Default Properties

Notes FolderId, display name, total count, subfolder count

Remarks
To return properties in addition to those identified by the BaseShape element, use the
AdditionalProperties element.

Example
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://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
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
FolderShape
ItemShape
BaseShape
(PreviewItemBaseShapeType)
Article • 03/29/2023 • 2 minutes to read

The BaseShape element specifies either the default preview with all properties returned
or a compact preview with fewer properties returned.

XML

<BaseShape> Default | Compact</BaseShape>

PreviewItemBaseShapeType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

PreviewItemResponseShape
Contains the shape of the response.

Text value
BaseShape element text values

Value Description

Default Indicates that all properties are shown.


Value Description

Compact Indicates that only selected properties are shown.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
BccRecipient
Article • 03/29/2023 • 2 minutes to read

The BccRecipient element represents a recipient to receive a blind carbon copy (Bcc) of
an e-mail message.

XML

<BccRecipient>true | false</BccRecipient>

Boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

RecipientTrackingEvent
Contains information for a single event for a recipient.

Text value
This element can be either true or false. A value of true indicates that the recipient is
blind carbon copied; a value of false indicates that the recipient is not blind carbon
copied.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
BccRecipients
Article • 03/29/2023 • 2 minutes to read

The BccRecipients element represents a collection of recipients to receive a blind carbon


copy (Bcc) of an e-mail message.

XML

<BccRecipients>

<Mailbox/>

</BccRecipients>

ArrayOfRecipientsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Mailbox
Identifies a mail-enabled Active Directory directory service object.

Parent elements

Element Description

RemoveItem
Removes an item from the Exchange store.

Message
Represents an Exchange e-mail message.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

MeetingCancellation Represents a meeting cancellation in the Exchange store.

AcceptItem
Represents an accept reply to a meeting request.

TentativelyAcceptItem Represents a tentatively accepted reply to a meeting request.

DeclineItem
Represents a decline reply to a meeting request.

ReplyToItem
Contains a reply to the creator of an item in the Exchange store.

ReplyAllToItem
Contains a reply to all identified recipients of an item in the Exchange
store.

ForwardItem
Contains an Exchange store item to forward to recipients.

CancelCalendarItem
Represents the response object that is used to cancel a meeting.

Remarks
You cannot get BccRecipients by using a FindItem request. Use a GetItem request to get
BccRecipients.

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

Element information
Item Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
BeginTime
Article • 03/29/2023 • 2 minutes to read

The BeginTime element specifies the beginning of the time span to query for reminders.

XML

<BeginTime/>

dateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
GetReminders

Text value
The text value of the BeginTime element is the beginning time of the item the reminder
is for.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetReminders

EWS XML elements in Exchange


Bias
Article • 03/29/2023 • 2 minutes to read

The Bias element represents the offset from the Coordinated Universal Time (UTC) offset identified by the Bias (UTC)
element for standard time and daylight saving time. This value is in minutes.

XML

<Bias>...</Bias>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

StandardTime Represents an offset from the time relative to UTC represented by the Bias (UTC) element. This element also contains
information about the transition to standard time from daylight saving time in regions where daylight saving time is
observed.

The following are the XPath expressions to the StandardTime element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/WorkingHours/TimeZone/StandardTime

/GetUserAvailabilityRequest/TimeZone/StandardTime

DaylightTime
Represents an offset from the time relative to UTC represented by the Bias (UTC) element in regions where daylight saving
time is observed. This element also contains information about when the transition to daylight saving time from standard
time occurs.

The following are the XPath expressions to the DaylightTime element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/WorkingHours/TimeZone/DaylightTime

/GetUserAvailabilityRequest/TimeZone/DaylightTime

Text value
A text value is required. The text value represents an integer.

Remarks
The offset used to determine the local time can only be provided by one of the Bias elements. The sum of the values
of the Bias element provided by the DaylightTime element or the StandardTime element plus the Bias (UTC) element
identifies the local time.

Example
The following example shows part of an XML request that identifies a user who observes daylight saving time by
adjusting the offset from UTC by -60 minutes. This effectively makes the bias 420 minutes from UTC.

XML

<TimeZone xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Bias>480</Bias>

<StandardTime>

<Bias>0</Bias>

<Time>02:00:00</Time>

<DayOrder>5</DayOrder>

<Month>10</Month>

<DayOfWeek>Sunday</DayOfWeek>

</StandardTime>

<DaylightTime>

<Bias>-60</Bias>

<Time>02:00:00</Time>

<DayOrder>1</DayOrder>

<Month>4</Month>

<DayOfWeek>Sunday</DayOfWeek>

</DaylightTime>

</TimeZone>

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
Getting User Availability
Bias (UTC)
Article • 03/29/2023 • 2 minutes to read

The Bias element represents the general offset from Coordinated Universal Time (UTC). This value is in
minutes.

XML

<TimeZone>

<Bias>int</Bias>

</TimeZone>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

TimeZone The container that identifies the date-time information of the request. This element contains information
(Availability) about the transition between standard time and daylight saving time.

The following are the XPath expressions to this element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/WorkingHours/TimeZone

/GetUserAvailabilityRequest/TimeZone

Text value
A text value is required. The text value represents an integer.

Remarks
A second Bias element in the schema represents the offset from the Coordinated Universal Time (UTC)
offset.
Example
The following example shows part of an XML request that identifies an offset of 8 hours from UTC on
the client application.

XML

<TimeZone xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Bias>480</Bias>

<StandardTime>

<Bias>0</Bias>

<Time>02:00:00</Time>

<DayOrder>5</DayOrder>

<Month>10</Month>

<DayOfWeek>Sunday</DayOfWeek>

</StandardTime>

<DaylightTime>

<Bias>-60</Bias>

<Time>02:00:00</Time>

<DayOrder>1</DayOrder>

<Month>4</Month>

<DayOfWeek>Sunday</DayOfWeek>

</DaylightTime>

</TimeZone>

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
Bias
Getting User Availability
BillingInformation
Article • 03/29/2023 • 2 minutes to read

The BillingInformation element holds billing information for a task.

XML

<BillingInformation/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Task
Represents a task in the Exchange store.

Text value
The text value represents task-related billing information.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
BinaryData
Article • 03/29/2023 • 2 minutes to read

The BinaryData element contains binary data property content.

XML

<BinaryData/>

Base64Binary

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

UserConfiguration
Defines a single user configuration object.

Text value
The BinaryData element contains binary data.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Birthday
Article • 03/29/2023 • 2 minutes to read

The Birthday element represents the birth date of a contact.

XML

<Birthday/>

DateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Text value
A text value that represents a date and time is required.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Birthdays
Article • 03/29/2023 • 2 minutes to read

The Birthdays element specifies an array of birthdays, stored as strings, and the
identifiers of their source attributions for the associated persona.

XML

<Birthdays>

<StringAttributedValue/>

</Birthdays>

ArrayOfStringAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

StringAttributedValue Specifies an instance in an array of attributes associated with a persona


element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Bitmask
Article • 03/29/2023 • 2 minutes to read

The Bitmask element represents a hexadecimal or decimal mask to be used during an


Excludes restriction operation.

XML

<Bitmask Value="" />

ExcludesValueType

Attributes and elements


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

Attributes

Attribute Description

Value Represents a decimal or hexadecimal bitmask. The value is represented by the


following regular expression:

((0x|0X)[0-9A-Fa-f]*)|([0-9]*) .

The following are examples of hexadecimal values for this attribute:

- 0x12AF

- 0X334AE

The following are examples of decimal values for this attribute:

- 10

- 255

- 4562

Child elements
None.

Parent elements

Element Description
Element Description

Excludes
Performs a bitwise mask of the properties.

Remarks
Hexadecimal values must have a prefix of either 0x or 0X. If this prefix does not exist, the
value is assumed to be a decimal number.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
BlockExternalImages
Article • 03/29/2023 • 2 minutes to read

The BlockExternalImages element specifies whether external images are blocked in


HTML text bodies.

XML

<BlockExternalImages> true | false </BlockExternalImages>

Boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

FolderShape Identifies the folder properties to include in the GetFolder, FindFolder, or


SyncFolderHierarchy response.

ItemShape
Identifies the item properties and content to include in a GetItem, FindItem, or
SyncFolderItems response.

Text value
A text value of true for BlockExternalImages element indicates that external images are
blocked in HTML bodies. A value of false indicates that external images are allowed.
Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
BlockStatus
Article • 03/29/2023 • 2 minutes to read

The BlockStatus element specifies the block status of an item.

XML

<BlockStatus> true | false </BlockStatus

Boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents a contact item in the Exchange store.

DistributionList
Represents a distribution list.

Item
Represents a generic item in the Exchange store.

Text value
A text value of true for the BlockStatus element indicates that an item is blocked. A
value of false indicates that an item is not blocked.
Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Bodies
Article • 03/29/2023 • 2 minutes to read

The Bodies element specifies an array of BodyContentAttributedValue elements.

XML

<Bodies>

<BodyContentAttributedValue></BodyContentAttributedValue>

<Bodies>

ArrayOfBodyContentAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

BodyContentAttributedValue
Specifies the body content of an item.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Body
Article • 03/29/2023 • 2 minutes to read

The Body element specifies the body of an item.

XML

<Body> BodyType="" IsTruncated="" </Body>

BodyType

Attributes and elements


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

Attributes

Attribute Description

BodyType Specifies the type of the body.

IsTruncated Boolean value that indicates whether the body is truncated.

BodyType

Value Description

HTML Indicates that the body is in HTML.

Text Indicates that the body is in text.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.
Element Description

Contact
Represents a contact item in the Exchange store.

DistributionList
Represents a distribution list.

Item
Represents a generic item in the Exchange store.

Message
Represents a Microsoft Exchange email message.

PostItem
Represents a post item in the Exchange store.

Task
Represents a task in the Exchange store.

Text value
The text value of the Body element is the body content of the item.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
BodyContentAttributedValue
Article • 03/29/2023 • 2 minutes to read

The BodyContentAttributedValue element specifies the body content of an item.

XML

<BodyContentAttributedValue>

<Value></Value>

<Attributions></Attributions>

</ BodyContentAttributedValue>

BodyContentAttributedValueType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Value (BodyContentType)
Specifies the value of a BodyContentAttributedValue
element.

Attributions Specifies an array of attribution information for one or more


(ArrayOfPersonaAttributionsType) of the contacts or active directory recipients aggregated into
the associated persona.

Parent elements

Element Description

Bodies
Specifies an array of BodyContentAttributedValue elements.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
BodyType
Article • 03/29/2023 • 2 minutes to read

The BodyType element identifies how the body text is formatted in the response.

XML

<BodyType>Best or HTML or Text</BodyType>

BodyTypeResponseType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ItemShape
Identifies the item properties and content to include in a GetItem, FindItem,
or SyncFolderItems response.

The following are the XPath expressions to this element:

/GetItem/ItemShape

/FindItem/ItemShape

/SyncFolderItems/ItemShape

Element Description

AttachmentShape Identifies additional extended item properties to return in a response to a


GetAttachment request.

The following is the XPath expression to this element:

/GetAttachment/AttachmentShape

Text value
The following table lists the possible values for the BodyType element.

Value Description

Best The response will return the richest available content of body text. This is useful if it is
unknown whether the content is text or HTML.

The returned body will be text if the stored body is plain text. Otherwise, the response
will return HTML if the stored body is in either HTML or RTF format.

This is the default value.

HTML The response will return an item body as HTML.

Text The response will return an item body as plain text.

Remarks
You can identify the type of body returned in the response by checking the BodyType
attribute of the Body element. The BodyType attribute will identify the body as either
HTML or text.

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

Example
The following example of a request shows where a BodyType element is used.

XML
<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<GetAttachment
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<AttachmentShape>
<t:BodyType>Best</t:BodyType>

</AttachmentShape>

<AttachmentIds>

<t:AttachmentId Id="ASkAS="/>

</AttachmentIds>

</GetAttachment>

</soap:Body>

</soap:Envelope>

The Id attribute has been shortened to preserve readability.

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


BodyType (BodyTypeType)
Article • 03/29/2023 • 2 minutes to read

The BodyType element specifies the type of the body of the item.

XML

<BodyType> HTML | Text</BodyType>

BodyTypeType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Body
Specifies the body of an item.

Text value
BodyType element text values

Value Description

HTML Indicates that the body is HTML.

Text Indicates that the body is text.


Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
BusinessAddresses
Article • 03/29/2023 • 2 minutes to read

The BusinessAddresses element specifies an array of business addresses and the


identifiers of their source attributions for the associated persona.

XML

<BusinessAddresses>

<PostalAddressAttributedValue></PostalAddressAttributedValue>

</BusinessAddresses

ArrayOfPostalAddressAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

PostalAddressAttributedValue Specifies an instance of an array of postal addresses and their


associated attributions.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
BusinessHomePage
Article • 03/29/2023 • 2 minutes to read

The BusinessHomePage element represents the Home page (Web address) for the
contact.

XML

<BusinessHomePage/>

AnyUri

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Text value
The text value represents a uniform resource identifier (URI) for the Home page.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)


BusinessHomePages
Article • 03/29/2023 • 2 minutes to read

The BusinessHomePages element specifies an array of business home pages and the
identifiers of their source attributions for the associated persona.

XML

<BusinessHomePages>

<StringAttributedValue></StringAttributedValue>

</BusinessHomePages>

ArrayOfStringAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

StringAttributedValue Specifies an instance in an array of attributes associated with a persona


element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
BusinessName
Article • 03/29/2023 • 2 minutes to read

The BusinessName element specifies the name of a business.

XML

<BusinessName></BusinessName>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact (ContactType)
Specifies a contact in the Unified Contact Store.

Text value
The text value of the BusinessName element is the name of a business.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
BusinessPhoneNumbers
Article • 03/29/2023 • 2 minutes to read

The BusinessPhoneNumbers element specifies an array of business phone numbers and


the identifiers of their source attributions for the associated persona.

XML

<BusinessPhoneNumbers>

<Value></Value>

<Attributions></Attributions>

</BusinessPhoneNumbers>

ArrayOfPhoneNumberAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Value Specifies a phone number and type information and is


(PersonaPhoneNumberType)
associated with a set of attributions.

Attributions Specifies an array of attributions for its associated Value


(ArrayOfValueAttributionsType) element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
BusinessPhoneNumbers2
Article • 03/29/2023 • 2 minutes to read

The BusinessPhoneNumbers2 element specifies an array of BusinessPhoneNumber2


elements and the identifiers of their source attributions for the associated persona.

XML

<BusinessPhoneNumbers2>

<Value></Value>

<Attributions></Attributions>

</BusinessPhoneNumbers2>

ArrayOfPhoneNumberAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Value Specifies a phone number and type information and is


(PersonaPhoneNumberType)
associated with a set of attributions.

Attributions Specifies an array of attributions for its associated Value


(ArrayOfValueAttributionsType) element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
BusyType
Article • 03/29/2023 • 2 minutes to read

The BusyType element represents the free/busy status set for a calendar event.

XML

<BusyType>Free or Tentative or Busy or OOF or NoData</BusyType>

BusyType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

IndividualAttendeeConflictData Contains a user's or contact's free/busy status for a time window that occurs at the same time as the suggested meeting time.
The following is the XPath expression to this element:
/GetUserAvailabilityResponse/SuggestionsResponse/SuggestionDayResultArray/SuggestionDayResult[i]/SuggestionArray/Suggestion[

CalendarEvent
Represents a unique calendar item occurrence.
The following is the XPath expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/CalendarEventArray/CalendarEvent[i]

Text value
A text value is required for this element. The value is a string type. The following are the possible values for the BusyType element:

Free

Tentative

Busy

OOF

NoData

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

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd


Element Description

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


CalendarEvent
Article • 03/29/2023 • 2 minutes to read

The CalendarEvent element represents a unique calendar item occurrence.

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

FreeBusyView

CalendarEventArray

CalendarEvent

XML

<CalendarEvent>

<StartTime>...</StartTime>

<EndTime>...</EndTime>

<BusyType>...</BusyType>

<CalendarEventDetails>...</CalendarEventDetails>

</CalendarEvent>

CalendarEvent

Attributes and elements


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

Attributes
None.

Child elements

Element Description

StartTime
Represents the start of a calendar event. This is a required child element.

EndTime
Represents the end of a calendar event. This is a required child element.

BusyType
Represents the free/busy status set for a calendar event. This is a required child element.

CalendarEventDetails
Provides additional information for a calendar event. This is an optional child element.

Parent elements

Element Description
Element Description

CalendarEventArray Contains a set of unique calendar item occurrences that represent the requested user's availability.
The following is the XPath 2.0 expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/CalendarEventArray

Remarks
The appointment and meeting times are returned in the time zone of the client. All the child elements are
listed in the sequence in which they occur. The level of detail provided by this element depends on the
permissions granted to the requestor.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


CalendarEventArray
Article • 03/29/2023 • 2 minutes to read

The CalendarEventArray element contains a set of unique calendar item occurrences


that represent the requested user's availability.

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

FreeBusyView

CalendarEventArray

XML

<CalendarEventArray>

<CalendarEvent>...</CalendarEvent>

</CalendarEventArray>

ArrayOfCalendarEvent

Attributes and elements


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

Attributes
None.

Child elements

Element Description

CalendarEvent
Represents a unique calendar item occurrence.

Parent elements

Element Description
Element Description

FreeBusyView Contains availability information for a specific user.


The following is the XPath 2.0 expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView

Remarks
The level of detail provided by this element depends on the permissions granted to the
requestor. This element is included when the FreeBusyViewType element is set to
FreeBusy, FreeBusyMerged, Detailed, or DetailedMerged. This element does not
include any child elements if no calendar items are present in the requested time
window.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


CalendarEventDetails
Article • 03/29/2023 • 2 minutes to read

The CalendarEventDetails element provides additional information about a calendar event.

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

FreeBusyView

CalendarEventArray

CalendarEvent

CalendarEventDetails

XML

<CalendarEventDetails>

<ID/>

<Subject/>

<Location/>

<IsMeeting/>

<IsRecurring/>

<IsException/>

<IsReminderSet/>

<IsPrivate/>

</CalendarEventDetails>

CalendarEventDetails

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ID
Represents the entry ID of the calendar item.

Subject (CalendarEventDetails)
Represents the subject of the calendar item.

Location (CalendarEventDetails)
Represents the location field of the calendar item.

IsMeeting Indicates whether the calendar event is a meeting or an appointment.


(CalendarEventDetails)

IsRecurring Indicates whether the calendar event is an instance of a recurring calendar item or a single
(CalendarEventDetails)
calendar item.

IsException
Indicates whether an instance of a recurring calendar item is changed from the master.
Element Description

IsReminderSet
Indicates whether a reminder has been set for the calendar event.

IsPrivate
Indicates whether the calendar item is private.

Parent elements

Element Description

CalendarEvent Represents a unique calendar item occurrence.


The following is the XPath 2.0 expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/CalendarEventArray/CalendarEvent[i]

Remarks
All the child elements are listed in the sequence in which they occur.

If the IsPrivate element is true, all the other elements in the CalendarEventDetails element are not returned in the
response.

The GetUserAvailability operation does not return detailed caller information unless the caller has read access on the
target user's calendar. You can set access permissions by using the Exchange Management Shell.

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

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


CalendarFolder
Article • 03/29/2023 • 2 minutes to read

The CalendarFolder element represents a folder that primarily contains calendar items.

XML

<CalendarFolder>

<FolderId/>

<ParentFolderId/>

<FolderClass/>

<DisplayName/>

<TotalCount/>

<ChildFolderCount/>

<ExtendedProperty/>

<ManagedFolderInformation/>

<EffectiveRights/>

<SharingEffectiveRights/>

<PermissionSet/>

</CalendarFolder>

CalendarFolderType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier and change key of a folder.

ParentFolderId Represents the identifier of the parent folder that contains


the folder.

FolderClass
Represents the folder class for a given folder.

DisplayName (string)
Contains the display name of a folder.

TotalCount
Represents the total count of items within a given folder.
Element Description

ChildFolderCount
Represents the number of child folders that are contained
within a folder. This property is read-only.

ExtendedProperty
Identifies extended properties on folders.

ManagedFolderInformation
Contains information about a managed folder.

EffectiveRights
Contains the client's rights based on the permission
settings for the item or folder. This element is read-only.

SharingEffectiveRights Indicates the permissions that the user has for the
(CalendarPermissionReadAccessType) calendar data that is being shared.

PermissionSet Contains all the configured permissions for a calendar


(CalendarPermissionSetType)
folder.

Parent elements

Element Description

AppendToFolderField Specifies data to append to a folder property during an UpdateFolder


operation.

Create (FolderSync)
Identifies a single folder to create in the local client store.

SetFolderField
Represents an update to a single property on a folder in an UpdateFolder
operation.

Update (FolderSync)
Identifies a single folder to update in the local client store.

Folders
Contains an array of folders that are used in folder operations.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema


Element Example

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
CalendarFolderPermissionLevel
Article • 03/29/2023 • 2 minutes to read

The CalendarFolderPermissionLevel element contains the permissions for the default


Calendar folder. This element was introduced in Microsoft Exchange Server 2007 Service
Pack 1 (SP1).

XML

<CalendarFolderPermissionLevel>

None or Editor or Reviewer or Author or Custom

</CalendarFolderPermissionLevel>

DelegateFolderPermissionLevelType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

DelegatePermissions Contains the delegate permission level settings for a user. This element
was introduced in Exchange 2007 SP1.

Text value
The following table lists the text values that represent the permission levels.

Permission level text values


Permission level Description

None The delegate user has no access permissions to the Calendar folder.

Reviewer The delegate user can read items in the Calendar folder.

Author The delegate user can read and create items in the Calendar folder.

Editor The delegate user can read, create, and modify items in the Calendar folder.

Custom The delegate user has custom access permissions to the Calendar folder.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
AddDelegate operation

UpdateDelegate operation

EWS XML elements in Exchange

Adding Delegates
CalendarItem
Article • 03/29/2023 • 7 minutes to read

The CalendarItem element represents an Exchange calendar item.

XML

<CalendarItem>

<MimeContent/>

<ItemId/>

<ParentFolderId/>

<ItemClass/>

<Subject/>

<Sensitivity/>

<Body/>

<Attachments/>

<DateTimeReceived/>

<Size/>

<Categories/>

<InReplyTo/>

<IsSubmitted/>

<IsDraft/>

<IsFromMe/>

<IsResend/>

<IsUnmodified/>

<InternetMessageHeaders/>

<DateTimeSent/>

<DateTimeCreated/>

<ResponseObjects/>

<ReminderDueBy/>

<ReminderIsSet/>

<ReminderMinutesBeforeStart/>

<DisplayCc/>

<DisplayTo/>

<HasAttachments/>

<ExtendedProperty/>

<Culture/>

<Start/>

<End/>

<OriginalStart/>

<IsAllDayEvent/>

<LegacyFreeBusyStatus/>

<Location/>

<When/>

<IsMeeting/>

<IsCancelled/>

<IsRecurring/>

<MeetingRequestWasSent/>

<IsResponseRequested/>

<CalendarItemType/>

<MyResponseType/>

<Organizer/>

<RequiredAttendees/>
<OptionalAttendees/>
<Resources/>

<ConflictingMeetingCount/>

<AdjacentMeetingCount/>

<ConflictingMeetings/>

<AdjacentMeetings/>

<Duration/>

<TimeZone/>

<AppointmentReplyTime/>

<AppointmentSequenceNumber/>

<AppointmentState/>

<Recurrence/>

<FirstOccurrence/>

<LastOccurrence/>

<ModifiedOccurrences/>

<DeletedOccurrences/>

<MeetingTimeZone/>

<StartTimeZone/>

<EndTimeZone/>

<ConferenceType/>

<AllowNewTimeProposal/>

<IsOnlineMeeting/>

<MeetingWorkspaceUrl/>

<NetShowUrl/>

<EffectiveRights/>

<LastModifiedName/>

<LastModifiedTime/>

<IsAssociated/>

<WebClientReadFormQueryString/>

<WebClientEditFormQueryString/>

<ConversationId/>

<UniqueBody/>

</CalendarItem>

CalendarItemType

Attributes and elements


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

Attributes
None.

Child elements

Element Description
Element Description

MimeContent
Contains the native Multipurpose Internet Mail Extensions
(MIME) stream of an object that is represented in base64Binary
format.

ItemId
Contains the unique identifier and change key of an item in the
Exchange store.

ParentFolderId Represents the identifier of the parent folder that contains the
item or folder.

ItemClass
Represents the message class of an item.

Subject
Represents the subject for Exchange store items and response
objects.

Sensitivity
Indicates the sensitivity level of an item.

Body
Represents the actual body content of a message.

Attachments
Contains the items or files that are attached to an item in the
Exchange store.

DateTimeReceived
Represents the date and time that an item in a mailbox was
received.

Size
Represents the size in bytes of an item. This property is read-
only.

Categories
Represents a collection of strings that identify the categories to
which an item in the mailbox belongs.

Importance
Describes the importance of an item.

InReplyTo
Represents the identifier of the item to which this item is a
reply.

IsSubmitted
Indicates whether an item has been submitted to the Outbox
default folder.

IsDraft
Indicates whether an item has not yet been sent.

IsFromMe
Indicates whether a user sent an item to him or herself.

IsResend
Indicates whether the item had previously been sent.

IsUnmodified
Indicates whether the item has been modified.

InternetMessageHeaders
Represents the collection of all Internet message headers that
are contained in an item in a mailbox.
Element Description

DateTimeSent
Represents the date and time that an item in a mailbox was
sent.

DateTimeCreated
Represents the date and time that a given item in the mailbox
was created.

ResponseObjects
Contains a collection of all the response objects that are
associated with an item in the Exchange store.

ReminderDueBy
Represents the date and time when the event occurs. This is
used by the ReminderMinutesBeforeStart element to
determine when the reminder is displayed.

ReminderIsSet
Indicates whether a reminder has been set for an item in the
Exchange store.

ReminderMinutesBeforeStart
Represents the number of minutes before an event when a
reminder is displayed.

DisplayCc
Represents the display string that is used for the contents of
the Cc line. This is the concatenated string of all Cc recipient
display names.

DisplayTo
Represents the display string that is used for the contents of
the To line. This is the concatenated string of all To recipient
display names.

HasAttachments
Represents a property that is set to true if an item has at least
one visible attachment. This property is read-only.

ExtendedProperty
Identifies extended properties on folders and items.

Culture
Represents the culture for a given item in a mailbox.

UID
Identifies a calendar item.

RecurrenceId
Used to identify a specific instance of a recurring calendar
item.

DateTimeStamp
Indicates the date and time that an instance of a iCalendar
object was created.

Start
Represents the start of a calendar item. This element only
applies to a single occurrence of a calendar item.

End Represents the end of a duration. This element only applies to


a single occurrence of a calendar item.

OriginalStart
Represents the original start time of a calendar item.
Element Description

IsAllDayEvent
Indicates whether a calendar item or meeting request
represents an all-day event.

LegacyFreeBusyStatus
Represents the free/busy status of the calendar item.

Location
Represents the location of a meeting or appointment.

When
Provides information about when a calendar item occurs.

IsMeeting Indicates whether the calendar item is a meeting or


appointment.

IsCancelled
Indicates whether an appointment or meeting has been
canceled.

IsRecurring
Indicates whether a calendar item is part of a recurring item.
This element is read-only.

MeetingRequestWasSent
Indicates whether a meeting request has been sent to
requested attendees.

IsResponseRequested
Indicates whether a response to an item is required.

CalendarItemType
Represents the occurrence type of a calendar item.

MyResponseType
Contains the status of or response to a calendar item.

Organizer
Represents the organizer of a meeting.

RequiredAttendees
Represents attendees that are required to attend a meeting.

OptionalAttendees
Represents attendees that are not required to attend a
meeting.

Resources
Represents a scheduled resource for a meeting.

ConflictingMeetingCount
Represents the number of meetings that conflict with the
calendar item.

AdjacentMeetingCount
Represents the total number of calendar items that are
adjacent to a meeting time.

ConflictingMeetings Identifies all items that conflict with a meeting time.

AdjacentMeetings
Describes all calendar items that are adjacent to a meeting
time.

Duration (Items)
Represents the duration of a calendar item.

TimeZone (Item)
Provides a text description of a time zone.
Element Description

AppointmentReplyTime
Represents the date and time when an attendee replied to a
meeting request.

AppointmentSequenceNumber
Specifies the sequence number of a version of an appointment.

AppointmentState
Specifies the status of the appointment.

Recurrence (RecurrenceType)
Contains the recurrence pattern for calendar items and
meeting requests.
This element is valid if CalendarItemType has the
RecurringMaster value.

FirstOccurrence
Represents the first occurrence of a recurring calendar item.
This element is valid if CalendarItemType has the
RecurringMaster value.

LastOccurrence
Represents the last occurrence of a recurring calendar item.
This element is valid if CalendarItemType has the
RecurringMaster value.

ModifiedOccurrences
Contains an array of recurring calendar item occurrences that
have been modified so that they differ from the recurrence
master item.
This element is valid if CalendarItemType has the
RecurringMaster value.

DeletedOccurrences
Contains an array of deleted occurrences of a recurring
calendar item.
This element is valid if CalendarItemType has the
RecurringMaster value.

MeetingTimeZone
Represents the time zone of the location where the meeting is
hosted.

StartTimeZone
Represents the start time zone of the calendar item.

EndTimeZone
Represents the end time zone of the calendar item.

ConferenceType
Describes the type of conferencing that is performed with a
calendar item.

AllowNewTimeProposal
Indicates whether a new meeting time can be proposed for a
meeting by an attendee.

IsOnlineMeeting
Indicates whether the meeting is online.

MeetingWorkspaceUrl
Contains the URL for the meeting workspace that is linked to
by the calendar item.

NetShowUrl
Specifies the URL for a Microsoft NetShow online meeting.
Element Description

EffectiveRights
Contains the client's rights based on the permission settings
for the item or folder. This element is read-only.

LastModifiedName
Contains the display name of the last user to modify an item.

LastModifiedTime
Indicates when an item was last modified.

IsAssociated
Indicates whether the item is associated with a folder.

WebClientReadFormQueryString Represents a URL to concatenate to the Microsoft Office


Outlook Web App endpoint to read an item in Outlook Web
App.

WebClientEditFormQueryString
Represents a URL to concatenate to the Microsoft Office
Outlook Web App endpoint to edit an item in Outlook Web
App.

ConversationId
Contains the identifier of an item or conversation.

UniqueBody
Represents an HTML fragment or plain text which represents
the unique body of this conversation.

Parent elements

Element Description

AdjacentMeetings
Describes all calendar items that are adjacent to a meeting
time.

AppendToItemField Identifies data to append to a single property of an item or


folder during an UpdateItem operation.

ConflictingMeetings Identifies all items that conflict with a meeting time.

Create (ItemSync)
Identifies a single folder to create in the local client store.

ItemAttachment
Represents an Exchange item that is attached to another
Exchange item.

Items
Contains an array of items.

Items Contains an array of items to create in the folder that is


(NonEmptyArrayOfAllItemsType) identified by the ParentFolderId (TargetFolderIdType) element.

SetItemField
Represents an update to a single property of an item in an
UpdateItem operation.

Update (ItemSync)
Identifies a single item to update in the local client store.
Text value
None.

Remarks
When a single calendar item is updated to become a recurring master calendar item, the
MeetingTimeZone element must be specified in order to preserve the calendar item's
original time zone.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

EWS reference for Exchange


CalendarItemType
Article • 03/29/2023 • 2 minutes to read

The CalendarItemType element represents the type of a calendar item.

XML

<CalendarItemType/>

CalendarItemTypeType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

MeetingRequest
Represents a meeting in the Exchange store.

CalendarItem
Represents an Exchange calendar item.

Text value
A text value is required if this element is used. The following are the possible values for
this element:

Single The item is not associated with a recurring calendar item.

Occurrence The item is an occurrence of a recurring calendar item.

Exception The item is an exception to a recurring calendar item.


RecurringMaster The item is master for a set of recurring calendar items.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
CalendarPermission
Article • 03/29/2023 • 2 minutes to read

The CalendarPermission element defines the access that a user has to a Calendar folder.
This element was introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

XML

<Permission>

<CalendarPermissionLevel/>

<CanCreateItems/>

<CanCreateSubfolders/>

<IsFolderOwner/>

<IsFolderVisible/>

<IsFolderContact/>

<EditItems/>

<DeleteItems/>

<ReadItems/>

<UserId/>

</Permission>

CalendarPermissionType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

CalendarPermissionLevel
Represents the permission level that a user has on a Calendar folder.
This element was introduced in Exchange 2007 SP1.

CanCreateItems
Indicates whether a user has permission to create items in a folder.
This element was introduced in Exchange 2007 SP1.

CanCreateSubFolders
Indicates whether a user has permission to create subfolders in a
folder. This element was introduced in Exchange 2007 SP1.
Element Description

DeleteItems
Indicates whether a user has permission to delete items in a folder.
This element was introduced in Exchange 2007 SP1.

EditItems
Indicates whether a user has permission to edit items in a folder. This
element was introduced in Exchange 2007 SP1.

IsFolderContact
Indicates whether a user is a contact for a folder. This element was
introduced in Exchange 2007 SP1.

IsFolderOwner
Indicates whether a user is the owner of a folder. This element was
introduced in Exchange 2007 SP1.

IsFolderVisible
Indicates whether a user can view a folder. This element was
introduced in Exchange 2007 SP1.

ReadItems Indicates whether a user has permission to read items within a


(CalendarPermissionType) calendar folder. This element was introduced in Exchange 2007 SP1.

UserId
Identifies a delegate user or a user who has folder access permissions.
This element was introduced in Exchange 2007 SP1.

Parent elements

Element Description

CalendarPermissions Contains an array of calendar permissions for a folder. This element was
introduced in Exchange 2007 SP1.

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.

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd


Element Description

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


CalendarPermissionLevel
Article • 03/29/2023 • 2 minutes to read

The CalendarPermissionLevel element represents the permission level that a user has
on a Calendar folder. This element was introduced in Microsoft Exchange Server 2007
Service Pack 1 (SP1).

XML

<CalendarPermissionLevel>None or Owner or PublishingEditor or Editor or


PublishingAuthor or Author or NoneditingAuthor or Reviewer or Contributor or
FreeBusyTimeOnly or FreeBusyTimeAndSubjectAndLocation or
Custom</CalendarPermissionLevel>

CalendarPermissionLevelType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarPermission Defines the access that a user has to a Calendar folder. This element was
introduced in Exchange 2007 SP1.

Text value
The following table lists the possible values for the CalendarPermissionLevel element.

CalendarPermissionLevel element text values


Value Description

None Indicates that the user has no permissions on the folder.

Owner Indicates that the user can create, read, edit, and delete
all items in the folder, and create subfolders. The user is
both folder owner and folder contact.

PublishingEditor Indicates that the user can create, read, edit, and delete
all items in the folder, and create subfolders.

Editor Indicates that the user can create, read, edit and delete all
items in the folder.

PublishingAuthor Indicates that the user can create and read all items in
the folder, edit and delete only items that the user
creates, and create subfolders.

Author Indicates that the user can create and read all items in
the folder, and edit and delete only items that the user
creates.

NoneditingAuthor Indicates that the user can create and read all items in
the folder, and delete only items that the user creates.

Reviewer Indicates that the user can read all items in the folder.

Contributor Indicates that the user can create items in the folder. The
contents of the folder do not appear.

FreeBusyTimeOnly Indicates that the user can view only free/busy time
within the calendar.

FreeBusyTimeAndSubjectAndLocation Indicates that the user can view free/busy time within the
calendar and the subject and location of appointments.

Custom Indicates that the user has custom access permissions on


the folder.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


CalendarPermissions
Article • 03/29/2023 • 2 minutes to read

The CalendarPermissions element contains an array of calendar permissions for a folder.


This element was introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

XML

<CalendarPermissions>

<PermissionSet/>

</CalendarPermissions>

ArrayOfCalendarPermissionsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

CalendarPermission
Defines the access that a delegate user has to a calendar folder.

Parent elements

Element Description

PermissionSet Contains all the configured permissions for a calendar folder. This
(CalendarPermissionSetType) element was introduced in Exchange 2007 SP1.

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.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


CalendarUrl
(FederatedDirectoryGroupType)
Article • 03/29/2023 • 2 minutes to read

The CalendarUrl (FederatedDirectoryGroupType) element is intended for internal use


only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
CalendarUrl (MasterMailboxType)
Article • 03/29/2023 • 2 minutes to read

The CalendarUrl (MasterMailboxType) element is intended for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
CalendarView
Article • 03/29/2023 • 2 minutes to read

The CalendarView element defines a FindItem operation as returning calendar items in


a set as they appear in a calendar.

FindItem

CalendarView

XML

<CalendarView MaxEntriesReturned="" StartDate="" EndDate="" />

CalendarView

Attributes and elements


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

Attributes

Attribute Description

MaxEntriesReturned Describes the maximum number of results to return in the FindItem


response.

StartDate
Identifies the start of a time span queried for calendar items. All calendar
items that have an end time that is before StartDate will not be returned.
The value of StartDate can be specified in coordinated universal time
(UTC) format, as in 2006-01-02T12:00:00Z, or in a format where local time
and time zone offset is specified, as in 2006-01-02T04:00:00-08:00.

This attribute is required.

EndDate
Identifies the end of a time span queried for calendar items. All calendar
items that have a start time that is on or after EndDate will not be
returned. The value of EndDate can be specified in UTC format, as in 2006-
02-02T12:00:00Z, or in a format where local time and time zone offset is
specified, as in 2006-02-02T04:00:00-08:00.

EndDate must be greater than or equal to StartDate; otherwise an error is


returned. This attribute is required.
Child elements
None.

Parent elements

Element Description

FindItem
Defines a request to find items in a mailbox.

The following is the XPath expression to this element:


/FindItem

Remarks
If the CalendarView element is specified in a FindItem request, the Web service returns a
list of single calendar items and occurrences of recurring calendar items within the
range specified by StartDate and EndDate.

If the CalendarView element is not specified in a FindItem request, the Web service
returns a list of single calendar items and recurring master calendar items. Calendar
occurrences of a recurring calendar item are not expanded.

CalendarView queries should only make use of the following properties since they
support faster calendar queries.

Recurrence blob properties


MapiStartTime

MapiEndTime

SubjectPrefixInternal

NormalizedSubjectInternal

MapiSubject

Location

AppointmentColor

MapiIsAllDayEvent
MapiHasAttachment

FreeBusyStatus

ReminderIsSetInternal

ReminderMinutesBeforeStartInternal

AppointmentState

AllAttachmentsHidden

ChangeHighlight

Calculated from the primary recurrence blob or master


ItemId

IsRecurring

IsException

AppointmentRecurring

MapiStartTime

MapiPRStartDate

MapiEndTime

MapiPREndDate

CalendarItemType

GlobalObjectId

TimeZoneDefinitionStart

TimeZoneDefinitionEnd

Master calendar item properties


EntryId

ChangeKey

ItemClass
SentRepresentingEmailAddress

SentRepresentingDisplayName

SentRepresentingEntryId

AppointmentRecurrenceBlob

TimeZone

TimeZoneBlob

TimeZoneDefinitionRecurring

CleanGlobalObjectId

AppointmentRecurring

IsException

IsRecurring

MapiSensitivity

ContainerClass

MapiPRStartDate

MapiPREndDate

Categories

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Example
The following example shows a FindItem request. A successful request returns a
response that includes calendar items that started at 2006-05-18T00:00:00-08:00 or after
and ended before 2006-05-19T00:00:00-08:00.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<FindItem Traversal="Shallow"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="calendar:Start"/>

<t:FieldURI FieldURI="calendar:End"/>

<t:FieldURI FieldURI="item:Subject"/>

</t:AdditionalProperties>

</ItemShape>

<CalendarView MaxEntriesReturned="2" StartDate="2006-05-18T00:00:00-


08:00" EndDate="2006-05-19T00:00:00-08:00"/>

<ParentFolderIds>
<t:DistinguishedFolderId Id="calendar"/>

</ParentFolderIds>

</FindItem>

</soap:Body>

</soap:Envelope>

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindItem operation
Finding Items
CallbackPhones
Article • 03/29/2023 • 2 minutes to read

The CallbackPhones element specifies an array of call-back phone numbers and the
identifiers of their source attributions for the associated persona.

XML

<CallbackPhones>

<Value></Value>

<Attributions></Attributions>

</CallbackPhones>

ArrayOfPhoneNumberAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Value Specifies a phone number and type information and is


(PersonaPhoneNumberType)
associated with a set of attributions.

Attributions Specifies an array of attributions for its associated Value


(ArrayOfValueAttributionsType) element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
CallerData
Article • 03/29/2023 • 2 minutes to read

The CallerData element in intended for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
CancelCalendarItem
Article • 03/29/2023 • 2 minutes to read

The CancelCalendarItem element represents the response object that is used to cancel a meeting.

XML

<CancelCalendarItem>

<Subject/>

<Body/>

<ToRecipients/>

<CcRecipients/>

<BccRecipients/>

<IsReadReceiptRequested/>

<IsDeliveryReceiptRequested/>

<ReferenceItemId/>

<NewBodyContent/>

<ReceivedBy/>

<ReceivedRepresenting/>

</CancelCalendarItem>

CancelCalendarItemType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Subject
Represents the subject property of Exchange store items.

Body
Not used by CancelCalendarItem. Use the NewBodyContent property to set the body content.

ToRecipients
Contains a set of recipients of an item. These are the primary recipients of an item.

CcRecipients
Represents a collection of recipients that will receive a copy of the message.

BccRecipients
Represents a collection of recipients to receive a blind carbon copy (Bcc) of an e-mail.

IsReadReceiptRequested
Indicates whether the sender of an item requests a read receipt.

IsDeliveryReceiptRequested Indicates whether the sender of an item requests a delivery receipt.

ReferenceItemId
Identifies the item to which the response object refers.

NewBodyContent
Represents the new body content of a message.

ReceivedBy
Identifies the delegate in a delegate access scenario. This element was introduced in Microsoft
Exchange Server 2007 Service Pack 1 (SP1).

ReceivedRepresenting
Identifies the principal in a delegate access scenario. This element was introduced in Microsoft
Exchange Server 2007 Service Pack 1 (SP1).
Parent elements

Element Description

AdjacentMeetings
Describes all items that are adjacent to a meeting time.

The following are some of the XPath expressions to this element:

/CalendarItem/AdjacentMeetings

/MeetingRequest/AdjacentMeetings

/SetItemField/CalendarItem/AdjacentMeetings

/AppendToItemField/CalendarItem/AdjacentMeetings

/AcceptItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/DeclineItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/TentativelyAcceptItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/SetItemField/CalendarItem/AdjacentMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/AppendToItemField/CalendarItem/AdjacentMeetings

/CreateAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/GetAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

ConflictingMeetings Describes all items that conflict with a meeting time.

The following are some of the XPath expressions to this element:

/CalendarItem/ConflictingMeetings

/MeetingRequest/ConflictingMeetings

/SetItemField/CalendarItem/ConflictingMeetings

/AppendToItemField/CalendarItem/ConflictingMeetings

/AcceptItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/DeclineItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/TentativelyAcceptItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/SetItemField/CalendarItem/ConflictingMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/AppendToItemField/CalendarItem/ConflictingMeetings
/CreateAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/GetAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

ResponseObjects
Contains a collection of all the response objects that are associated with an item in the Exchange
store.

Items Contains an array of items to create in the folder identified by the ParentFolderId
(NonEmptyArrayOfAllItemsType) (TargetFolderIdType) element.

Remarks
The CancelCalendarItem element is only viewed by the organizer. It only applies to the organizer's calendar item.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd


Element Example

Can be Empty False

See also
EWS XML elements in Exchange
CanCreateItems
Article • 03/29/2023 • 2 minutes to read

The CanCreateItems element indicates whether a user has permission to create items in
a folder. This element was introduced in Microsoft Exchange Server 2007 Service Pack 1
(SP1).

XML

<CanCreateItems/>

Boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Permission
Defines the access that a user has to a folder. This element was introduced
in Exchange 2007 SP1.

CalendarPermission Defines the access that a user has to a Calendar folder. This element was
introduced in Exchange 2007 SP1.

Text value
A text value of true indicates that the user can create items in the folder. A value of false
indicates that the user cannot create items in the folder.
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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


CanCreateSubFolders
Article • 03/29/2023 • 2 minutes to read

The CanCreateSubFolders element indicates whether a user has permission to create


subfolders in a folder. This element was introduced in Microsoft Exchange Server 2007
Service Pack 1 (SP1).

XML

<CanCreateSubFolders/>

Boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Permission
Defines the access that a user has to a folder. This element was introduced
in Exchange 2007 SP1.

CalendarPermission Defines the access that a user has to a Calendar folder. This element was
introduced in Exchange 2007 SP1.

Text value
A text value of true indicates that the user can create subfolders in the folder. A value of
false indicates that the user cannot create subfolders in the folder.
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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


CanDelete
Article • 03/29/2023 • 2 minutes to read

The CanDelete element indicates whether a managed folder can be deleted by a


customer.

XML

<CanDelete/>

Boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ManagedFolderInformation
Contains information about a managed folder.

Text value
A text value that represents a Boolean value is required if this element is present. A
value of true indicates that the folder can be deleted; a value of false means that the
folder cannot be deleted.

Remarks
To delete a managed folder, use the DeleteFolder operation.
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
CreateManagedFolder operation

EWS XML elements in Exchange

Deleting Folders
CanRenameOrMove
Article • 03/29/2023 • 2 minutes to read

The CanRenameOrMove element indicates whether a managed folder can be renamed


or moved by the customer.

XML

<CanRenameOrMove/>

Boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ManagedFolderInformation
Contains information about a managed folder.

Text value
The text value represents a Boolean value. A value of true indicates that the folder can
be renamed or moved; a value of false indicates that the folder cannot be renamed or
moved.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
CarPhones
Article • 03/29/2023 • 2 minutes to read

The CarPhone element specifies an array of car phone numbers and the identifiers of
their source attributions for the associated persona.

XML

<CarPhones>

<Value></Value>

<Attributions></Attributions>

</CarPhones>

ArrayOfPhoneNumberAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Value Specifies a phone number and type information and is


(PersonaPhoneNumberType)
associated with a set of attributions.

Attributions Specifies an array of attributions for its associated Value


(ArrayOfValueAttributionsType) element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Categories
Article • 03/29/2023 • 2 minutes to read

The Categories element contains a collection of strings that identify the categories to
which an item in the mailbox belongs.

XML

<Categories>

<String/>

</Categories>

ArrayOfStringsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

String
Contains a string that identifies a single category.

Parent elements

Element Description

Item
Represents an item in the Exchange store.

RemoveItem
Removes an item from the Exchange store.

Message
Represents an Exchange e-mail message.

Task
Represents a task in the Exchange store.

CalendarItem
Represents an Exchange calendar item.
Element Description

Conversation Represents a single conversation.


(ConversationType)

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Conditions
Represents the conditions that, when fulfilled, will trigger the rule
actions for a rule.

Exceptions
Represents all the available rule exception conditions for an Inbox
rule.

ConversationAction
Contains a single action to be applied to a single conversation.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


See also
EWS XML elements in Exchange
CcRecipients
Article • 03/29/2023 • 2 minutes to read

The CcRecipients element represents a collection of recipients that will receive a copy of
the message.

XML

<CcRecipients>

<Mailbox/>

</CcRecipients>

ArrayOfRecipientsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Mailbox
Identifies a mail-enabled Active Directory directory service object.

Parent elements

Element Description

RemoveItem
Removes an item from the Exchange store.

Message
Represents an Exchange e-mail message.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

MeetingCancellation Represents a meeting cancellation in the Exchange store.

AcceptItem
Represents an Accept reply to a meeting request.

TentativelyAcceptItem Represents a Tentative reply to a meeting request.

DeclineItem
Represents a Decline reply to a meeting request.

ReplyToItem
Contains a reply to the creator of an item in the Exchange store.

ReplyAllToItem
Contains a reply to all identified recipients of an item in the Exchange
store.

ForwardItem
Contains an Exchange store item to forward to recipients.

CancelCalendarItem
Represents the response object that is used to cancel a meeting.

Remarks
You cannot get CcRecipients by using a FindItem request. Use a GetItem request to get
CcRecipients.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ChangeCount
Article • 03/29/2023 • 2 minutes to read

The ChangeCount element specifies the version of the task.

XML

<ChangeCount/>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Task
Represents a task in the Exchange store.

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

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
ChangeHighlights
Article • 03/29/2023 • 2 minutes to read

The ChangeHighlights element specifies what has changed between two versions of a
meeting request message.

XML

<ChangeHighlights>

<HasLocationChanged></HasLocationChanged>

<Location></Location>

<HasStartTimeChanged></HasStartTimeChanged>

<Start></Start>

<HasEndTimeChanged></HasEndTimeChanged>

<End></End>

</ChangeHighlights>

ChangeHighlightsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

HasLocationChanged
Specifies whether the location property of a meeting has changed.

Location
Represents the location of a meeting or appointment.

HasStartTimeChanged
Specifies whether the start time for a meeting has changed.

Start
Represents the start of a duration.

HasEndTimeChanged
Specifies whether the end time for a meeting has changed.

End Represents the end of a duration.


Parent elements

Element Description

MeetingRequest
Represents a meeting request in the Exchange store.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Changes (Hierarchy)
Article • 03/29/2023 • 2 minutes to read

The Changes element contains a sequenced array of change types that represent the
type of differences between the folders on the client and the folders on the computer
that is running Microsoft Exchange Server 2007.

SyncFolderHierarchyResponse

ResponseMessages

SyncFolderHierarchyResponseMessage

Changes (Hierarchy)

XML

<Changes>

<Create/>

<Update/>

<Delete/>

</Changes>

SyncFolderHierarchyChangesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Create (FolderSync)
Identifies a single folder to create in the local client store.

Update (FolderSync)
Identifies a single folder to update in the local client store.

Delete (FolderSync)
Identifies a single folder to delete in the local client store.
Parent elements

Element Description

SyncFolderHierarchyResponseMessage Contains the status and result of a SyncFolderHierarchy


request.

Text value
A text value that represents a Boolean value is required.

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

Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
SyncFolderHierarchy operation

EWS reference for Exchange

EWS XML elements in Exchange


Changes (Items)
Article • 03/29/2023 • 2 minutes to read

The Changes element contains a sequence array of change types that represent the
types of differences between the items on the client and the items on the Exchange
server.

SyncFolderItemsResponse

ResponseMessages

SyncFolderItemsResponseMessage

Changes (Items)

XML

<Changes>

<Create/>

<Update/>

<Delete/>

<ReadFlagChange/>

</Changes>

SyncFolderItemsChangesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Create Identifies a single item to create in the local client store.


(ItemSync)

Update Identifies a single item to update in the local client store.


(ItemSync)

Element Description

Delete Identifies a single item to delete in the local client store.


(ItemSync)

ReadFlagChange Returned in SyncFolderItems operation responses when an item has been


read. This property is read-only.

Parent elements

Element Description

SyncFolderItemsResponseMessage Contains the status and result of a SyncFolderItems


operation request.

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

Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
SyncFolderItems operation

EWS XML elements in Exchange


ChildFolderCount
Article • 03/29/2023 • 2 minutes to read

The ChildFolderCount element represents the number of immediate child folders that
are contained within a folder. This property is read-only.

XML

<ChildFolderCount/>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Folder
Represents a folder in a mailbox.

CalendarFolder
Represents a Calendar folder in a mailbox.

ContactsFolder
Represents a Contacts folder in a mailbox.

SearchFolder
Represents a search folder in a mailbox.

TasksFolder
Represents a Tasks folder in a mailbox.

Text value
The text value represents an integer. This property is read-only.
Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Children
Article • 03/29/2023 • 2 minutes to read

The Children element contains the names of a contact's children.

XML

<Children>

<String/>

</Children>

ArrayOfStringsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

String
Contains the name of a contact's child.

Parent elements

Element Description

Contact
Represents a contact in the Exchange store.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Children
(ArrayOfStringArrayAttributedValuesTyp
e)
Article • 03/29/2023 • 2 minutes to read

The Children element specifies an array of child names and identifiers of their source
attributions for the associated persona.

XML

<Children>

<StringAttributedValue></StringAttributedValue>

</Children>

ArrayOfStringArrayAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

StringArrayAttributedValue Specifies an instance of an array of string data for a persona


element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
City
Article • 03/29/2023 • 2 minutes to read

The City element represents the city name that is associated with a contact.

XML

<City/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Entry (PhysicalAddress)
Describes a single physical address for a contact item.

Text value
The text value is a string value that represents the name of a city.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
ClientExtension
Article • 03/29/2023 • 2 minutes to read

The ClientExtension element contains user and configuration information about an app.

XML

<ClientExtension IsAvailable=" true | false " IsMandatory=" true | false "


IsEnabledByDefault=" true | false " Type="" Scope="" MarketplaceAssetId=""
MarketplaceContentMarket="" AppStatus="" Etoken="">

<SpecificUsers></SpecificUsers>

<Manifest></Manifest>

</ClientExtension>

ClientExtensionType

Attributes and elements


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

Attributes

Attribute Description

IsAvailable Specifies whether the app is available. A text value of true for the
IsAvailable attribute indicates that the app is available. A value of
false indicates that the app is not available. This attribute is
optional.

IsMandatory Specifies whether the app is mandatory. A text value of true for the
IsMandatory attribute indicates that the app is mandatory for the
mailbox. A value of false indicates that the app is not mandatory.
This attribute is optional.

IsEnabledByDefault Specifies whether the app is enabled by default. A text value of true
for the IsEnabledByDefault attribute indicates that the app is
enabled by default. A value of false indicates that the app is not
enabled by default. This attribute is optional.

ProvidedTo Specifies to whom the app is provided. This attribute is optional.

Type Specifies the type of the app.

Scope Specifies the scope of the app.

MarketplaceAssetId Specifies the marketplace asset identifier of the app.


Attribute Description

MarketplaceContentMarket Specifies the marketplace content that a user sees for details and
reviews about an app.

AppStatus Specifies the status code of a mail app in an unexpected state.

Etoken Specifies the license token for paid or trial mail apps.

Type

Value Description

Default Indicates that the app is available by default.

Private Indicates that the app is private.

MarketPlace Indicates that the app is a marketplace app.

Scope

Value Description

None Indicates that the app has no scope.

User Indicates that the app is per user.

Organization Indicates that the app is for an organization.

Default Indicates that the app is a default app.

Child elements

Element Description

SpecificUsers
Specifies the email accounts that can access the app.

Manifest
Contains the base-64 encoded app manifest file.

Parent elements

Element Description

ClientExtensions
Specifies an array of ClientExtension elements.
Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ClientExtensions
Article • 03/29/2023 • 2 minutes to read

The ClientExtensions element contains an array of user and configuration information


about apps.

XML

<ClientExtensions>

<ClientExtension/>

</ClientExtensions>

ArrayOfClientExtensionsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ClientExtension
Contains user and configuration information about an app.

Parent elements

Element Description

GetClientExtensionResponse Represents a response to get configuration information about an


app.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element

Namespace

Schema Name

Validation File

Can be Empty
ClientIntent
Article • 03/29/2023 • 2 minutes to read

The ClientIntent element is intended for internal use only.

XML

<ClientIntent />

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Message schema


Element Example

Validation File messages.xsd

Can Be Empty
Comment
Article • 03/29/2023 • 2 minutes to read

The Comment element contains the comment that is associated with a managed folder.

XML

<Comment/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ManagedFolderInformation
Contains information about a managed folder.

Text value
The text value represents the comment that is associated with a managed folder.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Companies
Article • 03/29/2023 • 2 minutes to read

The Companies element represents the collection of companies that are associated with
a contact or task.

XML

<Companies>

<String/>

</Companies>

ArrayOfStringsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

String
Represents the name of a company.

Parent elements

Element Description

Contact
Represents a contact in the Exchange store.

Task
Represents a task in the Exchange store.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
CompanyName
Article • 03/29/2023 • 2 minutes to read

The CompanyName element represents the company name that is associated with a
contact.

XML

<CompanyName/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents a contact item in the Exchange store.

Text value
A text value is required if this element is used.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)

Updating Contacts

Deleting Contacts
CompanyNames
Article • 03/29/2023 • 2 minutes to read

The CompanyNames element contains an array of company names and the identifiers
of their source attributions for the associated persona.

XML

<CompanyNames>

<StringAttributedValue></StringAttributedValue>

</CompanyNames>

ArrayOfStringAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

StringAttributedValue Specifies an instance in an array of attributes associated with a persona


element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
CompanyNameSortKey
Article • 03/29/2023 • 2 minutes to read

The CompanyNameSortKey element contains the sort key for a company name.

XML

<CompanyNameSortKey></CompanyNameSortKey>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
Persona

Text value
The text value of the CompanyNameSortKey element is the sort key for a company
name.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
CompleteDate
Article • 03/29/2023 • 2 minutes to read

The CompleteDate element represents the date on which an item was completed.

XML

<CompleteDate/>

DateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Task
Represents a task in the Exchange store.

Flag
Specifies a flag on a mailbox item.

Text value
A text value that represents the date and time is required if this element is used.

Remarks
Setting CompleteDate has the same effect as setting PercentComplete to 100 or Status
to Completed. In a request that sets at least two of these properties, the last processed
property will determine the value that is set for these elements. For example, if
PercentComplete is 100, CompleteDate is January 1, 2007, and Status is NotStarted, and
the properties are streamed in that order, the effect will be to set the Status of the task
to NotStarted, the CompleteDate to null, and PercentComplete to 0.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Creating Tasks

Deleting Tasks
CompleteFindInGALSpeechRecognition
Article • 03/29/2023 • 2 minutes to read

The CompleteFindInGALSpeechRecognition element is intended for internal use only.

XML

<CompleteFindInGALSpeechRecognition />

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Message schema


Element Example

Validation File messages.xsd

Can Be Empty
CompleteFindInGALSpeechRecognitionR
esponse
Article • 03/29/2023 • 2 minutes to read

The CompleteFindInGALSpeechRecognitionResponse element is intended for internal


use only.

XML

<CompleteFindInGALSpeechRecognitionResponse />

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

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

Schema Name Message schema

Validation File messages.xsd

Can Be Empty
CompleteName
Article • 03/29/2023 • 2 minutes to read

The CompleteName element represents the complete name of a contact.

XML

<CompleteName>

<Title/>

<FirstName/>

<MiddleName/>

<LastName/>

<Suffix/>

<Initials/>

<FullName/>

<Nickname/>

<YomiFirstName/>

<YomiLastName/>

</CompleteName>

CompleteNameType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Title Represents the title of a contact.

FirstName
Represents the first name of contact.

MiddleName
Represents the middle name of a contact.

LastName
Represents the last name of a contact.

Suffix
Represents a suffix to a contact's name.

Initials
Represents the initials of a contact.
Element Description

FullName
Represents the full name of a contact.

Nickname
Represents the nickname of a contact.

YomiFirstName Represents the name used in Japan for the searchable or phonetic spelling of a
Japanese first name.

YomiLastName Represents the name used in Japan for the searchable or phonetic spelling of a
Japanese last name.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Remarks
The CompleteName property is part of the Default shape. In the initial release version of
Microsoft Exchange Server 2007, the CompleteName property is returned by the
GetItem operation, but not the FindItem operation. Starting with Exchange Server 2007
Service Pack 1 (SP1), the FindItem operation also returns the CompleteName property
with the Default shape. This change does not affect the schema.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
CompleteNameType
EWS XML elements in Exchange
Creating Contacts (Exchange Web Services)
Condition
Article • 03/29/2023 • 2 minutes to read

The Condition element identifies the condition that must be satisfied for the action part
of the rule to be executed.

XML

<Condition>

<AllInternal/>

</Condition>

XML

<Condition>

<SenderDepartments/>

</Condition>

XML

<Condition>

<True/>

</Condition>

XML

<Condition>

<Recipients/>

</Condition>

XML

<Condition>

<And/>

</Condition>

ProtectionRuleConditionType

Attributes and elements


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

Child elements

Element Description

AllInternal
Evaluates to true if all recipients of an e-mail message are internal to
the sender's organization.

And Specifies that all child elements must match to evaluate to true.
(ProtectionRuleAndType) Specifies that there must be more than one protection rule child
condition.

RecipientIs
Specifies that any recipient of the e-mail message matches any of the
specified recipients in the child Value (ProtectionRuleValueType)
elements.

SenderDepartments
Specifies that the department of the sender matches any of the
specified departments in the child Value (ProtectionRuleValueType)
elements.

True
Specifies a condition that always matches.

Parent elements

Element Description

Rule
Contains a single protection rule.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Condition (RestrictionType)
Article • 03/29/2023 • 2 minutes to read

The Condition element specifies the condition that is used to identify the end of a
search for a FindItem or a FindConversation operation.

XML

<Condition>

<SearchExpression></SearchExpression>

</Condition>

RestrictionType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

SearchExpression
Abstract element that represents the substituted element within a restriction.

Parent elements

Element Description

SeekToConditionPageItemView Identifies the condition that is used to identify the end of a


search, the starting index of a search, the maximum entries to
return, and the search directions for a FindItem or a
FindConversation operation.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Conditions
Article • 03/29/2023 • 4 minutes to read

The Conditions element identifies the conditions that, when fulfilled, will trigger the rule
actions for a rule.

XML

<Conditions>

<Categories/>

<ContainsBodyStrings/>

<ContainsHeaderStrings/>

<ContainsRecipientStrings/>

<ContainsSenderStrings/>

<ContainsSubjectOrBodyStrings/>

<ContainsSubjectStrings/>

<FlaggedForAction/>

<FromAddresses/>

<FromConnectedAccounts/>

<HasAttachments/>

<Importance/>

<IsApprovalRequest/>
<IsAutomaticForward/>

<IsAutomaticReply/>

<IsEncrypted/>

<IsMeetingRequest/>

<IsMeetingResponse/>
<IsNDR/>

<IsPermissionControlled/>

<IsReadReceipt/>

<IsSigned/>

<IsVoicemail/>

<ItemClasses/>

<MessageClassifications/>

<NotSentToMe/>

<SentCcMe/>

<SentOnlyToMe/>

<SentToAddresses/>

<SentToMe/>

<SentToOrCcMe/>

<Sensitivity/>

<WithinDateRange/>

<WithinSizeRange/>

</Conditions>

RulePredicatesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Categories
Contains the categories that must be applied to an incoming
message in order for the condition or exception to apply.

ContainsBodyStrings
Indicates the strings that must appear in the body of incoming
messages in order for the condition or exception to apply.

ContainsHeaderStrings
Indicates the strings that must appear in the headers of
incoming messages in order for the condition or exception to
apply.

ContainsRecipientStrings
Indicates the strings that must appear in either the ToRecipients
or CcRecipients properties of incoming messages in order for
the condition or exception to apply.

ContainsSenderStrings
Indicates the strings that must appear in the From property of
incoming messages in order for the condition or exception to
apply.

ContainsSubjectOrBodyStrings Indicates the strings that must appear in either the body or the
subject of incoming messages in order for the condition or
exception to apply.

ContainsSubjectStrings
Indicates the strings that must appear in the subject of incoming
messages in order for the condition or exception to apply.

FlaggedForAction
Specifies the flag for action value that must appear on incoming
messages in order for the condition or exception to apply.

FromAddresses
Indicates the e-mail addresses from which incoming messages
must be sent in order for the condition or exception to apply.

FromConnectedAccounts
Represents the e-mail account names from which incoming
messages have to have been aggregated in order for the
condition or exception to apply.

HasAttachments
Indicates whether incoming messages have to have attachments
in order for the condition or exception to apply.
Element Description

Importance
Specifies the importance that is stamped on incoming messages
in order for the condition or exception to apply.

IsApprovalRequest
Indicates whether incoming messages must be approval
requests in order for the condition or exception to apply.

IsAutomaticForward
Indicates whether incoming messages must be automatic
forwards in order for the condition or exception to apply.

IsAutomaticReply
Indicates whether incoming messages must be automatic replies
in order for the condition or exception to apply.

IsEncrypted
Indicates whether incoming messages must be S/MIME
encrypted in order for the condition or exception to apply.

IsMeetingRequest
Indicates whether incoming messages must be meeting requests
in order for the condition or exception to apply.

IsMeetingResponse
Indicates whether incoming messages must be meeting
responses in order for the condition or exception to apply.

IsNDR
Indicates whether incoming messages must be non-delivery
reports (NDRs) in order for the condition or exception to apply.

IsPermissionControlled
Indicates whether incoming messages must be permission
controlled (RMS protected) in order for the condition or
exception to apply.

IsReadReceipt
Indicates whether incoming messages must be read receipts in
order for the condition or exception to apply.

IsSigned
Indicates whether incoming messages must be S/MIME signed in
order for the condition or exception to apply.

IsVoicemail
Indicates whether incoming messages must be voice mail
messages in order for the condition or exception to apply.

ItemClasses Represents the item classes that must be stamped on incoming


messages in order for the condition or exception to apply.

MessageClassifications
Represents the message classifications that must be stamped on
incoming messages in order for the condition or exception to
apply.

NotSentToMe
Indicates whether the owner of the mailbox must not be in the
ToRecipients property of the incoming messages in order for the
condition or exception to apply.
Element Description

SentCcMe
Indicates whether the owner of the mailbox has to be in the
CcRecipients property of incoming messages in order for the
condition or exception to apply.

SentOnlyToMe
Indicates whether the owner of the mailbox has to be the only
one in the ToRecipients property of incoming messages in order
for the condition or exception to apply.

SentToAddresses
Indicates the e-mail addresses that incoming messages have to
have been sent to in order for the condition or exception to
apply.

SentToMe
Indicates whether the owner of the mailbox has to be in the
ToRecipients property of incoming messages in order for the
condition or exception to apply.

SentToOrCcMe
Indicates whether the owner of the mailbox has to be in either a
ToRecipients or CcRecipients property of incoming messages in
order for the condition or exception to apply.

Sensitivity
Indicates the sensitivity that must be stamped on incoming
messages in order for the condition or exception to apply.

WithinDateRange
Specifies the date range within which incoming messages have
to have been received in order for the condition or exception to
apply.

WithinSizeRange
Specifies the minimum and maximum sizes that incoming
messages must be in order for the condition or exception to
apply.

Parent elements

Element Description

Rule (RuleType)
Contains a single rule and represents a rule in a user's mailbox.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
Exceptions

EWS XML elements in Exchange


ConferenceType
Article • 03/29/2023 • 2 minutes to read

The ConferenceType element describes the type of conferencing that is performed with
a calendar item.

XML

<ConferenceType/>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Text value
A text value that represents an integer value is required if this element is used. The
following are the possible values for this element:

0 = NetMeeting

1 = NetShow
2 = Chat

Remarks
The MeetingWorkspaceUrl property is read-writable for the organizer's calendar item. It
is read-only for meeting requests and for attendee's calendar items.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ConfigurationName
Article • 03/29/2023 • 2 minutes to read

The ConfigurationName element specifies the requested service configurations by


name.

XML

<ConfigurationName>MailTips or UnifiedMessagingConfiguration or
ProtectionRules</ConfigurationName>

ServiceConfigurationType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

RequestedConfiguration
Contains the requested service configurations.

Text value
The following table lists the possible values for the ConfigurationName element.

ConfigurationName element values

Value Description

MailTips Identifies the MailTips service configuration.


Value Description

UnifiedMessagingConfiguration Identifies the Unified Messaging service configuration.

ProtectionRules Identifies the Protection Rules service configuration.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ConfigurationRequestDetails
Article • 03/29/2023 • 2 minutes to read

The ConfigurationRequestDetails element contains client state for policy nudges. State
information can include the rules that are installed and client component version.

XML

<ConfigurationRequestDetails></ConfigurationRequestDetails>

ConfigurationRequestDetailsType

Attributes and elements


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

Attributes
None.

Child elements
The child elements are not defined in the Exchange Web Services schema.

Parent elements
GetServiceConfiguration

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

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

Schema name Messages schema

Validation file messages.xsd

Can be empty false


ConflictingMeetingCount
Article • 03/29/2023 • 2 minutes to read

The ConflictingMeetingCount element represents the number of meetings that conflict


with the calendar item.

XML

<ConflictingMeetingCount/>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

MeetingRequest
Represents a meeting in the Exchange store.

CalendarItem
Represents an Exchange calendar item.

Text value
The text value represents an integer. This property is read-only.

Remarks
A calendar item is considered conflicting if it occurs, at least in part, at the same time as
another calendar item in the same calendar folder. If a calendar item is in a noncalendar
folder, it is compared with calendar items in the default calendar folder. Meeting
requests are compared with calendar items in the default calendar folder.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
ConflictingMeetings
Article • 03/29/2023 • 2 minutes to read

The ConflictingMeetings element identifies all calendar items that conflict with a
meeting time.

XML

<ConflictingMeetings>

<CalendarItem/>

</ConflictingMeetings>

NonEmptyArrayOfAllItemsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Parent elements

Element Description

MeetingRequest
Represents a meeting request in the Exchange store.

CalendarItem
Represents an Exchange calendar item.

Remarks
If this element is used, it must contain one or more child elements.
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

7 Note

Although additional child elements are valid per the schema, the CalendarItem
element is the only child element that Exchange Web Services (EWS) will return
within the ConflictingMeetings element. This topic does not list child elements that
are valid per the schema but will not be returned by EWS.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ConflictResults
Article • 03/29/2023 • 2 minutes to read

The ConflictResults element contains the number of conflicts in an UpdateItem


operation response.

UpdateItemResponse

ResponseMessages

UpdateItemResponseMessage

ConflictResults

XML

<ConflictResults>

<Count/>

</ConflictResults>

ConflictResultsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Count
Contains the number of conflicts in an UpdateItem operation response.

Parent elements

Element Description

UpdateItemResponseMessage Contains the status and result of a single UpdateItem operation


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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
UpdateItem operation

ConflictResultsType
ConnectingSID
Article • 03/29/2023 • 2 minutes to read

The ConnectingSID element represents an account to impersonate when you are using
the ExchangeImpersonation SOAP header.

ExchangeImpersonation
ConnectingSID

XML

<ConnectingSID>

<PrincipalName/>

</ConnectingSID>

XML

<ConnectingSID>

<SmtpAddress/>

</ConnectingSID>

XML

<ConnectingSID>

<SID/>

</ConnectingSID>

XML

<ConnectingSID>

<PrimarySmtpAddress/>

</ConnectingSID>

ConnectingSIDType

Attributes and elements


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

Attributes
None.
Child elements

Element Description

PrincipalName
Represents the user principal name (UPN) of the account to use for
impersonation. This should be the UPN for the domain where the user
account exists.

SID
Represents the security descriptor definition language (SDDL) form of the
security identifier (SID) for the account to use for impersonation.

PrimarySmtpAddress Represents the primary Simple Mail Transfer Protocol (SMTP) address of
the account to use for Exchange impersonation. If the primary SMTP
address is supplied, it will cost an extra Active Directory directory service
lookup in order to obtain the SID of the user. We recommend that you use
the SID or UPN if they are available.

SmtpAddress
Represents the Simple Mail Transfer Protocol (SMTP) address of the
account to use for Exchange Impersonation. If the SMTP address is
supplied, it will cost an extra Active Directory lookup in order to obtain the
SID of the user. We recommend that you use the SID or UPN if they are
available.

Parent elements

Element Description

ExchangeImpersonation Used in the SOAP header of a request. When this element is present,
the caller is trying to impersonate the account that is contained within
the ExchangeImpersonation element.
The following is the XPath expression to this element:
/ExchangeImpersonation

Remarks
The calling account must have the ms-exch-impersonation right on the Client Access
server and the ms-exch-MayImpersonate right on either the mailbox database that
contains the mailbox to impersonate or the Active Directory user or contact object.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
Server-to-server authorization in EWS
ConnectionFailureCause
Article • 03/29/2023 • 2 minutes to read

The ConnectionFailureCause element specifies the reason for a disconnection from a


telephone call.

XML

<ConnectionFailureCause>None or UserBusy or NoAnswer or Unavailable or


Other</ConnectionFailureCause>

ConnectionFailureCauseType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

PhoneCallInformation
Specifies the state information for a telephone call.

Text value
The following table lists the possible values for the ConnectionFailureCause element.

ConnectionFailureCause element values

Value Description

None Call state is not disconnected or the disconnect reason is not known.
Value Description

UserBusy The called party line was busy.

NoAnswer The called party did not answer.

Unavailable The called party number was not available.

Other Catch-all for other disconnect reasons.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ConnectionStatus
Article • 03/29/2023 • 2 minutes to read

The ConnectionStatus element provides a text description of the status of a streaming


subscription.

XML

<ConnectionStatus>OK or Closed</ConnectionStatus>

ConnectionStatusType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

GetStreamingEventsResponseMessage Contains the status and result of a single


GetStreamingEvents operation request.

Text value
A text value is required. The following are the possible text values for this element:

OK

Closed
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetStreamingEvents operation

EWS XML elements in Exchange


ConnectionTimeout
Article • 03/29/2023 • 2 minutes to read

The ConnectionTimeout element specifies the number of minutes to keep a connection


open.

GetStreamingEvents operation

ConnectionTimeout

XML

<ConnectionTimeout/>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

GetStreamingEvents
Defines a request to get event notifications from a streaming connection.

Text value
The text value represents an integer that describes the maximum number of minutes to
keep a streaming connection open. The value must be between 1 and 30, inclusive.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
GetStreamingEvents operation

EWS XML elements in Exchange


Constant
Article • 03/29/2023 • 2 minutes to read

The Constant element identifies a constant value in a restriction.

XML

<Constant Value="" />

ConstantValueType

Attributes and elements


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

Attributes

Attribute Description

Value
Specifies the value to compare in the restriction.

Child elements
None.

Parent elements

Element Description

Contains
Represents a search expression that determines whether a given property
contains the supplied constant string value.

FieldURIOrConstant Represents either a property or a constant value to be used when


comparing with another property.

Remarks
The string value in the Value attribute must be coercible into the type you are trying to
compare against. For example, if you are comparing a date/time property against a
constant value, the string value must represent a date/time.
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Contact
Article • 03/29/2023 • 6 minutes to read

The Contact element represents a contact item in the Exchange store.

XML

<Contact>

<MimeContent/>

<ItemId/>

<ParentFolderId/>

<ItemClass/>

<Subject/>

<Sensitivity/>

<Body/>

<Attachments/>

<DateTimeReceived/>

<Size/>

<Categories/>

<Importance/>

<InReplyTo/>

<IsSubmitted/>

<IsDraft/>

<IsFromMe/>

<IsResend/>

<IsUnmodified/>

<InternetMessageHeaders/>

<DateTimeSent/>

<DateTimeCreated/>

<ResponseObjects/>

<ReminderDueBy/>

<ReminderIsSet/>

<ReminderMinutesBeforeStart/>

<DisplayCc/>

<DisplayTo/>

<HasAttachments/>

<ExtendedProperty/>

<Culture/>

<EffectiveRights/>

<LastModifiedName/>

<LastModifiedTime/>

<IsAssociated/>

<WebClientReadFormQueryString/>

<WebClientEditFormQueryString/>

<ConversationId/>

<UniqueBody/>

<FileAs/>

<FileAsMapping/>

<DisplayName/>

<GivenName/>

<Initials/>

<MiddleName/>

<Nickname/>

<CompleteName/>

<CompanyName/>

<EmailAddresses/>

<PhysicalAddresses/>
<PhoneNumbers/>

<AssistantName/>

<Birthday/>

<BusinessHomePage/>

<Children/>

<Companies/>

<ContactSource/>

<Department/>

<Generation/>

<ImAddresses/>

<JobTitle/>

<Manager/>

<Mileage/>

<OfficeLocation/>

<PostalAddressIndex/>

<Profession/>

<SpouseName/>

<Surname/>

<WeddingAnniversary/>

<HasPicture/>

<PhoneticFullName/>

<PhoneticFirstName/>
<PhoneticLastName/>

<Alias/>

<Notes/>

<Photo/>

<UserSMIMECertificate/>

<MSExchangeCertificate/>

<DirectoryId/>

<ManagerMailbox/>

<DirectReports/>

</Contact>

ContactItemType

Attributes and elements


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

Attributes
None.

Child elements
Element name Description

MimeContent
Contains the native Multipurpose Internet Mail Extensions
(MIME) stream of an object that is represented in base64Binary
format.

ItemId
Contains the unique identifier and change key of an item in the
Exchange store.

ParentFolderId Represents the identifier of the parent folder that contains the
item or folder.

ItemClass
Represents the message class of an item.

Subject
Represents the subject for Exchange store items and response
objects.

Sensitivity
Indicates the sensitivity level of an item.

Body
Represents the actual body content of a message.

Attachments
Contains the items or files that are attached to an item in the
Exchange store.

DateTimeReceived
Represents the date and time that an item in a mailbox was
received.

Size
Represents the size in bytes of an item. This property is read-
only.

Categories
Represents a collection of strings that identify to which
categories an item in the mailbox belongs.

Importance
Describes the importance of an item.

InReplyTo
Represents the identifier of the item to which this item is a
reply.

IsSubmitted
Indicates whether an item has been submitted to the Outbox
default folder.

IsDraft
Represents whether an item has not yet been sent.

IsFromMe
Indicates whether a user sent an item to himself or herself.

IsResend
Indicates whether the item had previously been sent.

IsUnmodified
Indicates whether the item has been modified.

InternetMessageHeaders
Represents the collection of all Internet message headers that
are contained in an item in a mailbox.
Element name Description

DateTimeSent
Represents the date and time that an item in a mailbox was
sent.

DateTimeCreated
Represents the date and time that a given item in the mailbox
was created.

ResponseObjects
Contains a collection of all the response objects that are
associated with an item in the Exchange store.

ReminderDueBy
Represents the date and time when the event occurs. This is
used by the ReminderMinutesBeforeStart element to
determine when the reminder is displayed.

ReminderIsSet
Indicates whether a reminder has been set for an item in the
Exchange store.

ReminderMinutesBeforeStart
Represents the number of minutes before an event when a
reminder is displayed.

DisplayCc
Represents the display string that is used for the contents of
the Cc line. This is the concatenated string of all Cc recipient
display names.

DisplayTo
Represents the display string that is used for the contents of
the To line. This is the concatenated string of all To recipient
display names.

HasAttachments
Represents a property that is set to true if an item has at least
one visible attachment. This property is read-only.

ExtendedProperty
Identifies extended properties on folders and items.

Culture
Represents the culture for a given item in a mailbox.

EffectiveRights
Contains the client's rights based on the permission settings
for the item or folder. This element is read-only.

LastModifiedName
Contains the display name of the last user to modify an item.

LastModifiedTime
Indicates when an item was last modified.

IsAssociated
Indicates whether the item is associated with a folder.

WebClientReadFormQueryString Represents a URL to concatenate to the Microsoft Office


Outlook Web App endpoint to read an item in Outlook Web
App.

WebClientEditFormQueryString
Represents a URL to concatenate to the Outlook Web App
endpoint to edit an item in Outlook Web App.
Element name Description

ConversationId
Contains the identifier of an item or conversation.

UniqueBody
Represents an HTML fragment or plain text which represents
the unique body of this conversation.

FileAs
Represents how a contact is filed in the Contacts folder.

FileAsMapping
Defines how to construct what is displayed for a contact.

DisplayName (string)
Defines the display name of a contact.

GivenName
Contains a contact's given name.

Initials
Represents the initials of a contact.

MiddleName
Represents the middle name of a contact.

Nickname
Represents the nickname of a contact.

CompleteName
Represents the complete name of a contact.

CompanyName
Represents the company name that is associated with a
contact.

EmailAddresses
Represents a collection of e-mail addresses for a contact.

PhysicalAddresses
Contains a collection of physical addresses that are associated
with a contact.

PhoneNumbers
Represents a collection of telephone numbers for a contact.

AssistantName
Represents an assistant to a contact.

Birthday
Represents the birth date of a contact.

BusinessHomePage
Represents the Home page (Web address) for the contact.

Children
Contains the names of a contact's children.

Companies
Represents the collection of companies that are associated
with a contact.

ContactSource
Describes whether the contact is located in the Exchange store
or the Active Directory directory service.

Department
Represents the contact's department at work.

Generation
Represents a generational abbreviation that follows the full
name of a contact.
Element name Description

ImAddresses
Represents a collection of instant messaging addresses for a
contact.

JobTitle
Represents the job title of a contact.

Manager Represents a contact's manager.

Mileage
Represents mileage for a contact item.

OfficeLocation
Represents the office location of a contact.

PostalAddressIndex
Represents the display types for physical addresses.

Profession
Represents the profession of a contact.

SpouseName
Represents the name of a contact's spouse/partner.

Surname
Represents the surname of a contact.

WeddingAnniversary
Contains the wedding anniversary of a contact.

HasPicture
Indicates whether the contact item has a file attachment that
represents the contact's picture.

PhoneticFullName
Contains the full name of a contact, including the first and last
name, spelled phonetically.

PhoneticFirstName
Contains the first name of a contact, spelled phonetically.

PhoneticLastName Contains the last name of a contact, spelled phonetically.

Alias
Contains the email alias of a contact.

Notes (Contact)
Contains supplementary contact information.

Photo
Contains a value that encodes the photo of a contact.

UserSMIMECertificate
Contains a value that encodes the SMIME certificate of a
contact.

MSExchangeCertificate
Contains a value that encodes the Microsoft Exchange
certificate of a contact.

DirectoryId
Contains the directory ID of a contact.

ManagerMailbox
Contains SMTP information that identifies the manager
mailbox of the contact.

DirectReports
Contains SMTP information that identifies the direct reports of
a contact.
Parent elements

Element name Description

AdjacentMeetings
Describes all calendar items that are adjacent to a meeting
time.

AppendToItemField Identifies data to append to a single property of an item or


folder during an UpdateItem operation.

ConflictingMeetings Identifies all items that conflict with a meeting time

Create (ItemSync)
Identifies a single folder to create in the local client store.

ItemAttachment
Represents an Exchange item that is attached to another
Exchange item.

Items
Contains an array of items.

Items Contains an array of items to create in the folder that is


(NonEmptyArrayOfAllItemsType) identified by the ParentFolderId (TargetFolderIdType) element.

Resolution
Contains a single resolved entity.

SetItemField
Represents an update to a single property of an item in an
UpdateItem operation.

Update (ItemSync)
Identifies a single item to update in the local client store.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema


Element Example

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)

Updating Contacts

Deleting Contacts
Contact (ContactType)
Article • 03/29/2023 • 2 minutes to read

The Contact element specifies a contact in the Unified Contact Store.

XML

<Contact>

<PersonName></PersonName>

<BusinessName></BusinessName>

<PhoneNumbers></PhoneNumbers>

<Urls></Urls>

<EmailAddresses></EmailAddresses>

<Addresses></Addesses> <ContactString></ContactString

</Contact>

ContactType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

PersonName
Specifies the name of an individual.

BusinessName
Specifies the name of a business.

PhoneNumbers
Represents a collection of telephone numbers for a
contact.

Urls
Specifies an array of URLs for a persona.

EmailAddresses Specifies an array of extracted email addresses.


(ArrayOfExtractedEmailAddresses)

Addresses (ArrayOfAddressesType)
Specifies an array of Address elements.

ContactString
Specifies the display name of a contact.
Parent elements

Element Description

Contacts (ArrayOfContactsType)
Specifies an array of contacts.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ContactId
Article • 03/29/2023 • 2 minutes to read

The ContactId element uniquely identifies a contact.

XML

<ContactId Id="" ChangeKey=""/>

ItemIdType

Attributes and elements


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

Attributes

Attribute Description

Id The text value of the Id attribute is the identifier of the contact item.

ChangeKey The text value of the ChangeKey attribute is the change key of the contact item.

Child elements
None.

Parent elements
AddImContactToGroup | RemoveContactFromImList | RemoveImContactFromGroup

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file types.xsd

Can be empty false


ContactIds
Article • 03/29/2023 • 2 minutes to read

The ContactIds element contains an array of contact item identifiers.

XML

<ContactIds>

<ItemId/>

<OccurrenceItemId/>

<RecurringMasterItemId/>

<RecurringMasterItemIdRanges/>

</ContactIds>

NonEmptyArrayOfBaseItemIdsType

Attributes and elements


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

Attributes
None.

Child elements
ItemId | OccurrenceItemId | RecurringMasterItemId | RecurringMasterItemIdRanges

Parent elements
GetImItems

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file types.xsd

Can be empty false


Contacts
Article • 03/29/2023 • 2 minutes to read

The Contacts element contains a list of contacts that are associated with a task.

XML

<Contacts>

<String/>

</Contacts>

ArrayOfStringsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

String
Represents a comma-separated list of contact names.

Parent elements

Element Description

Task
Represents a task in the Exchange store.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Contacts (ArrayOfContactsType)
Article • 03/29/2023 • 2 minutes to read

The Contacts element specifies an array of contacts.

XML

<Contacts>

<Contact></Contact>

</Contacts>

ArrayOfContactsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Contact (ContactType)
Specifies a contact in the Unified Contact Store.

Parent elements

Element Description

EntityExtractionResult
Specifies the EntityExtractionResult property of an item.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ContactsFolder
Article • 03/29/2023 • 2 minutes to read

The ContactsFolder element represents a contacts folder that is contained in a mailbox.

XML

<ContactsFolder>

<FolderId/>

<ParentFolderId/>

<FolderClass/>

<DisplayName/>

<TotalCount/>

<ChildFolderCount/>

<ExtendedProperty/>

<ManagedFolderInformation/>

<EffectiveRights/>

<SharingEffectiveRights/>

<PermissionSet/>

</ContactsFolder>

ContactsFolderType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier and change key of a contacts folder.

ParentFolderId Represents the identifier of the parent folder that contains the
contacts folder.

FolderClass
Represents the folder class for a contacts folder.

DisplayName (string)
Contains the display name of a contacts folder.

TotalCount
Represents the total count of items within a contacts folder.
Element Description

ChildFolderCount
Represents the number of child folders that are contained within
a contacts folder. This property is read-only.

ExtendedProperty
Identifies extended properties on contacts folders.

ManagedFolderInformation
Contains information about a managed folder.

EffectiveRights
Contains the client's rights based on the permission settings for
the item or folder.

SharingEffectiveRights Indicates the permissions that the user has for the contact data
(PermissionReadAccessType)
that is being shared.

PermissionSet Contains all the configured permissions for a folder.


(PermissionSetType)

Parent elements

Element Description

AppendToFolderField Specifies data to append to a folder property during an UpdateFolder


operation.

Create (FolderSync)
Identifies a single folder to create in the local client store.

SetFolderField
Represents an update to a single property on a folder in an UpdateFolder
operation.

Update (FolderSync)
Identifies a single folder to update in the local client store.

Folders
Contains an array of folders that are used in folder operations.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ContactsFolderPermissionLevel
Article • 03/29/2023 • 2 minutes to read

The ContactsFolderPermissionLevel element contains the permissions for the default


Contacts folder. This element was introduced in Microsoft Exchange Server 2007 Service
Pack 1 (SP1).

XML

<ContactsFolderPermissionLevel>

None or Editor or Reviewer or Author or Custom

</ContactsFolderPermissionLevel>

DelegateFolderPermissionLevelType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

DelegatePermissions Contains the delegate permission level settings for a user. This element
was introduced in Exchange 2007 SP1.

Text value
The following table lists the text values that represent the permission levels.

Permission level text values


Permission level Description

None The delegate user has no access permissions to the Contacts folder.

Reviewer The delegate user can read items in the Contacts folder.

Author The delegate user can read and create items in the Contacts folder.

Editor The delegate user can read, create, and modify items in the Contacts folder.

Custom The delegate user has custom access permissions to the Contacts folder.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
AddDelegate operation

UpdateDelegate operation

EWS XML elements in Exchange

Adding Delegates
ContactSource
Article • 03/29/2023 • 2 minutes to read

The ContactSource element describes whether the contact is located in the Exchange
store or Active Directory Domain Services (AD DS).

XML

<ContactSource/>

ContactSourceType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents a contact item in the Exchange store.

DistributionList
Represents a distribution list.

Text value
The following are the possible values for this element:

ActiveDirectory

Store
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
ContactString
Article • 03/29/2023 • 2 minutes to read

The ContactString element specifies the display name of a contact.

XML

<ContactString></ContactString>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact (ContactType)
Specifies a contact in the Unified Contact Store.

Text value
The text value of the ContactString element is the string value that specifies the display
name.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ContactsView
Article • 03/29/2023 • 2 minutes to read

The ContactsView element defines a search for contact items based on alphabetical
display names.

FindItem

ContactsView

XML

<ContactsView MaxEntriesReturned="" InitialName="" FinalName="" />

ContactsViewType

Attributes and elements


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

Attributes

Attribute Description

MaxEntriesReturned Describes the maximum number of results to return in the FindItem


response.

InitialName
Defines the first name in the contacts list to return in the response. If the
specified initial name is not in the contacts list, the next alphabetical name
as defined by the cultural context will be returned, except if the next name
comes after FinalName. If the InitialName attribute is omitted, the
response will contain a list of contacts that starts with the first name in the
contact list. This attribute is optional.

FinalName
Defines the last name in the contacts list to return in the response. If the
FinalName attribute is omitted, the response will contain all subsequent
contacts in the specified sort order. If the specified final name is not in the
contacts list, the next alphabetical name as defined by the cultural context
will be excluded.

For example, if FinalName="Name", but Name is not in the contacts list,


contacts that have display names of Name1 or NAME will not be included.

This attribute is optional.


Child elements
None.

Parent elements

Element Description

FindItem
Defines a request to find items in a mailbox.

The following is the XPath expression to this element:


/FindItem

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

Example
The following example of a request demonstrates how to find the first three contacts
starting with the contact that has the display name of Kelly Rollin.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<FindItem Traversal="Shallow"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="contacts:DisplayName"/>

</t:AdditionalProperties>

</ItemShape>

<ContactsView MaxEntriesReturned="3" InitialName="Kelly Rollin" />

<SortOrder>

<t:FieldOrder Order="Descending">

<t:FieldURI FieldURI="contacts:DisplayName"/>

</t:FieldOrder>

</SortOrder>

<ParentFolderIds>
<t:DistinguishedFolderId Id="contacts"/>

</ParentFolderIds>

</FindItem>

</soap:Body>

</soap:Envelope>

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindItem operation
Finding Items
Contains
Article • 03/29/2023 • 2 minutes to read

The Contains element represents a search expression that determines whether a given
property contains the supplied constant string value.

XML

<Contains ContainmentMode="" ContainmentComparison="">

<FieldURI/>

<Constant/>

</Contains>

XML

<Contains ContainmentMode="" ContainmentComparison="">

<ExtendedFieldURI/>

<Constant/>

</Contains>

XML

<Contains ContainmentMode="" ContainmentComparison="">

<IndexedFieldURI/>

<Constant/>

</Contains>

ContainsExpressionType

Attributes and elements


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

Attributes

Attribute Description

ContainmentMode
Identifies the boundaries of a search.

ContainmentComparison
Determines whether the search ignores cases and spaces.

ContainmentMode attribute values


Value Description

FullString The comparison is between the full string and the constant. The property value
and the supplied constant are precisely the same.

Prefixed The comparison is between the string prefix and the constant.

Substring The comparison is between a substring of the string and the constant.

PrefixOnWords The comparison is between a prefix on individual words in the string and the
constant.

ExactPhrase The comparison is between an exact phrase in the string and the constant.

ContainmentComparison attribute values

Value Description

Exact The comparison must be exact.

IgnoreCase The comparison ignores casing.

IgnoreNonSpacingCharacters The comparison ignores non-spacing characters.

Loose To be removed.

IgnoreCaseAndNonSpacingCharacters The comparison ignores casing and non-spacing


characters.

LooseAndIgnoreCase To be removed.

LooseAndIgnoreNonSpace To be removed.

LooseAndIgnoreCaseAndIgnoreNonSpace To be removed.

Child elements

Element Description

FieldURI
Identifies frequently referenced properties by URI.

IndexedFieldURI
Identifies individual members of a dictionary.

ExtendedFieldURI
Identifies MAPI properties.

Constant
Identifies a constant value in a restriction.

Parent elements
Element Description

Restriction Represents the restriction or query that is used to filter items or folders in
FindItem/FindFolder and search folder operations.

Not
Represents a search expression that negates the Boolean value of the search
expression it contains.

And
Represents a search expression that allows you to perform a Boolean And operation
between two or more search expressions. The result of the And operation is true if all
of the search expressions contained within the And are true.

Or
Represents a search expression that performs a logical OR on the search expression
it contains. The Or element will return true if any of its children return true.

Remarks
The attributes are used to determine how the elements are matched.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ContainsBodyStrings
Article • 03/29/2023 • 2 minutes to read

The ContainsBodyStrings element indicates the strings that must appear in the body of
incoming messages in order for the condition or exception to apply.

XML

<ContainsBodyStrings>

<String/>

</ContainsBodyStrings>

ArrayOfStringsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

String
Represents a string that must appear in the body of incoming messages in order for
the condition or exception to apply.

Parent elements

Element Description

Conditions Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions Represents the exceptions that represent all the available rule exception conditions
for an Inbox rule.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
ContainsHeaderStrings
Article • 03/29/2023 • 2 minutes to read

The ContainsHeaderStrings element indicates the strings that must appear in the
headers of incoming messages in order for the condition or exception to apply.

XML

<ContainsHeaderStrings>

<String/>

</ContainsHeaderStrings>

ArrayOfStringsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

String
Represents a string that must appear in message headers in order for the condition or
exception to apply.

Parent elements

Element Description

Conditions Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions Represents the exceptions that represent all the available rule exception conditions
for an Inbox rule.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
ContainsRecipientStrings
Article • 03/29/2023 • 2 minutes to read

The ContainsRecipientStrings element indicates the strings that must appear in either
the ToRecipients or CcRecipients properties of incoming messages in order for the
condition or exception to apply.

XML

<ContainsRecipientStrings>

<String/>

</ContainsRecipientStrings>

ArrayOfStringsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

String
Represents a string that must appear in either the ToRecipients or CcRecipients
properties of incoming messages in order for the condition or exception to apply.

Parent elements

Element Description

Conditions Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions Represents the exceptions that represent all the available rule exception conditions
for an Inbox rule.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
ContainsSenderStrings
Article • 03/29/2023 • 2 minutes to read

The ContainsSenderStrings element indicates the strings that must appear in the From
property of incoming messages in order for the condition or exception to apply.

XML

<ContainsSenderStrings>

<String/>

</ContainsSenderStrings>

ArrayOfStringsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

String
Represents a string that must appear in the From property of incoming messages in
order for the condition or exception to apply.

Parent elements

Element Description

Conditions Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions Represents the exceptions that represent all the available rule exception conditions
for an Inbox rule.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
ContainsSubjectOrBodyStrings
Article • 03/29/2023 • 2 minutes to read

The ContainsSubjectOrBodyStrings element indicates the strings that must appear in


either the body or the subject of incoming messages in order for the condition or
exception to apply.

XML

<ContainsSubjectOrBodyStrings>

<String/>

</ContainsSubjectOrBodyStrings>

ArrayOfStringsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

String
Represents a string that must appear in either the body or the subject of incoming
messages in order for the condition or exception to apply.

Parent elements

Element Description

Conditions Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions Represents the exceptions that represent all the available rule exception conditions
for an Inbox rule.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
ContainsSubjectStrings
Article • 03/29/2023 • 2 minutes to read

The ContainsSubjectStrings element indicates the strings that must appear in the
subject of incoming messages in order for the condition or exception to apply.

XML

<ContainsSubjectStrings>

<String/>

</ContainsSubjectStrings>

ArrayOfStringsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

String
Represents a string that must appear in the subject of incoming messages in order for
the condition or exception to apply.

Parent elements

Element Description

Conditions Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions Represents the exceptions that represent all the available rule exception conditions
for an Inbox rule.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
Content
Article • 03/29/2023 • 2 minutes to read

The Content element contains the Base64-encoded contents of a file attachment.

XML

<Content/>

Base64Binary

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

FileAttachment
Represents a file t is thattached to an item in the Exchange store.

Text value
The string value represents the Base64-encoded binary data of the file attachment.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
ContentExpiryDate
Article • 03/29/2023 • 2 minutes to read

The ContentExpiryDate element specifies the expiration date of the content.

XML

<ContentExpiryDate></ContentExpiryDate>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

RightsManagementLicenseData
Specifies information about the rights management license.

Text value
The text value of the ContentExpiryDate element is a string that specifies the expiration
date of the content.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ContentId
Article • 03/29/2023 • 2 minutes to read

The ContentId element represents an identifier for the contents of an attachment.


ContentId can be set to any string value. Applications can use ContentId to implement
their own identification mechanisms.

XML

<ContentId/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ItemAttachment
Represents an Exchange item that is attached to another Exchange item.

FileAttachment
Represents a file that is attached to an item in the Exchange store.

Text value
The string value represents the identifier to the contents of an attachment.

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

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
ContentLocation
Article • 03/29/2023 • 2 minutes to read

The ContentLocation element contains the Uniform Resource Identifier (URI) that
corresponds to the location of the content of an attachment.

XML

<ContentLocation/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ItemAttachment
Represents an Exchange item that is attached to another Exchange item.

FileAttachment
Represents a file that is attached to an item in the Exchange store.

Text value
The text value is a string value that represents a URI.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
ContentOwner
Article • 03/29/2023 • 2 minutes to read

The ContentOwner element specifies the name of the content owner.

XML

<ContentOwner></ContentOwner>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

RightsManagementLicenseData
Specifies information about the rights management license.

Text value
The text value of the ContentOwner element is a string that specifies the expiration date
of the content.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ContentType
Article • 03/29/2023 • 2 minutes to read

The ContentType element describes the Multipurpose Internet Mail Extensions (MIME)
type of the attachment content.

XML

<ContentType/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ItemAttachment
Represents an Exchange item that is attached to another Exchange item.

FileAttachment
Represents a file that is attached to an item in the Exchange store.

Text value
The text value is a string value that represents the content type of the attachment.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
ContextFolderId
Article • 03/29/2023 • 2 minutes to read

The ContextFolderId element indicates the folder that is targeted for actions that use
folders. This element must be present when copying, deleting, moving, and setting read
state on conversation items in a target folder.

ApplyConversationAction
ConversationActions
ConversationAction
ContextFolderId

XML

<ContextFolderId>

<FolderId/>

</ContextFolderId>

XML

<ContextFolderId>

<DistinguishedFolderId/>

</ContextFolderId>

TargetFolderIdType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier and change key of the context folder.

DistinguishedFolderId
Identifies folders that can be referenced by name.
Parent elements

Element Description

ConversationAction
Contains a single action to be applied to a single conversation.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
ApplyConversationAction operation
Conversation
(ConversationRequestType)
Article • 03/29/2023 • 2 minutes to read

The Conversation element represents a single conversation returned in a


GetConversationItems response.

XML

<Conversation>

<ConversationId/>

<SyncState/>

</Conversation>

Attributes and elements


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

Attributes
None.

Child elements
ConversationId | SyncState (base64Binary)

Parent elements
Conversations

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file types.xsd

Can be empty false


Conversation
(ConversationResponseType)
Article • 03/29/2023 • 2 minutes to read

The Conversation (GetConversationItemsResponseMessageType) element represents a


single conversation returned in a GetConversationItems response.

XML

<Conversation />

ConversationResponseType

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

Attributes

Attribute Description

Value Description

Child elements

Element Description

Parent elements

Element Description

Remarks
This element was introduced in Exchange Server 2013.

Example
Microsoft.Win32.RegistryKey#4

Element information
Element information

Namespace

Schema name

Validation file

Can be empty
Conversation (ConversationType)
Article • 03/29/2023 • 2 minutes to read

The Conversation element represents a single conversation.

FindConversationResponse

Conversations

Conversation (ConversationType)

XML

<Conversation>

<ConversationId/>

<ConversationTopic/>
<UniqueRecipients/>

<GlobalUniqueRecipients/>

<UniqueUnreadSenders/>

<GlobalUniqueUnreadSenders/>

<UniqueSenders/>

<GlobalUniqueSenders/>

<LastDeliveryTime/>

<GlobalLastDeliveryTime/>

<Categories/>

<GlobalCategories/>

<FlagStatus/>

<GlobalFlagStatus/>

<HasAttachments/>

<GlobalHasAttachments/>

<MessageCount/>

<GlobalMessageCount/>

<UnreadCount/>

<GlobalUnreadCount/>
<Size/> <GlobalSize/>

<ItemClasses/>

<GlobalItemClasses/>
<Importance/>

<GlobalImportance/>

<ItemIds/>

<GlobalItemIds/>

</Conversation>

ConversationType

Attributes and elements


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

Child elements

Element Description

ConversationId
Represents the identifier of a conversation.

ConversationTopic
Represents the conversation topic. This element is read-only.

UniqueRecipients
Contains the recipient list of a conversation aggregated from a
particular folder. This element is read-only.

GlobalUniqueRecipients
Contains the recipient list of a conversation aggregated across a
mailbox. This element is read-only.

UniqueUnreadSenders
Contains a list of all the people who have sent messages that are
currently unread in this conversation in the current folder. This
element is read-only.

GlobalUniqueUnreadSenders Contains a list of all the people who have sent messages that are
currently unread in this conversation across all folders in the
mailbox.

UniqueSenders
Contains a list of all the senders of conversation items in the
current folder. This element is read-only.

GlobalUniqueSenders
Contains a list of all the senders of conversation items in the
mailbox.

LastDeliveryTime
Contains the delivery time of the message that was last received in
this conversation in the current folder.

GlobalLastDeliveryTime
Contains the delivery time of the message that was last received in
this conversation across all folders in the mailbox.

Categories
Contains a collection of strings that identify the categories that are
applied to all conversation items in the current folder.

GlobalCategories
Contains the category list for all conversation items in a mailbox.

FlagStatus
Contains the aggregated flag status for conversation items in the
current folder.

GlobalFlagStatus
Contains the aggregated flag status for all conversation items in a
mailbox.
Element Description

HasAttachments
Contains a value that indicates whether at least one conversation
item in the current folder has an attachment.

GlobalHasAttachments
Contains a value that indicates whether at least one conversation
item in a mailbox has an attachment.

MessageCount
Contains the total number of conversation items in the current
folder.

GlobalMessageCount
Contains the total number of conversation items in the mailbox.

UnreadCount
Contains the count of unread conversation items within a folder.

GlobalUnreadCount
Contains a count of all the unread conversation items in the
mailbox.

Size
Contains the conversation size calculated from the size of all
conversation items in the current folder.

GlobalSize
Contains the size of the conversation calculated from the size of
all conversation items in the mailbox.

ItemClasses Contains a list of item classes that represents all the item classes
(ArrayOfItemClassType)
of the conversation items in the current folder.

GlobalItemClasses
Contains a list of item classes that represents all the item classes
of the conversation items in a mailbox.

Importance
Contains the aggregated importance for all conversation items in
the current folder.

GlobalImportance
Contains the aggregated importance for all conversation items in
a mailbox.

ItemIds
Contains the collection of item identifiers for all conversation
items in the current folder.

GlobalItemIds
Contains the collection of item identifiers for all conversation
items in a mailbox.

Parent elements

Element Description

Conversations Contains an array of conversations that are returned in the FindConversation


response.
Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindConversation operation

ApplyConversationAction operation

Conversations in EWS
ConversationAction
Article • 03/29/2023 • 2 minutes to read

The ConversationAction element contains a single action to be applied to a single


conversation.

ApplyConversationAction

ConversationActions

ConversationAction

XML

<ConversationAction>

<Action/>

<ConversationId/>

<ContextFolderId/>

<ConversationLastSyncTime/>

<ProcessRightAway/>

<DestinationFolderId/>

<Categories/>

<EnableAlwaysDelete/>

<IsRead/>

<DeleteType/>

</ConversationAction>

ConversationActionType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Action Contains the action to perform on the conversation specified by


(ConversationActionTypeType) the ConversationId element. This element must be present.
Element Description

ConversationId
Contains the identifier of the conversation that will have the
action specified by the Action (ConversationActionTypeType)
element applied to items in the conversation. This element must
be present.

ContextFolderId
Indicates the folder that is targeted for actions that use folders.
This element must be present when copying, deleting, moving,
and setting read state on conversation items in a target folder.

ConversationLastSyncTime
Contains the date and time that a conversation was last
synchronized. This element must be present when trying to
delete all items in a conversation that were received up to the
specified time.

ProcessRightAway
Indicates whether the response is sent as soon as the action
starts processing on the server or whether the response is sent
after the action has completed. This element must be present for
the response to be sent asynchronous to the requested action.

DestinationFolderId
Indicates the destination folder for copy and move actions.

Categories
Contains a collection of strings that identify the categories to
which items in a conversation belong.

EnableAlwaysDelete
Specifies a flag that enables deletion for all new items in a
conversation.

IsRead
Indicates whether a message has been read.

DeleteType
Indicates how items in a conversation are deleted.

Parent elements

Element Description

ConversationActions
Contains a collection of conversations and the actions to apply to them.

Text value
ConversationAction element text values

Value Description

AlwaysCategorize Always categorize the conversation.


Value Description

AlwaysDelete Always delete the conversation.

AlwaysMove Always move the conversation.

Delete Delete the conversation.

Move Move the conversation.

Copy Copy the conversation.

SetReadState Set the read state of the conversation.

SetRetentionPolicy Set the retention policy for the conversation.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
ApplyConversationAction operation

EWS XML elements in Exchange


ConversationActions
Article • 03/29/2023 • 2 minutes to read

The ConversationActions element contains a collection of conversations and the actions


to apply to them.

ApplyConversationAction

ConversationActions

XML

<ConversationActions>

<ConversationAction/>

</ConversationActions>

NonEmptyArrayOfApplyConversationActionType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ConversationAction
Contains a single action to be applied to a single conversation.

Parent elements

Element Description

ApplyConversationAction
Defines a request to apply actions to items in a conversation.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
ApplyConversationAction operation
ConversationId
Article • 03/29/2023 • 2 minutes to read

The ConversationId element contains the identifier of an item or conversation.

XML

<ConversationId Id="" ChangeKey="" />

ItemIdType

Attributes and elements


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

Attributes

Attribute Description

Id
Identifies a specific item in the Exchange store.

ChangeKey Identifies a specific version of an item. A ChangeKey is required for the following
scenarios:

- The UpdateItem element requires a ChangeKey if the ConflictResolution attribute


is set to AutoResolve. AutoResolve is a default value. If the ChangeKey attribute is
not included, the response will return a ResponseCode value equal to
ErrorChangeKeyRequired.

- SendItem, DeleteItem, and DeleteFolder elements require a ChangeKey to test


whether the attempted operation will act upon the most recent version of an item.
If the ChangeKey attribute is not included in the ItemId or if the ChangeKey is
empty, the response will return a ResponseCode value equal to ErrorStaleObject.

Child elements
None.

Parent elements

Element Description
Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

ConversationAction
Represents a single action to be applied to a single
conversation.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Message
Represents an Exchange e-mail message.

PostItem
Represents a post item in the Exchange store.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

Conversation Represents a single conversation.


(ConversationType)

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types
Element Example

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
FindConversation operation
EWS XML elements in Exchange
ConversationIndex
Article • 03/29/2023 • 2 minutes to read

The ConversationIndex element contains a binary ID that represents the thread to which
this message belongs.

XML

<ConversationIndex/>

Base64Binary

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

RemoveItem
Removes an item from the Exchange store.

Message
Represents an Exchange e-mail message.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

AcceptItem
Represents an Accept reply to a meeting request.

TentativelyAcceptItem Represents a tentatively accepted reply to a meeting request.


Element Description

DeclineItem
Represents a Decline reply to a meeting request.

ReplyToItem
Contains a reply to the creator of an item in the Exchange store.

ReplyAllToItem
Contains a reply to all identified recipients of an item in the Exchange
store.

ForwardItem
Contains an Exchange store item to forward to recipients.

CancelCalendarItem
Represents the response object that is used to cancel a meeting.

PostItem
Represents a post item in the Exchange store. This element was
introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

Text value
The text value represents a binary identifier in Base64Binary format.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
Exchange server that has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ConversationIndex (string)
Article • 03/29/2023 • 2 minutes to read

The ConversationIndex element specifies the location of a node in a conversation.

XML

<ConversationIndex></ConversationIndex>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ConversationNode
Specifies a node in a conversation.

Text value
String value that represents the index of the conversation.

Remarks
This element is required.

The ConversationIndex element is applicable for clients that target Exchange Online
and versions of Microsoft Exchange Server starting with Exchange 2013.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ConversationLastSyncTime
Article • 03/29/2023 • 2 minutes to read

The ConversationLastSyncTime element contains the date and time that a conversation
was last synchronized. This element must be present when trying to delete all items in a
conversation that were received up to the specified time.

ApplyConversationAction

ConversationActions

ConversationAction

ConversationLastSyncTime

XML

<ConversationLastSyncTime/>

xs:dateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ConversationAction
Contains a single action to be applied to a single conversation.

Text value
The text value of the ConversationLastSyncTime indicates the last time the conversation
was synchronized.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
ApplyConversationAction operation

EWS XML elements in Exchange


ConversationNode
Article • 03/29/2023 • 2 minutes to read

The ConversationNode element specifies a node in a conversation.

XML

<ConversationNode>

<InternetMessageId></InternetMessageId>

<ParentInternetMessageId></ParentInternetMessageId>

<Items></Items>

</ConversationNode>

ConversationNodeType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

InternetMessageId
Represents the Internet message identifier of an item.

ParentInternetMessageId
Specifies the identifier of the parent Internet message.

ItemIds (NonEmptyArrayOfItemIdsType)
Specifies all the items in the conversation node.

Parent elements

Element Description

ConversationNodes
Specifies a collection of conversation nodes.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ConversationNodes
Article • 03/29/2023 • 2 minutes to read

The ConversationNodes element specifies a collection of conversation nodes.

XML

<ConversationNodes>

<ConversationNode></ConversationNode>

</ConversationNodes>

ArrayOfConversationNodesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ConversationNode
Specifies a node in a conversation.

Parent elements

Element Description

Conversation Represents a single conversation returned in a


(ConversationResponseType)
GetConversationItems response.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Conversations
Article • 03/29/2023 • 2 minutes to read

The Conversations element contains an array of conversations that are returned in the
FindConversation response.

FindConversationResponse

Conversations

XML

<Conversations>

<Conversation/>

</Conversations>

ArrayOfConversationsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Conversation (ConversationType)
Represents a single conversation.

Parent elements

Element Description

FindConversationResponse
Defines a response to a FindConversation request.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
FindConversation operation

Conversations in EWS
ConversationShape
Article • 03/29/2023 • 2 minutes to read

The ConversationShape element identifies the property set to return in a


FindConversation operation response.

XML

<ConversationShape>

<BaseShape/>

<AdditionalProperties/>

</ConversationShape>

Attributes and elements


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

Attributes
None.

Child elements
BaseShape | AdditionalProperties

Parent elements
FindConversation

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file types.xsd

Can be empty false


ConversationTopic
Article • 03/29/2023 • 2 minutes to read

The ConversationTopic element represents the conversation topic.

XML

<ConversationTopic/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

RemoveItem
Removes an item from the Exchange store.

Message
Represents an Exchange e-mail message.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

AcceptItem
Represents an Accept reply to a meeting request.

TentativelyAcceptItem Represents a Tentative reply to a meeting request.


Element Description

DeclineItem
Represents a Decline reply to a meeting request.

ReplyToItem
Contains a reply to the creator of an item in the Exchange store.

ReplyAllToItem
Contains a reply to all identified recipients of an item in the Exchange
store.

ForwardItem
Contains an Exchange store item to forward to recipients.

CancelCalendarItem
Represents the response object that is used to cancel a meeting.

PostItem
Represents a post item in the Exchange store. This element was
introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

Conversation Represents a single conversation.


(ConversationType)

Text value
The text value represents the topic for the conversation thread.

Remarks
The conversation topic is usually the subject of the first e-mail message in a thread.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
FindConversation operation
EWS XML elements in Exchange
ConvertHtmlCodePageToUTF8
Article • 03/29/2023 • 2 minutes to read

The ConvertHtmlCodePageToUTF8 element indicates whether the item HTML body is


converted to UTF8.

XML

<ConvertHtmlCodePageToUTF8/>

xs:boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ItemShape
Identifies a set of properties to return in a response.

Text value
A text value of true for the ConvertHtmlCodePageToUTF8 element indicates that the
HTML body is converted to UTF8. A text value of false indicates that the HTML body is
not converted to UTF8.

Remarks
The default value of true is used if the ConvertHtmlCodePageToUTF8 element is not
specified in a request.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ConvertId
Article • 03/29/2023 • 2 minutes to read

The ConvertId element defines a request to convert item and folder identifiers between
supported Exchange formats. This element was introduced in Microsoft Exchange Server
2007 Service Pack 1 (SP1).

XML

<ConvertId DestinationFormat="">

<SourceIds/>

</ConvertId>

ConvertIdType

Attributes and elements


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

Attributes

Attribute Description

DestinationFormat Describes the identifier format that will be returned for all the converted
identifiers. The DestinationFormat is described by the IdFormatType.

DestinationFormat Attribute

Value Description

EwsLegacyId Represents the identifier format that is used for Exchange Web Services identifiers
that are provided in the initial release version of Exchange 2007.

EwsId
Represents the identifier format that is used for Exchange Web Services identifiers
starting with Exchange Server 2007 SP1.

EntryId
Represents the MAPI identifier, as in the PR_ENTRYID property.

HexEntryId
Represents the availability calendar event identifier. This is a hexadecimal-encoded
representation of the PR_ENTRYID property.

StoreId
Represents the Exchange store identifier.
Value Description

OwaId
Represents the Outlook Web Access identifier format.

Child elements

Element Description

SourceIds
Contains the source identifiers to convert.

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.

Element information
Element Example

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

Schema Name messages schema

Validation File Messages.xsd

Can be Empty False

See also
ConvertId operation

EWS XML elements in Exchange

Converting Identifiers
ConvertIdResponse
Article • 03/29/2023 • 2 minutes to read

The ConvertIdResponse element contains a response to a ConvertId request. This


element was introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

XML

<ConvertIdResponse>

<ResponseMessages/>

</ConvertIdResponse>

ConvertIdResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Remarks
The response messages that are contained within the ResponseMessages element will
be instances of ConvertIdResponseMessageType.

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

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
ConvertId operation

EWS XML elements in Exchange

Converting Identifiers
ConvertIdResponseMessage
Article • 03/29/2023 • 2 minutes to read

The ConvertIdResponseMessage element contains the status and result of a ConvertId


operation request.

ConvertIdResponse
ResponseMessages
ConvertIdResponseMessage

XML

<ConvertIdResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<AlternateId/>

</ConvertIdResponseMessage>

ConvertIdResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of a ConvertId operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description
Value Description

Success
Describes a request that is fulfilled.

Warning Describes a request that was not fully processed or for which an unintended result
occurred.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and reserved for future use. This element contains a value
of 0.

MessageXml
Provides additional error response information.

AlternateId
Describes a converted identifier in the response.

Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
One response message per converted identifier is returned. The AlternateId element will
be missing from the response if an error response code is returned,

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

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
ConvertId operation
EWS XML elements in Exchange
CopiedEvent
Article • 03/29/2023 • 2 minutes to read

The CopiedEvent element represents an event in which an item or folder is copied.

XML

<CopiedEvent>

<Watermark/>

<TimeStamp/>

<FolderId/>

<ParentFolderId/>

<OldFolderId/>

<OldParentFolderId/>
</CopiedEvent>

XML

<CopiedEvent>

<Watermark/>

<TimeStamp/>

<ItemId/>

<ParentFolderId/>

<OldItemId/>

<OldParentFolderId/>
</CopiedEvent>

MovedCopiedEventType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Watermark
Represents an events bookmark in the mailbox events table.

TimeStamp
Represents the timestamp of a copy item/folder mailbox event.
Element Description

FolderId
Represents the identifier of the folder.

ItemId
Represents the identifier of the item.

ParentFolderId Represents the identifier of the folder that contains the copy.

OldFolderId
Represents the folder identifier of the original folder before it was copied.

OldItemId
Contains the unique identifier of the original item before it was copied.

OldParentFolderId Contains the identifier of the original parent folder of an item or folder that
was copied.

Parent elements

Element Description

Notification Contains information about the subscription and the events that have occurred
since the last notification.

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

Element information
Element Description

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
Subscribe operation
GetEvents operation
Unsubscribe operation
Using Pull Subscriptions
Push Notification Sample Application
CopyFolder
Article • 03/29/2023 • 2 minutes to read

The CopyFolder element defines a request to copy folders in a mailbox in the Exchange
store.

XML

<CopyFolder>

<ToFolderId/>

<FolderIds/>

</CopyFolder>

CopyFolderType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ToFolderId Represents the destination folder for a copied folder.

FolderIds
Contains an array of folders to copy to the folder identified by the ToFolderId
element.

Parent elements
None.

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

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
CopyFolder operation
CopyFolderResponse
Article • 03/29/2023 • 2 minutes to read

The CopyFolderResponse element defines a response to a CopyFolder request.

XML

<CopyFolderResponse>

<ResponseMessages/>

</CopyFolderResponse>

CopyFolderResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

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

Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
CopyFolder operation

CopyFolder

EWS XML elements in Exchange


CopyFolderResponseMessage
Article • 03/29/2023 • 2 minutes to read

The CopyFolderResponseMessage element contains the status and result of a single


CopyFolder operation request.

CopyFolderResponse
ResponseMessages
CopyFolderResponseMessage

XML

<CopyFolderResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Folders/>

</CopyFolderResponseMessage>

FolderInfoResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of a CopyFolder operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description
Value Description

Success
Describes a request that is fulfilled.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store goes offline during the batch.


- Active Directory Domain Services (AD DS) goes offline.
- Mailboxes are moved.
- The message database (MDB) goes offline.
- A password is expired.
- A quota is exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempted by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

Folders
Contains an array of copied folders.

Parent elements
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

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

Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
CopyFolder operation
EWS reference for Exchange
EWS XML elements in Exchange
CopyItem
Article • 03/29/2023 • 2 minutes to read

The CopyItem element defines a request to copy an item in a mailbox in the Exchange
store.

XML

<CopyItem>

<ToFolderId/>

<ItemIds/>

<ReturnNewItemIds/>

</CopyItem>

CopyItemType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ToFolderId
Represents the destination folder for a copied item.

ItemIds
Contains an array of identified items to copy to the folder represented by the
ToFolderId element.

ReturnNewItemIds Indicates whether the item identifiers of new items are returned in the
response.

Parent elements
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
CopyItem operation

EWS XML elements in Exchange


CopyItemResponse
Article • 03/29/2023 • 2 minutes to read

The CopyItemResponse element defines a response to a CopyItem request.

XML

<CopyItemResponse>

<ResponseMessages/>

</CopyItemResponse>

CopyItemResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

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

Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
CopyItem operation

CopyItem

EWS XML elements in Exchange


CopyItemResponseMessage
Article • 03/29/2023 • 2 minutes to read

The CopyItemResponseMessage element contains the status and result of a single


CopyItem operation request.

XML

<CopyItemResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Items/>

</CopyItemResponseMessage>

ItemInfoResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of a CopyItem operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store goes offline during the batch.


- Active Directory Domain Services (AD DS) goes offline.
- Mailboxes are moved.
- The mailbox database (MDB) goes offline.
- A password is expired.
- A quota is exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

- EWS XML elements in Provides a text description of the status of the response.
Exchange

MessageText

ResponseCode
Provides an error code that identifies the specific error that the
request encountered.

DescriptiveLinkKey
Currently unused and is reserved for future use. It contains a value
of 0.

MessageXml
Provides additional error response information.

Items
Contains an array of copied items
Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

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

Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
CopyItem operation
EWS reference for Exchange
CopyToFolder
Article • 03/29/2023 • 2 minutes to read

The CopyToFolder element specifies the identifier of the folder that email items can be
copied to.

XML

<CopyToFolder>

<FolderId></FolderId>

<DistinguishedFolderId></DistinguisedFolderId>

</CopyToFolder>

TargetFolderIdType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier of a destination folder for a copied or moved item
or folder.

DistinguishedFolderId Identifies a named destination folder for a copied or moved item or


folder.

Parent elements

Element Description

Actions
Represents the set of actions that are available to be taken on a message when the
conditions are fulfilled.
Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
MoveToFolder

EWS XML elements in Exchange


Count
Article • 03/29/2023 • 2 minutes to read

The Count element contains the number of conflicts in an UpdateItem operation


response.

UpdateItemResponse

ResponseMessages

UpdateItemResponseMessage

ConflictResults

Count

XML

<Count/>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ConflictResults
Contains the number of conflicts in an UpdateItem operation response.
Text value
The text value is an integer that represents the number of conflicts in an UpdateItem
operation response.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
UpdateItem operation

ConflictResultsType
Country
Article • 03/29/2023 • 2 minutes to read

The Country element identifies a country identifier in a postal address.

XML

<Country></Country>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
PostalAddress (PersonaPostalAddressType)

Text value
The text value of the Country element is a country identifier.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
CountryOrRegion
Article • 03/29/2023 • 2 minutes to read

The Country element represents the country or region for a given physical address.

XML

<Country/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Entry (PhysicalAddress)
Describes a single physical address for a contact item.

Text value
The text value is a string value that represents the name of a country.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Create (FolderSync)
Article • 03/29/2023 • 2 minutes to read

The Create element identifies a single folder to create in the local client store.

SyncFolderHierarchyResponse

ResponseMessages

SyncFolderHierarchyResponseMessage

Changes (Hierarchy)

Create (FolderSync)

XML

<Create>

<Folder/>

<CalendarFolder/>

<ContactsFolder/>

<SearchFolder/>

<TasksFolder/>

</Create>

SyncFolderHierarchyCreateOrUpdateType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Folder
Defines the folder to create, get, find, synchronize, or update.

CalendarFolder
Represents a folder that primarily contains calendar items.

ContactsFolder
Represents a contact folder in a mailbox.
Element Description

SearchFolder
Represents a search folder contained in a mailbox.

TasksFolder
Represents a task folder contained in a mailbox.

Parent elements

Element Description

Changes Contains a sequence array of change types that represent the type of differences
(Hierarchy) between the items on the client and the items on the Exchange server.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
SyncFolderItems operation

EWS XML elements in Exchange


Create (ItemSync)
Article • 03/29/2023 • 2 minutes to read

The Create element identifies a single item to create in the local client store.

SyncFolderItemsResponse
ResponseMessages
SyncFolderItemsResponseMessage
Changes (Items)
Create (ItemSync)

XML

<Create>

<Item/>

</Create>

XML

<Create>

<Task/>

</Create>

XML

<Create>

<MeetingResponse/>

</Create>

XML

<Create>

<CalendarItem/>

</Create>

XML

<Create>

<MeetingMessage/>

</Create>

XML
<Create>

<DistributionList/>

</Create>

XML

<Create>

<MeetingCancellation/>

</Create>

XML

<Create>

<MeetingRequest/>

</Create>

XML

<Create>

<Message/>

</Create>

XML

<Create>

<Contact/>

</Create>

SyncFolderItemsCreateOrUpdateType

Attributes and elements


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

Attributes
None.

Child elements

Element Description
Element Description

Item
Represents a generic Exchange item to create.

Message
Represents an Exchange e-mail message to create.

CalendarItem
Represents an Exchange calendar item to create.

Contact
Represents an Exchange contact item to create.

DistributionList
Represents a distribution list to create.

MeetingMessage
Represents a meeting message to create.

MeetingRequest
Represents a meeting request to create.

MeetingResponse
Represents a meeting response to create.

MeetingCancellation Represents a meeting cancellation to create.

Task
Represents a task to create.

Parent elements

Element Description

Changes Contains a sequence array of change types that represent the types of differences
(Items)
between the items on the client and the items on the Exchange server.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False


See also
SyncFolderItems operation
EWS XML elements in Exchange
CreateAssociated
Article • 03/29/2023 • 2 minutes to read

The CreateAssociated element indicates whether a client can create an associated


contents table. This element was introduced in Microsoft Exchange Server 2007 Service
Pack 1 (SP1).

XML

<CreateAssociated>true or false</CreateAssociated>

boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

EffectiveRights Contains the rights of the client based on the permission settings for the item or
folder. This element was introduced in Exchange 2007 SP1.

Text value
A text value of true indicates that a client can create an associated contents table.

Remarks
This property is only used on folder objects.
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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


CreateAttachment
Article • 03/29/2023 • 2 minutes to read

The CreateAttachment element defines a request to create an attachment to an item in


the Exchange store.

XML

<CreateAttachment>

<ParentItemId/>

<Attachments/>

</CreateAttachment>

CreateAttachmentType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ParentItemId Identifies the parent Exchange store item that contains the created attachment.
The ParentItemId element must provide the ID of a real Exchange store item. Real
store items can be retrieved by using the GetItem operation; attachments are
retrieved by using the GetAttachment operation. An error occurs if the
ParentItemId is passed the ID of a file attachment. If the ParentItemId represents
the ID of an existing item attachment, the CreateAttachment operation adds the
new attachment to the existing attachment.
This element is required for the CreateAttachment operation.

Attachments Contains the items or files to attach to an item in the Exchange store.

Parent elements
None.
Remarks
An item attachment does not exist as a store item. It only exists as an attachment to an
item or another attachment. Item attachments can only be retrieved by using the
GetAttachment request.

The following item attachments can be created:

Item

Message

CalendarItem

Contact

Task

MeetingMessage

MeetingRequest

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

Example
The following example shows how to create and attach an item to another item in the
Exchange store.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<CreateAttachment
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<ParentItemId Id="ASkAS"/>

<Attachments>

<t:ItemAttachment>

<t:Name>MyAttachment</t:Name>

<t:Message>

<t:ItemClass>IPM>Note</t:ItemClass>

<t:Subject>My attachment subject</t:Subject>

<t:Body BodyType="Text">My attachment body</t:Body>

</t:Message>

</t:ItemAttachment>

</Attachments>

</CreateAttachment>

</soap:Body>

</soap:Envelope>

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
CreateAttachment operation

DeleteAttachment operation

GetAttachment operation
CreateAttachmentResponse
Article • 03/29/2023 • 2 minutes to read

The CreateAttachmentResponse element defines a response to a CreateAttachment


request.

XML

<CreateAttachmentResponse>

<ResponseMessages/>

</CreateAttachmentResponse>

CreateAttachmentResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

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

Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
CreateAttachment operation

CreateAttachment

EWS XML elements in Exchange


CreateAttachmentResponseMessage
Article • 03/29/2023 • 2 minutes to read

The CreateAttachmentResponseMessage element contains the status and result of a


single CreateAttachment operation request.

CreateAttachmentResponse
ResponseMessages
CreateAttachmentResponseMessage

XML

<CreateAttachmentResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Attachments/>

</CreateAttachmentResponseMessage>

AttachmentInfoResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of a CreateAttachment operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description
Value Description

Success
Describes a request that is fulfilled.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes are moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota is exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

Attachments
Contains the items or files that are attached to an item in the Exchange
store.

Parent elements
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

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

7 Note

If multiple attachments are attached to an item in a single round trip, the


RootItemChangeKey attribute in the last response message is the one that
represents the new change key of the item that has the attachments.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
CreateAttachment operation
CreateAttachment
EWS reference for Exchange
EWS XML elements in Exchange
CreateContents
Article • 03/29/2023 • 2 minutes to read

The CreateContents element indicates whether a client can create a contents table. This
element was introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

XML

<CreateContents>true or false</CreateContents>

boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

EffectiveRights Contains the rights of the client based on the permission settings for the item or
folder. This element was introduced inExchange 2007 SP1.

Text value
A text value of true indicates that a client can create a contents table.

Remarks
This property is only used on folder objects.
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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


CreatedEvent
Article • 03/29/2023 • 2 minutes to read

The CreatedEvent element represents an event in which an item or folder is created.

XML

<CreatedEvent>

<Watermark/>

<TimeStamp/>

<ItemId/>

<ParentFolderId/>

</CreatedEvent>

XML

<CreatedEvent>

<Watermark/>

<TimeStamp/>

<FolderId/>

<ParentFolderId/>

</CreatedEvent>

BaseObjectChangedEventType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Watermark
Represents an event bookmark in the mailbox events table.

TimeStamp
Represents the timestamp of a created item or folder mailbox event.

FolderId
Represents the identifier of the created folder.

ItemId
Represents the identifier of the created item.
Element Description

ParentFolderId Represents the identifier of the parent folder of the created item or folder.

Parent elements

Element Description

Notification Contains information about the subscription and the events that have occurred
since the last notification.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
Subscribe operation
GetEvents operation
Unsubscribe operation
Using Pull Subscriptions
Event notifications in EWS
CreatedTime
Article • 03/29/2023 • 2 minutes to read

The CreatedTime element specifies the time at which the item was created.

XML

<CreatedTime></CreatedTime>

dateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

SearchPreviewItem Specifies the first 256 characters of a mailbox item for preview without
opening the item.

Text value
The text value of the CreatedTime element is the time at which the item was created.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
CreateFolder
Article • 03/29/2023 • 2 minutes to read

The CreateFolder element defines a request to create a folder in the Exchange store.

XML

<CreateFolder>

<ParentFolderId/>

<Folders/>

</CreateFolder>

CreateFolderType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ParentFolderId The element that identifies the location where the new folder is
(TargetFolderIdType)
created.

Folders
The element that contains all the folders to create.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

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

Schema Name Message schema

Validation File Messages.xsd

Can be Empty False

See also
CreateFolder operation

Creating Folders (Exchange Web Services)


CreateFolderPath
Article • 03/29/2023 • 2 minutes to read

The CreateFolderPath element is used to create a folder path and includes a parent
folder Id and a relative folder path.

XML

<CreateFolderPath>

<ParentFolderId/>

<RelativeFolderPath/>

</CreateFolderPath>

CreateFolderPathType

Attributes and elements


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

Attributes
None.

Child elements
ParentFolderId (TargetFolderIdType) | RelativeFolderPath

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

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

Schema name Messages schema

Validation file messages.xsd

Can be empty false


CreateFolderPathResponse
Article • 03/29/2023 • 2 minutes to read

The CreateFolderPathResponse element is used to return a folder path.

XML

<CreateFolderPathResponse>

<ResponseMessages/>

</CreateFolderPathResponse>

CreateFolderPathResponseType

Attributes and elements


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

Attributes
None.

Child elements
ResponseMessages

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value
Name Value

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

Schema name Messages schema

Validation file messages.xsd

Can be empty false


CreateFolderPathResponseMessage
Article • 03/29/2023 • 2 minutes to read

The CreateFolderPathResponseMessage element specifies the response message for a


CreateFolderPath request.

XML

<CreateFolderPathResponseMessage ResponseClass="">

<Folders></Folders>

<MessageText></MessageText>

<ResponseCode></ResponseCode>

<DescriptiveLinkKey></DescriptiveLinkKey>

<MessageXml></MessageXml>

</CreateFolderPathResponseMessage>

FolderInfoResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass Indicates the class of the response.

ResponseClass

Value Description

Success Indicates success.

Warning Indicates a warning.

Error Indicates an error.

Child elements

Element Description
Element Description

Folders
Contains an array of folders that are used in folder operations.

DescriptiveLinkKey
Currently unused and reserved for future use.

MessageText
Provides a text description of the status of the response.

MessageXml
Provides additional error response information.

ResponseCode
Provides status information about the request.

Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

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

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
CreateFolderResponse
Article • 03/29/2023 • 2 minutes to read

The CreateFolderResponse element defines a response to a CreateFolder request.

XML

<CreateFolderResponse>

<ResponseMessages/>

</CreateFolderResponse>

CreateFolderResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

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

Element information
Name Value

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
CreateFolder operation

CreateFolder

EWS XML elements in Exchange


CreateFolderResponseMessage
Article • 03/29/2023 • 2 minutes to read

The CreateFolderResponseMessage element contains the status and result of a single


CreateFolder operation request.

XML

<CreateFolderResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Folders/>

</CreateFolderResponseMessage>

FolderInfoResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of a CreateFolder operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes are moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota is exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

Folders
Contains an array of created folders.

Parent elements

Element Description
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

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

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
CreateFolder operation
EWS reference for Exchange
EWS XML elements in Exchange
CreateHierarchy
Article • 03/29/2023 • 2 minutes to read

The CreateHierarchy element indicates whether a client can create a hierarchy table.
This element was introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

XML

<CreateHierarchy>true or false</CreateHierarchy>

boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

EffectiveRights Contains the rights of the client based on the permission settings for the item or
folder. This element was introduced in Exchange 2007 SP1.

Text value
A text value of true indicates that a client can create a hierarchy table.

Remarks
This property is only used on folder objects.
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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


CreateItem
Article • 03/29/2023 • 2 minutes to read

The CreateItem element defines a request to create an item in the Exchange store.

XML

<CreateItem MessageDisposition="" SendMeetingInvitations="">

<SavedItemFolderId/>
<Items/>

</CreateItem>

CreateItemType

Attributes and elements


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

Attributes

Attribute Description

MessageDisposition
Describes how the item will be handled after it is created. The attribute
is required for e-mail messages. This attribute is only applicable to e-
mail messages.

SendMeetingInvitations Describes how meeting requests are handled after they are created.
This attribute is required for calendar items.

MessageDisposition Attribute

Value Description

SaveOnly The message item is saved in the folder that is specified by the
SavedItemFolderId element. Messages can be sent later by using the
SendItem operation. An item identifier is returned in the response. Item
identifiers are not returned for any item types except for message items.
This includes response objects.
Value Description

SendOnly The item is sent but no copy is saved in the Sent Items folder. An item
identifier is not returned in the response.

NOTE: CreateItem does not support delegate access when the SendOnly
option is used because a destination folder cannot be specified with this
option. The workaround is to create the item, get the item identifier, and
then use the SendItem operation to send the item.

SendAndSaveCopy The item is sent and a copy is saved in the folder that is identified by the
SavedItemFolderId element. An item identifier is not returned in the
response.

NOTE: Meeting requests are not saved to the folder that is identified by the
SavedItemFolderId property. For calendaring, only the save location for
calendar items can be specified by the SavedItemFolderId property. You
cannot control where a meeting request item is saved. Only the associated
calendar items are copied and saved into the folder that is identified by the
SavedItemFolderId property.

SendMeetingInvitations Attribute

Value Description

SendToNone If the item is a meeting request, it is saved as a calendar item but not
sent.

SendOnlyToAll The meeting request is sent to all attendees but is not saved in the Sent
Items folder.

SendToAllAndSaveCopy The meeting request is sent to all attendees and a copy is saved in the
folder that is identified by the SavedItemFolderId element.

Child elements

Element Description

SavedItemFolderId
Identifies the target folder where a new item can be created. If
the MessageDisposition attribute is set to SendOnly, a created
message will only be sent. The message will not be put in the
folder that is identified by the SavedItemFolderId element.

Items Contains an array of items to create in the folder that is


(NonEmptyArrayOfAllItemsType) identified by the SavedItemFolderId element.
Parent elements
None.

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

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
CreateItemResponse
CreateItem operation
Creating E-mail Messages
Creating Contacts (Exchange Web Services)
Creating Tasks
Creating Appointments
CreateItemResponse
Article • 03/29/2023 • 2 minutes to read

The CreateItemResponse element defines a response to a CreateItem request.

XML

<CreateItemResponse>

<ResponseMessages/>

</CreateItemResponse>

CreateItemResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

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

Element information
Element Description

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
CreateItem operation

CreateItem

EWS XML elements in Exchange


CreateItemResponseMessage
Article • 03/29/2023 • 2 minutes to read

The CreateItemResponseMessage element contains the status and result of a single


CreateItem operation request.

CreateItemResponse
ResponseMessages
CreateItemResponseMessage

XML

<CreateItemResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Items/>

</CreateItemResponseMessage>

ItemInfoResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of a CreateItem operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description
Value Description

Success
Describes a request that is fulfilled.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes are moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota is exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

Items
Contains an array of created items.

Parent elements
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

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

Element information
Name Value

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
CreateItem operation
EWS reference for Exchange
EWS XML elements in Exchange
CreateManagedFolder
Article • 03/29/2023 • 2 minutes to read

The CreateManagedFolder element defines a request to add managed custom folders


to a mailbox.

XML

<CreateManagedFolder>

<FolderNames/>

<Mailbox/>

</CreateManagedFolder>

CreateManagedFolderRequestType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

FolderNames
Contains an array of named managed folders to add to a mailbox.

Mailbox
Identifies a mail-enabled Active Directory directory service object.

Parent elements
None.

Remarks
The account of the person who is making the request must have FullAccess permissions
on the mailbox where the managed folders are created. You can use the _ -AccessRights
_ parameter with the Exchange Management Shell Add-MailboxPermission cmdlet to
assign the FullAccess permission.

Although you can use Exchange Web Services to add managed folders to a mailbox, you
cannot use Exchange Web Services to access the list of managed folders that are
available. To obtain a list of available managed folders, use the get-managedfolder
Exchange Management Shell cmdlet. The list that is returned by the get-managedfolder
cmdlet will contain both managed custom folders and managed default folders. You can
only add folders of type managedcustomfolder to the mailbox by using the
CreateManagedFolder operation.

7 Note

You can also get a list of managed folders by using the DirectoryServices API of the
Microsoft .NET Framework.

You can use the FindFolder operation to find managed folders in a mailbox. Managed
folders can be distinguished by setting the BaseShape element to AllProperties in the
request. The response will contain a ManagedFolderInformation element to distinguish
the managed folders from the Exchange store folders. You can delete managed folders
in the same manner that you delete other folder types.

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

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
CreateManagedFolder operation
FindFolder operation

Finding Folders

Adding Managed Folders


CreateManagedFolderResponse
Article • 03/29/2023 • 2 minutes to read

The CreateManagedFolderResponse element defines a response to a


CreateManagedFolder request.

XML

<CreateManagedFolderResponse>

<ResponseMessages/>

</CreateManagedFolderResponse>

CreateManagedFolderResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

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

Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
CreateManagedFolder operation

CreateManagedFolder

EWS XML elements in Exchange


CreateManagedFolderResponseMessage
Article • 03/29/2023 • 2 minutes to read

The CreateManagedFolderResponseMessage element contains the status and result of


a single CreateManagedFolder operation request.

CreateManagedFolderResponse
ResponseMessages
CreateManagedFolderResponseMessage

XML

<CreateManagedFolderResponseMessage>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Folders/>

</CreateManagedFolderResponseMessage>

FolderInfoResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of a CreateManagedFolder operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description
Value Description

Success
Describes a request that is fulfilled.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes are moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota is exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

Folders
Contains an array of created managed folders.

Parent elements
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

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

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
CreateManagedFolder operation
EWS reference for Exchange
EWS XML elements in Exchange
CreateRuleOperation
Article • 03/29/2023 • 2 minutes to read

The CreateRuleOperation element represents an operation to create a new Inbox rule.

UpdateInboxRules

Operations

XML

<CreateRuleOperation>

<Rule/>

</CreateRuleOperation>

CreateRuleOperationType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Rule (RuleType)
Represents a rule to be created in a user's mailbox.

Parent elements

Element Description

Operations
Contains the operations that can be performed on an Inbox.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
UpdateInboxRules

SetRuleOperation

DeleteRuleOperation

EWS XML elements in Exchange


CreateUserConfiguration
Article • 03/29/2023 • 2 minutes to read

The CreateUserConfiguration element represents a request to create a user


configuration object.

XML

<CreateUserConfiguration>

<UserConfiguration/>
</CreateUserConfiguration>

CreateUserConfigurationType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

UserConfiguration
Represents a single user configuration object.

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
CreateUserConfigurationResponse
Article • 03/29/2023 • 2 minutes to read

The CreateUserConfigurationResponse element defines a response to a single


CreateUserConfiguration request.

XML

<CreateUserConfigurationResponse>

<ResponseMessages/>

</CreateUserConfigurationResponse>

CreateUserConfigurationResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
CreateUserConfigurationResponseMess
age
Article • 03/29/2023 • 2 minutes to read

The CreateUserConfigurationResponseMessage element contains the status and result


of a single CreateUserConfiguration request.

XML

<CreateUserConfigurationResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</CreateUserConfigurationResponseMessage>

ResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements.


- Attributes or elements that are out of range.
- An unknown tag.
- The attribute or element is not valid in the context.
- An unauthorized access attempt by any client.
- A server-side failure in response to a valid client-side call.

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and reserved for future use. This element contains a value
of 0.

MessageXml
Provides additional error response information.

Parent elements

Element Description
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
CreationTime
Article • 03/29/2023 • 2 minutes to read

The CreationTime element specifies when the persona was created.

XML

<CreationTime></CreationTime>

datetime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
Persona

Text value
The text value of the CreationTime element is the date and time that a persona was
created.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Culture
Article • 03/29/2023 • 2 minutes to read

The Culture element represents the culture for a given item in a mailbox.

XML

<Culture/>

Language

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

Text value
The text value indicates the language that is used in the Exchange Web Services
operations. Culture is specified by using the RFC 1766 culture identifier; for example, en-
US.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
CurrentMeetingTime
Article • 03/29/2023 • 2 minutes to read

The CurrentMeetingTime element represents the start time of a meeting that you want
to update with a meeting time proposed by a meeting attendee.

GetUserAvailabilityRequest

SuggestionsViewOptions

CurrentMeetingTime

XML

<CurrentMeetingTime>...</CurrentMeetingTime>

DateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

SuggestionsViewOptions
Contains the options for obtaining meeting suggestion information.
The following is the XPath to this element:
/GetUserAvailabilityRequest/SuggestionViewOptions

Remarks
This element is not required.

7 Note

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

Getting User Availability


CustomMailTip
Article • 03/29/2023 • 2 minutes to read

The CustomMailTip element represents a customized mail tip message.

XML

<CustomMailTip/>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

MailTips
Represents values for the various types of mail tips.

Text value
A text value that represents a string is required if this element is used.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DailyRecurrence
Article • 03/29/2023 • 2 minutes to read

The DailyRecurrence element describes the frequency, in days, in which a calendar item
or a task recurs.

XML

<DailyRecurrence>

<Interval/>

</DailyRecurrence>

DailyRecurrencePatternType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Interval
Defines the interval, in days, between two consecutive recurring items. The value must
be in the range from 1 to 999.

Parent elements

Element Description

Recurrence Contains recurrence information for recurring tasks.


(TaskRecurrenceType)

Recurrence (RecurrenceType)
Contains the recurrence pattern for calendar items and meeting
requests.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
DailyRegeneration
Article • 03/29/2023 • 2 minutes to read

The DailyRegeneration element describes the frequency, in days, in which a task is


regenerated.

XML

<DailyRegeneration>

<Interval/>

</DailyRegeneration>

DailyRegeneratingPatternType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Interval
Defines the interval, in days, between two consecutive recurring items. The value must
be in the range of 1 to 999.

Parent elements

Element Description

Recurrence (TaskRecurrenceType)
Contains recurrence information for recurring tasks.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Data
Article • 03/29/2023 • 2 minutes to read

The Data element contains encrypted data that represents the shared data.

EncryptedSharedFolderData
Data

XML

<Data/>

EncryptedDataContainerType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

EncryptedSharedFolderData Contains the encrypted data that a client can use to authorize the
sharing of its calendar or contact data with other clients.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetSharingMetadata operation
EWS XML elements in Exchange
Data (base64Binary)
Article • 03/29/2023 • 2 minutes to read

The Data element contains the data of a single exported item or an item to upload into
a mailbox.

XML

<Data/>

xs:base64Binary

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ExportItemsResponseMessage Contains the status and results of a request to export a single


mailbox item.

Item (UploadItemType)
Represents a single item to upload into a mailbox.

Text value
The Data element contains the property names and values for an exported item or an
item that will be uploaded into a mailbox.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

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

Schema Name Message schema

Validation File Messages.xsd

Can be Empty False

See also
ExportItems operation
UploadItems operation
DataType
Article • 03/29/2023 • 2 minutes to read

The DataType element describes the type of data that is shared by a shared folder.

XML

<DataType>Calendar or Contacts</DataType>

SharingDataType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

GetSharingFolder Defines a request to get the local folder identifier of a specified shared folder.

Text value
The following table lists the possible values for the DataType element.

DataType element values

Value Description

Calendar Indicates that the shared folder contains calendar information.

Contacts Indicates that the shared folder contains contact information.


Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Date
Article • 03/29/2023 • 2 minutes to read

The Date element represents the date that contains the suggested meeting times.

GetUserAvailabilityResponse
SuggestionsResponse
SuggestionDayResultArray
SuggestionDayResult
Date

XML

<Date>...</Date>

dateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

SuggestionDayResult Represents a single day that contains suggested meeting times.

The following is the XPath 2.0 expression to this element:

/GetUserAvailabilityResponse/SuggestionsResponse/SuggestionDayResultArray/SuggestionDayResult[i]

Text value
A text value is required. Review the World Wide Web Consortium (W3C) schema datatype
recommendations for the format of the dateTime primitive datatype.

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

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
GetUserAvailabilityResponse
Getting User Availability
Date (MessageTracking)
Article • 03/29/2023 • 2 minutes to read

The Date element represents the date and time at which the event occurred.

XML

<Date/>

dateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

RecipientTrackingEvent
Contains details for a specific event in the tracking report.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DateTime
Article • 03/29/2023 • 2 minutes to read

The DateTime element represents the date and time at which the time zone transition
occurs.

XML

<DateTime/>

DateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

AbsoluteDateTransition Represents a time zone transition that occurs on a specific date and at a
specific time.

Text value
The text value of the DateTime element represents the date and time at which the time
zone transition occurs.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DateTimeCreated
Article • 03/29/2023 • 2 minutes to read

The DateTimeCreated element represents the date and time that an item in the mailbox
was created.

XML

<DateTimeCreated/>

DateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

Text value
The text value represents the date and time when an item in the mailbox was created.

Remarks
Using calendar response objects updates the DateTimeCreated property on the
associated calendar item. The expected behavior is for the DateTimeCreated property to
remain unchanged. For example, user A sends a meeting request to user B. User B
accepts the meeting request with the identifier of the meeting request. The
DateTimeCreated property of the associated calendar item is changed.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DateTimePrecision
Article • 03/29/2023 • 2 minutes to read

The DateTimePrecision element specifies the precision for returned date/time values.

XML

<DateTimePrecision />

DateTimePrecisionType

Attributes and elements


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

Attributes
None

Child elements
None.

Parent elements
The DateTimePrecision element is located in the SOAP header.

Text value
A text value is required. The following are the possible values:

Seconds

Milliseconds

Remarks
When a SOAP header with the DateTimePrecision element set to "Seconds" is used,
date/time values are returned to the nearest seconds (00:00:00). When "Milliseconds" is
used, date/time values are returned to the nearest millisecond (00:00:00.0000).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

This element was introduced in Exchange Server 2010 Service Pack 2 (SP2).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


DateTimeReceived
Article • 03/29/2023 • 2 minutes to read

The DateTimeReceived element represents the date and time that an item in a mailbox
was received.

XML

<DateTimeReceived/>

DateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Item
Represents an item in the Exchange store.

RemoveItem
Removes an item from the Exchange store.

Message
Represents an Exchange e-mail message.

Task
Represents a task in the Exchange store.

CalendarItem
Represents an Exchange calendar item.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

MeetingCancellation Represents a meeting cancellation in the Exchange store.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Text value
The text value represents the time at which an item is received in a mailbox. This
property is read-only.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DateTimeSent
Article • 03/29/2023 • 2 minutes to read

The DateTimeSent element represents the date and time at which an item in a mailbox
was sent.

XML

<DateTimeSent/>

DateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

Text value
The text value represents the date and time at which an item was sent.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DateTimeStamp
Article • 03/29/2023 • 2 minutes to read

The DateTimeStamp element indicates the date and time that an instance of a calendar
object was created.

XML

<DateTimeStamp/>

dateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingMessage
Represents a meeting message.

MeetingRequest
Represents a meeting request.

MeetingResponse
Represents a meeting response.

MeetingCancellation Represents a meeting cancellation.

Text value
The text value represents a date/time value that identifies a calendar occurrence.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Day
Article • 03/29/2023 • 2 minutes to read

The Day element represents the day of the month on which the time zone transition
occurs.

XML

<Day/>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

RecurringDateTransition Represents a time zone transition that occurs on a specific date each
year.

Text value
The text value of the Day element is an integer that represents the day of the month on
which the time zone transition occurs.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Daylight
Article • 03/29/2023 • 2 minutes to read

The Daylight element represents the date and time when the time changes from
standard time to daylight saving time.

XML

<Daylight TimeZoneName="">

<Offset/>

<RelativeYearlyRecurrence/>

<Time/>

</Daylight>

XML

<Daylight TimeZoneName="">

<Offset/>

<AbsoluteDate/>

<Time/>

</Daylight>

TimeChangeType

Attributes and elements


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

Attributes

Attribute Description

TimeZoneName
Describes the name of the time zone.

Child elements

Element Description

Offset
Describes the offset from the BaseOffset. The base offset in addition to
this offset identifies the time according to whether it is standard or
daylight saving time.
Element Description

RelativeYearlyRecurrence Describes a relative yearly recurrence pattern for a time zone transition
date pattern.

AbsoluteDate
Represents the date when the time changes from standard or daylight
saving time.

Time (TimeChangeType)
Describes the time when the time changes between standard time and
daylight saving time.

Parent elements

Element Description

MeetingTimeZone
Represents the time zone of the location where the meeting is hosted.

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.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DaylightTime
Article • 03/29/2023 • 2 minutes to read

The DaylightTime element represents an offset from the time relative to Coordinated Universal Time
(UTC) that is represented by the Bias (UTC) element in regions where daylight saving time is observed.
This element also contains information about when the transition to daylight saving time from standard
time occurs.

TimeZone (Availability)
DaylightTime

XML

<DaylightTime>

<Bias>int</Bias>

<Time>string</Time>

<DayOrder>short</DayOrder>

<Month>short</Month>

<DayOfWeek>Sunday or Monday or Tuesday or Wednesday or Thursday or Friday or


Saturday</DayOfWeek>

<Year>string</Year>

</DaylightTime>

SerializableTimeZoneTime

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Bias Represents the offset from the UTC offset that is identified by the Bias (UTC) element for standard
time and daylight saving time. This value is in minutes.

Time Represents the transition time of day to and from standard time and daylight saving time.

DayOrder Represents the _n_th occurrence of the day that is specified in the DayOfWeek (TimeZone) element
that represents the date of transition from and to standard time and daylight saving time.

Month Represents the transition month of the year to and from standard time and daylight saving time.

DayOfWeek Represents the day of the week when the transition to and from standard time and daylight saving
(TimeZone) time occurs.
Element Description

Year Used to define a time zone that changes depending on the year. This element is optional. This
element was introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

Parent elements

Element Description

TimeZone Contains elements that identify time zone information.

(Availability) This element also contains information about the transition between standard time and daylight saving time.

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/WorkingHours/TimeZone
/GetUserAvailabilityRequest/TimeZone

Example
The following partial GetUserAvailability request represents a client application in a location that
recognizes daylight saving time.

XML

<TimeZone xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Bias>480</Bias>

<StandardTime>

<Bias>0</Bias>

<Time>02:00:00</Time>

<DayOrder>5</DayOrder>

<Month>10</Month>

<DayOfWeek>Sunday</DayOfWeek>

</StandardTime>

<DaylightTime>

<Bias>-60</Bias>

<Time>02:00:00</Time>

<DayOrder>1</DayOrder>

<Month>4</Month>

<DayOfWeek>Sunday</DayOfWeek>

</DaylightTime>

</TimeZone>

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
Getting User Availability
DayOfMonth
Article • 03/29/2023 • 2 minutes to read

The DayOfMonth element describes the day in a month that a recurring item occurs.

XML

<DayOfMonth/>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

AbsoluteYearlyRecurrence
Represents a yearly recurrence pattern.

AbsoluteMonthlyRecurrence
Represents a monthly recurrence pattern.

Text value
A text value that represents an integer in the range of 1 to 31 is required. If for a
particular month this value is larger than the number of days in the month, the last day
of the month is assumed.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
DayOfWeek (TimeZone)
Article • 03/29/2023 • 2 minutes to read

The DayOfWeek element represents the day of the week on which the time zone transition occurs.

XML

<DayOfWeek>...</DayOfWeek>

DayOfWeekType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

StandardTime
Represents an offset from the time relative to Coordinated Universal Time (UTC) represented by the Bias (UTC) element.

This element also contains information about the transition to standard time from daylight saving time in regions where
daylight saving time is observed.

The following are the XPath expressions to this element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/WorkingHours/TimeZone/StandardTime

/GetUserAvailabilityRequest/TimeZone/StandardTime

DaylightTime
Represents an offset from the time relative to UTC represented by the Bias (UTC) element in regions where daylight saving
time is observed.

This element also contains information about when the transition to daylight saving time from standard time occurs.

The following are the XPath expressions to this element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/WorkingHours/TimeZone/DaylightTime

/GetUserAvailabilityRequest/TimeZone/DaylightTime

RecurringDayTransition Represents a time zone transition that occurs on the same day each year.

Text value
A text value is required. The text value is represented by an enumeration that has the following possible values:

Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Day
Weekday
WeekendDay

Remarks
A StandardTime element that contains a DayOrder element that has a value of 5, a Month element that has a value of 10, and
a DayOfWeek element that has a value of Sunday means that the transition from standard time to daylight saving time
occurs on the fifth Sunday of the tenth month.

The schema that describes this element is located in the IIS virtual directory that hosts Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
Getting User Availability
DayOfWeek (WorkingPeriod)
Article • 03/29/2023 • 2 minutes to read

The DayOfWeek element contains the list of working days scheduled for the mailbox user.

GetUserAvailabilityResponse
FreeBusyResponseArray
FreeBusyResponse
FreeBusyView
WorkingHours
WorkingPeriodArray
WorkingPeriod
DayOfWeek (WorkingPeriod)

XML

<DayOfWeek>Sunday Monday Tuesday Wednesday Thursday Friday Saturday</DayOfWeek>

DaysOfWeek

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

WorkingPeriod Contains the work week days and hours of the mailbox user.

The following is the XPath expression to this element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/WorkingHours/WorkingPeriodArray/WorkingPeriod[i[

Text value
A text value is returned if the mailbox user has days set to represent the work week. The following are the possible values for this
element:

Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday

The text values will be returned in that order.


Remarks
It is important to note that the difference between this element and the Availability DayOfWeek (TimeZone) element is the type.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
GetUserAvailabilityResponse
Getting User Availability
DayOfWeekIndex
Article • 03/29/2023 • 2 minutes to read

The DayOfWeekIndex element describes which week in a month is used in a relative


recurrence pattern.

XML

<DayOfWeekIndex/>

DayOfWeekIndexType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

RelativeYearlyRecurrence
Describes a relative yearly recurrence pattern.

RelativeMonthlyRecurrence
Describes a relative monthly recurrence pattern.

Text value
A text value is required. The following are the possible values:

First
Second
Third
Fourth
Last

Remarks
For example, the second Monday of a month may occur in the third week of that month.
If a month starts on a Friday, the first week of the month only contains a few days and
does not contain a Monday. Therefore, the first Monday would have to occur in the
second week.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
DayOrder
Article • 03/29/2023 • 2 minutes to read

The DayOrder element represents the _n_th occurrence of the day specified in the DayOfWeek (TimeZone) element
that represents the date of transition from and to standard time and daylight saving time.

XML

<DayOrder>...</DayOrder>

short

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

StandardTime Represents an offset from the time relative to Coordinated Universal Time (UTC) represented by the Bias (UTC) element.

This element also contains information about the transition to standard time from daylight saving time in regions where
daylight saving time is observed.

The following are the XPath expressions to the StandardTime element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/WorkingHours/TimeZone/StandardTime

/GetUserAvailabilityRequest/TimeZone/StandardTime

DaylightTime Represents an offset from the time relative to UTC represented by the Bias (UTC) element in regions where daylight saving
time is observed.

This element also contains information about when the transition to daylight saving time from standard time occurs.

The following are the XPath expressions to the DaylightTime element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/WorkingHours/TimeZone/DaylightTime

/GetUserAvailabilityRequest/TimeZone/DaylightTime

Text value
A text value is required. The value for the DayOrder element can be 1 through 5. The maximum value for this element
can be either 4 or 5, depending on the month and year.

Remarks
A StandardTime element that contains a DayOrder element that has a value of 5, a Month element that has a value of
10, and a DayOfWeek (TimeZone) element that has a value of Sunday means that the transition from standard time to
daylight saving time occurs on the fifth Sunday of the tenth month.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
Getting User Availability
DayQuality
Article • 03/29/2023 • 2 minutes to read

The DayQuality element represents the quality of the day for containing quality suggested meeting times.

GetUserAvailabilityResponse
SuggestionsResponse
SuggestionDayResultArray
SuggestionDayResult
DayQuality

XML

<DayQuality>Excellent or Good or Fair or Poor</DayQuality>

SuggestionQuality

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

SuggestionDayResult Represents a single day that contains suggested meeting times.

The following is the XPath 2.0 expression to this element:

/GetUserAvailabilityResponse/SuggestionsResponse/SuggestionDayResultArray/SuggestionDayResult[i]

Text value
A text value is required. The following are the possible values for this element:

Excellent
Good
Fair
Poor
Remarks
The schema that describes this element is located in the EWS virtual directory of the computer that is
running MicrosoftExchange Server 2007 that has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
GetUserAvailabilityResponse
Getting User Availability
DaysOfWeek (DayOfWeekType)
Article • 03/29/2023 • 2 minutes to read

The DaysOfWeek element describes days of the week that are used in item recurrence
patterns.

XML

<DaysOfWeek/>

DayOfWeekType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

RelativeYearlyRecurrence
Describes a relative yearly recurrence pattern.

RelativeMonthlyRecurrence
Describes a relative monthly recurrence pattern.

Text value
A text value is required. The following are the possible values:

Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Day (not used in the TimeChangePatternTypes)
Weekday (not used in the TimeChangePatternTypes)
WeekendDay (not used in the TimeChangePatternTypes)

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DaysOfWeek (DaysOfWeekType)
Article • 03/29/2023 • 2 minutes to read

The DaysOfWeek element describes days of the week that are used in item recurrence
patterns.

XML

<DaysOfWeek/>

DaysOfWeekType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

WeeklyRecurrence
Describes a weekly recurrence pattern.

Text value
A text value is required. The following are the possible values:

Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Day (this value is not valid for a weekly recurrence pattern)
Weekday (this value is not valid for a weekly recurrence pattern)
WeekendDay (this value is not valid for a weekly recurrence pattern)

A weekly recurrence pattern can contain multiple values. Values are separated by a
space character. For example, for a weekly recurrence on Tuesdays and Thursdays, the
text value will be "Tuesday Thursday".

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DeclineItem
Article • 03/29/2023 • 2 minutes to read

The DeclineItem element represents a Decline reply to a meeting request.

XML

<DeclineItem>

<ItemClass/>

<Sensitivity/>

<Body/>

<Attachments/>

<InternetMessageHeaders/>

<Sender/>

<ToRecipients/>

<CcRecipients/>

<BccRecipients/>

<IsReadReceiptRequested/>

<IsDeliveryReceiptRequested/>

<ReferenceItemId/>

<ReceivedBy/>

<ReceivedRepresenting/>

<ProposedStart/>

<ProposedEnd/>

</DeclineItem>

DeclineItemType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ItemClass
Represents the message class of an item.

Sensitivity
Indicates the sensitivity level of an item.

Body
Represents the actual body content of a message.

Attachments
Contains the item or file that is attached to an item in the Exchange store.

InternetMessageHeaders
Represents the Internet message header name for a given header within the headers collection.

Sender
Identifies the sender of an item.

ToRecipients
Contains a set of recipients of an item. These are the primary recipients of an item.

CcRecipients
Represents a collection of recipients that will receive a copy of the message.

BccRecipients
Represents a collection of recipients to receive a blind carbon copy (Bcc) of an e-mail.

IsReadReceiptRequested
Indicates whether the sender of an item requests a read receipt.
Element Description

IsDeliveryReceiptRequested Indicates whether the sender of an item requests a delivery receipt.

ReferenceItemId
Identifies the item to which the response object refers.

ReceivedBy
Identifies the delegate in a delegate access scenario. This element was introduced in Microsoft
Exchange Server 2007 Service Pack 1 (SP1).

ReceivedRepresenting
Identifies the principal in a delegate access scenario. This element was introduced in Exchange
2007 SP1.

ProposedStart
Specifies the proposed start time of the meeting.

ProposedEnd
Specifies the proposed end time of the meeting.

Parent elements

Element Description

AdjacentMeetings
Describes all items that are adjacent to a meeting time.

The following are some of the XPath expressions to this element:

/CalendarItem/AdjacentMeetings

/MeetingRequest/AdjacentMeetings

/SetItemField/CalendarItem/AdjacentMeetings

/AppendToItemField/CalendarItem/AdjacentMeetings

/AcceptItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/DeclineItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/TentativelyAcceptItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/SetItemField/CalendarItem/AdjacentMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/AppendToItemField/CalendarItem/AdjacentMeetings

/CreateAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/GetAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

ConflictingMeetings Describes all items that conflict with a meeting time.

The following are some of the XPath expressions to this element:

/CalendarItem/ConflictingMeetings

/MeetingRequest/ConflictingMeetings

/SetItemField/CalendarItem/ConflictingMeetings

/AppendToItemField/CalendarItem/ConflictingMeetings

/AcceptItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/DeclineItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/TentativelyAcceptItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/SetItemField/CalendarItem/ConflictingMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/AppendToItemField/CalendarItem/ConflictingMeetings
/CreateAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/GetAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

ResponseObjects
Contains a collection of all the response objects that are associated with an item in the Exchange
store.

Items Contains an array of items to create in the folder that is identified by the ParentFolderId
(NonEmptyArrayOfAllItemsType) (TargetFolderIdType) element.

Remarks
The schema that describes this element is located in the EWS virtual directory of the Exchange server that has the
Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Deduplication
Article • 03/29/2023 • 2 minutes to read

The Deduplication element indicates whether the search result should remove duplicate
items.

XML

<Deduplication> true | false </Deduplication>

Boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
SearchMailboxes | SetHoldOnMailboxes

Text value
A text value of true for the Deduplication element indicates that search results may not
contain duplicate items. A value of false indicates that search results may contain
duplicate items.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file types.xsd

Can be empty false


DelegatePermissions
Article • 03/29/2023 • 2 minutes to read

The DelegatePermissions element contains the delegate permission-level settings for a


user. This element was introduced in Microsoft Exchange Server 2007 Service Pack 1
(SP1).

XML

<DelegatePermissions>

<CalendarFolderPermissionLevel/>

<TasksFolderPermissionLevel/>

<InboxFolderPermissionLevel/>

<ContactsFolderPermissionLevel/>

<NotesFolderPermissionLevel/>

<JournalFolderPermissionLevel/>

</DelegatePermissions>

DelegatePermissionsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

CalendarFolderPermissionLevel Contains the permissions for the default Calendar folder. This
element was introduced in Exchange 2007 SP1.

TasksFolderPermissionLevel
Contains the permissions for the default Task folder. This
element was introduced in Exchange 2007 SP1.

InboxFolderPermissionLevel
Contains the permissions for the default Inbox folder. This
element was introduced in Exchange 2007 SP1.

ContactsFolderPermissionLevel Contains the permissions for the default Contacts folder. This
element was introduced in Exchange 2007 SP1.
Element Description

NotesFolderPermissionLevel
Contains the permissions for the default Notes folder. This
element was introduced in Exchange 2007 SP1.

JournalFolderPermissionLevel
Contains the permissions for the default Journal folder. This
element was introduced in Exchange 2007 SP1.

Parent elements

Element Description

DelegateUser Identifies a single delegate to add or update in a mailbox. This element was
introduced in Exchange 2007 SP1.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
AddDelegate operation
UpdateDelegate operation
EWS XML elements in Exchange
Adding Delegates
DelegateUser
Article • 03/29/2023 • 2 minutes to read

The DelegateUser element identifies a single delegate to add or update in a mailbox or


a delegate returned in a delegate management response. This element was introduced
in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

XML

<DelegateUser>

<UserId/>

<DelegatePermissions/>

<ReceiveCopiesOfMeetingMessages/>

<ViewPrivateItems/>

</DelegateUser>

DelegateUserType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

UserId
Identifies the delegate. This element was introduced in
Exchange 2007 SP1.

DelegatePermissions
Contains the delegate permission level settings. This
element was introduced in Exchange 2007 SP1.

ReceiveCopiesOfMeetingMessages Indicates whether a delegate receives copies of meeting-


related messages that are addressed to the principal. This
element was introduced in Exchange 2007 SP1.

ViewPrivateItems
Indicates whether a delegate has permission to view private
calendar items in the principal's mailbox. This element was
introduced in Exchange 2007 SP1.
Parent elements

Element Description

DelegateUsers
Contains the identities of delegates to add or update in a
mailbox.

DelegateUserResponseMessageType Contains response messages for delegate management


operations. This element was introduced in Microsoft
Exchange Server 2007 Service Pack 1 (SP1).

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
AddDelegate operation
UpdateDelegate operation
EWS XML elements in Exchange
Adding Delegates
DelegateUserResponseMessageType
Article • 03/29/2023 • 2 minutes to read

The DelegateUserResponseMessageType element contains the response message for a


single delegate user.

XML

<DelegateUserResponseMessageType>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<DelegateUser/>

</DelegateUserResponseMessageType>

DelegateUserResponseMessageType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

DelegateUser
Identifies a single delegate that is returned in a delegate management
response.

Parent elements
Element Description

ResponseMessages Contains the response messages for an Exchange


(ArrayOfDelegateUserResponseMessageType) Web Services delegate management request.

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

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
AddDelegate operation
GetDelegate operation
UpdateDelegate operation
RemoveDelegate operation
EWS XML elements in Exchange
DelegateUsers
Article • 03/29/2023 • 2 minutes to read

The DelegateUsers element contains the identities of delegates to add to or update in a


mailbox. This element was introduced in Microsoft Exchange Server 2007 Service Pack 1
(SP1).

XML

<DelegateUsers>

<DelegateUser>

</DelegateUsers>

ArrayOfDelegateUserType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

DelegateUser
Identifies a single delegate to add to or update in a mailbox.

Parent elements

Element Description

AddDelegate
Defines a request to add delegates to a mailbox. This element was introduced
in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

UpdateDelegate Defines a request to update delegates in a mailbox. This element was


introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

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.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
AddDelegate operation
UpdateDelegate operation
EWS XML elements in Exchange
Adding Delegates
DelegationState
Article • 03/29/2023 • 2 minutes to read

The DelegationState element represents the status of a delegated task.

XML

<DelegationState/>

TaskDelegateStateType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Task
Represents a task in the Exchange store.

Text value
This is a read-only property. The following are the possible values:

NoMatch

OwnNew

Owned

Accepted
Declined

Max

Remarks
Exchange Web Services in Microsoft Exchange Server 2007 does not support task
assignments.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Delegator
Article • 03/29/2023 • 2 minutes to read

The Delegator element contains the name of the delegator who assigned the task.

XML

<Delegator/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Task
Represents a task in the Exchange store.

Text value
The text value represents the name of the delegator.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Delete
Article • 03/29/2023 • 2 minutes to read

The Delete element indicates whether a client can delete a folder or item.

XML

<Delete>true or false</Delete>

boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

EffectiveRights Contains the rights of the client based on the permission settings for the item or
folder.

Actions
Represents the set of actions that are available to be taken on a message when
the conditions are fulfilled.

Text value
A text value of true indicates that a client can delete an item or folder. A value of false
indicates that a client cannot delete an item or folder.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Setting Folder-Level Permissions
Delete (FolderSync)
Article • 03/29/2023 • 2 minutes to read

The Delete element identifies a single folder to delete in the local client store.

SyncFolderHierarchyResponse
ResponseMessages
SyncFolderHierarchyResponseMessage
Changes (Hierarchy)
Delete (FolderSync)

XML

<Delete>

<FolderId/>

</Delete>

SyncFolderHierarchyDeleteType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier and change key of a folder.

Parent elements

Element Description

Changes Contains a sequenced array of change types that represent the type of differences
(Hierarchy) between the folders on the client and the folders on the computer that is running
Microsoft Exchange Server 2007.
Remarks
The schema that describes this element is located in the EWS virtual directory of the
Exchange 2007 computer that has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
SyncFolderHierarchy operation
EWS reference for Exchange
EWS XML elements in Exchange
Delete (ItemSync)
Article • 03/29/2023 • 2 minutes to read

The Delete element identifies a single item to delete in the local client store.

SyncFolderItemsResponse
ResponseMessages
SyncFolderItemsResponseMessage
Changes (Items)
Delete (ItemSync)

XML

<Delete>

<ItemId/>

</Delete>

SyncFolderItemsDeleteType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ItemId
Contains the unique identifier and change key of an item in the Exchange store.

Parent elements

Element Description

Changes Contains a sequence array of change types that represent the type of differences
(Items)
between the items on the client and the items on the Exchange server.
Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
SyncFolderItems operation
EWS XML elements in Exchange
DeleteAttachment
Article • 03/29/2023 • 2 minutes to read

The DeleteAttachment element is the root element in a request to delete an attachment


from the Exchange store.

XML

<DeleteAttachment>

<AttachmentIds/>

</DeleteAttachment>

DeleteAttachmentType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

AttachmentIds Contains an array of attachment identifiers that are used to delete the
attachments.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
DeleteAttachment operation
DeleteAttachmentResponse
Article • 03/29/2023 • 2 minutes to read

The DeleteAttachmentResponse defines a response to a DeleteAttachment request.

XML

<DeleteAttachmentResponse>

<ResponseMessages/>

</DeleteAttachmentResponse>

DeleteAttachmentResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

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

Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
DeleteAttachment operation
DeleteAttachment
EWS XML elements in Exchange
DeleteAttachmentResponseMessage
Article • 03/29/2023 • 2 minutes to read

The DeleteAttachmentResponseMessage element contains the status and result of a


single DeleteAttachment operation request.

DeleteAttachmentResponse
ResponseMessages
DeleteAttachmentResponseMessage

XML

<DeleteAttachmentResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<RootItemId/>

</DeleteAttachmentResponseMessage>

DeleteAttachmentResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of a DeleteAttachment operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description
Value Description

Success
Describes a request that is fulfilled.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes are moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota is exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

RootItemId
Identifies the parent item of a deleted attachment.

Parent elements
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

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

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
DeleteAttachment
DeleteAttachment operation
EWS reference for Exchange
EWS XML elements in Exchange
DeletedEvent
Article • 03/29/2023 • 2 minutes to read

The DeletedEvent element represents an event in which an item or folder is deleted.

XML

<DeletedEvent>

<Watermark/>

<TimeStamp/>

<ItemId/>

<ParentFolderId/>

</DeletedEvent>

XML

<DeletedEvent>

<Watermark/>

<TimeStamp/>

<FolderId/>

<ParentFolderId/>

</DeletedEvent>

BaseObjectChangedEventType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Watermark
Represents an event bookmark in the mailbox events table.

TimeStamp
Represents the timestamp of a deleted item or folder mailbox event.

FolderId
Represents the identifier of the deleted folder.

ItemId
Represents the identifier of the deleted item.
Element Description

ParentFolderId Represents the identifier of the parent folder of the deleted item or folder before
deletion.

Parent elements

Element Description

Notification Contains information about the subscription and the events that have occurred
since the last notification.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
Subscribe operation
GetEvents operation
Unsubscribe operation
DeletedOccurrence
Article • 03/29/2023 • 2 minutes to read

The DeletedOccurrence element represents a deleted occurrence of a recurring


calendar item.

XML

<DeletedOccurrence>

<Start/>

</DeletedOccurrence>

DeletedOccurrenceInfoType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Start
Represents the start time of a deleted occurrence of a recurring calendar item.

Parent elements

Element Description

DeletedOccurrences
Contains an array of deleted occurrences of a recurring calendar item.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
EWS reference for Exchange
DeletedOccurrences
Article • 03/29/2023 • 2 minutes to read

The DeletedOccurrences element contains an array of deleted occurrences of a


recurring calendar item.

XML

<DeletedOccurrences>

<DeletedOccurrence/>
</DeletedOccurrences>

NonEmptyArrayOfDeletedOccurrencesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

DeletedOccurrence
Represents a deleted occurrence of a recurring calendar item.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Remarks
This element is valid if the RecurringMaster text value is used for the CalendarItemType
element.
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
EWS reference for Exchange
DeletedOccurrenceStateDefinition
Article • 03/29/2023 • 2 minutes to read

The DeletedOccurrenceStateDefinition specifies the state for a deleted occurrence of a


calendar item.

XML

<DeletedOccurrenceStateDefinition>

<OccurrenceDate></OccurrenceDate>

<IsOccurrencePresent></IsOccurrencePresent>

</DeletedOccurrenceStateDefinition>

DeletedOccurrenceStateDefinitionType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Occurrence (Time Zone Specifies the date of the occurrence of a calendar item.
Transition)

IsOccurrencePresent
Specifies a Boolean value that indicates whether an occurrence of the
calendar item is present.

Parent elements

Element Description

StateDefinition
Specifies a state definition.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
DeleteFolder
Article • 03/29/2023 • 2 minutes to read

The DeleteFolder element defines a request to delete folders from a mailbox in the
Exchange store.

XML

<DeleteFolder DeleteType="">

<FolderIds/>

</DeleteFolder>

DeleteFolderType

Attributes and elements


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

Attributes

Attribute Description

DeleteType
Describes how a folder is deleted. This attribute is required.

DeleteType attribute

Value Description

HardDelete A folder is permanently removed from the store.

SoftDelete A folder is moved to the dumpster if the dumpster is enabled.

MoveToDeletedItems A folder is moved to the Deleted Items folder.

Child elements

Element Description

FolderIds
Contains an array of folder identifiers that are used to identify folders to delete.
Parent elements
None.

Text value
None.

Remarks
The MoveToDeletedItems and HardDelete options are transactional, which means that
by the time a Web service call completes, the database has moved the item to the
Deleted Items folder or permanently removed the item from the Exchange database.
This behavior is the same for MicrosoftExchange Server 2007 and Exchange Server 2010.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Message schema

Validation File Messages.xsd

Can be Empty False

See also
DeleteFolder operation
DeleteFolderField
Article • 03/29/2023 • 2 minutes to read

The DeleteFolderField element represents an operation to delete a given property from


a folder during an UpdateFolder call.

UpdateFolder
FolderChanges
FolderChange
Updates (Folder)
DeleteFolderField

XML

<DeleteFolderField>

<FieldURI/>

</DeleteFolderField>

XML

<DeleteFolderField>

<ExtendedFieldURI/>

</DeleteFolderField>

XML

<DeleteFolderField>

<IndexedFieldURI/>

</DeleteFolderField>

DeleteFolderFieldType

Attributes and elements


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

Attributes
None.

Child elements
Element Description

FieldURI
Identifies frequently referenced properties by URI.

IndexedFieldURI
Identifies individual members of a dictionary property.

ExtendedFieldURI
Identifies extended MAPI properties.

Parent elements

Element Description

Updates Contains a set of elements that define append, set, and delete changes to folder
(Folder)
properties.
The following is the XPath expression to this element:
/UpdateFolder/FolderChanges/FolderChange[i]/Updates

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
UpdateFolder operation
DeleteFolderResponse
Article • 03/29/2023 • 2 minutes to read

The DeleteFolderResponse element defines a response to a DeleteFolder request.

XML

<DeleteFolderResponse>

<ResponseMessages/>

</DeleteFolderResponse>

DeleteFolderResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

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

Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
DeleteFolder operation
DeleteFolder
EWS XML elements in Exchange
DeleteFolderResponseMessage
Article • 03/29/2023 • 2 minutes to read

The DeleteFolderResponseMessage element contains the status and result of a single


DeleteFolder operation request.

DeleteFolderResponse
ResponseMessages
DeleteFolderResponseMessage

XML

<DeleteFolderResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</DeleteFolderResponseMessage>

ResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of a DeleteFolder operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store goes offline during the batch.

- Active Directory Domain Services (AD DS) goes offline.

- Mailboxes are moved.

- The message database (MDB) goes offline.

- A password is expired.

- A quota is exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements

- Attributes or elements out of range

- Unknown tag

- Attribute or element not valid in the context

- Unauthorized access attempt by any client

- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
A text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains the value of 0.

MessageXml
Provides additional error response information.

Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.
Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
DeleteFolder operation
EWS reference for Exchange
EWS XML elements in Exchange
Deleting Folders
DeleteFromFolderStateDefinition
Article • 03/29/2023 • 2 minutes to read

The DeleteFromFolderStateDefinition element specifies the state when an item is


deleted from a folder.

XML

<DeleteFromFolderStateDefinition>

<OccurrenceDate></OccurrenceDate>

<IsOccurrencePresent></IsOccurrencePresent>

</DeleteFromFolderStateDefinition>

DeleteFromFolderStateDefinitionType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Occurrence (Time Zone Specifies the date of the occurrence of a calendar item.
Transition)

IsOccurrencePresent
Specifies a Boolean value that indicates whether an occurrence of the
calendar item is present.

Parent elements

Element Description

StateDefinition
Specifies a state definition.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
DeleteItem
Article • 03/29/2023 • 2 minutes to read

The DeleteItem element defines a request to delete an item from a mailbox in the
Exchange store.

XML

<DeleteItem DeleteType="" SendMeetingCancellations=""


AffectedTaskOccurrences="" SuppressReadReceipts="">

<ItemIds/>

</DeleteItem>

DeleteItemType

Attributes and elements


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

Attributes

Attribute Description

DeleteType
Describes how an item is deleted. This attribute is required.

SendMeetingCancellations Describes whether a calendar item deletion is communicated to


attendees. This attribute is required when calendar items are
deleted. This attribute is optional if non-calendar items are deleted.

AffectedTaskOccurrences
Describes whether a task instance or a task master is deleted by a
DeleteItem operation. This attribute is required when tasks are
deleted. This attribute is optional when non-task items are deleted.

SuppressReadReceipts
Indicates whether read receipts for the deleted item are suppressed.
A text value of true, indicates that the read receipts are suppressed.
A value of false indicates that the read receipts are sent to the
sender. This attribute is optional.

DeleteType attribute

Value Description

HardDelete An item is permanently removed from the store.


Value Description

SoftDelete An item is moved to the dumpster if the dumpster is enabled.

MoveToDeletedItems An item is moved to the Deleted Items folder.

SendMeetingCancellations attribute

Value Description

SendToNone A calendar item is deleted without sending a cancellation message.

SendOnlyToAll A calendar item is deleted and a cancellation message is sent to all


attendees.

SendToAllAndSaveCopy A calendar item is deleted and a cancellation message is sent to all


attendees. A copy of the cancellation message is saved in the Sent
Items folder.

AffectedTaskOccurrences attribute

Value Description

AllOccurrences A delete item request deletes the master task, and therefore all
recurring tasks that are associated with the master task.

SpecifiedOccurrenceOnly A delete item request deletes only specific occurrences of a task.

Child elements

Element Description

ItemIds
Contains an array of items, occurrence items, and recurring master items to delete
from a mailbox in the Exchange store. The DeleteItem operation can be performed on
any item type.

Parent elements
None.

Remarks
The MoveToDeletedItems and HardDelete options are transactional, which means that
by the time a Web service call completes, the database has moved the item to the
Deleted Items folder or permanently removed the item from the Exchange database.
This behavior is the same for MicrosoftExchange Server 2007 and Exchange Server 2010.

The SoftDelete option works differently for different target versions of Exchange.
SoftDelete for Exchange 2007 sets a bit on the item that indicates to the Exchange
database that the item will be moved to the dumpster folder at an indeterminate time in
the future. SoftDelete for Exchange 2010 immediately moves the item to the dumpster.
SoftDelete is not an option for folder deletion. SoftDelete traversal searches for items
and folders will not return any results.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
DeleteItemResponse
DeleteItem operation
DeleteItemField
Article • 03/29/2023 • 2 minutes to read

The DeleteItemField element represents an operation to delete a given property from


an item during an UpdateItem call.

UpdateItem
ItemChanges
ItemChange
Updates (Item)
DeleteItemField

XML

<DeleteItemField>

<FieldURI/>

</DeleteItemField>

XML

<DeleteItemField>

<IndexedFieldURI/>

</DeleteItemField>

XML

<DeleteItemField>

<ExtendedFieldURI/>

</DeleteItemField>

DeleteItemFieldType

Attributes and elements


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

Attributes
None.

Child elements
Element Description

FieldURI
Identifies frequently referenced properties by URI.

IndexedFieldURI
Identifies individual members of a dictionary property.

ExtendedFieldURI
Identifies extended MAPI properties.

Parent elements

Element Description

Updates Contains a set of elements that define append, set, and delete changes to item
(Item)
properties.

The following is the XPath expression to this element:

/UpdateItem/ItemChanges/ItemChange[i]/Updates

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name types schema

Validation File Types.xsd

Can be Empty False

See also
UpdateItem operation
DeleteItemResponse
Article • 03/29/2023 • 2 minutes to read

The DeleteItemResponse element defines a response to a single DeleteItem request.

XML

<DeleteItemResponse>

<ResponseMessages/>

</DeleteItemResponse>

DeleteItemResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

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

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
DeleteItem operation
DeleteItem
EWS XML elements in Exchange
DeleteItemResponseMessage
Article • 03/29/2023 • 2 minutes to read

The DeleteItemResponseMessage element contains the status and result of a single


DeleteItem operation request.

DeleteItemResponse
ResponseMessages
DeleteItemResponseMessage

XML

<DeleteItemResponseMessage>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</DeleteItemResponseMessage>

DeleteItemResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of a DeleteItem operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store goes offline during the batch.


- Active Directory Domain Services (AD DS) goes offline.
- Mailboxes are moved.
- The message database (MDB) goes offline.
- A password is expired.
- A quota is exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- A client attempt to set the error logging level above the maximum level that is
permitted by the administrator
- A client attempt to set the severity failure level below the default level that is
specified by the administrator
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

Parent elements
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

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

Version differences
In versions of Exchange starting with build 15.00.0986.00, the
DeleteItemResponseMessage element is of type DeleteItemResponseMessageType. In
previous versions, the element is of type ResponseMessageType.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
DeleteItem operation
EWS reference for Exchange
EWS XML elements in Exchange
Deleting Items (Exchange Web Services)
DeleteItems
Article • 03/29/2023 • 2 minutes to read

The DeleteItems element indicates which items in a folder a user has permission to
delete. This element was introduced in Microsoft Exchange Server 2007 Service Pack 1
(SP1).

XML

<DeleteItems>None or Owned or All</DeleteItems>

PermissionActionType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Permission
Defines the access that a user has to a folder. This element was introduced
in Exchange 2007 SP1.

CalendarPermission Defines the access that a user has to a Calendar folder. This element was
introduced in Exchange 2007 SP1.

Text value
The following table lists the possible values for the DeleteItems element.

DeleteItems element text values


Value Description

None Indicates that the user does not have permission to delete items in the folder.

Owned Indicates that the user has permission to delete the items that the user owns in the
folder.

All Indicates that the user has permission to delete all items in the folder.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Setting Folder-Level Permissions
DeleteRuleOperation
Article • 03/29/2023 • 2 minutes to read

The DeleteRuleOperation element contains an operation to delete an existing Inbox


rule.

UpdateInboxRules
Operations

XML

<DeleteRuleOperation>

<RuleId/>

</DeleteRuleOperation>

DeleteRuleOperationType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

RuleId
Specifies the identifier of the rule to delete.

Parent elements

Element Description

Operations
Contains an array of rule operations that can be performed on an Inbox.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
UpdateInboxRules
SetRuleOperation
CreateRuleOperation
EWS XML elements in Exchange
DeleteType
Article • 03/29/2023 • 2 minutes to read

The DeleteType element indicates how items in a conversation are deleted.

ApplyConversationAction
ConversationActions
ConversationAction
DeleteType

XML

<DeleteType> HardDelete | MoveToDeletedItems | SoftDelete </DeleteType>

DisposalType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ConversationAction
Contains a single action to be applied to a single conversation.

Text value
The text value of the DeleteType element indicates how items in a conversation are
deleted. The following are the possible text values:
HardDelete - Indicates that items in a conversation are permanently removed from
the mailbox database.

MoveToDeleteItems - Indicates that items in a conversation are moved to the


Deleted Items folder.

SoftDelete - Indicates that items in a conversation are moved to the dumpster if


the dumpster is enabled.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
ApplyConversationAction operation
EWS XML elements in Exchange
DeleteUserConfiguration
Article • 03/29/2023 • 2 minutes to read

The DeleteUserConfiguration element represents a request to delete a user


configuration object.

XML

<DeleteUserConfiguration>

<UserConfigurationName/>

</DeleteUserConfiguration>

DeleteUserConfigurationType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

UserConfigurationName
Represents the name of the user configuration object to delete.

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DeleteUserConfigurationResponse
Article • 03/29/2023 • 2 minutes to read

The DeleteUserConfigurationResponse element defines a response to a single


DeleteUserConfiguration request.

XML

<DeleteUserConfigurationResponse> <ResponseMessages/>
</DeleteUserConfigurationResponse>

DeleteUserConfigurationResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DeleteUserConfigurationResponseMess
age
Article • 03/29/2023 • 2 minutes to read

The DeleteUserConfigurationResponseMessage element contains the status and result


of a single DeleteUserConfiguration request.

XML

<DeleteUserConfigurationResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</DeleteUserConfigurationResponseMessage>

ResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and reserved for future use. This element contains a value
of 0.

MessageXml
Provides additional error response information.

Parent elements

Element Description
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DeliverMeetingRequests
Article • 03/29/2023 • 2 minutes to read

The DeliverMeetingRequests element defines how meeting requests are handled


between the delegate and the principal. This element was introduced in Microsoft
Exchange Server 2007 Service Pack 1 (SP1).

XML

<DeliverMeetingRequests>DelegatesOnly or DelegatesAndMe or
DelegatesAndSendInformationToMe or NoForward</DeliverMeetingRequests>

DeliverMeetingRequestsType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

AddDelegate
Defines a request to add delegates to a mailbox. This element was
introduced in Exchange 2007 SP1.

UpdateDelegate
Defines a request to update delegates in a mailbox. This element was
introduced in Exchange 2007 SP1.

GetDelegateResponse Contains the status and result of a GetDelegate request. This element was
introduced in Exchange 2007 SP1.

Text value
The following table lists the possible values for the DeliverMeetingRequests element.

DeliverMeetingRequests element values

Value Description

DelegatesOnly Meeting requests are forwarded to the delegate and


moved to the Deleted Items folder in the principal's
mailbox.

DelegatesAndMe Meeting requests are forwarded to the delegate and


remain in the Inbox folder in the principal's mailbox.

DelegatesAndSendInformationToMe Meeting requests are forwarded to the delegate and


remain in the Inbox folder in the principal's mailbox, but
the Accept, Tentative, and Decline buttons do not appear
in the Microsoft Office Outlook reading pane.

NoForward Meeting requests are not forwarded to the delegate.

Remarks
The DeliverMeetingRequests setting affects all delegates in a principal's mailbox.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
AddDelegate operation
UpdateDelegate operation
GetDelegate operation
EWS XML elements in Exchange
Adding Delegates
DeliveryRestricted
Article • 03/29/2023 • 2 minutes to read

The DeliveryRestricted element indicates whether delivery restrictions will prevent the
sender's message from reaching the recipient.

XML

<DeliveryRestricted>true | false</DeliveryRestricted>

Boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

MailTips
Represents values for various types of mail tips.

Text value
The text value of this element is true if delivery restrictions will prevent the sender's
message from reaching the recipient. The value is false if delivery restrictions will not
prevent the sender's message from reaching the recipient.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DeliveryStatus
Article • 03/29/2023 • 2 minutes to read

The DeliveryStatus element specifies the status for a message.

XML

<DeliveryStatus>Unsuccessful | Pending | Delivered | Transferred |


Read</DeliveryStatus>

MessageTrackingDeliveryStatusType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

RecipientTrackingEvent
Contains information for a single event for a recipient.

Text value
The following table lists the possible text values for the DeliveryStatus element.

DeliveryStatus element values

Value Description

Unsuccessful Specifies that a message was not delivered.

Pending Specifies that the message is waiting for approval from a moderator.
Value Description

Delivered Specifies that the message was delivered to all of the specified recipients.

Transferred Specifies that the message was transferred to a server outside the search scope.

Read Specifies that the message was delivered and read by the recipients.

Remarks
The DeliveryStatus element was of type MessageTrackingDeliveryStatusType in
Exchange Server 2010.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Department
Article • 03/29/2023 • 2 minutes to read

The Department element represents the contact's department at work.

XML

<Department/>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Text value
A text value is required.

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.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
Creating Contacts (Exchange Web Services)
Departments
Article • 03/29/2023 • 2 minutes to read

The Departments element specifies an array of department names and the identifiers of
their source attributions for the associated persona.

XML

<Departments>

<StringAttributedValue></StringAttributedValue>

</Departments>

ArrayOfStringAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

StringAttributedValue Specifies an instance in an array of attributes associated with a persona


element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Description
Article • 03/29/2023 • 2 minutes to read

The Description element specifies the descriptive text for the retention policy.

XML

<Description></Description>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

RetentionPolicyTag
Specifies the retention policy for a mailbox item.

Text value
The text value of the Description element is a string value that describes the retention
policy.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Description (MasterMailboxType)
Article • 03/29/2023 • 2 minutes to read

The Description (MasterMailboxType) element is intended for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
DescriptiveLinkKey
Article • 03/29/2023 • 2 minutes to read

The DescriptiveLinkKey element is currently unused and is reserved for future use. It contains a value of 0.

XML

<DescriptiveLinkKey/>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ResponseMessage
Provides descriptive information about the response status.

The following are some possible XPath expressions to this element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/ResponseMessage

/GetUserAvailabilityResponse/SuggestionsResponse/ResponseMessage

/SetUserOofSettingsResponse/ResponseMessage

/GetUserOofSettingsResponse/ResponseMessage

DeleteItemResponseMessage
Contains the status and result of a single DeleteItem request.

SendItemResponseMessage
Contains the status and result of a single SendItem request.

DeleteFolderResponseMessage
Contains the status and result of a single DeleteFolder request.

DeleteAttachmentResponseMessage
Contains the status and result of a single DeleteAttachment request.

UnsubscribeResponseMessage
Contains the status and result of a single Unsubscribe request.

CreateFolderResponseMessage
Contains the status and result of a single CreateFolder request.

GetFolderResponseMessage
Contains the status and result of a single GetFolder request.

UpdateFolderResponseMessage
Contains the status and result of a single UpdateFolder request.

MoveFolderResponseMessage
Contains the status and result of a single MoveFolder request.
Element Description

CopyFolderResponseMessage
Contains the status and result of a single CopyFolder request.

CreateManagedFolderResponseMessage
Contains the status and result of a single CreateManagedFolder request.

FindFolderResponseMessage
Contains the status and result of a single FindFolder request.

CreateItemResponseMessage
Contains the status and result of a single CreateItem request.

GetItemResponseMessage
Contains the status and result of a single GetItem request.

UpdateItemResponseMessage
Contains the status and result of a single UpdateItem request.

MoveItemResponseMessage
Contains the status and result of a single MoveItem request.

CopyItemResponseMessage
Contains the status and result of a single CopyItem request.

CreateAttachmentResponseMessage
Contains the status and result of a single CreateAttachment request.

GetAttachmentResponseMessage
Contains the status and result of a single GetAttachment request.

FindItemResponseMessage
Contains the status and result of a single FindItem request.

ResolveNamesResponseMessage
Contains the status and result of a ResolveNames request.

ExpandDLResponseMessage
Contains the status and result of a single ExpandDL request.

SubscribeResponseMessage
Contains the status and result of a single Subscribe request.

GetEventsResponseMessage
Contains the status and result of a single GetEvents request.

SendNotificationResponseMessage
Contains the status and result of a single SendNotification request.

SyncFolderHierarchyResponseMessage
Contains the status and result of a SyncFolderHierarchy request.

SyncFolderItemsResponseMessage
Contains the status and result of a SyncFolderItems request.

ConvertIdResponseMessage
Contains the status and result of a ConvertId request.

AddDelegateResponse
Contains the status and result of an AddDelegate request.

GetServerTimeZonesResponseMessage
Contains the status and result of a GetServerTimeZones request.

GetSharingFolderResponseMessage
Contains the status and result of a GetSharingFolder request.

GetSharingFolderResponse
Defines a response to a GetSharingFolder request.

GetSharingMetadataResponseMessage
Contains the status and result of a GetSharingMetadata request.

GetSharingMetadataResponse
Defines a response to a GetSharingMetadata request.

RefreshSharingFolderResponseMessage
Contains the status and result of a RefreshSharingFolder request.

RefreshSharingFolderResponse
Defines a response to a RefreshSharingFolder request.

FindConversationResponse
Contains the status and results of a FindConversation response.

EmptyFolderResponseMessage
Contains the status and result of a single EmptyFolder request.

UpdateInboxRulesResponse
Contains the status and result of an UpdateInboxRules request.

UploadItemsResponseMessage
Contains a status and result of an UploadItemsResponse request.

GetInboxRulesResponse
Contains a response to a GetInboxRules request.

GetServiceConfigurationResponse Contains a response to a GetServiceConfiguration request.


Element Description

ServiceConfigurationResponseMessageType Contains service configuration settings.

Text value
A text value is required if this element is used. This element is read-only.

Remarks
This element is not required and is not included in all responses.

The schema that describes this element is located in the IIS virtual directory that hosts Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS reference for Exchange
EWS XML elements in Exchange
DestinationFolderId
Article • 03/29/2023 • 2 minutes to read

The DestinationFolderId element indicates the destination folder for copy and move
actions.

ApplyConversationAction
ConversationActions
ConversationAction
DestinationFolderId

XML

<DestinationFolderId>

<FolderId/>

</DestinationFolderId>

XML

<DestinationFolderId>

<DistinguishedFolderId/>

</DestinationFolderId>

TargetFolderIdType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier and change key of the destination folder.

DistinguishedFolderId
Identifies folders that can be referenced by name.
Parent elements

Element Description

ConversationAction
Contains a single action to be applied to a single conversation.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
ApplyConversationAction operation
DetailedSuggestionsWindow
Article • 03/29/2023 • 2 minutes to read

The DetailedSuggestionsWindow element identifies the time span that is queried for
detailed information about suggested meeting times.

GetUserAvailabilityRequest
SuggestionsViewOptions
DetailedSuggestionsWindow

XML

<DetailedSuggestionsWindow>

<StartTime>...</StartTime>

<EndTime>...</EndTime>

</DetailedSuggestionsWindow>

Duration

Attributes and elements


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

Attributes
None.

Child elements

Element Description

StartTime Represents the start of the time span queried for detailed information about
suggested meeting times.

EndTime
Represents the end of the time span queried for detailed information about
suggested meeting times.

Parent elements

Element Description
Element Description

SuggestionsViewOptions
Contains the options for obtaining meeting suggestion information.
The following is the XPath to this element:
/GetUserAvailabilityRequest/SuggestionViewOptions

Remarks
This element is not required.

7 Note

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

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
Getting User Availability
Diagnostics
Article • 03/29/2023 • 2 minutes to read

The Diagnostics element provides timing and performance information that is used for
reporting in a DataCenter.

XML

<Diagnostics>

<String/>

</Diagnostics>

ArrayOfStringsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

String
Contains a string that is used by items, contacts, tasks, and conversations.

Parent elements

Element Description

FindMessageTrackingReportResponse Contains the status and result of a single


FindMessageTrackingReport operation request.

GetMessageTrackingReportResponse
Contains the response for the GetMessageTrackingReport
operation.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindMessageTrackingReport operation
GetMessageTrackingReport operation
EWS XML elements in Exchange
DiagnosticsLevel
Article • 03/29/2023 • 2 minutes to read

The DiagnosticsLevel element represents timing and performance information that will
be used to derive the report.

XML

<DiagnosticsLevel/>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

FindMessageTrackingReport Contains criteria for the types of messages to find.

GetMessageTrackingReport
Contains the request for the GetMessageTrackingReport operation
to retrieve the full message tracking report for the specified ID.

Text value
A text value that represents a string is required if this element is used.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetMessageTrackingReport operation
EWS XML elements in Exchange
DialString (Exchange Web Services)
Article • 03/29/2023 • 2 minutes to read

The DialString element represents the dial string of the telephone number that is called
to play an item by telephone. This element is required.

XML

<DialString/>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

PlayOnPhone (Exchange Web Services)


Represents a request to read an item on a telephone.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Dictionary
Article • 03/29/2023 • 2 minutes to read

The Dictionary element defines a set of dictionary property entries for a user
configuration object.

XML

<Dictionary>

<DictionaryEntry/>

</Dictionary>

UserConfigurationDictionaryType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

DictionaryEntry
Specifies the contents of a single dictionary entry property.

Parent elements

Element Description

UserConfiguration
Defines a single user configuration object.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DictionaryEntry
Article • 03/29/2023 • 2 minutes to read

The DictionaryEntry element specifies the contents of a single dictionary entry property.

XML

<DictionaryEntry>

<DictionaryKey/>

<DictionaryValue/>

</DictionaryEntry>

UserConfigurationDictionaryEntryType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

DictionaryKey
Specifies the dictionary key for a dictionary property.

DictionaryValue
Specifies the dictionary value for a dictionary property.

Parent elements

Element Description

Dictionary
Defines a set of dictionary property entries for a user configuration object.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DictionaryKey
Article • 03/29/2023 • 2 minutes to read

The DictionaryKey element specifies the dictionary key for a dictionary property.

XML

<DictionaryKey>

<Type/>

<Value/>

</DictionaryKey>

UserConfigurationDictionaryObjectType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Type (UserConfiguration)
Specifies a dictionary object type.

The type can be one of the following string values:

- DateTime
- Boolean
- Byte
- String
- Integer32
- UnsignedInteger32
- Integer64
- UnsignedInteger64
- StringArray
- ByteArray

Value (UserConfiguration)
Specifies the dictionary object value as a string.
Parent elements

Element Description

DictionaryEntry
Specifies the contents of a single dictionary entry property.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DictionaryValue
Article • 03/29/2023 • 2 minutes to read

The DictionaryValue element specifies the dictionary value for a dictionary property.

XML

<DictionaryValue>

<Type/>

<Value/>

</DictionaryValue>

UserConfigurationDictionaryObjectType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Type (UserConfiguration)
Specifies the dictionary object type.

Value (UserConfiguration)
Specifies the dictionary object value as a string.

Parent elements

Element Description

DictionaryEntry
Specifies the contents of a single dictionary entry property.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DirectoryId
Article • 03/29/2023 • 2 minutes to read

The DirectoryId element contains the directory ID of a contact.

XML

<DirectoryId/>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element name Description

Contact
Represents an Exchange contact item.

Text value
The text value is a string that represents the directory ID of the contact.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

This element was introduced in Exchange Server 2010 Service Pack 2 (SP2).
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Creating Contacts (Exchange Web Services)
DirectReports
Article • 03/29/2023 • 2 minutes to read

The DirectReports element contains SMTP information that identifies the direct reports
of a contact.

XML

<DirectReports>

<Mailbox/>

</DirectReports>

SingleRecipientType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Mailbox
Identifies a mail-enabled Active Directory directory service object.

Parent elements

Element name Description

Contact
Represents contact item in the Exchange store.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

This element was introduced in Exchange Server 2010 Service Pack 2 (SP2).
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Creating Contacts (Exchange Web Services)
DisableApp
Article • 03/29/2023 • 2 minutes to read

The DisableApp element specifies a request to disable an app.

XML

<DisableApp>

<ID></ID>

<DisableReason></DisableReason>

</DisableApp>

DisableAppType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ID (String)
Specifies the identifier of an item.

DisableReason
Specifies the reason for disabling an app.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

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

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
DisableAppResponse
Article • 03/29/2023 • 2 minutes to read

The DisableAppResponse element specifies the response to a DisableApp request.

XML

<DisableAppResponse>

<MessageText></MessageText>

<ResponseCode></ResponeCode>

<DescriptiveLinkKey></DescriptiveLinkKey>

<MessageXml></MessageXml>

</DisableAppResponse>

DisableAppResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides status information about the request.

DescriptiveLinkKey
Currently unused and reserved for future use.

MessageXml
Provides additional error response information.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
DisableReason
Article • 03/29/2023 • 2 minutes to read

The DisableReason element specifies the reason for disabling an app.

XML

<DisableReason> NoReason | OutlookClientPerformance | OWAClientPerformance |


MobileClientPerformance </DisableReason>

DisableReasonType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

DisableApp
Specifies a request to disable an app.

Text value
DisableReason element text value

Value Description

NoReason No reason given

OutlookClientPerformance To improve email client performance.

OWAClientPerformance To improve Web app client performance.


Value Description

MobileClientPerformance To improve mobile client performance.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
DisclaimerText
(EncryptionConfigurationResponseType)
Article • 03/29/2023 • 2 minutes to read

The DisclaimerText (EncryptionConfigurationResponseType) element is intended for


internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
DisclaimerText
(SetEncryptionConfigurationType)
Article • 03/29/2023 • 2 minutes to read

The DisclaimerText (SetEncryptionConfigurationType) element is intended for internal


use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
DisconnectPhoneCall
Article • 03/29/2023 • 2 minutes to read

The DisconnectPhoneCall element represents a request to disconnect a call.

XML

<DisconnectPhoneCall>

<PhoneCallId/>

</DisconnectPhoneCall>

DisconnectPhoneCallType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

PhoneCallId
Specifies the identifier of the call to disconnect. This element is required.

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DisconnectPhoneCallResponse
Article • 03/29/2023 • 2 minutes to read

The DisconnectPhoneCallResponse element contains the status and result of a single


DisconnectPhoneCall request.

XML

<DisconnectPhoneCallResponse ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</DisconnectPhoneCallResponse>

DisconnectPhoneCallResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and reserved for future use. This element contains a value
of 0.

MessageXml
Provides additional error response information.

Parent elements
None.
Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DiscoverySearchConfiguration
Article • 03/29/2023 • 2 minutes to read

The DiscoverySearchConfiguration element specifies the configuration for eDiscovery


search.

XML

<DiscoverySearchConfiguration>

<SearchId></SearchId>

<SearchQuery></SearchQuery>

<SearchableMailboxes></SearchableMailboxes>

</DiscoverySearchConfiguration>

DiscoverySearchConfigurationType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

SearchId
Specifies the identifier of the search.

SearchQuery
Specifies the name of an eDiscovery search query.

SearchableMailboxes Contains a list of the mailboxes returned from a GetSearchableMailboxes


request.

Parent elements

Element Description

DiscoverySearchConfigurations
Specifies an array of DiscoverySearchConfiguration elements.
Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
DiscoverySearchConfigurations
Article • 03/29/2023 • 2 minutes to read

The DiscoverySearchConfigurations element specifies an array of


DiscoverySearchConfiguration elements.

XML

<DiscoverySearchConfigurations>

<DiscoverySearchConfiguration></DiscoverySearchConfiguration>

</DiscoverySearchConfigurations>

ArrayOfDiscoverySearchConfigurationType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

DiscoverySearchConfiguration
Specifies the configuration for eDiscovery search.

Parent elements

Element Description

GetDiscoverySearchConfigurationResponseMessage Specifies the response message for a


GetDiscoverySearchConfiguration request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
DisplayCc
Article • 03/29/2023 • 2 minutes to read

The DisplayCc element represents the display string that is used for the contents of the
Cc box. This is the concatenated string of all Cc recipient display names.

XML

<DisplayCc/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

Message
Represents an Exchange e-mail message.

Task
Represents a task in the Exchange store.

Text value
The text value represents the display string that is used for the contents of the Cc box.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DisplayName
(FederatedDirectoryGroupType)
Article • 03/29/2023 • 2 minutes to read

The DisplayName (FederatedDirectoryGroupType) element is intended for internal use


only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
DisplayName (MasterMailboxType)
Article • 03/29/2023 • 2 minutes to read

The DisplayName (MasterMailboxType) element is intended for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
DisplayName (NonEmptyStringType)
Article • 03/29/2023 • 2 minutes to read

The DisplayName element contains the display name of a new instant messaging group
contact or the display name of a new instant messaging group.

XML

<DisplayName></DisplayName>

NonEmptyStringType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
AddDistributionGroupToImList | AddImGroup | AddNewImContactToGroup | ImGroup

Text value
The text value of the DisplayName element is the display name of a new instant
messaging group contact or the display name of a new instant messaging group.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file types.xsd

Can be empty false


DisplayName (string)
Article • 03/29/2023 • 2 minutes to read

The DisplayName element defines the display name of a folder, contact, distribution list,
delegate user, location, or rule.

XML

<DisplayName/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarFolder
Represents a calendar folder in a mailbox.

Contact
Represents an Exchange contact item.

ContactsFolder
Represents a contact folder in a mailbox.

DistributionList
Represents a distribution list.

Folder
Represents a folder in a mailbox.

Rule (RuleType)
Represents a rule in a user's mailbox.

SearchFolder
Represents a search folder in a mailbox.

TasksFolder
Represents a task folder in a mailbox.
Element Description

UserId
Identifies a delegate user or a user who has folder access permissions.

Text value
A text value that represents the display name is required if this element is used.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Example
This following example shows how to create a new folder and to set the DisplayName of
the folder to "TestFolder".

C#

FolderType folder = new FolderType();

folder.DisplayName = "TestFolder";

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
DisplayName (VotingOptionDataType)
Article • 03/29/2023 • 2 minutes to read

The DisplayName (VotingOptionDataType) element specifies the display name of a


voting option.

XML

<DisplayName />

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
VotingOptionData

Text value
The text value of the DisplayName (VotingOptionDataType) element is the display
name of a voting option.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
VotingOptionData
EWS XML elements in Exchange
DisplayNameFirstLast
Article • 03/29/2023 • 2 minutes to read

The DisplayNameFirstLast element specifies the display name of the associated persona
in the format, "First Name", "Last Name".

XML

<DisplayNameFirstLast>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Text value
The text value of the DisplayNameFirstLast element is a string value containing the
display name, with the given name first.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
DisplayNameFirstLastHeader
Article • 03/29/2023 • 2 minutes to read

The DisplayNameFirstLastHeader element specifies the header for the display name,
first name first.

XML

<DisplayNameFirstLastHeader></DisplayNameFirstLastHeader>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Text value
The text value of the DisplayNameFirstLastHeader element is a string value that
specifies the header.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
DisplayNameFirstLastSortKey
Article • 03/29/2023 • 2 minutes to read

The DisplayNameFirstLastSortKey element contains the sort key for a display name in
first name, last name order.

XML

<DisplayNameFirstLastSortKey></DisplayNameFirstLastSortKey>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
Persona

Text value
The text value of the DisplayNameFirstLastSortKey element is the sort key for a
persona's display name, in first name, last name order.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
DisplayNameLastFirst
Article • 03/29/2023 • 2 minutes to read

The DisplayNameLastFirst element specifies the display name of the associated persona
in the format, "Last Name", "First Name".

XML

<DisplayNameLastFirst></DisplayNameLastFirst>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Text value
The text value of the DisplayNameLastFirst element is a string value that specifies the
display name, with the surname first.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
DisplayNameLastFirstHeader
Article • 03/29/2023 • 2 minutes to read

The DisplayNameLastFirstHeader element specifies the header for the display name,
last name first.

XML

<DisplayNameLastFirstHeader></DisplayNameLastFirstHeader>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Text value
The text value of the DisplayNameLastFirstHeader element is a string value that
specifies the display name, surname first.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
DisplayNameLastFirstSortKey
Article • 03/29/2023 • 2 minutes to read

The DisplayNameLastFirstSortKey element contains the sort key for a display name in
last name, first name order.

XML

<DisplayNameLastFirstSortKey></DisplayNameLastFirstSortKey>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
Persona

Text value
The text value of the DisplayNameLastFirstSortKey element is the sort key for a
persona's name in last name, first name order.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Item Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
DisplayNamePrefix
Article • 03/29/2023 • 2 minutes to read

The DisplayNamePrefix element specifies the prefix of the display name of the
associated persona.

XML

<DisplayNamePrefix></DisplayNamePrefix>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Text value
The text value of the DisplayNamePrefix element is a string value that specifies the
prefix for the display name.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
DisplayNamePrefixes
Article • 03/29/2023 • 2 minutes to read

The DisplayNamePrefixes element specifies an array of display name prefixes and the
identifiers of their source attributions for the associated persona.

XML

<DisplayNamePrefixes>

<StringAttributedValue></StringAttributedValue>

</DisplayNamePrefixes>

ArrayOfStringAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

StringAttributedValue Specifies an instance in an array of attributes associated with a persona


element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
DisplayNames
Article • 03/29/2023 • 2 minutes to read

The DisplayNames element specifies an array of display names and the identifiers of
their source attributions for the associated persona.

XML

<DisplayNames>

<StringAttributedValue></StringAttributedValue>

</DisplayNames>

ArrayOfStringAttributedValuesType

Attributes and elements


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

Attributes
None

Child elements

Element Description

StringAttributedValue Specifies an instance in an array of attributes associated with a persona


element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
DisplayTo
Article • 03/29/2023 • 2 minutes to read

The DisplayTo element represents the display string that is used for the contents of the
To box. This is the concatenated string of all To recipient display names.

XML

<DisplayTo/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

Message
Represents an Exchange e-mail message.

Task
Represents a task in the Exchange store.

Text value
The text value represents the display string that is used for the contents of the To box.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DistinguishedFolderId
Article • 03/29/2023 • 3 minutes to read

The DistinguishedFolderId element identifies folders that can be referenced by name. If


you do not use this element, you must use the FolderId element to identify a folder.

XML

<DistinguishedFolderId Id="" ChangeKey="">

<Mailbox/>

</DistinguishedFolderId>

DistinguishedFolderIdType

Attributes and elements


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

Attributes

Attribute Description

Id
Contains a string that identifies a default folder. This attribute is required.

ChangeKey Contains a string that identifies a version of a folder that is identified by the Id
attribute. This attribute is optional. Use this attribute to make sure that the correct
version of a folder is used.

Id attribute values

Value Description

calendar Represents the Calendar folder.

contacts Represents the Contacts folder.

deleteditems Represents the Deleted Items folder.

drafts Represents the Drafts folder.

inbox Represents the Inbox folder.

journal Represents the Journal folder.


Value Description

notes Represents the Notes folder.

outbox Represents the Outbox folder.

sentitems Represents the Sent Items folder.

tasks Represents the Tasks folder.

msgfolderroot Represents the message folder root.

root Represents the root of the mailbox.

junkemail Represents the Junk Email folder.

searchfolders Represents the Search Folders folder.

voicemail Represents the Voice Mail folder.

recoverableitemsroot Represents the dumpster root folder.

recoverableitemsdeletions Represents the dumpster deletions folder.

recoverableitemsversions Represents the dumpster versions folder.

recoverableitemspurges Represents the dumpster purges folder.

archiveroot Represents the root archive folder.

archivemsgfolderroot Represents the root archive message folder.

archivedeleteditems Represents the archive deleted items folder.

archiveinbox Represents the archive Inbox folder. Versions of Exchange


starting with build number 15.00.0913.09 include this value.

archiverecoverableitemsroot Represents the archive recoverable items root folder.

archiverecoverableitemsdeletions Represents the archive recoverable items deletions folder.

archiverecoverableitemsversions Represents the archive recoverable items versions folder.

archiverecoverableitemspurges Represents the archive recoverable items purges folder.

syncissues Represents the sync issues folder.

conflicts Represents the conflicts folder.

localfailures Represents the local failures folder.

serverfailures Represents the server failures folder.

recipientcache Represents the recipient cache folder.


Value Description

quickcontacts Represents the quick contacts folder.

conversationhistory Represents the conversation history folder.

adminauditlogs Represents the admin audit logs folder.

todosearch Represents the todo search folder.

mycontacts Represents the My Contacts folder.

directory Represents the directory folder.

imcontactlist Represents the IM contact list folder.

peopleconnect Represents the people connect folder.

favorites Represents the Favorites folder.

Child elements

Element Description

Mailbox
Identifies a primary SMTP address. Proxy addresses are not allowed.

Parent elements

Element Description

ContextFolderId
Indicates the folder that is targeted for conversation actions that use
folders.

DestinationFolderId
Indicates the destination folder for copy and move conversation
actions.

ParentFolderId Identifies the folder in which a new folder or item is created.


(TargetFolderIdType)

The following are the XPath expressions to this element:

/CreateItem/ParentFolderId

/CreateFolder/ParentFolderId

ParentFolderIds
Identifies folders to search for the FindItem operation and the
FindFolder operation.
Element Description

BaseFolderIds Represents the collection of folders that will be searched to determine


the contents of a search folder.

FolderIds
Contains an array of folder identifiers that are used to identify folders
to copy, move, get, delete, or monitor for event notifications.

FolderChange
Represents a collection of changes to be performed on a single folder.

The following is the XPath expression to this element:

/UpdateFolder/FolderChanges/FolderChange

ToFolderId
Represents the destination folder for a copied or moved item or folder.

The following are the XPath expressions to this element:

/MoveFolder/ToFolderId

/CopyFolder/ToFolderId

/MoveItem/ToFolderId

/CopyItem/ToFolderId

SavedItemFolderId
Identifies the target folder for operations that update, send, and create
items in the Exchange store.

The following are the XPath expressions to this element:

/CreateItem/SavedItemFolderId

/UpdateItem/SavedItemFolderId

/SendItem/SavedItemFolderId

SyncFolderId
Represents the folder that contains the items to synchronize.

UserConfigurationName Represents the name of a user configuration object. The user


configuration object name is the identifier for a user configuration
object.

CopyToFolder
Represents the ID of the folder that email items will be copied to.

MoveToFolder
Represents the ID of the folder that email items will be moved to.

Text value
None.

Remarks
A DistinguishedFolderId resolves to a FolderId.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Creating Folders (Exchange Web Services)
DistinguishedFolderId
(DistinguishedFolderIdNameType)
Article • 03/29/2023 • 2 minutes to read

The DistinguishedFolderId element identifies folders that can be referenced by name.

XML

<DistinguishedFolderId> calendar | contacts | deleteditems | drafts | inbox


| journal | notes | outbox | sentitems | tasks | msgfolderroot |
publicfoldersroot | root | junkemail | searchfolders | voicemail |
recoverableitemsroot | recoverableitemsdeletions | recoverableitemsversions
| recoverableitemspurges | archiveroot | archivemsgfolderroot |
archivedeleteditems | archiverecoverableitemsroot |
archiverecoverableitemsdeletions | archiverecoverableitemsversions |
archiverecoverableitemspurges | syncissues | conflicts | localfailures |
serverfailures | recipientcache | quickcontacts | conversationhistory |
adminauditlogs | todosearch | mycontacts | directory | imcontactlist |
peopleconnect</DistinguishedFolderId>

DistinguishedFolderIdNameType

Attributes and elements


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

Attributes
None.

Child elements
None

Parent elements

Element Description

Folder
Specifies a generic folder.

CalendarFolder
Specifies a calendar folder.
Element Description

ContactsFolder
Specifies a contacts folder.

Text value
DistinguishedFolderId element text values

Value Description

calendar Indicates the URL of the calendar folder.

contacts Indicates the URL of the contacts folder.

deleteditems Indicates the URL of the deleted items folder.

drafts Indicates the URL of the drafts folder.

inbox Indicates the URL of the inbox folder.

journal Indicates the URL of the journal folder.

notes Indicates the URL of the notes folder.

outbox Indicates the URL of the outbox folder.

sentitems Indicates the URL of the sent items folder.

tasks Indicates the URL of the tasks folder.

msgfolderroot Indicates the URL of the message root folder.

publicfoldersroot Indicates the URL of the public folders root folder.

root Indicates the URL of the root folder.

junkemail Indicates the URL of the junk email folder.

searchfolders Indicates the URL of the search folders.

voicemail Indicates the URL of the voice-mail folder.

recoverableitemsroot Indicates the URL of the recoverable items root folder.

recoverableitemsdeletions Indicates the URL of the deleted recoverable items folder.

recoverableitemsversions Indicates the URL of the recoverable item versions folder.

recoverableitemspurges Indicates the URL of the purged recoverable items folder.

archiveroot Indicates the URL of the archive root folder.


Value Description

archivemsgfolderroot Indicates the URL of the archived message folder root folder.

archivedeleteditems Indicates the URL of the archived deleted items folder.

archiverecoverableitemsroot Indicates the URL of the archived recoverable items root


folder.

archiverecoverableitemsdeletions Indicates the URL of the archived recoverable deleted items


folder.

archiverecoverableitemsversions Indicates the URL of the archived recoverable items versions


folder.

archiverecoverableitemspurges Indicates the URL of the archived purged recoverable items


folder.

syncissues Indicates the URL of the synchronization issues folder.

conflicts Indicates the URL of the conflicts folder.

localfailures Indicates the URL of the local failures folder.

serverfailures Indicates the URL of the server failures folder.

recipientcache Indicates the URL of the recipient cache folder.

quickcontacts Indicates the URL of the quick contacts folder.

conversationhistory Indicates the URL of the conversation history folder.

adminauditlogs Indicates the URL of the administrative audit log folder.

todosearch Indicates the URL of the search to-do folder.

mycontacts Indicates the URL of the my contacts folder.

directory Indicates a URL of the directory folder.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
DistinguishedGroupBy
Article • 03/29/2023 • 2 minutes to read

The DistinguishedGroupBy element provides standard groupings for FindItem queries.

FindItem
DistinguishedGroupBy

XML

<DistinguishedGroupBy>

<StandardGroupBy/>

</DistinguishedGroupBy>

DistinguishedGroupByType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

StandardGroupBy Represents the standard grouping and aggregating mechanisms for a


grouped FindItem operation.

Parent elements

Element Description

FindItem
Defines a request to find items in a mailbox.

The following is the XPath expression to this element: /FindItem

Remarks
The DistinguishedGroupBy element can be added to a FindItem operation when the
results must come backed grouped and when one of the standard groups meets the
grouping requirements. If neither the DistinguishedGroupBy element nor the GroupBy
element is specified, FindItem results will come back ungrouped.

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.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindItem operation
Finding Items
DistinguishedUser
Article • 03/29/2023 • 2 minutes to read

The DistinguishedUser element identifies Anonymous and Default user accounts for
delegate access. This element was introduced in Microsoft Exchange Server 2007 Service
Pack 1 (SP1).

XML

<DistinguishedUser>Default or Anonymous</DistinguishedUser>

DistinguishedUserType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

UserId
Identifies a delegate user or a user who has folder access permissions. This element
was introduced in Exchange 2007 SP1.

Text value
A text value of Default describes the default setting for delegate users who are added to
the principal's mailbox. A text value of Anonymous describes the delegate access
settings that anonymous users have on the principal's mailbox.
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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
AddDelegate operation
UpdateDelegate operation
EWS XML elements in Exchange
Adding Delegates
DistributionList
Article • 03/29/2023 • 4 minutes to read

The DistributionList element represents a distribution list.

XML

<DistributionList>

<MimeContent/>

<ItemId/>

<ParentFolderId/>

<ItemClass/>

<Subject/>

<Sensitivity/>

<Body/>

<Attachments/>

<DateTimeReceived/>

<Size/>

<Categories/>

<Importance/>

<InReplyTo/>

<IsSubmitted/>

<IsDraft/>

<IsFromMe/>

<IsResend/>

<IsUnmodified/>

<InternetMessageHeaders/>

<DateTimeSent/>

<DateTimeCreated/>

<ResponseObjects/>

<ReminderDueBy/>

<ReminderIsSet/>

<ReminderMinutesBeforeStart/>

<DisplayCc/>

<DisplayTo/>

<HasAttachments/>

<ExtendedProperty/>

<Culture/>

<EffectiveRights/>

<LastModifiedName/>

<LastModifiedTime/>

<IsAssociated/>

<WebClientReadFormQueryString/>

<WebClientEditFormQueryString/>

<ConversationId/>

<UniqueBody/>

<DisplayName/>

<FileAs/>

<ContactSource/>

<Members/>

</DistributionList>

DistributionListType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

MimeContent
Contains the native MIME stream of an object represented in
base64Binary format.

ItemId
Contains the unique identifier and change key of a distribution
list item in the Exchange store.

ParentFolderId Represents the identifier of the parent folder that contains the
distribution list item.

ItemClass
Represents the message class of a distribution list item.

Subject
Represents the subject for Exchange store items and response
objects.

Sensitivity
Contains the status for a distribution list item's sensitivity.

Body
Represents the actual body content of a distribution list item.

Attachments
Contains the items or files that are attached to a distribution
list item in the Exchange store.

DateTimeReceived
Represents the date and time that a distribution list item in a
mailbox was received.

Size
Represents the size, in bytes, of a distribution list item. This
property is read-only.

Categories
Represents a collection of strings that identify to which
categories a distribution list item in the mailbox belongs.

Importance
Describes the importance of a distribution list item.

InReplyTo
Represents the identifier of the item which this item is a reply.
Element Description

IsSubmitted
Indicates whether an item has been submitted to the Outbox
default folder.

IsDraft
Represents whether an item has not yet been sent.

IsFromMe
Indicates whether a user sent an item to itself.

IsResend
Indicates whether the item had previously been sent.

IsUnmodified
Indicates whether the item has been modified.

InternetMessageHeaders
Represents the collection of all Internet message headers
contained within an item in a mailbox.

DateTimeSent
Represents the date and time that an item in a mailbox was
sent.

DateTimeCreated
Represents the date and time that a given item in the mailbox
was created.

ResponseObjects
Contains a collection of all the response objects that are
associated with an item in the Exchange store.

ReminderDueBy
Represents the date and time when the event occurs. This is
used by the ReminderMinutesBeforeStart element to
determine when the reminder is displayed.

ReminderIsSet
Indicates whether a reminder has been set for an item in the
Exchange store.

ReminderMinutesBeforeStart
Represents the number of minutes before an event when a
reminder is displayed.

DisplayCc
Represents the display string that is used for the contents of
the Cc line. This is the concatenated string of all Cc recipient
display names.

DisplayTo
Represents the display string that is used for the contents of
the To line. This is the concatenated string of all To recipient
display names.

HasAttachments
Represents a property that is set to true if an item has at least
one visible attachment. This property is read-only.

ExtendedProperty
Identifies extended properties on a distribution list item.

Culture
Represents the culture for a distribution list item in a mailbox.

EffectiveRights
Contains the client's rights based on the permission settings
for the item or folder. This element is read-only.
Element Description

LastModifiedName
Contains the display name of the last user to modify an item.

LastModifiedTime
Indicates when an item was last modified.

IsAssociated
Indicates whether the item is associated with a folder.

WebClientReadFormQueryString Represents a URL to concatenate to the Microsoft Office


Outlook Web App endpoint to read an item in Outlook Web
App.

WebClientEditFormQueryString
Represents a URL to concatenate to the Outlook Web App
endpoint to edit an item in Outlook Web App.

ConversationId
Contains the identifier of an item or conversation.

UniqueBody
Represents an HTML fragment or plain text which represents
the unique body of this conversation.

DisplayName (string)
Defines the display name of a distribution list.

FileAs
Represents how a distribution list is filed in the Contacts folder.

ContactSource
Describes whether the contact is located in the Exchange store
or in Active Directory Domain Services (AD DS).

Members (MemberListType)
Contains a list of members of the distribution list.

Parent elements

Element Description

AdjacentMeetings
Describes all calendar items that are adjacent to a meeting
time.

AppendToItemField Identifies data to append to a single property of a distribution


list during an UpdateItem operation.

ConflictingMeetings Identifies all items that conflict with a meeting time.

Create (ItemSync)
Identifies a single distribution list to create in the local client
store.

Update (ItemSync)
Identifies a single distribution list to update in the local client
store.

Items
Contains an array of items.
Element Description

Items Contains an array of items to create in the folder identified by


(NonEmptyArrayOfAllItemsType) the ParentFolderId (TargetFolderIdType) element.

SetItemField
Represents an update to a single property of a distribution list
item in an UpdateItem operation.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DLExpansion
Article • 03/29/2023 • 2 minutes to read

The DLExpansion element contains an array of mailboxes that are contained in a


distribution list.

ExpandDLResponse
ResponseMessages
ExpandDLResponseMessage
DLExpansion

XML

<DLExpansion AbsoluteDenominator"" IncludesLastItemInRange=""


IndexedPagingOffset="" NumeratorOffset="" TotalItemsInView="">

<Mailbox/>

</DLExpansion>

ArrayOfDLExpansionType

Attributes and elements


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

Attributes

Attribute Description

IndexedPagingOffset
Represents the next index that should be used for the next request
when you are using an indexed page view.

NumeratorOffset
Represents the new numerator value to use for the next request
when you are using fraction page views.

AbsoluteDenominator
Represents the next denominator to use for the next request when
you are using fraction page views.

IncludesLastItemInRange Indicates whether the current results contain the last item in the
query so that additional paging is not needed.

TotalItemsInView
Represents the total number of items in the view.

Child elements
Element Description

Mailbox
Identifies a mail-enabled Active Directory directory service object.

Parent elements

Element Description

ExpandDLResponseMessage
Contains the status and result of a single ExpandDL request.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
ExpandDL operation
EWS XML elements in Exchange
EWS reference for Exchange
Domain
Article • 03/29/2023 • 2 minutes to read

The Domain element identifies a single SMTP domain.

XML

<Domain Name="" IncludeSubdomains="" />

StmpDomain

Attributes and elements


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

Attributes

Attribute Description

Name Identifies the name of a domain. This attribute is required.

IncludeSubdomains Indicates whether subdomains of the domain identified by the Name


attribute are considered internal. This attribute is optional.

Child elements
None.

Parent elements

Element Description

InternalDomains Identifies the list of internal SMTP domains of the


(SmtpDomainList)
organization.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Domain (Message Tracking)
Article • 03/29/2023 • 2 minutes to read

The Domain element represents the domain to search for.

XML

<Domain/>

NonEmptyStringType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

FindMessageTrackingReport
Contains criteria for the types of messages to find.

Text value
A text value that represents a string is required if this element is used.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
DomainController (MasterMailboxType)
Article • 03/29/2023 • 2 minutes to read

The DomainController (MasterMailboxType) element is intended for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
DraftItemIds
Article • 03/29/2023 • 2 minutes to read

The DraftItemIds element contains an array of item identifiers to draft items in a


conversation.

XML

<DraftItemIds>

<ItemId/>

<OccirrenceItemId/>

<RecurringMasterItemId/>

<RecurringMasterItemIdRanges/>

</DraftItemIds>

NonEmptyArrayOfBaseItemIdsType

Attributes and elements


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

Attributes
None.

Child elements
ItemId | OccurrenceItemId | RecurringMasterItemId | RecurringMasterItemIdRanges

Parent elements
Conversation (ConversationType)

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
DueDate
Article • 03/29/2023 • 2 minutes to read

The DueDate element represents the date an item is due.

XML

<DueDate/>

dateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Task
Represents a task in the Exchange store.

Flag
Specifies a flag on a mailbox item.

Text value
A text value that represents the date and time is required if this element is used.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Duration (Items)
Article • 03/29/2023 • 2 minutes to read

The Duration element represents the duration of a calendar item.

XML

<Duration/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Text value
The text value represents the duration of a calendar item. This property is read-only.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Duration (UserOofSettings)
Article • 03/29/2023 • 2 minutes to read

The Duration element specifies the duration that the out of office (OOF) status is
enabled if the OofState element is set to Scheduled.

XML

<Duration>

<StartTime/>

<EndTime/>

</Duration>

Duration

Attributes and elements


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

Attributes
None.

Child elements

Element Description

StartTime Represents the start of the time span set with an OOF status. This element is required.

EndTime
Represents the end of the time span set with an OOF status. This element is required.

Parent elements

Element Description

UserOofSettings Specifies the OOF settings.

The following is the XPath expression to this element:

/SetUserOofSettingsRequest/UserOofSettings

Element Description

OofSettings
Contains the OOF settings.

The following is the XPath expression to this element:

/GetUserOofSettingsResponse/OofSettings

OutOfOffice
Defines the Out of Office (OOF) response message and a duration time for
sending the response message for a mailbox.

Remarks
The Duration type is also the type for the DetailedSuggestionsWindow, TimeWindow,
and OutOfOffice elements.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Example
The following example of a SetUserOofSettings operation request sets the OofState to
Enabled, the internal and external OOF messages, and sets the duration of OOF for 10
days.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<SetUserOofSettingsRequest
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<Mailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Name>David Alexander</Name>

<Address>[email protected]</Address>

<RoutingType>SMTP</RoutingType>

</Mailbox>

<UserOofSettings
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<OofState>Enabled</OofState>

<ExternalAudience>All</ExternalAudience>

<Duration>

<StartTime>2005-10-05T00:00:00</StartTime>

<EndTime>2005-10-25T00:00:00</EndTime>

</Duration>

<InternalReply>

<Message>I am out of office. This is my internal reply.</Message>

</InternalReply>

<ExternalReply>

<Message>I am out of office. This is my external reply.</Message>

</ExternalReply>

<SetByLegacyClient>false</SetByLegacyClient>

</UserOofSettings>

</SetUserOofSettingsRequest>

</soap:Body>

</soap:Envelope>

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserOofSettings operation
SetUserOofSettings operation
EditAllowed
Article • 03/29/2023 • 2 minutes to read

The EditAllowed element specifies whether Information Rights Management can be


edited.

XML

<EditAllowed> true | false </EditAllowed>

Boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

RightsManagementLicenseData
Specifies information about the rights management license.

Text value
A text value of true for the EditAllowed element indicates that Information Rights
Management (IRM) can be edited. A value of false indicates that IRM cannot be edited.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
EditItems
Article • 03/29/2023 • 2 minutes to read

The EditItems element indicates which items in a folder a user has permission to edit.
This element was introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

XML

<EditItems>None or Owned or All</EditItems>

PermissionActionType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Permission
Defines the access that a user has to a folder. This element was introduced
in Exchange 2007 SP1.

CalendarPermission Defines the access that a user has to a Calendar folder. This element was
introduced in Exchange 2007 SP1.

Text value
The following table lists the possible values for the EditItems element.

EditItems element text values


Value Description

None Indicates that the user does not have permission to edit items in the folder.

Owned Indicates that the user has permission to edit the items that the user owns in the folder.

All Indicates that the user has permission to edit all items in the folder.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Setting Folder-Level Permissions
EffectiveRights
Article • 03/29/2023 • 2 minutes to read

The EffectiveRights element contains the client's rights based on the permission
settings for the item or folder. This element is read-only.

XML

<EffectiveRights>

<CreateAssociated/>

<CreateContents/>

<CreateHierarchy/>

<Delete/>

<Modify/>

<Read/>

<ViewPrivateItems/>

</EffectiveRights>

EffectiveRightsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

CreateAssociated Indicates whether a client can create an associated contents table. This
property is only used on folder objects.

CreateContents
Indicates whether a client can create a contents table. This property is only
used on folder objects.

CreateHierarchy
Indicates whether a client can create a hierarchy table. This property is only
used on folder objects.

Delete
Indicates whether a client can delete a folder or item.

Modify
Indicates whether a client can modify a folder or item.
Element Description

Read
Indicates whether a client can read a folder or item.

ViewPrivateItems Indicates whether a private item can be viewed.

Parent elements

Element Description

Folder
Represents a folder in a mailbox.

TasksFolder
Represents a tasks folder in a mailbox.

ContactsFolder
Represents a contacts folder in a mailbox.

CalendarFolder
Represents a calendar folder in a mailbox.

SearchFolder
Represents a search folder in a mailbox.

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents a generic Exchange item.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Message
Represents an Exchange e-mail message.

Task
Represents a task in the Exchange store.

PostItem
Represents a post item in the Exchange store.

Text value
None.

Remarks
EffectiveRights is supported in the GetFolder, GetItem, FindFolder, FindItem,
SyncFolderHierarchy, and SyncFolderItems responses. The EffectiveRights property is
exposed in the AllProperties shape for folders and items.

This EffectiveRights property provides access to the same information that is provided
in the PR_ACCESS MAPI property.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Setting Folder-Level Permissions
Email (EmailAddress)
Article • 03/29/2023 • 2 minutes to read

The Email element identifies an attendee to a meeting.

XML

<Email></Email>

EmailAddress

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
MailboxData

Text value
The text value of the Email element identifies an attendee returned in a
GetUserAvailability operation response.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Email (EmailAddressType)
Article • 03/29/2023 • 2 minutes to read

The Email element represents the mailbox user for a GetUserAvailability query.

GetUserAvailabilityRequest
MailboxDataArray
MailboxData
Email (EmailAddressType)

XML

<Email>

<Name>...</Name>

<Address>...</Address>

<RoutingType>...</RoutingType>

</Email>

EmailAddressType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Name (EmailAddress)
Represents the display name of the mailbox user.

Address (string)
Represents the e-mail address of the mailbox user.

RoutingType (EmailAddress)
Represents the routing protocol for the message.

Parent elements

Element Description
Element Description

MailboxData Represents an individual mailbox user and options for the type of data to be
returned about the mailbox user.
The following is the XPath to this element:
/GetUserAvailabilityRequest/MailboxDataArray[i]/MailboxData

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
GetUserAvailabilityRequest
Getting User Availability
Email (String)
Article • 03/29/2023 • 2 minutes to read

The Email element identifies the email address of the user whose photo is requested in
the GetUserPhoto operation.

XML

<Email></Email>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
GetUserPhoto

Text value
The text value of the Email element is the email address of the user whose photo is
requested in the GetUserPhoto operation.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
EmailAddress (EmailAddress)
Article • 03/29/2023 • 2 minutes to read

The EmailAddress element is intended for internal use only.

XML

<EmailAddress />

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
EmailAddress (EmailAddressType)
Article • 03/29/2023 • 2 minutes to read

The EmailAddress element specifies the fully resolved SMTP address for the site mailbox
or the associated persona.

XML

<EmailAddress>

<Name></Name>

<EmailAddress></EmailAddress>

<RoutingType></RoutingType>

<MailboxType></MailboxType>

<ItemId></ItemId>

</EmailAddress>

EmailAddressType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Name (string)
Specifies a search refiner name or key or the name of an email
user.

EmailAddress Defines the primary SMTP address of a mailbox user.


(NonEmptyStringType)

RoutingType Specifies the routing type of an email address.


(EmailAddressType)

MailboxType
Represents the type of mailbox that is represented by the e-mail
address.

ItemId
Contains the unique identifier and change key of an item in the
Exchange store.
Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Text value
None.

Remarks
This element is optional.

The EmailAddress element is applicable for clients that target Exchange Online and
versions of Microsoft Exchange Server starting with Exchange 2013.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
EmailAddress (GetPersonaType)
Article • 03/29/2023 • 2 minutes to read

The EmailAddress (GetPersonaType) element specifies the email address associated


with the persona.

XML

<EmailAddress>

<Name></Name>

<EmailAddress></EmailAddress>

<RoutingType></RoutingType>

<MailboxType></MailboxType>

<ItemId></ItemId>

<OriginalDisplayName></OriginalDisplayName>

</EmailAddress>>

EmailAddressType

Attributes and elements


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

Attributes
None.

Child elements
Name (string) | EmailAddress (NonEmptyStringType) | RoutingType (EmailAddressType) |
MailboxType | ItemId | OriginalDisplayName

Parent elements
GetPersona

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
GetPersona
EWS XML elements in Exchange
EmailAddress (NonEmptyStringType)
Article • 03/29/2023 • 2 minutes to read

The EmailAddress element defines the primary SMTP address of a mailbox user.

XML

<EmailAddress/>

NonEmptyStringType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ActingAs Identifies who the caller is sending as.

Mailbox
Identifies a fully resolved e-mail address.

The following are some XPath expressions to this element:

/CreateItem/ParentFolderId/DistinguishedFolderId/Mailbox

/CreateFolder/ParentFolderId/DistinguishedFolderId/Mailbox

CreateItem/Items/AcceptItem/ToRecipients/Mailbox

SyncFolderItemsResponseMessage/Changes/Create/CalendarItem/ConflictingMeetings/AcceptItem/CcRecipients/Mailbox

The following are additional parent elements of the Mailbox element:

- BccRecipients

- ReplyTo

- Sender

- From

- Organizer

- DistinguishedFolderId

- Resolution

- DLExpansion

- Attendee

Element Description

RoomList Identifies a list of meeting rooms by email address.

Text value
A text value that represents an SMTP address is required.

Remarks
The EmailAddress element can represent SMTP or legacy Exchange distinguished name (also known as DN)
addresses. The EmailAddress element is the only required Mailbox element.

The schema that describes this element is located in the IIS virtual directory that hosts Exchange Web
Services.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


EmailAddress (string)
Article • 03/29/2023 • 2 minutes to read

The EmailAddress element specifies a single email address.

XML

<EmailAddress></EmailAddress>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

EmailAddressEntity
Specifies a single email address entity.

Text value
The text value of the EmailAddress element is a string value that specifies the email
address.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
EmailAddressAttributedValue
Article • 03/29/2023 • 2 minutes to read

The EmailAddressAttributedValue element specifies an instance of an array of email


addresses and their associated attributions.

XML

<EmailAddressAttributedValue>

<Value></Value>

<Attributions></Attributions>

<EmailAddressAttributedValue>

EmailAddressAttributedValueType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Value (EmailAddressType)
Specifies the value of an EmailAddress associated with an
attributions array.

Attributions Specifies an array of attributions for its associated Value


(ArrayOfValueAttributionsType)
element.

Parent elements

Element Description

Emails1
Specifies an array of email values and the identifiers of their source attributions for the
associated persona.

Emails2
Specifies an array of email values and the identifiers of their source attributions for the
associated persona.
Element Description

Emails3
Specifies an array of email values and the identifiers of their source attributions for the
associated persona.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
EmailAddressEntity
Article • 03/29/2023 • 2 minutes to read

The EmailAddressEntity element specifies a single email address entity.

XML

<EmailAddressEntity>

<EmailAddress></EmailAddress>

</EmailAddressEntity>

EmailAddressEntityType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

EmailAddress (string)
Specifies a single email address.

Parent elements

Element Description

EmailAddresses (ArrayOfEmailAddressEntitiesType)
Specifies an array of email address entities.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
EmailAddresses
Article • 03/29/2023 • 2 minutes to read

The EmailAddresses element represents a collection of e-mail addresses for a contact.

XML

<EmailAddresses>

<Entry/>

</EmailAddresses>

EmailAddressDictionaryType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Entry (EmailAddress)
Represents a single e-mail address for a contact.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Creating Contacts (Exchange Web Services)
Updating Contacts
Deleting Contacts
EmailAddresses
(ArrayOfEmailAddressEntitiesType)
Article • 03/29/2023 • 2 minutes to read

The EmailAddresses element specifies an array of email address entities.

XML

<EmailAddresses>

<EmailAddressEntity></EmailAddressEntity>

</EmailAddresses>

ArrayOfEmailAddressEntitiesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

EmailAddressEntity
Specifies a single email address entity.

Parent elements

Element Description

EntityExtractionResult
Specifies the EntityExtractionResult property of an item.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
EmailAddresses
(ArrayOfEmailAddressesType)
Article • 03/29/2023 • 2 minutes to read

The EmailAddresses element specifies an array of all email addresses of the associated
persona.

XML

<EmailAddresses>

<Address></Address>

</EmailAddresses>

ArrayOfEmailAddressesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Address (EmailAddressType)
Represents a fully resolved e-mail address.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
EmailAddresses
(ArrayOfExtractedEmailAddresses)
Article • 03/29/2023 • 2 minutes to read

The EmailAddresses element specifies an array of extracted email addresses.

XML

<EmailAddresses>

<EmailAddress/>

</EmailAddresses>

ArrayOfExtractedEmailAddresses

Attributes and elements


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

Attributes
None.

Child elements
EmailAddress (string)

Parent elements
Contact (ContactType)

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Emails1
Article • 03/29/2023 • 2 minutes to read

The Emails1 element specifies an array of EmailAddressAttributedValue values and the


identifiers of their source attributions for the associated persona.

XML

<Emails1>

<EmailAddressAttributedValue></EmailAddressAttributedValue>

</Emails1>

ArrayOfEmailAddressAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

EmailAddressAttributedValue Specifies an instance of an array of email addresses and their


associated attributions.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Emails2
Article • 03/29/2023 • 2 minutes to read

The Emails2 element contains an array of EmailAddressAttributedValue values and the


identifiers of their source attributions for the associated persona.

XML

<Emails2>

<EmailAddressAttributedValue></EmailAddressAttributedValue>

</Emails2>

ArrayOfEmailAddressAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

EmailAddressAttributedValue Specifies an instance of an array of email addresses and their


associated attributions.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Emails3
Article • 03/29/2023 • 2 minutes to read

The Emails3 element specifies an array of EmailAddressAttributedValue values and the


identifiers of their source attributions for the associated persona.

XML

<Emails3>

<EmailAddressAttributedValue></EmailAddressAttributedValue>

</Emails3>

ArrayOfEmailAddressAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

EmailAddressAttributedValue Specifies an instance of an array of email addresses and their


associated attributions.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
EmailText
(EncryptionConfigurationResponseType)
Article • 03/29/2023 • 2 minutes to read

The EmailText (EncryptionConfigurationResponseType) element is intended for internal


use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
EmailText
(SetEncryptionConfigurationType)
Article • 03/29/2023 • 2 minutes to read

The EmailText (SetEncryptionConfigurationType) element is intended for internal use


only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
EmailUser
Article • 03/29/2023 • 2 minutes to read

The EmailUser element specifies an email recipient.

XML

<EmailUser>

<Name/>

<UserId/>

</EmailUser>

EmailUserType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Name (string)
Specifies a search refiner name or key or the name of an email user.

UserId (string)
Specifies the user identifier of an email user.

Parent elements

Element Description

Attendees
Specifies the recipients of an invitation to a meeting.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
EmptyFolder
Article • 03/29/2023 • 2 minutes to read

The EmptyFolder element defines a request to empty a folder in a mailbox in the


Exchange store. Optionally, subfolders can also be deleted when the folder is emptied.

XML

<EmptyFolder>

<FolderIds/>

</EmptyFolder>

EmptyFolderType

Attributes and elements


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

Attributes

Attribute Description

DeleteType
Specifies how a folder is emptied. This attribute is required.

DeleteSubFolders
Specifies whether subfolders are to be deleted. This attribute is required.

DeleteType Attribute

Value Description

HardDelete A messages and folders are permanently removed from the store.

SoftDelete A messages and folders are moved to the dumpster if the dumpster is
enabled.

MoveToDeletedItems A messages and folders are moved to the Deleted Items folder.

Child elements

Element Description

FolderIds
Contains an array of folder identifiers that are used to identify folders to delete.
Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

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

Schema Name Message schema

Validation File Messages.xsd

Can be Empty False

See also
EmptyFolder operation
EmptyFolderResponse
Article • 03/29/2023 • 2 minutes to read

The EmptyFolderResponse element defines a response to an EmptyFolder operation


request.

XML

<EmptyFolderResponse>

<ResponseMessages/>

</EmptyFolderResponse>

EmptyFolderResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
EmptyFolder operation

EmptyFolder

EWS XML elements in Exchange


EmptyFolderResponseMessage
Article • 03/29/2023 • 2 minutes to read

The EmptyFolderResponseMessage element contains the status and result of a single


EmptyFolder request.

XML

<EmptyFolderResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</EmptyFolderResponseMessage>

ResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of an EmptyFolder operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store goes offline during the batch.


- Active Directory Domain Services (AD DS) goes offline.
- Mailboxes are moved.
- The message database (MDB) goes offline.
- A password is expired.
- A quota is exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains the value of 0.

MessageXml
Provides additional error response information.

Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.
Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Type

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EmptyFolder operation
EWS reference for Exchange
EWS XML elements in Exchange
EnableAlwaysDelete
Article • 03/29/2023 • 2 minutes to read

The EnableAlwaysDelete element specifies a flag that enables deletion for all new items
in a conversation.

ApplyConversationAction

ConversationActions

ConversationAction

EnableAlwaysDelete

XML

<EnableAlwaysDelete/>

xs:boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

ConversationAction
Contains a single action to be applied to a single conversation.

Text value
The text value of the EnableAlwaysDelete element is true to enable the deletion of all
items in conversation; otherwise, false.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
ApplyConversationAction operation
EncryptedSharedFolderData
Article • 03/29/2023 • 2 minutes to read

The EncryptedSharedFolderData element contains the encrypted data that a client can
use to authorize the sharing of its calendar or contact data with other clients.

XML

<EncryptedSharedFolderData> <Token/> <Data/></EncryptedSharedFolderData>

EncryptedSharedFolderDataType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Token
Contains encrypted data that represents the identification token for the shared data.

Data
Contains encrypted data that represents the shared data.

Parent elements

Element Description

EncryptedSharedFolderDataCollection Represents a collection of data structures that a client can


use to authorize the sharing of its calendar or contact
data with other clients.

Remarks
The schema that describes this element is located in the IIS Virtual directory that hosts
Exchange Web Services of the computer that is running Microsoft Exchange Server that
has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetSharingMetadata operation
EWS XML elements in Exchange
EncryptedSharedFolderDataCollection
Article • 03/29/2023 • 2 minutes to read

The EncryptedSharedFolderDataCollection element contains a collection of data


structures that a client can use to authorize the sharing of its calendar or contact data
with other clients.

XML

<EncryptedSharedFolderDataCollection> <EncryptedSharedFolderData/>
</EncryptedSharedFolderDataCollection>

ArrayOfEncryptedSharedFolderDataType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

EncryptedSharedFolderData Contains the encrypted data that a client can use to authorize the
sharing of its calendar or contact data with other clients.

Parent elements

Element Description

GetSharingMetadataResponse
Defines a response to a GetSharingMetadata operation
request.

GetSharingMetadataResponseMessage Contains the status and result of a single


GetSharingMetadata operation request.

Remarks
The schema that describes this element is located in the IIS Virtual directory that hosts
Exchange Web Services of the computer that is running Microsoft Exchange Server that
has the Client Access server role installed.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetSharingMetadata operation
EWS XML elements in Exchange
End
Article • 03/29/2023 • 2 minutes to read

The End element represents the end of a duration.

XML

<End/>

DateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem Represents an Exchange calendar item.

FirstOccurrence Represents the first occurrence of a recurring calendar item.

LastOccurrence Represents the last occurrence of a recurring calendar item.

MeetingRequest Represents a meeting request in the Exchange store.

Occurrence Represents a single modified occurrence of a recurring calendar item.

Text value
The text value represents the end of a duration.
Remarks
The UpdateItem operation can set the Start and End time of an Exchange store item. In
an UpdateItem request, you can set the Start time without also setting the End time.
This can cause an error if the Start time is later than the End time. Be aware that client
applications must perform adjustments to the End time when that Start time is changed
in order to preserve the duration.

7 Note

The time zone offset information is lost if the Start and End dates of the recurring
master item do not have a date that is equal to the first occurrence of a weekly
recurrence pattern.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
WeeklyRecurrence

End

EWS XML elements in Exchange


End (ChangeHighlightsType)
Article • 03/29/2023 • 2 minutes to read

The End element specifies the changes made to a meeting end time when a meeting
update occurs.

XML

<End></End>

dateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
ChangeHighlights

Text value
The text value of the End element is the new end time of a meeting.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
EndDate (Recurrence)
Article • 03/29/2023 • 2 minutes to read

The EndDate element represents the end date of a recurring task or a calendar item that
has the EndDateRecurrence pattern type.

XML

<EndDate/>

date

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

EndDateRecurrence
Describes the start date and the end date of an item recurrence pattern.

Text value
A text value that represents a date is required if this element is used. The value cannot
be larger than September 1, 4500 00:00:00.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
EndDate (ReminderType)
Article • 03/29/2023 • 2 minutes to read

The EndDate element specifies the end date of the item the reminder is for.

XML

<EndDate/>

dateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
Reminder

Text value
The text value of the EndDate element is the end date of an item.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
Reminder

EWS XML elements in Exchange


EndDateRecurrence
Article • 03/29/2023 • 2 minutes to read

The EndDateRecurrence element describes the start date and the end date of an item
recurrence pattern.

XML

<EndDateRecurrence>

<StartDate/>

<EndDate/>

</EndDateRecurrence>

EndDateRecurrenceRangeType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

StartDate (Recurrence)
Represents the start date of a recurring task or calendar item.

EndDate (Recurrence)
Represents the end date of a recurring task or calendar item.

Parent elements

Element Description

Recurrence (RecurrenceType)
Contains the recurrence pattern for calendar items and meeting
requests.

Recurrence Contains the recurrence pattern for recurring tasks.


(TaskRecurrenceType)

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
EndDateTime
Article • 03/29/2023 • 2 minutes to read

The EndDateTime element specifies the end date and time for a rule or a search.

XML

<EndDateTime/>

dateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

FindMessageTrackingReport Contains criteria for the types of messages to find.

WithinDateRange
Specifies the date range within which incoming messages have to
have been received in order for the condition or exception to
apply.

Text value
A text value that represents a date/time is required if this element is used.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
EndNodeUrl
Article • 03/29/2023 • 2 minutes to read

The EndNodeUrl element specifies the URL for the mail app in the Office Store.

XML

<EndNodeUrl/>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
Metadata

Text value
The text value of the EndNodeUrl element is the URL for the mail app in the Office
Store.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Not applicable

Can be Empty False

See also
Metadata

EWS XML elements in Exchange


EndTime
Article • 03/29/2023 • 2 minutes to read

The EndTime element represents the end of a time span.

XML

<EndTime>dateTime</EndTime>

dateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

TimeWindow
Identifies the time span queried for the user availability information.

The following is the XPath expression to this element:

/GetUserAvailabilityRequest/FreeBusyViewOptions/TimeWindow

DetailedSuggestionsWindow Identifies the time span that is queried for detailed information about suggested meeting times.

The following is the XPath expression to this element:

/GetUserAvailabilityRequest/SuggestionViewOptions/DetailedSuggestionsWindow .

Duration (UserOofSettings)
Specifies the duration for which the Out of Office (OOF) status is enabled if the OofState element is set to Scheduled.

The following are the possible XPath expressions to this element:

/SetUserOofSettingsRequest/UserOofSettings/Duration

/GetUserOofSettingsResponse/OofSettings/Duration

Occurrence Represents a single modified occurrence of a recurring calendar item.

CalendarEvent
Represents a unique calendar item occurrence. This is used for Availability inquiries. The EndTime element is required in the
CalendarEvent element. The EndTime element in the CalendarEvent element is unique to the CalendarEvent type.

The following is the XPath expression to this element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/CalendarEventArray/CalendarEvent[i]

Text value
A text value is required.

Remarks
The StartTime element represents the beginning of a time span.

The end time represents the client's time.

The schema includes many EndTime elements.

7 Note

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

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
Getting User Availability
EndTime (ReminderMessageDataType)
Article • 03/29/2023 • 2 minutes to read

The EndTime element represents the end of the time span to query for reminders.

XML

<EndTime/>

dateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
ReminderMessageData

Text value
The text value of the EndTime element represents the end of the time span to query for
reminders.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
ReminderMessageData

EWS XML elements in Exchange


EndTimeInMinutes
Article • 03/29/2023 • 2 minutes to read

The EndTimeInMinutes element represents the end of the working day for a mailbox user.

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

FreeBusyView

WorkingHours

WorkingPeriodArray

WorkingPeriod

EndTimeInMinutes

XML

<StartTimeInMinutes>...</StartTimeInMinutes>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

WorkingPeriod Contains the work week days and hours of the mailbox user.
The following is the XPath expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/WorkingHours/WorkingPeriodArray/WorkingPeriod[i]

Text value
A text value is required. The text value represents the end of the working day by how many minutes have elapsed since the day
began. For example, an end time of 6 P.M. is represented by 1080 minutes.

The range of possible values for this element is 0 to 1440.

Remarks
The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange
Server 2007 that has the Client Access server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


EndTimeZone
Article • 03/29/2023 • 2 minutes to read

The EndTimeZone element defines the time zone for the end time of a CalendarItem or
MeetingRequest.

XML

<EndTimeZone Id="" Name="">

<Periods/>

<TransitionsGroups/>
<Transitions/>

</EndTimeZone>

TimeZoneDefinitionType

Attributes and elements


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

Attributes

Attribute Description

Id Represents the unique identifier of the time zone definition.

Name Represents the descriptive name of the time zone definition.

Child elements

Element Description

Periods
Represents an array of Period elements that define the time offset at different
stages of the time zone.

TransitionsGroups Represents an array of TransitionsGroup elements that specify time zone


transitions.

Transitions
Represents an array of time zone transitions.

Parent elements
Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
EndTimeZoneId
Article • 03/29/2023 • 2 minutes to read

The EndTimeZoneId element specifies the time zone in which a meeting takes place.

XML

<EndTimeZoneId></EndTimeZoneId>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Text value
The EndTimeZoneId element specifies the time zone identifier.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Item Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
EndWallClock
Article • 03/29/2023 • 2 minutes to read

The EndWallClock element specifies the end time of a meeting in the time zone of the
location in which the meeting takes place.

XML

<EndWallClock></EndWallClock>

dateTime

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Text value
The text value of the EndWallClock element is a string value that specifies the time zone
identifier.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
EnhancedLocation
Article • 03/29/2023 • 2 minutes to read

The EnhancedLocation element specifies location information such as the name,


address, and optional notes about a location.

XML

<EnhancedLocation>

<DisplayName/>

<Annotation/>

<PostalAddress/>

</EnhancedLocation>

EnhancedLocationType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

DisplayName (string)
Defines the display name of a folder, contact, distribution list,
delegate user, location, or rule.

Annotation
Contains optional notes added by a user.

PostalAddress Specifies the postal address for a persona.


(PersonaPostalAddressType)

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.
Element Description

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
EntityExtractionResult
Article • 03/29/2023 • 2 minutes to read

The EntityExtractionResult element specifies the EntityExtractionResult property of an


item.

XML

<EntityExtractionResult>

<Addresses/>

<MeetingSuggestions/>

<TaskSuggestions/>

<EmailAddresses/>

<Contacts/>

<Urls/>

<PhoneNumbers/>

</EntityExtractionResult>

EntityExtractionResultType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Addresses (ArrayOfAddressEntitiesType)
Specifies an array of AddressEntity elements.

MeetingSuggestions
Specifies an array of MeetingSuggestion
elements.

TaskSuggestions
Specifies an array of TaskSuggestion elements.

EmailAddresses Specifies an array of email address entities.


(ArrayOfEmailAddressEntitiesType)

Contacts (ArrayOfContactsType)
Specifies an array of contacts.
Element Description

Urls (ArrayOfUrlEntitiesType)
Specifies an array of URLs.

PhoneNumbers (ArrayOfPhoneEntitiesType)
Specifies an array of phone numbers.

Parent elements

Element Description

Item
Represents a generic item in the Exchange store.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
Entry (EmailAddress)
Article • 03/29/2023 • 2 minutes to read

The Entry element represents a single e-mail address for a contact.

XML

<Entry Key="" Name="" RoutingType="" MailboxType="" />

EmailAddressDictionaryEntryType

Attributes and elements


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

Attributes

Attribute Description

Key
Identifies the e-mail address.

The following are the possible values for this attribute:

- EmailAddress1
- EmailAddress2
- EmailAddress3

This attribute is required.

Name
Defines the name of the mailbox user. This attribute is optional.

RoutingType Defines the routing that is used for the mailbox. The default is SMTP. This
attribute is optional.

MailboxType Defines the mailbox type of a mailbox user. This attribute is optional.

Child elements
None.

Parent elements
Element Description

EmailAddresses
Represents a collection of e-mail addresses for a contact.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Entry (IMAddress)
Article • 03/29/2023 • 2 minutes to read

The Entry element represents an instant messaging (IM) address for a contact.

XML

<Entry Key=""/>

ImAddressDictionaryEntryType

Attributes and elements


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

Attributes

Attribute Description

Key
Identifies the IM address.

The following are the possible values for this attribute:

- ImAddress1
- ImAddress2
- ImAddress3

Child elements
None.

Parent elements

Element Description

ImAddresses
Represents a collection of IM addresses for a contact.

Text value
A text value that represents the IM address is required if this element is used.
Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Creating Contacts (Exchange Web Services)
Updating Contacts
Deleting Contacts
Entry (PhoneNumber)
Article • 03/29/2023 • 2 minutes to read

The Entry element represents a telephone number for a contact.

XML

<Entry Key=""/>

PhoneNumberDictionaryEntryType

Attributes and elements


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

Attributes

Attribute Description

Key
Identifies the telephone number. The Key attribute is of type PhoneNumberKeyType.

The following are the possible values for this attribute:

- AssistantPhone
- BusinessFax
- BusinessPhone
- BusinessPhone2
- Callback
- CarPhone
- CompanyMainPhone
- HomeFax
- HomePhone
- HomePhone2
- Isdn
- MobilePhone
- OtherFax
- OtherTelephone
- Pager
- PrimaryPhone
- RadioPhone
- Telex
- TtyTddPhone
Child elements
None.

Parent elements

Element Description

PhoneNumbers
Represents a collection of telephone numbers for a contact.

Text value
A text value that represents a telephone number is required if this element is used.

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

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Creating Contacts (Exchange Web Services)
Updating Contacts
Deleting Contacts
Entry (PhysicalAddress)
Article • 03/29/2023 • 2 minutes to read

The Entry element describes a single physical address for a contact item.

XML

<Entry Key="">

<Street/>

<City/>

<State/>

<Country/>

<PostalCode/>

</Entry>

PhysicalAddressDictionaryEntryType

Attributes and elements


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

Attributes

Attribute Description

Key
Identifies a physical address.

The following are the possible values for this attribute:

- Business
- Home
- Other

Child elements

Element Description

Street
Represents a street address for a contact item.

City
Represents the city name that is associated with a contact.

State
Represents the state of residence for a contact item.

CountryOrRegion
Represents the country or region for a given physical address.
Element Description

PostalCode
Represents the postal code for a contact item.

Parent elements

Element Description

PhysicalAddresses Contains a collection of physical addresses that are associated with a contact.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Creating Contacts (Exchange Web Services)
Updating Contacts
Deleting Contacts
Error
Article • 03/29/2023 • 2 minutes to read

The Error element represents a single validation error on a particular rule property value,
predicate property value, or action property value.

XML

<Error>

<FieldUri/>

<ErrorCode/>

<ErrorMessage/>

<FieldValue/>

</Error>

RuleValidationErrorType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

FieldUri Specifies the URI to the rule field that caused the validation error.
(Rule)

ErrorCode
Represents a rule validation error code that describes what failed validation for
each rule predicate or action.

ErrorMessage Represents the reason for the validation error.

FieldValue
Represents the value of the field that caused the validation error.

Parent elements

Element Description
Element Description

ValidationErrors Represents an array of rule validation errors on each rule field that has an error.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
Errors
Article • 03/29/2023 • 2 minutes to read

The Errors element contains a property bag to store errors that are returned through
the Web service.

FindMessageTrackingReport

Errors

XML

<Errors>

<Properties/>

</Errors>

ArrayOfArraysOfTrackingPropertiesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Properties (ArrayOfTrackingPropertiesType)
Contains a list of one or more tracking properties.

Parent elements

Element Description

FindMessageTrackingReportResponse Contains the status and result of a single


FindMessageTrackingReport operation request.

GetMessageTrackingReportResponse
Contains the result of a single GetMessageTrackingReport
operation request.
Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindMessageTrackingReport operation

GetMessageTrackingReport operation

EWS XML elements in Exchange


ErrorCode
Article • 03/29/2023 • 2 minutes to read

The ErrorCode element represents a rule validation error code that describes what failed
validation for each rule predicate or action.

XML

<ErrorCode/>

RuleValidationErrorCodeType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Error
Represents a single validation error on a particular rule property value, predicate
property value, or action property value.

Text value
The text value for this element is restricted to one of the following strings:

ADOperationFailure

ConnectedAccountNotFound

CreateWithRuleId
EmptyValueFound

DuplicatedPriority

DuplicatedOperationOnTheSameRule

FolderDoesNotExist

InvalidAddress

InvalidDateRange

InvalidFolderId

InvalidSizeRange

InvalidValue

MessageClassificationNotFound

MissingAction

MissingParameter

MissingRangeValue

NotSettable

RecipientDoesNotExist

RuleNotFound

SizeLessThanZero

StringValueTooBig

UnsupportedAddress

UnexpectedError

UnsupportedRule

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ErrorCode (int)
Article • 03/29/2023 • 2 minutes to read

The ErrorCode element specifies the error code of a failed search performed against a
mailbox.

XML

<ErrorCode></ErrorCode>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

FailedMailbox
Specifies the hold status of the mailbox.

Text value
The text value of the ErrorCode element is the error code returned for a failed search
performed against a mailbox.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ErrorCode (ItemIndexErrorType)
Article • 03/29/2023 • 2 minutes to read

The ErrorCode element is intended for internal use only.

ItemIndexErrorType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file types.xsd

Can be empty False


See also
EWS XML elements in Exchange
ErrorDescription
Article • 03/29/2023 • 2 minutes to read

The ErrorDescription element describes the error that is returned in information about
an item that cannot be indexed.

XML

<ErrorDescription></ErrorDescription>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
NonIndexableItemDetail

Text value
The text value of the ErrorDescription element contains a description of an item level
error.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
ErrorMessage
Article • 03/29/2023 • 2 minutes to read

The ErrorMessage element represents the reason for the validation error.

XML

<ErrorMessage/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Error
Represents a single validation error on a particular rule property value, predicate
property value, or action property value.

Text value
The error message associated with the rule validation error.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
ErrorMessage
(NonIndexableItemStatisticType)
Article • 03/29/2023 • 2 minutes to read

The ErrorMessage element contains the error message that describes why an item is not
indexable.

XML

<ErrorMessage></ErrorMessage>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
NonIndexableItemStatistic

Text value
The text value of the ErrorMessage element is an error message that describes why an
item is not indexable.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False


ErrorSubscriptionIds
Article • 03/29/2023 • 2 minutes to read

The ErrorSubscriptionIds element contains an array of invalid subscription IDs.

XML

<ErrorSubscriptionIds>

<SubscriptionId/>

</ErrorSubscriptionIds>

NonEmptyArrayOfSubscriptionIdsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

SubscriptionId (GetEvents)
Represents the identifier for a subscription.

Parent elements

Element Description

GetStreamingEventsResponseMessage Contains the status and result of a single


GetStreamingEvents operation request.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

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


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

Schema Messages schema; Types schema


Name

Validation Messages.xsd; Types.xsd


File

Can be False
Empty

See also
GetStreamingEvents operation

EWS XML elements in Exchange


EventData
Article • 03/29/2023 • 2 minutes to read

The EventData element represents data that is associated with the processing step for
the event.

XML

<EventData>

<String/>

</EventData>

ArrayOfStringsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

String
Contains a string that identifies an event.

Parent elements

Element Description

RecipientTrackingEvent
Contains information for a single event for a recipient.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
EventDescription
Article • 03/29/2023 • 2 minutes to read

The EventDescription element

XML

<EventDescription/>

MessageTrackingEventDescriptionType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

RecipientTrackingEvent

Text value
The following table lists the possible values for the EventDescription element.

EventDescription element values

Value Description

Submitted

Resolved
Value Description

Expanded

Delivered

MovedToFolderByInboxRule

RulesCc

FailedGeneral

FailedModeration

FailedTransportRules

SmtpSend

SmtpSendCrossSite

SmtpSendCrossForest

SmtpReceive

Forwarded

Pending

PendingModeration

ApprovedModeration

QueueRetry

QueueRetryNoRetryTime

MessageDefer

TransferredToForeignOrg

TransferredToPartnerOrg

TransferredToLegacyExchangeServer

DelayedAfterTransferToPartnerOrg

Read

NotRead

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
EventType
Article • 03/29/2023 • 2 minutes to read

The EventType element is used to create a subscription and identifies an event type to
be reported in a notification.

XML

<EventType/>

NotificationEventTypeType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

EventTypes Contains a collection of event notification event types that are used to create a
subscription.

Text value
A text value is required. The following are the possible values:

CopiedEvent

CreatedEvent

DeletedEvent
ModifiedEvent

MovedEvent

NewMailEvent

FreeBusyChangedEvent

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
Subscribe operation

GetEvents operation

Unsubscribe operation
EventTypes
Article • 03/29/2023 • 2 minutes to read

The EventTypes element contains a collection of event notification types that are used
to create a subscription.

XML

<EventTypes>

<EventType/>

</EventTypes>

NonEmptyArrayOfNotificationEventTypesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

EventType
Represents a requested event notification type that is used to create a subscription.

Parent elements

Element Description

PullSubscriptionRequest
Represents a subscription to a pull-based event notification
subscription.

PushSubscriptionRequest
Represents a subscription to a push-based event notification
subscription.

StreamingSubscriptionRequest Represents a subscription to a streaming event notification


subscription.
Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
Subscribe operation

GetEvents operation

GetStreamingEvents operation

Unsubscribe operation
ExceptionFieldURI
Article • 03/29/2023 • 2 minutes to read

The ExceptionFieldURI element identifies particular errors in a request. This element is


only used as part of an error response in the MessageXml node.

XML

<ExceptionFieldURI FieldURI="" />

ExceptionPropertyURIType

Attributes and elements


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

Attributes

Attribute Description

FieldURI
Identifies a property of an occurrence of a recurring item. This attribute is required.

FieldURI Attribute

Value Description

attachment:Name Identifies the attachment name as containing an error.

attachment:ContentType Identifies the content type as containing an error.

attachment:Content Identifies the content as containing an error.

recurrence:Month Identifies the month field as containing an error.

recurrence:DayOfWeekIndex Identifies the day of week index as containing an error.

recurrence:DaysOfWeek Identifies the DaysOfWeek property as containing an error.

recurrence:DayOfMonth Identifies the DayOfMonth as containing an error.

recurrence:Interval Identifies the interval as containing an error.

recurrence:NumberOfOccurrences Identifies the number of occurrences as containing an error.


Child elements
None.

Parent elements

Element Description

MessageXml
Provides additional error response information.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Exceptions
Article • 03/29/2023 • 4 minutes to read

The Exceptions element identifies the exceptions that represent all the available rule
exception conditions for an Inbox rule.

XML

<Conditions>

<Categories/>

<ContainsBodyStrings/>

<ContainsHeaderStrings/>

<ContainsRecipientStrings/>

<ContainsSenderStrings/>

<ContainsSubjectOrBodyStrings/>

<ContainsSubjectStrings/>

<FlaggedForAction/>

<FromAddresses/>

<FromConnectedAccounts/>

<HasAttachments/>

<Importance/>

<IsApprovalRequest/>
<IsAutomaticForward/>

<IsAutomaticReply/>

<IsEncrypted/>

<IsMeetingRequest/>

<IsMeetingResponse/>
<IsNDR/>

<IsPermissionControlled/>

<IsReadReceipt/>

<IsSigned/>

<IsVoicemail/>

<ItemClasses/>

<MessageClassifications/>

<NotSentToMe/>

<SentCcMe/>

<SentOnlyToMe/>

<SentToAddresses/>

<SentToMe/>

<SentToOrCcMe/>

<Sensitivity/>

<WithinDateRange/>

<WithinSizeRange/>

</Conditions>

RulePredicatesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Categories
Contains the categories that must be applied to an incoming
message in order for the condition or exception to apply.

ContainsBodyStrings
Indicates the strings that must appear in the body of incoming
messages in order for the condition or exception to apply.

ContainsHeaderStrings
Indicaqtes the strings that must appear in the headers of
incoming messages in order for the condition or exception to
apply.

ContainsRecipientStrings
Indicates the strings that must appear in either the ToRecipients
or CcRecipients properties of incoming messages in order for
the condition or exception to apply.

ContainsSenderStrings
Indicates the strings that must appear in the From property of
incoming messages in order for the condition or exception to
apply.

ContainsSubjectOrBodyStrings Indicates the strings that must appear in either the body or the
subject of incoming messages in order for the condition or
exception to apply.

ContainsSubjectStrings
Indicates the strings that must appear in the subject of incoming
messages in order for the condition or exception to apply.

FlaggedForAction
Specifies the flag for action value that must appear on incoming
messages in order for the condition or exception to apply.

FromAddresses
Indicates the e-mail addresses from which incoming messages
must be sent in order for the condition or exception to apply.

FromConnectedAccounts
Represents the e-mail account names from which incoming
messages have to have been aggregated in order for the
condition or exception to apply.

HasAttachments
Indicates whether incoming messages have to have attachments
in order for the condition or exception to apply.
Element Description

Importance
Specifies the importance that is stamped on incoming messages
in order for the condition or exception to apply.

IsApprovalRequest
Indicates whether incoming messages must be approval
requests in order for the condition or exception to apply.

IsAutomaticForward
Indicates whether incoming messages must be automatic
forwards in order for the condition or exception to apply.

IsAutomaticReply
Indicates whether incoming messages must be automatic replies
in order for the condition or exception to apply.

IsEncrypted
Indicates whether incoming messages must be S/MIME
encrypted in order for the condition or exception to apply.

IsMeetingRequest
Indicates whether incoming messages must be meeting requests
in order for the condition or exception to apply.

IsMeetingResponse
Indicates whether incoming messages must be meeting
responses in order for the condition or exception to apply.

IsNDR
Indicates whether incoming messages must be non-delivery
reports (NDRs) in order for the condition or exception to apply.

IsPermissionControlled
Indicates whether incoming messages must be permission
controlled (RMS protected) in order for the condition or
exception to apply

IsReadReceipt
Indicates whether incoming messages must be read receipts in
order for the condition or exception to apply.

IsSigned
Indicates whether incoming messages must be S/MIME signed in
order for the condition or exception to apply.

IsVoicemail
Indicates whether incoming messages must be voice mail
messages in order for the condition or exception to apply.

ItemClasses Represents the item classes that must be stamped on incoming


messages in order for the condition or exception to apply.

MessageClassifications
Represents the message classifications that must be stamped on
incoming messages in order for the condition or exception to
apply.

NotSentToMe
Indicates whether the owner of the mailbox must not be in the
ToRecipients property of the incoming messages in order for the
condition or exception to apply.
Element Description

SentCcMe
Indicates whether the owner of the mailbox has to be in the
CcRecipients property of incoming messages in order for the
condition or exception to apply.

SentOnlyToMe
Indicates whether the owner of the mailbox has to be the only
one in the ToRecipients property of incoming messages in order
for the condition or exception to apply.

SentToAddresses
Indicates the e-mail addresses that incoming messages have to
have been sent to in order for the condition or exception to
apply.

SentToMe
Indicates whether the owner of the mailbox has to be in the
ToRecipients property of incoming messages in order for the
condition or exception to apply.

SentToOrCcMe
Indicates whether the owner of the mailbox has to be in either a
ToRecipients or CcRecipients property of incoming messages in
order for the condition or exception to apply.

Sensitivity
Indicates the sensitivity that must be stamped on incoming
messages in order for the condition or exception to apply.

WithinDateRange
Specifies the date range within which incoming messages have
to have been received in order for the condition or exception to
apply.

WithinSizeRange
Specifies the minimum and maximum sizes that incoming
messages must be in order for the condition or exception to
apply.

Parent elements

Element Description

Rule (RuleType)
Contains a single rule and represents a rule in a user's mailbox.

Text value
None.

Remarks
The rule predicates are used as rule conditions or exceptions.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
Conditions

EWS XML elements in Exchange


ExchangeImpersonation
Article • 03/29/2023 • 2 minutes to read

The ExchangeImpersonation element is used in the SOAP header of a request. When


this element is present, the caller is trying to impersonate the account that is contained
within the ExchangeImpersonation element.

ExchangeImpersonation

XML

<ExchangeImpersonation>

<ConnectingSID/>

</ExchangeImpersonation>

ExchangeImpersonationType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ConnectingSID Represents an account to impersonate when you are using the


ExchangeImpersonation SOAP header.

Parent elements
None.

Remarks
The calling account must have the ms-exch-impersonation right on the Client Access
server and the ms-exch-MayImpersonate right on either the mailbox database that
contains the mailbox to impersonate or the Active Directory User/Contact object.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
Server-to-server authorization in EWS
ExchangeStoreId
Article • 03/29/2023 • 2 minutes to read

The ExchangeStoreId element specifies the instant messaging (IM) group identifier.

XML

<ExchangeStoreId Id="" ChangeKey=""/>

ItemIdType

Attributes and elements


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

Attributes

Attribute Description

Id The text value of the Id attribute is the identifier of the group.

ChangeKey The text value of the ChangeKey attribute is the change key of the group.

Child elements
None.

Parent elements

Element Description

ImGroup
Represents an instant messaging group.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ExcludeConflicts
Article • 03/29/2023 • 2 minutes to read

The ExcludeConflicts element specifies whether to return suggested times for calendar
times that conflict among the attendees.

GetUserAvailabilityRequest

MailboxDataArray

MailboxData

ExcludeConflicts

XML

<ExcludeConflicts>true or false</ExcludeConflicts>

Boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

MailboxData Represents an individual mailbox user and options for the type of data to be
returned about the mailbox user.
The following is the XPath to this element:
/GetUserAvailabilityRequest/MailboxDataArray/MailboxData

Text value
A text value is required. The possible values are a Boolean true or false.

Remarks
This element is required.

7 Note

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityRequest

Getting User Availability


Excludes
Article • 03/29/2023 • 2 minutes to read

The Excludes element performs a bitwise mask of the specified property and a supplied
value.

XML

<Excludes>

<FieldURI/>

<Bitmask/>

</Excludes>

XML

<Excludes>

<ExtendedFieldURI/>
<Bitmask/>

</Excludes>

XML

<Excludes>

<IndexedFieldURI/>

<Bitmask/>

</Excludes>

ExcludesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

FieldURI
Identifies frequently referenced properties by URI.
Element Description

IndexedFieldURI
Identifies individual members of a dictionary.

ExtendedFieldURI Identifies MAPI properties.

Bitmask
Represents a hexadecimal or decimal mask to be used during an Excludes
restriction operation. If the bitmask represents a hexadecimal number, it must
be prefixed by 0x or 0X. Otherwise, it will be considered a decimal number.

Parent elements

Element Description

Restriction Represents the restriction or query that is used to filter items or folders in
FindItem/FindFolder and search folder operations.

Not
Represents a search expression that negates the Boolean value of the search
expression that it contains.

And
Represents a search expression that allows you to perform a Boolean And operation
between two or more search expressions. The result of the And operation is true if all
of the search expressions contained within the And are true.

Or
Represents a search expression that performs a logical OR on the search expression
it contains. The Or element will return true if any of its children return true.

Remarks
Excludes will resolve to true if an AND operation performed on the following resolves to
0:

1. The bitwise value for the property

2. The bitmask value for the property

Excludes can only be applied to a property that has an integer value. If the property
type is anything other than an integer, an error code of
ErrorUnsupportedPathForQuery is returned in the response.

You can perform the reverse operation by calling Not(Excludes).

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.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ExecutedSearchScope
Article • 03/29/2023 • 2 minutes to read

The ExecutedSearchScope element contains the scope of the search that was performed
to get the search results.

XML

<ExecutedSearchScope/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

FindMessageTrackingReportResponse Contains the status and result of a single


FindMessageTrackingReport operation request.

Text value
The text value is optional. This information is used by the client application to cache the
results more effectively.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
FindMessageTrackingReport operation

EWS XML elements in Exchange


Exists
Article • 03/29/2023 • 2 minutes to read

The Exists element represents a search expression that returns true if the supplied
property exists on an item.

XML

<Exists>

<Path/>

</Exists>

ExistsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

FieldURI
Identifies frequently referenced properties by URI.

IndexedFieldURI
Identifies individual members of a dictionary.

ExtendedFieldURI
Identifies MAPI properties.

Parent elements

Element Description

Restriction Represents the restriction or query that is used to filter items or folders in
FindItem/FindFolder and search folder operations.

Not
Represents a search expression that negates the Boolean value of the search
expression that it contains.
Element Description

And
Represents a search expression that enables you to perform a Boolean And
operation between two or more search expressions. The result of the And operation
is true if all the search expressions contained within the And are true.

Or
Represents a search expression that performs a logical OR on the search expression
that it contains. Or will return true if any of its children return true.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ExpandDL
Article • 03/29/2023 • 2 minutes to read

The ExpandDL element defines a request to expand a distribution list.

XML

<ExpandDL>

<Mailbox/>

</ExpandDL>

ExpandDLType

Attributes and elements


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

Attributes
None

Child elements

Element Description

Mailbox Identifies a fully resolved e-mail address or a distribution list. This mailbox represents
the distribution list to expand.

Parent elements
None.

Remarks
A distribution list expansion will only be performed for a single distribution list. A
distribution list expansion is not recursive.

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

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

Schema Name Message schema

Validation File Messages.xsd

Can be Empty False

See also
ExpandDL operation
ExpandDLResponse
Article • 03/29/2023 • 2 minutes to read

The ExpandDLResponse element defines a response to a request to expand a


distribution list.

ExpandDLResponse

XML

<ExpandDLResponse>

<ResponseMessages/>

</ExpandDLResponse>

ExpandDLResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
ExpandDL

ExpandDL operation
ExpandDLResponseMessage
Article • 03/29/2023 • 2 minutes to read

The ExpandDLResponseMessage element contains the status and result of a single


ExpandDL operation request.

ExpandDLResponse
ResponseMessages
ExpandDLResponseMessage

XML

<ExpandDLResponseMessage ResponseClass="" IndexedPagingOffset=""


NumeratorOffset="" AbsoluteDenominator="" IncludesLastItemInRange=""
TotalItemsInView="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<DLExpansion/>

</ExpandDLResponseMessage>

ExpandDLResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of an ExpandDL operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

IndexedPagingOffset
Represents the next index that should be used for the next request
when an indexed paging view is used.
Attribute Description

NumeratorOffset
Represents the new numerator value to use for the next request
when fraction page views are used.

AbsoluteDenominator
Represents the next denominator to use for the next request when
doing fractional paging.

IncludesLastItemInRange Indicates that additional paging is not needed. This attribute will be
true if the current results contain the last item in the query.

TotalItemsInView
Represents the total number of items that pass the restriction.

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes are moved.
- The mailbox database (MDB) is offline.
- A password is expired.
- A quota was exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements
Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

DLExpansion
Contains an array of mailboxes that are contained in a distribution list.

Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
ExpandDL operation
EWS reference for Exchange
EWS XML elements in Exchange
ExpandGroupMembership
Article • 03/29/2023 • 2 minutes to read

The ExpandGroupMembership element indicates whether to expand the membership


of the group returned from a GetSearchableMailboxes request.

XML

<ExpandGroupMembership>true | false</ExpandGroupMembership>

Boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
GetDiscoverySearchConfiguration | GetSearchableMailboxes

Text value
A text value of true for the ExpandGroupElement element indicates that group
membership is expanded. A value of false indicates that the group membership is not
expanded to show the members of the group.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

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

Schema name Messages schema

Validation file messages.xsd

Can be empty false


ExportAllowed
Article • 03/29/2023 • 2 minutes to read

The ExportAllowed element specifies whether exporting is enabled.

XML

<ExportAllowed>true | false</ExportAllowed>

Boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

RightsManagementLicenseData
Specifies information about the rights management license.

Text value
A text value of true for the ExportAllowed element indicates that exporting is allowed. A
value of false indicates that exporting is not allowed.

Remarks
This element is optional.

This element was introduced in Exchange Server 2013.


The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ExportItems
Article • 03/29/2023 • 2 minutes to read

The ExportItems element represents a request to export items from a mailbox.

ExportItems

XML

<ExportItems>

<ItemIds/>

</ExportItems>

ExportItemsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ItemIds Contains an array of item identifiers that identify the items to


(NonEmptyArrayOfItemIdsType) export from a mailbox.

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

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

Schema Name Message schema

Validation File Messages.xsd

Can be Empty False

See also
ExportItems operation

UploadItems operation
ExportItemsResponse
Article • 03/29/2023 • 2 minutes to read

The ExportItemsResponse element represents response to a single ExportItems


request.

ExportItemsResponse

XML

<ExportItemsResponse>

<ResponseMessages/>

</ExportItemsResponse>

ExportItemsResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

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

Schema Name Message schema

Validation File Messages.xsd

Can be Empty False

See also
ExportItems operation

UploadItems operation
ExportItemsResponseMessage
Article • 03/29/2023 • 2 minutes to read

The ExportItemsResponseMessage element contains the status and results of a request


to export a single mailbox item.

ExportItemsResponse
ResponseMessages
ExportItemsResponseMessage

XML

<ExportItemsResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<ItemId/>

<Data/>

</ExportItemsResponseMessage>

ExportItemsResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description
Value Description

Success
Describes a request that is fulfilled.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and reserved for future use. This element contains a value
of 0.

MessageXml
Provides additional error response information.

ItemId
Contains the item identifier of an exported item.

Data Contains the contents of an exported item.


(base64Binary)

Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Type

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

Schema Name Message schema

Validation File Messages.xsd

Can be Empty False

See also
ExportItems operation
UploadItems operation
ExtendedAttribute
Article • 03/29/2023 • 2 minutes to read

The ExtendedAttribute element is intended for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
ExtendedAttributes
Article • 03/29/2023 • 2 minutes to read

The ExtendedAttributes element is intended for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
ExtendedFieldURI
Article • 03/29/2023 • 7 minutes to read

The ExtendedFieldURI element identifies an extended MAPI property.

XML

<ExtendedFieldURI DistinguishedPropertySetId="" PropertySetId=""


PropertyTag="" PropertyName="" PropertyId="" PropertyType="" />

PathToExtendedFieldType

Attributes and elements


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

Attributes

Attribute Description

DistinguishedPropertySetId Defines the well-known property set IDs for extended MAPI
properties.

If this attribute is used, the PropertySetId and PropertyTag


attributes cannot be used. This attribute must be used with either
the PropertyId or PropertyName attribute, and the PropertyType
attribute.

The DistinguishedPropertySetId Attribute table later in this topic


lists the possible values for this attribute.

This attribute is optional.

PropertySetId
Identifies a MAPI extended property set or namespace by its
identifying GUID.

If this attribute is used, the DistinguishedPropertySetId and


PropertyTag attribute cannot be used. This attribute must be used
with either the PropertyId or PropertyName attribute, and the
PropertyType attribute.

This attribute is optional.


Attribute Description

PropertyTag
Identifies the property tag without the type part of the tag. The
PropertyTag can be represented as either a hexadecimal or a short
integer.

The range between 0x8000 and 0xFFFE represents the custom


range of properties. When a mailbox database encounters a
custom property for the first time, it assigns that custom property a
property tag within the custom property range of 0x8000-0xFFFE.
A given custom property tag will most likely differ across
databases. Therefore, a custom property request by property tag
can return different properties on different databases. The use of
the PropertyTag attribute is prohibited for custom properties.
Instead, use the PropertySetId attribute and the PropertyName or
PropertyId attribute.

IMPORTANT: Access any custom property between 0x8000 and


0xFFFE by using the GUID + name/ID. If the PropertyTag attribute
is used, the DistinguishedPropertySetId, PropertySetId,
PropertyName, and PropertyId attributes cannot be used.

This attribute is optional.

NOTE: You cannot use a property tag attribute for properties within
the custom range 0x8000-0xFFFE. You must use a named property
in this case.

PropertyName
Identifies an extended property by its name. This property must be
coupled with either DistinguishedPropertySetId or PropertySetId.

If this attribute is used, the PropertyId and PropertyTag attributes


cannot be used.

This attribute is optional.

PropertyId
Identifies an extended property by its dispatch ID. The dispatch ID
can be identified in either decimal or hexadecimal formats. This
property must be coupled with either DistinguishedPropertySetId
or PropertySetId.

If this attribute is used, the PropertyName and PropertyTag


attributes cannot be used.

This attribute is optional.


Attribute Description

PropertyType
Represents the property type of a property tag. This corresponds
to the least significant word in a property tag.

The PropertyType Attribute table later in this topic contains the


possible values for this attribute.

This attribute is required.

DistinguishedPropertySetId Attribute

Value Description

Address Identifies the address property set ID by name.

Appointment Identifies the appointment property set ID by name.

CalendarAssistant Identifies the calendar assistant property set ID by name.

Common Identifies the common property set ID by name.

InternetHeaders Identifies the Internet headers property set ID by name.

Meeting Identifies the meeting property set ID by name.

Sharing

PublicStrings Identifies the public strings property set ID by name.

Task Identifies the task property set ID by name.

UnifiedMessaging Identifies the unified messaging property set ID by name.

PropertyType Attribute

Value Description

ApplicationTime A double value that is interpreted as a date and time. The integer part is
the date and the fraction part is the time.

ApplicationTimeArray An array of double values that are interpreted as a date and time.

Binary A Base64-encoded binary value.

BinaryArray An array of Base64-encoded binary values.

Boolean A Boolean true or false.


Value Description

CLSID A GUID string.

CLSIDArray An array of GUID strings.

Currency A 64-bit integer that is interpreted as the number of cents.

CurrencyArray An array of 64-bit integers that are interpreted as the number of cents.

Double A 64-bit floating-point value.

DoubleArray An array of 64-bit floating-point values.

Error SCODE value; 32-bit unsigned integer.


Not used for restrictions or for getting/setting values. This exists only for
reporting.

Float A 32-bit floating-point value.

FloatArray An array of 32-bit floating-point values.

Integer A signed 32-bit (Int32) integer.

IntegerArray An array of signed 32-bit (Int32) integers.

Long A signed or unsigned 64-bit (Int64) integer.

LongArray An array of signed or unsigned 64-bit (Int64) integers.

Null Indicates no property value.


Not used for restrictions or for getting/setting values. This exists only for
reporting.

Object A pointer to an object that implements the IUnknown interface.


Not used for restrictions or for getting/setting values. This exists only for
reporting.

ObjectArray An array of pointers to objects that implement the IUnknown interface.


Not used for restrictions or for getting/setting values. This exists only for
reporting.

Short A signed 16-bit integer.

ShortArray An array of signed 16-bit integers.

SystemTime A 64-bit integer data and time value in the form of a FILETIME structure.

SystemTimeArray An array of 64-bit integer data and time values in the form of a FILETIME
structure.

String A Unicode string.


Value Description

StringArray An array of Unicode strings.

Child elements
None.

Parent elements

Element Description

ExtendedProperty
Identifies extended properties on folders and items.

AdditionalProperties
Identifies additional properties.

The following are the XPath expressions to this element:

/FindFolder/FolderShape/AdditionalProperties

/GetFolder/FolderShape/AdditionalProperties

/SyncFolderHierarchy/FolderShape/AdditionalProperties

/GetItem/ItemShape/AdditionalProperties

/FindItem/ItemShape/AdditionalProperties

/SyncFolderItems/ItemShape/AdditionalProperties

/GetAttachment/AttachmentShape/AdditionalProperties

SetItemField
Represents an update to a single property of an item in an UpdateItem
operation.

SetFolderField
Represents an update to a single property on a folder in an
UpdateFolder operation.

DeleteItemField
Represents a delete operation for deleting a given property from an
item during an UpdateItem operation.

DeleteFolderField
Represents a delete operation for deleting a given property from a
folder during an UpdateFolder call.

AppendToItemField Identifies data to append to a single property of an item during an


UpdateItem operation.

AppendToFolderField
Specifies data to append to a folder property during an UpdateFolder
operation.

Exists
Represents a search expression that returns true if the supplied
property exists on an item.
Element Description

FieldURIOrConstant
Represents either a property or a constant value to be used when
comparing with another property.

IsEqualTo
Represents a search expression that compares a property with either a
constant value or another property and evaluates to true if they are
equal.

IsGreaterThan
Represents a search expression that compares a property with either a
constant value or another property and returns true if the first property
is greater.

IsGreaterThanOrEqualTo Represents a search expression that compares a property with either a


constant value or another property and returns true if the first property
is greater than or equal to the second.

IsLessThan
Represents a search expression that compares a property with either a
constant value or another property and returns true if the first property
is less than the second.

IsLessThanOrEqualTo
Represents a search expression that compares a property with either a
constant value or another property and returns true if the first property
is less than the second.

IsNotEqualTo
Represents a search expression that compares a property with either a
constant value or another property and returns true if the values are
not the same.

Excludes
Performs a bitwise mask of the properties.

Contains
Represents a search expression that determines whether a given
property contains the supplied constant string value.

FieldOrder
Represents a single field by which to sort results and indicates the
direction for the sort.

Remarks
Some attributes cannot be used in combination with other attributes. Any request that
comes in with an invalid combination of extended property attributes will generate an
error message.

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

7 Note
In Microsoft .NET, a Long is a 64-bit signed integer, while in MAPI and COM, a Long
is a 32-bit integer. Most developers will use the Microsoft.NET Framework to
develop Exchange Web Services client applications. Therefore, the .NET naming is
used instead of the MAPI naming.

For example, the PR_MESSAGE_FLAGS MAPI property, 0x0E07, is a PT_LONG type.


In .NET, this is considered an integer. An extended property for
PR_MESSAGE_FLAGS is defined as <t:ExtendedFieldURI PropertyTag="0x0E07"
PropertyType="Integer"/> .

Example
The following example of a request creates an item that has two custom properties. The
first custom property is named IsMyHouse with a Boolean value set to true. The second
custom extended property is named HousePrices. It contains an array of Currency
values.

XML

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<CreateItem
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

MessageDisposition="SaveOnly">

<SavedItemFolderId>

<t:DistinguishedFolderId Id="inbox"/>

</SavedItemFolderId>

<Items>

<t:Item>

<t:ItemClass>IPM.Note</t:ItemClass>

<t:Subject>Create an extended property</t:Subject>

<t:Body BodyType="Text">Added info to extended props</t:Body>

<t:ExtendedProperty>

<t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings"

PropertyName="IsMyHouse"

PropertyType="Boolean"/>

<t:Value>true</t:Value>

</t:ExtendedProperty>

<t:ExtendedProperty>

<t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings"

PropertyName="HousePrices"

PropertyType="CurrencyArray"/>

<t:Values>

<t:Value>30000000</t:Value>

<t:Value>40000000</t:Value>

<t:Value>50000000</t:Value>

</t:Values>

</t:ExtendedProperty>

</t:Item>

</Items>

</CreateItem>

</soap:Body>

</soap:Envelope>

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
FieldURI
IndexedFieldURI
EWS XML elements in Exchange
ExtendedProperties
(ArrayOfExtendedPropertyAttributedVal
ueType)
Article • 03/29/2023 • 2 minutes to read

The ExtendedProperties element contains the extended properties used for a persona.

XML

<ExtendedProperties>

<ExtendedPropertyAttributedValue/>

</ExtendedProperties>

ArrayOfExtendedPropertyAttributedValueType

Attributes and elements


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

Attributes
None.

Child elements
ExtendedPropertyAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
ExtendedProperties
(NonEmptyArrayOfExtendedFieldURIs)
Article • 03/29/2023 • 2 minutes to read

The ExtendedProperties element contains the extended properties used for the Unified
Contact Store operations.

XML

<ExtendedProperties>

<ExtendedProperty/>

</ExtendedProperties>

NonEmptyArrayOfExtendedFieldURIs

Attributes and elements


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

Attributes
None.

Child elements
ExtendedProperty (PathToExtendedFieldType)

Parent elements
GetImItems | GetImItemList

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty
ExtendedProperties
(NonEmptyArrayOfExtendedPropertyTy
pe)
Article • 03/29/2023 • 2 minutes to read

The ExtendedProperties element specifies an array of additional properties.

XML

<ExtendedProperties>

<ExtendedProperty/>

</ExtendedProperties>

NonEmptyArrayOfExtendedPropertyType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ExtendedProperty
Identifies extended MAPI properties on folders and items.

Parent elements

Element Description

ImGroup
Represents an instant messaging group.

SearchPreviewItem Specifies the first 256 characters of a mailbox item for preview without
opening the item.
Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ExtendedProperty
Article • 03/29/2023 • 2 minutes to read

The ExtendedProperty element identifies extended MAPI properties on folders and


items.

XML

<ExtendedProperty>

<ExtendedFieldURI/>

<Values/>

</ExtendedProperty>

XML

<ExtendedProperty>

<ExtendedFieldURI/>

<Value/>

</ExtendedProperty>

ExtendedPropertyType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ExtendedFieldURI
Identifies an extended MAPI property to get, set, or create.

Values
Contains a collection of values for a multivalued extended MAPI property.

Value
Contains the value of single-valued MAPI extended property.

Parent elements
Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

CalendarFolder
Represents a folder that primarily contains calendar items.

ContactsFolder
Represents a contacts folder in a mailbox.

Folder
Represents a folder to create, get, find, synchronize, or update.

SearchFolder
Represents a search folder that is contained in a mailbox.

TasksFolder
Represents a tasks folder that is contained in a mailbox.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd


Element Example

Can be Empty False

See also
EWS XML elements in Exchange
ExtendedProperty
(PathToExtendedFieldType)
Article • 03/29/2023 • 2 minutes to read

The ExtendedProperty element specifies an extended property for the Unified Contact
Store.

XML

<ExtendedProperty DistinguishedPropertySetId="" PropertySetId=""


PropertyTag="" PropertyName="" PropertyId="" PropertyType="" FieldURI="">

</ExtendedProperty>

PathToExtendedFieldType

Attributes and elements


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

Attributes

Attribute Description

DistinguishedPropertySetId Indicates the distinguished property set identifier. This attribute is


optional.

PropertySetId Indicates the GUID property set identifier. This attribute is optional.

PropertyTag Represents the property tag minus the type part.

There are two options for representation:

- Hexadecimal: 0x3fa4
- Decimal: 0-65535

This attribute is optional.

PropertyName String that indicates the property name. This attribute is optional.

PropertyId Integer that indicates the property identifier. This attribute is


optional.

PropertyType Indicates the property type. This attribute is required.


Attribute Description

FieldURI Indicates the field Uniform Resource Identifier (URI). This attribute is
required. For possible values, see the FieldURI element.

DistinguishedPropertySetId

Value Description

Meeting Indicates a meeting.

Appointment Indicates an appointment.

Common Indicates the common property set.

PublicStrings Indicates public strings.

Address Indicates an address.

InternetHeaders Indicates Internet headers.

CalendarAssistant Indicates the Calendar Assistant.

UnifiedMessaging Indicates Unified Messaging.

Task Indicates a task.

PropertyType

Value Description

ApplicationTime Indicates the application time.

ApplicationTimeArray Indicates an array of application times.

Binary Indicates a binary value.

BinaryArray Indicates an array of binary values.

Boolean Indicates a Boolean value.

CLSID Indicates a CLSID.

CLSIDArray Indicates an array of CLSIDs.

Currency Indicates a currency value.

CurrencyArray Indicates an array of currency values.


Value Description

Double Indicates a double.

DoubleArray Indicates an array of double values.

Error Indicates an error. This is for error-reporting purposes. It cannot be used


in restrictions or for getting or setting values.

Float Indicates a float.

FloatArray Indicates an array of float values.

Integer Indicates an integer.

IntegerArray Indicates an array of integers.

Long Indicates a long.

LongArray Indicates an array of long values.

Null Indicates a null value. This is for error-reporting purposes. It cannot be


used in restrictions or for getting or setting values.

Object Indicates an object. This is for error-reporting purposes. It cannot be used


in restrictions or for getting or setting values.

ObjectArray Indicates an array of objects. This is for error-reporting purposes. It


cannot be used in restrictions or for getting or setting values.

Short Indicates a short.

ShortArray Indicates an array of short values.

SystemTime Indicates a system time value.

SystemTimeArray Indicates an array of system time values.

String Indicates a string.

StringArray Indicates an array of strings.

Child elements
None.

Parent elements

Element Description
Element Description

ExtendedFieldURI
Identifies an extended MAPI property.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ExtendedPropertyAttributedValue
Article • 03/29/2023 • 2 minutes to read

The ExtendedPropertyAttributedValue element specifies extended properties for a


persona.

XML

<ExtendedPropertyAttributedValue>

<Value/>

<Attributions/>

</ExtendedPropertyAttributedValue>

ExtendedPropertyAttributedValueType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Value (ExtendedPropertyType)
Specifies an array of extended properties for a persona.

Attributions Specifies an array of attributions for its associated Value


(ArrayOfValueAttributionsType)
element.

Parent elements

Element Description

ExtendedProperties Contains the extended properties used for


(ArrayOfExtendedPropertyAttributedValueType) Unified Contact Store operations.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ExternalAudience
Article • 03/29/2023 • 2 minutes to read

The ExternalAudience element sets or contains a value that determines to whom


external Out of Office (OOF) messages are sent.

XML

<ExternalAudience>None or Known or All</ExternalAudience>

ExternalAudience

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

UserOofSettings
Specifies the OOF settings.
The following is the XPath expression to this element:
/SetUserOofSettingsRequest/UserOofSettings

OofSettings
Contains the OOF settings.
The following is the XPath expression to this element:
/GetUserOofSettingsResponse/OofSettings

Text value
A text value is required for this element. The following table lists the possible values for
this element.
Value Description

None
E-mail senders outside the mailbox user's organization who send messages to the user
will not receive an external OOF message response.

Known E-mail senders outside the mailbox user's organization who send messages to the user
will only receive an external OOF message response if the sender is in the user's
Exchange store contact list.

All
E-mail senders outside the mailbox user's organization who send messages to the user
will receive an external OOF message response.

Remarks
This element shares the same type as the AllowExternalOof element.

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

Example
The following example of a SetUserOofSettings request sets the OoFState to Enabled,
sets the external audience to All, sets the duration of OOF to 10 days, and sets the
internal and external OOF messages.

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<SetUserOofSettingsRequest
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<Mailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Name>David Alexander</Name>

<Address>[email protected]</Address>

<RoutingType>SMTP</RoutingType>

</Mailbox>

<UserOofSettings
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<OofState>Enabled</OofState>

<ExternalAudience>All</ExternalAudience>

<Duration>

<StartTime>2005-10-05T00:00:00</StartTime>

<EndTime>2005-10-25T00:00:00</EndTime>

</Duration>

<InternalReply>

<Message>I am out of office. This is my internal reply.</Message>

</InternalReply>

<ExternalReply>

<Message>I am out of office. This is my external reply.</Message>

</ExternalReply>

</UserOofSettings>

</SetUserOofSettingsRequest>

</soap:Body>

</soap:Envelope>

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserOofSettings operation

SetUserOofSettings operation
ExternalDirectoryObjectId
Article • 03/29/2023 • 2 minutes to read

The ExternalDirectoryObjectId element is intended for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
ExternalDirectoryObjectId
(GetFederatedDirectoryUserType)
Article • 03/29/2023 • 2 minutes to read

The ExternalDirectoryObjectId (GetFederatedDirectoryUserType) element is intended


for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
ExternalDirectoryObjectId
(FederatedDirectoryGroupType)
Article • 03/29/2023 • 2 minutes to read

The ExternalDirectoryObjectId (FederatedDirectoryGroupType) element is intended for


internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
ExternalDirectoryObjectId
(FederatedDirectoryIdentityDetailsType)
Article • 03/29/2023 • 2 minutes to read

The ExternalDirectoryObjectId (FederatedDirectoryIdentityDetailsType) element is


intended for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
ExternalEmailAddress
Article • 03/29/2023 • 2 minutes to read

The ExternalEmailAddress element contains the external email address of the mailbox.

XML

<ExternalEmailAddress></ExternalEmailAddress>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
SearchableMailbox

Text value
The text value of the ExternalEmailAddress element is the external email address of the
mailbox.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
ExternalMemberCount
Article • 03/29/2023 • 2 minutes to read

The ExternalMemberCount element represents the count of external members in a


group.

XML

<ExternalMemberCount/>

int

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

MailTips
Represents values for various types of mail tips.

Text value
The text value is an integer that represents the number of external members in a group.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ExternalReply
Article • 03/29/2023 • 2 minutes to read

The ExternalReply element contains the out of office (OOF) response that is sent to
addresses outside the recipient's domain or trusted domains.

XML

<ExternalReply>

<Message/>

</ExternalReply>

ReplyBody

Attributes and elements


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

Attributes

Attribute Description

xml:lang Specifies the language used in the ExternalReply message. The possible values for this
attribute are defined by IETF RFC 3066.

Child elements

Element Description

Message (Availability)
Contains the OOF response.

Parent elements

Element Description

UserOofSettings
Specifies the OOF settings.
The following is the XPath expression to this element:
/SetUserOofSettingsRequest/UserOofSettings

Element Description

OofSettings
Contains the OOF settings.
The following is the XPath expression to this element:
/GetUserOofSettingsResponse/OofSettings

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Example
The following example of a SetUserOofSettings request sets the OofState to Enabled,
sets the duration of OOF to 10 days, and sets the internal and external OOF messages.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<SetUserOofSettingsRequest
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<Mailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Name>David Alexander</Name>

<Address>[email protected]</Address>

<RoutingType>SMTP</RoutingType>

</Mailbox>

<UserOofSettings
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<OofState>Enabled</OofState>

<ExternalAudience>All</ExternalAudience>

<Duration>

<StartTime>2005-10-05T00:00:00</StartTime>

<EndTime>2005-10-25T00:00:00</EndTime>

</Duration>

<InternalReply>

<Message>I am out of office. This is my internal reply.</Message>

</InternalReply>

<ExternalReply>

<Message>I am out of office. This is my external reply.</Message>

</ExternalReply>

</UserOofSettings>

</SetUserOofSettingsRequest>

</soap:Body>

</soap:Envelope>

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
SetUserOofSettings operation
ExternalUserIdentity
Article • 03/29/2023 • 2 minutes to read

The ExternalUserIdentity element identifies an external delegate user or an external


user who has folder access permissions.

XML

<ExternalUserIdentity/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

UserId
Identifies a delegate user or a user who has folder access permissions.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ExtractAllowed
Article • 03/29/2023 • 2 minutes to read

The ExtractAllowed element specifies whether entity extraction is enabled.

XML

<ExtractAllowed>true | false</ExtractAllowed

Boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

RightsManagementLicenseData
Specifies information about the rights management license.

Text value
A text value of true for the ExtractAllowed element indicates that entity extraction is
enabled. A value of false indicates that entity extraction is not enabled.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
FailedMailbox
Article • 03/29/2023 • 2 minutes to read

The FailedMailbox element specifies the error message for a mailbox that failed on
search.

XML

<FailedMailbox>

<Mailbox/>

<ErrorCode/>

<ErrorMessage/>

<IsArchive/>

</FailedMailbox>

FailedSearchMailboxType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Mailbox (string)
Contains an identifier for the mailbox.

ErrorCode (int)
Specifies the error code of the mailbox that failed the search.

ErrorMessage
Represents the reason for the validation error.

IsArchive
Specifies a Boolean value that indicates whether the mailbox is an archive.

Parent elements

Element Description

FailedMailboxes
Specifies an array of failed mailboxes.
Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
FailedMailboxes
Article • 03/29/2023 • 2 minutes to read

The FailedMailboxes element specifies an array of mailboxes that failed on search.

XML

<FailedMailboxes>

<FailedMailbox/>

<FailedMailboxes>

ArrayOfFailedSearchMailboxesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

FailedMailbox
Specifies the error message for a mailbox that failed on search.

Parent elements

Element Description

SearchMailboxesResult
Contains the result of the SearchMailboxes request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
FederatedDeliveryMailbox
Article • 03/29/2023 • 2 minutes to read

The FederatedDeliveryMailbox element represents the mailbox to which a cross-


premise message was sent.

XML

<FederatedDeliveryMailbox>

<Name/>

<EmailAddress/>

<RoutingType/>

<MailboxType/>

<ItemId/>

</FederatedDeliveryMailbox>

EmailAddressType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Name Defines the name of the mailbox user. This element is optional.
(EmailAddressType)

EmailAddress Defines the Simple Mail Transfer Protocol (SMTP) address of a mailbox
(NonEmptyStringType) user. This element is optional.

RoutingType Defines the routing that is used for the mailbox. The default is SMTP.
(EmailAddress)
This element is optional.

MailboxType
Defines the mailbox type of a mailbox user. This element is optional.

ItemId
Defines the item identifier of a contact or private distribution list for
recipients from a user's Contacts folder. This element is optional.
Parent elements

Element Description

FindMessageTrackingReport
Contains criteria for the types of messages to find.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
FieldOrder
Article • 03/29/2023 • 2 minutes to read

The FieldOrder element represents a single field by which to sort results and indicates
the direction for the sort.

XML

<FieldOrder Order="">

<FieldURI/>

</FieldOrder>

XML

<FieldOrder Order="">

<ExtendedFieldURI/>
</FieldOrder>

XML

<FieldOrder Order="">

<IndexedFieldURI/>

</FieldOrder>

FieldOrderType

Attributes and elements


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

Attributes

Attribute Description

Order
Describes the sort order direction.

The following are the possible values:

- Ascending
- Descending

Child elements
Element Description

FieldURI
Identifies frequently referenced properties by URI.

IndexedFieldURI
Identifies individual members of a dictionary.

ExtendedFieldURI
Identifies MAPI properties.

Parent elements

Element Description

SortOrder
Defines how items are sorted in a FindItem request.
The following is the XPath expression to this element: /FindItem/SortOrder

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
FieldURI
Article • 03/29/2023 • 11 minutes to read

The FieldURI element identifies frequently referenced properties by URI.

XML

<FieldURI FieldURI="" />

PathToUnindexedFieldType

Attributes and elements


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

Attributes

Attribute Description

FieldURI
Identifies the URI of the property.

FieldURI Attribute

Value Description

folder:FolderId Identifies the FolderId property.

folder:ParentFolderId Identifies the ParentFolderId property.

folder:DisplayName Identifies the DisplayName property.

folder:UnreadCount Identifies the UnreadCount property.

folder:TotalCount Identifies the TotalCount property.

folder:ChildFolderCount Identifies the ChildFolderCount property.

folder:FolderClass Identifies the FolderClass property.

folder:SearchParameters Identifies the SearchParameters property.

folder:ManagedFolderInformation Identifies the ManagedFolderInformation property.

folder:PermissionSet Identifies the PermissionSet property.


Value Description

folder:EffectiveRights Identifies the EffectiveRights property.

folder:SharingEffectiveRights Identifies the SharingEffectiveRights property.

item:ItemId Identifies the ItemId property.

item:ParentFolderId Identifies the ParentFolderId property.

item:ItemClass Identifies the ItemClass property.

item:MimeContent Identifies the MimeContent property.

item:Attachments Identifies the Attachments property.

item:Subject Identifies the Subject property.

item:DateTimeReceived Identifies the DateTimeReceived property.

item:Size Identifies the Size property.

item:Categories Identifies the Categories property.

item:HasAttachments Identifies the HasAttachments property.

item:Importance Identifies the Importance property.

item:InReplyTo Identifies the InReplyTo property.

item:InternetMessageHeaders Identifies the InternetMessageHeaders property.

item:IsAssociated Identifies the IsAssociated property.

item:IsDraft Identifies the IsDraft property.

item:IsFromMe Identifies the IsFromMe property.

item:IsResend Identifies the IsResend property.

item:IsSubmitted Identifies the IsSubmitted property.

item:IsUnmodified Identifies the IsUnmodified property.

item:DateTimeSent Identifies the DateTimeSent property.

item:DateTimeCreated Identifies the DateTimeCreated property.

item:Body Identifies the Body property.

item:ResponseObjects Identifies the ResponseObjects property.

item:Sensitivity Identifies the Sensitivity property.


Value Description

item:ReminderDueBy Identifies the ReminderDueBy property.

item:ReminderIsSet Identifies the ReminderIsSet property.

item:ReminderNextTime Identifies the ReminderNextTime property.

item:ReminderMinutesBeforeStart Identifies the ReminderMinutesBeforeStart property.

item:DisplayTo Identifies the DisplayTo property.

item:DisplayCc Identifies the DisplayCc property.

item:Culture Identifies the Culture property.

item:EffectiveRights Identifies the EffectiveRights property.

item:LastModifiedName Identifies the LastModifiedName property.

item:LastModifiedTime Identifies the LastModifiedTime property.

item:ConversationId Identifies the ConversationId property.

item:UniqueBody Identifies the UniqueBody property.

item:Flag Identifies the Flag property.

item:StoreEntryId Identifies the StoreEntryId property.

item:InstanceKey Identifies the InstanceKey property.

item:NormalizedBody Identifies the NormalizedBody property.

item:EntityExtractionResult Identifies the EntityExtractionResult property.

itemPolicyTag Idnentifies the PolicyTag property.

item:ArchiveTag Identifies the ArchiveTag property.

item:RetentionDate Identifies the RetentionDate property.

item:Preview Identifies the Preview property.

item:NextPredictedAction Identifies the NextPredictedAction property.

item:GroupingAction Identifies the GroupingAction property.

item:PredictedActionReasons Identifies the PredictedActionReasons property

item:IsClutter Intended for internal use only.

item:RightsManagementLicenseData Identifies the RightsManagementLicenseData


property.
Value Description

item:BlockStatus Identifies the BlockStatus property.

item:HasBlockedImages Identifies the HasBlockedImages property.

item:WebClientReadFormQueryString Identifies the WebClientReadFormQueryString


property.

item:WebClientEditFormQueryString Identifies the WebClientEditFormQueryString


property.

item:TextBody Identifies the TextBody property.

item:IconIndex Identifies the IconIndex property.

item:MimeContentUTF8 Identifies the MimeContentUTF8 property.

message:ConversationIndex Identifies the ConversationIndex property.

message:ConversationTopic Identifies the ConversationTopic property.

message:InternetMessageId Identifies the InternetMessageId property.

message:IsRead Identifies the IsRead property.

message:IsResponseRequested Identifies the IsResponseRequested property.

message:IsReadReceiptRequested Identifies the IsReadReceiptRequested property.

message:IsDeliveryReceiptRequested Identifies the IsDeliveryReceiptRequested property.

message:ReceivedBy Identifies the ReceivedBy property.

message:ReceivedRepresenting Identifies the ReceivedRepresenting property.

message:References Identifies the References property.

message:ReplyTo Identifies the ReplyTo property.

message:From Identifies the From property.

message:Sender Identifies the Sender property.

message:ToRecipients Identifies the ToRecipients property.

message:CcRecipients Identifies the CcRecipients property.

message:BccRecipients Identifies the BccRecipients property.

message:ApprovalRequestData Identifies the ApprovalRequestData property.

message:VotingInformation Identifies the VotingInformation property.


Value Description

message:ReminderMessageData Identifies the ReminderMessageData property.

meeting:AssociatedCalendarItemId Identifies the AssociatedCalendarItemId property.

meeting:IsDelegated Identifies the IsDelegated property.

meeting:IsOutOfDate Identifies the IsOutOfDate property.

meeting:HasBeenProcessed Identifies the HasBeenProcessed property.

meeting:ResponseType Identifies the ResponseType property.

meeting:ProposedStart Identifies the ProposedStart property.

meeting:ProposedEnd Identifies the ProposedEnd property.

meetingRequest:MeetingRequestType Identifies the MeetingRequestType property.

meetingRequest:IntendedFreeBusyStatus Identifies the IntendedFreeBusyStatus property.

meetingRequest:ChangeHighlights Identifies the ChangeHighlights property.

calendar:Start Identifies the Start property.

calendar:End Identifies the End property.

calendar:OriginalStart Identifies the OriginalStart property.

calendar:StartWallClock Identifies the StartWallClock property.

calendar:EndWallClock Identifies the EndWallClock property.

calendar:StartTimeZoneId Identifies the StartTimeZoneId property.

calendar:EndTimeZoneId Identifies the EndTimeZoneId property.

calendar:IsAllDayEvent Identifies the IsAllDayEvent property.

calendar:LegacyFreeBusyStatus Identifies the LegacyFreeBusyStatus property.

calendar:Location Identifies the Location property.

calendar:When Identifies the When property.

calendar:IsMeeting Identifies the IsMeeting property.

calendar:IsCancelled Identifies the IsCancelled property.

calendar:IsRecurring Identifies the IsRecurring property.

calendar:MeetingRequestWasSent Identifies the MeetingRequestWasSent property.


Value Description

calendar:IsResponseRequested Identifies the IsResponseRequested property.

calendar:CalendarItemType Identifies the CalendarItemType property.

calendar:MyResponseType Identifies the MyResponseType property.

calendar:Organizer Identifies the Organizer property.

calendar:RequiredAttendees Identifies the RequiredAttendees property.

calendar:OptionalAttendees Identifies the OptionalAttendees property.

calendar:Resources Identifies the Resources property.

calendar:ConflictingMeetingCount Identifies the ConflictingMeetingCount property.

calendar:AdjacentMeetingCount Identifies the AdjacentMeetingCount property.

calendar:ConflictingMeetings Identifies the ConflictingMeetings property.

calendar:AdjacentMeetings Identifies the AdjacentMeetings property.

calendar:Duration Identifies the Duration property.

calendar:TimeZone Identifies the TimeZone property.

calendar:AppointmentReplyTime Identifies the AppointmentReplyTime property.

calendar:AppointmentSequenceNumber Identifies the AppointmentSequenceNumber


property.

calendar:AppointmentState Identifies the AppointmentState property.

calendar:Recurrence Identifies the Recurrence property.

calendar:FirstOccurrence Identifies the FirstOccurrence property.

calendar:LastOccurrence Identifies the LastOccurrence property.

calendar:ModifiedOccurrences Identifies the ModifiedOccurrences property.

calendar:DeletedOccurrences Identifies the DeletedOccurrences property.

calendar:MeetingTimeZone Identifies the MeetingTimeZone property.

calendar:ConferenceType Identifies the ConferenceType property.

calendar:AllowNewTimeProposal Identifies the AllowNewTimeProposal property.

calendar:IsOnlineMeeting Identifies the IsOnlineMeeting property.

calendar:MeetingWorkspaceUrl Identifies the MeetingWorkspaceUrl property.


Value Description

calendar:NetShowUrl Identifies the NetShowUrl property.

calendar:UID Identifies the UID property.

calendar:RecurrenceId Identifies the RecurrenceId property.

calendar:DateTimeStamp Identifies the DateTimeStamp property.

calendar:StartTimeZone Identifies the StartTimeZone property.

calendar:EndTimeZone Identifies the EndTimeZone property.

calendar:JoinOnlineMeetingUrl Identifies the JoinOnlineMeetingUrl property.

calendar:OnlineMeetingSettings Identifies the OnlineMeetingSettings property.

calendar:IsOrganizer Identifies the IsOrganizer property.

task:ActualWork Identifies the ActualWork property.

task:AssignedTime Identifies the AssignedTime property.

task:BillingInformation Identifies the BillingInformation property.

task:ChangeCount Identifies the ChangeCount property.

task:Companies Identifies the Companies property.

task:CompleteDate Identifies the CompleteDate property.

task:Contacts Identifies the Contacts property.

task:DelegationState Identifies the DelegationState property.

task:Delegator Identifies the Delegator property.

task:DueDate Identifies the DueDate property.

task:IsAssignmentEditable Identifies the IsAssignmentEditable property.

task:IsComplete Identifies the IsComplete property.

task:IsRecurring Identifies the IsRecurring property.

task:IsTeamTask Identifies the IsTeamTask property.

task:Mileage Identifies the Mileage property.

task:Owner Identifies the Owner property.

task:PercentComplete Identifies the PercentComplete property.


Value Description

task:Recurrence Identifies the Recurrence property.

task:StartDate Identifies the StartDate property.

task:Status Identifies the Status property.

task:StatusDescription Identifies the StatusDescription property.

task:TotalWork Identifies the TotalWork property.

contacts:Alias Identifies the Alias property. This property was


introduced in Exchange Server 2010 Service Pack 2
(SP2).

contacts:AssistantName Identifies the AssistantName property.

contacts:Birthday Identifies the Birthday property.

contacts:BusinessHomePage Identifies the BusinessHomePage property.

contacts:Children Identifies the Children property.

contacts:Companies Identifies the Companies property.

contacts:CompanyName Identifies the CompanyName property.

contacts:CompleteName Identifies the CompleteName property.

contacts:ContactSource Identifies the ContactSource property.

contacts:Culture Identifies the Culture property.

contacts:Department Identifies the Department property.

contacts:DisplayName Identifies the DisplayName property.

contacts:DirectoryId Identifies the DirectoryId property. This property was


introduced in Exchange 2010 SP2.

contacts:DirectReports Identifies the DirectReports property. This property


was introduced in Exchange 2010 SP2.

contacts:EmailAddresses Identifies the EmailAddresses property.

contacts:FileAs Identifies the FileAs property.

contacts:FileAsMapping Identifies the FileAsMapping property.

contacts:Generation Identifies the Generation property.

contacts:GivenName Identifies the GivenName property.


Value Description

contacts:ImAddresses Identifies the ImAddresses property.

contacts:Initials Identifies the Initials property.

contacts:JobTitle Identifies the JobTitle property.

contacts:Manager Identifies the Manager property.

contacts:ManagerMailbox Identifies the ManagerMailbox property. This


property was introduced in Exchange 2010 SP2.

contacts:MiddleName Identifies the MiddleName property.

contacts:Mileage Identifies the Mileage property.

contacts:MSExchangeCertificate Identifies the MSExchangeCertificate property. This


property was introduced in Exchange 2010 SP2.

contacts:Nickname Identifies the Nickname property.

contacts:Notes Identifies the Notes property. This property was


introduced with in Exchange 2010 SP2.

contacts:OfficeLocation Identifies the OfficeLocation property.

contacts:PhoneNumbers Identifies the PhoneNumbers property.

contacts:PhoneticFullName Identifies the PhoneticFullName property. This


property was introduced in Exchange 2010 SP2.

contacts:PhoneticFirstName Identifies the PhoneticFirstName property. This


property was introduced in Exchange 2010 SP2.

contacts:PhoneticLastName Identifies the PhoneticLastName property. This


property was introduced in Exchange 2010 SP2.

contacts:Photo Identifies the Photo property. This property was


introduced in Exchange 2010 SP2.

contacts:PhysicalAddresses Identifies the PhysicalAddresses property.

contacts:PostalAddressIndex Identifies the PostalAddressIndex property.

contacts:Profession Identifies the Profession property.

contacts:SpouseName Identifies the SpouseName property.

contacts:Surname Identifies the Surname property.

contacts:WeddingAnniversary Identifies the WeddingAnniversary property.


Value Description

contacts:UserSMIMECertificate Identifies the UserSMIMECertificate property. This


property was introduced in Exchange 2010 SP2.

contacts:HasPicture Identifies the HasPicture property.

distributionlist:Members Identifies the Members property.

postitem:PostedTime Identifies the PostedTime property.

conversation:ConversationId Identifies the ConversationId property.

conversation:ConversationTopic Identifies the ConversationTopic property.

conversation:UniqueRecipients Identifies the UniqueRecipients property.

conversation:GlobalUniqueRecipients Identifies the GlobalUniqueRecipients property.

conversation:UniqueUnreadSenders Identifies the UniqueUnreadSenders property.

conversation:GlobalUniqueUnreadSenders Identifies the GlobalUniqueUnreadSenders property.

conversation:UniqueSenders Identifies the UniqueSenders property.

conversation:GlobalUniqueSenders Identifies the GlobalUniqueSenders property.

conversation:LastDeliveryTime Identifies the LastDeliveryTime property.

conversation:GlobalLastDeliveryTime Identifies the GlobalLastDeliveryTime property.

conversation:Categories Identifies the Categories property.

conversation:GlobalCategories Identifies the GlobalCategories property.

conversation:FlagStatus Identifies the FlagStatus property.

conversation:GlobalFlagStatus Identifies the GlobalFlagStatus property.

conversation:HasAttachments Identifies the HasAttachments property.

conversation:GlobalHasAttachments Identifies the GlobalHasAttachments property.

conversation:HasIrm Identifies the HasIrm property.

conversation:GlobalHasIrm Identifies the GlobalHasIrm property.

conversation:MessageCount Identifies the MessageCount property.

conversation:GlobalMessageCount Identifies the GlobalMessageCount property.

conversation:UnreadCount Identifies the UnreadCount property.

conversation:GlobalUnreadCount Identifies the GlobalUnreadCount property.


Value Description

conversation:Size Identifies the Size property.

conversation:GlobalSize Identifies the GlobalSize property.

conversation:ItemClasses Identifies the ItemClasses property.

conversation:GlobalItemClasses Identifies the GlobalItemClasses property.

conversation:Importance Identifies the Importance property.

conversation:GlobalImportance Identifies the GlobalImportance property.

conversation:ItemIds Identifies the ItemIds property.

conversation:GlobalItemIds Identifies the GlobalItemIds property.

conversation:LastModifiedTime Identifies the LastModifiedTime property.

conversation:InstanceKey Identifies the InstanceKey property.

conversation:Preview Identifies the Preview property.

conversation:GlobalParentFolderId Identifies the GlobalParentFolderId property.

conversation:NextPredictedAction Identifies the NextPredictedAction property.

conversation:GroupingAction Identifies the GroupingAction property.

conversation:IconIndex Identifies the IconIndex property.

conversation:GlobalIconIndex Identifies the GlobalIconIndex property.

conversation:DraftItemIds Identifies the DraftItemIds property.

conversation:HasClutter Intended for internal use only.

persona:PersonaId Identifies the PersonaId property.

persona:PersonaType Identifies the PersonaType property.

persona:GivenName Identifies the GivenName property.

persona:CompanyName Identifies the CompanyName property.

persona:Surname Identifies the Surname property.

persona:DisplayName Identifies the DisplayName property.

persona:EmailAddress Identifies the EmailAddress property.

persona:FileAs Identifies the FileAs property.


Value Description

persona:HomeCity Identifies the HomeCity property.

persona:CreationTime Identifies the CreationTime property.

persona:RelevanceScore Identifies the RelevanceScore property.

persona:WorkCity Identifies the WorkCity property.

persona:PersonaObjectStatus Identifies the PersonaObjectStatus property.

persona:FileAsId Identifies the FileAsId property.

persona:DisplayNamePrefix Identifies the DisplayNamePrefix property.

persona:YomiCompanyName Identifies the YomiCompanyName property.

persona:YomiFirstName Identifies the YomiFirstName property.

persona:YomiLastName Identifies the YomiLastName property.

persona:Title Identifies the Title property.

persona:EmailAddresses Identifies the EmailAddresses property.

persona:PhoneNumber Identifies the PhoneNumber property.

persona:ImAddress Identifies the ImAddress property.

persona:ImAddresses Identifies the ImAddresses property.

persona:ImAddresses2 Identifies the ImAddresses2 property.

persona:ImAddresses3 Identifies the ImAddresses3 property.

persona:FolderIds Identifies the FolderIds property.

persona:Attributions Identifies the Attributions property.

persona:DisplayNames Identifies the DisplayNames property.

persona:Initials Identifies the Initials property.

persona:FileAses Identifies the FileAses property.

persona:FileAsIds Identifies the FileAsIds property.

persona:DisplayNamePrefixes Identifies the DisplayNamePrefixes property.

persona:GivenNames Identifies the GivenNames property.

persona:MiddleNames Identifies the MiddleNames property.


Value Description

persona:Surnames Identifies the Surnames property.

persona:Generations Identifies the Generations property.

persona:Nicknames Identifies the Nicknames property.

persona:YomiCompanyNames Identifies the YomiCompanyNames property.

persona:YomiFirstNames Identifies the YomiFirstNames property.

persona:YomiLastNames Identifies the YomiLastNames property.

persona:BusinessPhoneNumbers Identifies the BusinessPhoneNumbers property.

persona:BusinessPhoneNumbers2 Identifies the BusinessPhoneNumbers2 property.

persona:HomePhones Identifies the HomePhones property.

persona:HomePhones2 Identifies the HomePhones2 property.

persona:MobilePhones Identifies the MobilePhones property.

persona:MobilePhones2 Identifies the MobilePhones2 property.

persona:AssistantPhoneNumbers Identifies the AssistantPhoneNumbers property.

persona:CallbackPhones Identifies the CallbackPhones property.

persona:CarPhones Identifies the CarPhones property.

persona:HomeFaxes Identifies the HomeFaxes property.

persona:OrganizationMainPhones Identifies the OrganizationMainPhones property.

persona:OtherFaxes Identifies the OtherFaxes property.

persona:OtherTelephones Identifies the OtherTelephones property.

persona:OtherPhones2 Identifies the OtherPhones2 property.

persona:Pagers Identifies the Pagers property.

persona:RadioPhones Identifies the RadioPhones property.

persona:TelexNumbers Identifies the TelexNumbers property.

persona:WorkFaxes Identifies the WorkFaxes property.

persona:Emails1 Identifies the Emails1 property.

persona:Emails2 Identifies the Emails2 property.


Value Description

persona:Emails3 Identifies the Emails3 property.

persona:BusinessHomePages Identifies the BusinessHomePages property.

persona:School Identifies the School property.

persona:PersonalHomePages Identifies the PersonalHomePages property.

persona:OfficeLocations Identifies the OfficeLocations property.

persona:BusinessAddresses Identifies the BusinessAddresses property.

persona:HomeAddresses Identifies the HomeAddresses property.

persona:OtherAddresses Identifies the OtherAddresses property.

persona:Titles Identifies the Titles property.

persona:Departments Identifies the Departments property.

persona:CompanyNames Identifies the CompanyNames property.

persona:Managers Identifies the Managers property.

persona:AssistantNames Identifies the AssistantNames property.

persona:Professions Identifies the Professions property.

persona:SpouseNames Identifies the SpouseNames property.

persona:Hobbies Identifies the Hobbies property.

persona:WeddingAnniversaries Identifies the WeddingAnniversaries property.

persona:Birthdays Identifies the Birthdays property.

persona:Children Identifies the Children property.

persona:Locations Identifies the Locations property.

persona:ExtendedProperties Identifies the ExtendedProperties property.

persona:PostalAddress Identifies the PostalAddress property.

persona:Bodies Identifies the Bodies property.

Child elements
None.
Parent elements

Element Description

AdditionalProperties
Identifies additional properties to get, set, or create.
The following are the XPath expressions to this element:
/FindFolder/FolderShape/AdditionalProperties

/GetFolder/FolderShape/AdditionalProperties

/SyncFolderHierarchy/FolderShape/AdditionalProperties

/GetItem/ItemShape/AdditionalProperties

/FindItem/ItemShape/AdditionalProperties

/SyncFolderItems/ItemShape/AdditionalProperties

/GetAttachment/AttachmentShape/AdditionalProperties

AggregateOn
Represents the property that is used to determine the order of
grouped items for a grouped FindItem result set.

GroupBy
Specifies an arbitrary grouping for FindItem queries.

SetItemField
Represents an update to a single property of an item in an UpdateItem
operation.

SetFolderField
Represents an update to a single property on a folder in an
UpdateFolder operation.

DeleteItemField
Represents a delete operation for deleting a given property from an
item during an UpdateItem call.

DeleteFolderField
Represents a delete operation for deleting a given property from a
folder during an UpdateFolder call.

AppendToItemField Identifies data to append to a single property of an item during an


UpdateItem operation.

AppendToFolderField
Specifies data to append to a folder property during an UpdateFolder
operation.

Exists
Represents a search expression that returns true if the supplied
property exists on an item.

FieldURIOrConstant
Represents either a property or a constant value to be used when
comparing with another property.

IsEqualTo
Represents a search expression that compares a property with either a
constant value or another property and evaluates to true if they are
equal.

IsGreaterThan
Represents a search expression that compares a property with either a
constant value or another property and returns true if the first property
is greater.
Element Description

IsGreaterThanOrEqualTo Represents a search expression that compares a property with either a


constant value or another property and returns true if the first property
is greater than or equal to the second.

IsLessThan
Represents a search expression that compares a property with either a
constant value or another property and returns true if the first property
is less than the second.

IsLessThanOrEqualTo
Represents a search expression that compares a property with either a
constant value or another property and returns true if the first property
is less than the second.

IsNotEqualTo
Represents a search expression that compares a property with either a
constant value or another property and returns true if the values are
not the same.

Excludes
Performs a bitwise mask of the properties.

Contains
Represents a search expression that determines whether a given
property contains the supplied constant string value.

FieldOrder
Represents a single field by which to sort results and indicates the
direction for the sort.

Text value
None.

Remarks
This element is part of the Path substitution group.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Example
The following example shows how to use the FieldURI element.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<GetItem
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject"/>

</t:AdditionalProperties>

</ItemShape>

<ItemIds>

<t:ItemId Id="ASkAS="/>

</ItemIds>

</GetItem>

</soap:Body>

</soap:Envelope>

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
FieldUri (Rule)
Article • 03/29/2023 • 2 minutes to read

The FieldURI element specifies the URI to the rule field that caused the validation error.

XML

<FieldURI/>

RuleFieldURIType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Error
Represents a single validation error on a particular rule property value, predicate
property value, or action property value.

Text value
The text value for this element is restricted to one of the following strings:

RuleId

DisplayName

Priority

IsNotSupported
Actions

Condition:Categories

Condition:ContainsBodyStrings

Condition:ContainsHeaderStrings

Condition:ContainsRecipientStrings

Condition:ContainsSenderStrings

Condition:ContainsSubjectOrBodyStrings

Condition:ContainsSubjectStrings

Condition:FlaggedForAction

Condition:FromAddresses

Condition:FromConnectedAccounts

Condition:HasAttachments

Condition:Importance

Condition:IsApprovalRequest

Condition:IsAutomaticForward

Condition:IsAutomaticReply

Condition:IsEncrypted

Condition:IsMeetingRequest

Condition:IsMeetingResponse

Condition:IsNDR

Condition:IsPermissionControlled

Condition:IsReadReceipt

Condition:IsSigned

Condition:IsVoicemail

Condition:ItemClasses
Condition:MessageClassifications

Condition:NotSentToMe

Condition:SentCcMe

Condition:SentOnlyToMe

Condition:SentToAddresses

Condition:SentToMe

Condition:SentToOrCcMe

Condition:Sensitivity

Condition:WithinDateRange

Condition:WithinSizeRange

Exception:Categories

Exception:ContainsBodyStrings

Exception:ContainsHeaderStrings

Exception:ContainsRecipientStrings

Exception:ContainsSenderStrings

Exception:ContainsSubjectOrBodyStrings

Exception:ContainsSubjectStrings

Exception:FlaggedForAction

Exception:FromAddresses

Exception:FromConnectedAccounts

Exception:HasAttachments

Exception:Importance

Exception:IsApprovalRequest

Exception:IsAutomaticForward

Exception:IsAutomaticReply
Exception:IsEncrypted

Exception:IsMeetingRequest

Exception:IsMeetingResponse

Exception:IsNDR

Exception:IsPermissionControlled

Exception:IsReadReceipt

Exception:IsSigned

Exception:IsVoicemail

Exception:ItemClasses

Exception:MessageClassifications

Exception:NotSentToMe

Exception:SentCcMe

Exception:SentOnlyToMe

Exception:SentToAddresses

Exception:SentToMe

Exception:SentToOrCcMe

Exception:Sensitivity

Exception:WithinDateRange

Exception:WithinSizeRange

Action:AssignCategories

Action:CopyToFolder

Action:Delete

Action:ForwardAsAttachmentToRecipients

Action:ForwardToRecipients

Action:MarkImportance
Action:MarkAsRead

Action:MoveToFolder

Action:PermanentDelete

Action:RedirectToRecipients

Action:SendSMSAlertToRecipients

Action:ServerReplyWithMessage

Action:StopProcessingRules

IsEnabled

IsInError

Conditions

Exceptions

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
FieldURIOrConstant
Article • 03/29/2023 • 2 minutes to read

The FieldURIOrConstant element represents either a property or a constant value to be


used when comparing with another property.

XML

<FieldURIOrConstant>

<Constant/>

</FieldURIOrConstant>

XML

<FieldURIOrConstant>

<IndexedFieldURI/>
</FieldURIOrConstant>

XML

<FieldURIOrConstant>

<FieldURI/>

</FieldURIOrConstant>

XML

<FieldURIOrConstant>

<ExtendedFieldURI/>
</FieldURIOrConstant>

FieldURIOrConstantType

Attributes and elements


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

Attributes
None.

Child elements
Element Description

Constant
Identifies a constant value in a restriction.

FieldURI
Identifies frequently referenced properties by URI.

IndexedFieldURI
Identifies individual members of a dictionary.

ExtendedFieldURI
Identifies MAPI properties.

Parent elements

Element Description

IsEqualTo
Represents a search expression that compares a property with either a
constant value or another property and evaluates to true if they are
equal.

IsGreaterThan
Represents a search expression that compares a property with either a
constant value or another property and returns true if the first property
is greater.

IsGreaterThanOrEqualTo Represents a search expression that compares a property with either a


constant value or another property and returns true if the first property
is greater than or equal to the second value or property.

IsLessThan
Represents a search expression that compares a property with either a
constant value or another property and returns true if the first property
is less than the second value or property.

IsLessThanOrEqualTo
Represents a search expression that compares a property with either a
constant value or another property and returns true if the first property
is less than or equal to the second value or property.

IsNotEqualTo
Represents a search expression that compares a property with either a
constant value or another property and returns true if the values are
not the same.

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 XML example shows the FieldURIOrConstant element used with both a
constant and field URI.

XML

<Restriction>

<Or xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<IsEqualTo>

<FieldURI FieldURI="item:DateTimeCreated"/>

<FieldURIOrConstant>

<FieldURI FieldURI="item:DateTimeReceived"/>

</FieldURIOrConstant>

</IsEqualTo>

<IsEqualTo>

<FieldURI FieldURI="item:Subject"/>

<FieldURIOrConstant>

<Constant Value="Here is a test message"/>

</FieldURIOrConstant>

</IsEqualTo>

</Or>

</Restriction>

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
FieldValue
Article • 03/29/2023 • 2 minutes to read

The FieldValue element represents the value of the field that caused the validation error.

XML

<FieldValue/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Error
Represents a single validation error on a particular rule property value, predicate
property value, or action property value.

Text value
None

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
FileAs
Article • 03/29/2023 • 2 minutes to read

The FileAs element represents how a contact or distribution list is filed in the Contacts
folder.

XML

<FileAs/>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

DistributionList
Represents a distribution list.

Contact
Represents an Exchange contact item.

Text value
A text value that represents a string is required if this element is used.

Remarks
The FileAs element is used to sort contacts and distribution lists by a name other than a
full name or company name.

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

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
FileAses
Article • 03/29/2023 • 2 minutes to read

The FileAses element specifies an array of StringAttributedValue elements and the


identifiers of their source attributions for the associated persona.

XML

<FileAses>

<StringAttributedValue/>

</FileAses>

ArrayOfStringAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

StringAttributedValue Specifies an instance in an array of attributes associated with a persona


element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
FileAsHeader
Article • 03/29/2023 • 2 minutes to read

The FileAsHeader specifies the header for the File As option.

XML

<FileAsHeader></FileAsHeader>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Text value
The text value of the FileAsHeader element specifies the header.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Code Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
FileAsId
Article • 03/29/2023 • 2 minutes to read

The FileAsId element specifies the FileAs identifier.

XML

<FileAsId></FileAsId

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Text value
The text value of the FileAsId element specifies the FileAs identifier.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
FileAsIds
Article • 03/29/2023 • 2 minutes to read

The FileAsIds element specifies an array of StringAttributedValue elements and the


identifiers of their source attributions for the associated persona.

XML

<FileAsIds>

<StringAttributedValue/>

<FileAsIds>

ArrayOfStringAttributedValuesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

StringAttributedValue Specifies an instance in an array of attributes associated with a persona


element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
FileAsMapping
Article • 03/29/2023 • 2 minutes to read

The FileAsMapping element defines how to construct what is displayed for a contact.

XML

<FileAsMapping/>

FileAsMappingType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Text value
The text value for this element is restricted to one of the following string values:

None

LastCommaFirst

FirstSpaceLast

Company
LastCommaFirstCompany

CompanyLastFirst

LastFirst

LastFirstCompany

CompanyLastCommaFirst

LastFirstSuffix

LastSpaceFirstCompany

CompanyLastSpaceFirst

LastSpaceFirst

DisplayName

FirstName

LastFirstMiddleSuffix

LastName

Empty

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

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False


See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)

Updating Contacts

Deleting Contacts
FileAttachment
Article • 03/29/2023 • 2 minutes to read

The FileAttachment element represents a file that is attached to an item in the Exchange
store.

XML

<FileAttachment>

<AttachmentId/>

<Name/>

<ContentType/>

<ContentId/>

<ContentLocation/>

<Size/>

<LastModifiedTime/>

<IsInline/>

<IsContactPhoto/>

<Content/>

</FileAttachment>

FileAttachmentType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

AttachmentId
Identifies the file attachment.

Name Represents the name of the attachment.


(AttachmentType)

ContentType
Describes the Multipurpose Internet Mail Extensions (MIME) type of the
attachment content.
Element Description

ContentId
Represents an identifier for the contents of an attachment. ContentId can be
set to any string value. Applications can use ContentId to implement their
own identification mechanisms.

ContentLocation
Contains the Uniform Resource Identifier (URI) that corresponds to the
location of the content of the attachment.

Size
Represents the size in bytes of the file attachment.

LastModifiedTime Represents when the file attachment was last modified.

IsInline
Represents whether the attachment appears inline within an item.

IsContactPhoto
Indicates whether the file attachment is a contact picture.

Content
Contains the Base64-encoded contents of the file attachment.

Parent elements

Element Description

Attachments
Contains the items or files that are attached to an item in the Exchange store.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False


See also
EWS XML elements in Exchange
FilterHtmlContent
Article • 03/29/2023 • 2 minutes to read

The FilterHtmlContent element specifies whether potentially unsafe HTML content is


filtered from an item or attachment.

XML

<FilterHtmlContent>true or false</FilterHtmlContent>

boolean

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

AttachmentShape Identifies additional properties to return in a response to a GetAttachment


request.

The following is the XPath expression to this element:

/GetAttachment/AttachmentShape

Element Description

ItemShape
Identifies the item properties and content to include in a GetItem, FindItem,
or SyncFolderItems response.

The following are the XPath expressions to this element:

/GetItem/ItemShape

/FindItem/ItemShape

/SyncFolderItems/ItemShape

Text value
This element can be either true or false. The default value is false. This is a Boolean data
type.

Remarks
This element is optional.

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

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
FindConversation
Article • 03/29/2023 • 2 minutes to read

The FindConversation element defines a request to find conversations in a mailbox.

FindConversation

XML

<FindConversation Traversal="" ViewFilter="">

<IndexedPageItemView/>

<SeekToConditionPageItemView/>

<SortOrder/>

<ParentFolderId/>

<MailboxScope/>

<QueryString/>

<ConversationShape/>
</FindConversation>

FindConversationType

Attributes and elements


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

Attributes

Attribute Description

Traversal Identifies the types of sub-tree traversal. This attribute is optional.

ViewFilter Identifies the types view filters. This attribute is optional.

Traversal attribute values

Value Description

Shallow Indicates a shallow traversal.

Deep Indicates a deep traversal.


ViewFilter attribute values

Value Description

All Find all conversations.

Flagged Find flagged conversations.

HasAttachment Find conversations with attachments.

ToOrCcMe Find conversations addressed or cc'd to me.

Unread Find unread conversations.

TaskActive Find active tasks.

TaskOverdue Find overdue tasks.

TaskCompleted Find completed tasks.

NoClutter For internal use only.

Clutter For internal use only.

Child elements

Element Description

IndexedPageItemView
Describes how paged conversation information is returned.

SeekToConditionPageItemView Specifies the condition that is used to identify the end of a


search, the starting index of a search, the maximum entries to
return, and the search directions for a FindItem or
FindConversation search.

SortOrder
Defines how items are sorted in a FindConversation operation
request. The conversation:LastDeliveryTime property is the only
property that is supported for sorting when the
FindConversation operation is used.

ParentFolderId Identifies the folder to search for conversations.


(TargetFolderIdType)

MailboxScope
Specifies whether a search or fetch for a conversation should
span either the primary mailbox, archive mailbox, or both the
primary and archive mailbox.

QueryString (QueryStringType) Specifies a mailbox query string based on Advanced Query


Syntax (AQS).
Element Description

ConversationShape
Identifies the property set to return in a FindConversation
operation response.

Parent elements
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindConversation operation

EWS XML elements in Exchange

Conversations in EWS
FindConversationResponse
Article • 03/29/2023 • 2 minutes to read

The FindConversationResponse element defines a response to a FindConversation


operation request.

FindConversationResponse

XML

<FindConversationResponse ResponseClass="">

<Conversations/>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</FindConversationResponse>

FindConversationResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of a FindConversation operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

Conversations
Contains an array of conversations.

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

Parent elements
None.
Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
FindConversation operation
EWS XML elements in Exchange
Conversations in EWS
FindFolder
Article • 03/29/2023 • 2 minutes to read

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

XML

<FindFolder Traversal="Shallow/Deep/SoftDeleted">

<FolderShape/>

<IndexedPageFolderView/>

<Restriction/>

<ParentFolderIds/>

</FindFolder>

XML

<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.
Value Description

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
<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://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
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindFolder operation
FindFolderResponse
Article • 03/29/2023 • 2 minutes to read

The FindFolderResponse element defines a response to a FindFolder request.

FindFolderResponse

XML

<FindFolderResponse>

<ResponseMessages/>

</FindFolderResponse>

FindFolderResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
FindFolder operation

Finding Folders
FindFolderResponseMessage
Article • 03/29/2023 • 2 minutes to read

The FindFolderResponseMessage element contains the status and result of a single


FindFolder operation request.

FindFolderResponse

ResponseMessages

FindFolderResponseMessage

XML

<FindFolderResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<RootFolder/>

</FindFolderResponseMessage>

FindFolderResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of a FindFolder operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass Attribute

Value Description
Value Description

Success
Describes a request that is fulfilled.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store goes offline during the batch.


- Active Directory Domain Services (AD DS) goes offline.
- Mailboxes are moved.
- The message database (MDB) goes offline.
- A password is expired.
- A quota was exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:


- Invalid attributes or elements
- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the
request encountered.

DescriptiveLinkKey
Currently unused and is reserved for future use. It contains a
value of 0.

MessageXml
Provides additional error response information.

RootFolder Contains the results from a search of a single root folder during
(FindFolderResponseMessage) a FindFolder operation.

Parent elements
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

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

Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
FindFolder operation
Finding Folders
FindItem
Article • 03/29/2023 • 2 minutes to read

The FindItem element defines a request to find items in a mailbox.

XML

<FindItem Traversal="">

<ItemShape/>

<IndexedPageItemView/>

<GroupBy/>

<Restriction/>

<SortOrder/>

<ParentFolderIds/>

<QueryString/>

</FindItem>

XML

<FindItem Traversal="">

<ItemShape/>

<IndexedPageItemView/>

<DistinguishedGroupBy/>

<Restriction/>

<SortOrder/>

<ParentFolderIds/>

<QueryString/>

</FindItem>

XML

<FindItem Traversal="">

<ItemShape/>

<ContactsView/>

<GroupBy/>

<Restriction/>

<SortOrder/>

<ParentFolderIds/>

<QueryString/>

</FindItem>

XML

<FindItem Traversal="">

<ItemShape/>

<ContactsView/>

<DistinguishedGroupBy/>

<Restriction/>

<SortOrder/>

<ParentFolderIds/>

<QueryString/>

</FindItem>

XML

<FindItem Traversal="">

<ItemShape/>

<CalendarView/>

<GroupBy/>

<Restriction/>

<SortOrder/>

<ParentFolderIds/>

<QueryString/>

</FindItem>

XML

<FindItem Traversal="">

<ItemShape/>

<FractionalPageItemView/>

<GroupBy/>

<Restriction/>

<SortOrder/>

<ParentFolderIds/>

<QueryString/>

</FindItem>

XML

<FindItem Traversal="">

<ItemShape/>

<FractionalPageItemView/>

<DistinguishedGroupBy/>

<Restriction/>

<SortOrder/>

<ParentFolderIds/>

<QueryString/>

</FindItem>

FindItemType

Attributes and elements


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

Attribute Description

Traversal Defines whether the search finds items in folders or the folders' dumpsters. This
attribute is required.

Traversal attribute values

Value Description

Shallow Returns only the identities of items in the folder.

SoftDeleted Returns only the identities of items that are in a folder's dumpster. Note that a soft-
deleted traversal combined with a search restriction will result in zero items
returned even if there are items that match the search criteria.

Associated Returns only the identities of associated items in the folder.

Child elements

Element Description

ItemShape
Identifies the item properties and content to include in a FindItem
operation response.

IndexedPageItemView
Describes how paged item information is returned for a FindItem
request. This element is optional.

FractionalPageItemView Describes where the paged view starts and the maximum number of
items returned in a FindItem request. The paged view offset from the
beginning of the set of found items is described by a fraction. This
element is optional.

CalendarView Provides time span limits to define a search for calendar items. This
element is optional.

ContactsView
Defines a search for contact items based on alphabetical display names.
This element is optional.

GroupBy
Specifies arbitrary groupings for FindItem queries. This element is
optional.

DistinguishedGroupBy
Provides standard groupings for FindItem queries. This element is
optional.
Element Description

Restriction
Defines the restriction or query that is used to filter items or folders in
FindItem/ FindFolder and search folder operations. This element is
optional.

SortOrder
Defines how items are sorted in a FindItem request. This element is
optional.

ParentFolderIds
Identifies folders to search for the FindItem and FindFolder operations.

QueryString Contains a mailbox query string based on Advanced Query Syntax


(QueryStringType)
(AQS).

Parent elements
None.

Remarks
Only one of the IndexedPageItemView, FractionalPageItemView, CalendarView, or
ContactsView elements can be included in a FindItem request. Only one of the GroupBy
or DistinguishedGroupBy elements can be included in a FindItem request.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindItem operation
Finding Items
FindItemResponse
Article • 03/29/2023 • 2 minutes to read

The FindItemResponse element defines a response to a FindItem request.

FindItemResponse

XML

<FindItemResponse>

<ResponseMessages/>

</FindItemResponse>

FindItemResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
FindItem operation

FindItem

Finding Items
FindItemResponseMessage
Article • 03/29/2023 • 2 minutes to read

The FindItemResponseMessage element contains the status and result of a single


FindItem operation request.

FindItemResponse
ResponseMessages
FindItemResponseMessage

XML

<FindItemResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<RootFolder/>

</FindItemResponseMessage>

FindItemResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of a FindItem operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description
Value Description

Success
Describes a request that is fulfilled.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while processing an item in the request was processing and subsequent
items could not be processed.

The following are examples of sources of warnings:

- The Exchange store goes offline during the batch.


- Active Directory Domain Services (AD DS) goes offline.
- Mailboxes are moved.
- The message database (MDB) goes offline.
- A password is expired.
- A quota was exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the
request encountered.

DescriptiveLinkKey
Currently unused and is reserved for future use. It contains a
value of 0.

MessageXml
Provides additional error response information.

RootFolder Contains the results from a search of a single root folder during
(FindItemResponseMessage)
a FindItem operation.
Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

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

Element information
Element Example

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
FindItem operation
Finding Items
FindMailboxStatisticsByKeywords
Article • 03/29/2023 • 2 minutes to read

The FindMailboxStatisticsByKeywords element specifies a request to search for mailbox


statistics by keyword.

XML

<FindMailboxStatisticsByKeywords>

<Mailboxes/>

<Keywords/>

<Language/>

<Senders/>

<Recipients/>

<FromDate/>

<ToDate/>

<MessageTypes/>

<SearchDumpster/>

<IncludePersonalArchive/>

<IncludeUnsearchableItems/>

</FindMailboxStatisticsByKeywords>

FindMailboxStatisticsByKeywordsType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Mailboxes Contains an array of mailboxes affected by the hold.


(ArrayOfUserMailboxesType)

Keywords
Specifies keywords for a search.

Language
Contains the language used for the search query.

Senders
Specifies an array of SMTP addresses.
Element Description

Recipients Specifies an array of recipients of a message.


(ArrayOfSmtpAddressType)

FromDate
Specifies the date that the message was sent.

ToDate Specifies the date that the message was received.

MessageTypes
Specifies an array of messages to search.

SearchDumpster
Specifies whether to search in deleted items.

IncludePersonalArchive
Specifies whether to include the personal archive in the
search.

IncludeUnsearchableItems
Specifies whether to include items that cannot be
searched.

Parent elements
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

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

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
FindMailboxStatisticsByKeywordsRespo
nse
Article • 03/29/2023 • 2 minutes to read

The FindMailboxStatisticsByKeywordsResponse element specifies the response to a


FindMailboxStatisticsByKeywords request.

XML

<FindMailboxStatisticsByKeywordsResponse>

<ResponseMessages/>

</FindMailboxStatisticsByKeywordsResponse>

FindMailboxStatisticsByKeywordsResponseType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ResponseMessages Contains the response messages for an Exchange Web Services (EWS)
request.

Parent elements
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

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

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
FindMailboxStatisticsByKeywordsRespo
nseMessage
Article • 03/29/2023 • 2 minutes to read

The FindMailboxStatisticsByKeywordsResponseMessage element specifies the


response message for a FindMailboxStatisticsByKeywords request.

XML

<FindMailboxStatisticsByKeywordsResponseMessage ResponseClass=" Success |


Warning | Error ">

<MailboxStatisticsSearchResult/>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</FindMailboxStatisticsByKeywordsResponseMessage>

FindMailboxStatisticsByKeywordsResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass Specifies the response class.

ResponseClass

Value Description

Success Indicates success.

Warning Indicates a warning.

Error Indicates an error.

Child elements
Element Description

MailboxStatisticsSearchResult
Specifies the result of a mailbox search.

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides status information about the request.

DescriptiveLinkKey
Currently unused and reserved for future use.

MessageXml
Provides additional error response information.

Parent elements

Element Description

ResponseMessages
Specifies an array of response messages.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
FindMessageTrackingReport
Article • 03/29/2023 • 2 minutes to read

The FindMessageTrackingReport element specifies criteria for the types of messages to


find.

XML

<FindMessageTrackingReport>

<Scope/>

<Domain/>

<Sender/>

<PurportedSender/>

<Recipient/>

<Subject/>

<StartDateTime/>

<EndDateTime/>

<MessageId/>

<FederatedDeliveryMailbox/>

<DiagnosticsLevel/>

<ServerHint/>

<Properties/>

</FindMessageTrackingReport>

FindMessageTrackingReportRequestType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

Scope (NonEmptyStringType)
Represents how extensive the message tracking report
should be.

Domain (Message Tracking)


Contains the name of the domain where the message
tracking is executed.
Element Description

Sender (EmailAddressType)
Contains contact information for the sender of the e-mail
message.

PurportedSender
Contains contact information for the alleged sender of an e-
mail message.

Recipient
Contains the e-mail address for the recipient of the message.

Subject
Contains the subject of the e-mail message.

StartDateTime
Contains the starting date and time for the search.

EndDateTime
Contains the ending date and time for the search.

MessageId
Contains the message identifier for the search.

FederatedDeliveryMailbox
Contains the name of the mailbox where the cross-premise
message was sent.

DiagnosticsLevel
Represents the level of detail for diagnostic reports.

ServerHint
Represents the starting point for tracking a message in a
remote site or forest.

Properties Contains a list of one or more tracking properties. This


(ArrayOfTrackingPropertiesType)
element is optional.

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindMessageTrackingReport operation

EWS XML elements in Exchange


FindMessageTrackingReportResponse
Article • 03/29/2023 • 2 minutes to read

The FindMessageTrackingReportResponse element contains the status and result of a


single FindMessageTrackingReport operation request.

XML

<FindMessageTrackingReportResponse ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Diagnostics/>

<MessageTrackingSearchResults/>

<Errors/>

<Properties/>

</FindMessageTrackingReportResponse>

FindMessageTrackingReportResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the
request encountered.

DescriptiveLinkKey
Currently unused and reserved for future use. This element
contains a value of 0.

MessageXml
Provides additional error response information.

Diagnostics Contains information that will be used to produce various


statistical reports for the tracking feature in a DataCenter.

MessageTrackingSearchResults
Contains and array of messages that match the search
requirements.
Element Description

ExecutedSearchScope
Contains the scope of the search that was performed to get the
search results.

Errors
Contains a property bag to store errors that are returned
through the Web service.

Properties Contains a list of one or more tracking properties.


(ArrayOfTrackingPropertiesType)

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindMessageTrackingReport operation
EWS XML elements in Exchange
FindPeople
Article • 03/29/2023 • 2 minutes to read

The FindPeople element specifies a set of data used in a FindPeople request. The data
includes zero or more of the following elements: a persona shape (optional), an indexed
page item view, a restriction (optional), an aggregation restriction (optional), a sort
order (optional), a parent folder Id, and a query string (optional).

XML

<FindPeople>

<PersonaShape/>

<IndexedPageItemView/>

<Restriction/>

<AggregationRestriction/>

<SortOrder/>

<ParentFolderId/>

<QueryString/>

</FindPeople>

FindPeopleType

Attributes and elements


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

Attributes
None.

Child elements
PersonaShape | IndexedPageItemView | Restriction | AggregationRestriction | SortOrder |
ParentFolderId (TargetFolderIdType) | QueryString (QueryStringType)

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

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

Schema name Messages schema

Validation file messages.xsd

Can be empty false


FindPeopleResponse
Article • 03/29/2023 • 2 minutes to read

The FindPeopleResponse element specifies the response to a FindPeople request.

XML

<FindPeopleResponse ResponseClass=" Success | Warning | Error ">

<People/>

<TotalNumberOfPeopleInView/>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</FindPeopleResponse>

FindPeopleResponseMessageType

Attributes and elements


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

Attributes

Attribute Description

ResponseClass Specifies the response class.

ResponseClass

Value Description

Success Indicates success.

Warning Indicates a warning.

Error Indicates an error.

Child elements

Element Description
Element Description

People
Specifies an array of persona data returned as the result of a
FindPeople request.

TotalNumberOfPeopleInView Specifies the total number of personas stored on a server that are
returned by a FindPeople request.

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides status information about the request.

DescriptiveLinkKey
Currently unused and reserved for future use.

MessageXml
Provides additional error response information.

Parent elements

Element Description

ResponseMessages
Specifies an array of response messages.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

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

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
FindPeopleResponseMessage
Article • 03/29/2023 • 2 minutes to read

The FindPeopleResponseMessage element specifies the response message for a


FindPeople request.

XML

<FindPeopleResponseMessage>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<People/>

<TotalNumberOfPeopleInView/>

</FindPeopleResponseMessage>

FindPeopleResponseMessageType

Attributes and elements


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

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml | People |
TotalNumberOfPeopleInView

Parent elements
ResponseMessages

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Item Value

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

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


FirstDayOfWeek
Article • 03/29/2023 • 2 minutes to read

The FirstDayOfWeek element specifies the first day of the week.

XML

<FirstDayOfWeek> Sunday | Monday | Tuesday | Wednesday | Thursday | Friday |


Saturday</FirstDayOfWeek>

DayOfWeekType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

WeeklyRecurrence
Describes a weekly recurrence pattern.

Text value
The text value of the FirstDayOfWeek element indicates which day of the week is used
as the first day of the week. The following are the possible text values:

Sunday

Monday

Tuesday
Wednesday

Thursday

Friday

Saturday

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
FirstHopServer
Article • 03/29/2023 • 2 minutes to read

The FirstHopServer element contains the name of the server in the forest that first
accepted the message.

XML

<FirstHopServer/>

NonEmptyStringType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

MessageTrackingSearchResult Contains a single message result for a


FindMessageTrackingReportResponse element.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
FindMessageTrackingReport operation

EWS XML elements in Exchange


FirstLoadedRowIndex
Article • 03/29/2023 • 2 minutes to read

The FirstLoadedRowIndex element is intended for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
FirstMatchingRowIndex
Article • 03/29/2023 • 2 minutes to read

The FirstMatchingRowIndex element is intended for internal use only.

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
FirstName
Article • 03/29/2023 • 2 minutes to read

The FirstName element represents the first name of a contact.

XML

<FirstName/>

String

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

CompleteName
Represents the complete name of a contact.

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

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)


FirstOccurrence
Article • 03/29/2023 • 2 minutes to read

The FirstOccurrence element represents the first occurrence of a recurring calendar


item.

XML

<FirstOccurrence>

<ItemId/>

<Start/>

<End/>

<OriginalStart/>

</FirstOccurrence>

OccurrenceInfoType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

ItemId
Contains the unique identifier and change key of the first occurrence of a recurring
calendar item.

Start
Represents the start time of the first occurrence of a recurring calendar item.

End Represents the end time of the first occurrence of a recurring calendar item.

OriginalStart Represents the original start time of the first occurrence of a recurring calendar
item.

Parent elements

Element Description
Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Remarks
This element is valid if CalendarItemType has the RecurringMaster value.

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

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

EWS reference for Exchange


Flag
Article • 03/29/2023 • 2 minutes to read

The Flag element specifies a flag on a mailbox item.

XML

<Flag>

<FlagStatus/>

<StartDate/>

<DueDate/>

<CompleteDate/>

</Flag>

FlagType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

FlagStatus
Contains the aggregated flag status for items in the current folder.

StartDate
Represents the start date of an item.

DueDate
Represents the date when an item is due.

CompleteDate
Represents the date on which an item was completed.

Parent elements

Element Description

ConversationAction
Contains a single action to be applied to a single conversation.

Item
Represents a generic item in the Exchange store.
Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
FlaggedForAction
Article • 03/29/2023 • 2 minutes to read

The FlaggedForAction element specifies the flag for action value that must appear on
incoming messages in order for the condition or exception to apply.

XML

<FlaggedForAction/>

FlaggedForActionType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conditions Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions Represents the exceptions that represent all the available rule exception conditions
for an Inbox rule.

Text value
A text value is required. The following are the possible text values for this element:

Any

Call
DoNotForward

FollowUp

FYI

Forward

NoResponseNecessary

Read

Reply

ReplyToAll

Review

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Type

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
FlagStatus
Article • 03/29/2023 • 2 minutes to read

The FlagStatus element contains the aggregated flag status for conversation items in
the current folder.

FindConversationResponse

Conversations

Conversation (ConversationType)

FlagStatus

XML

<FlagStatus> NotFlagged | Flagged | Complete </FlagStatus>

FlagStatusType

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.

Text value
The text value of the FlagStatus element is the aggregated flag status for conversation
items in the current folder. The following are the possible text values:

NotFlagged - Indicates the not-flagged status.

Flagged - Indicates the flagged status.

Complete - Indicates the complete flag status.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindConversation operation

ApplyConversationAction operation

Conversations in EWS
Folder
Article • 03/29/2023 • 2 minutes to read

The Folder element defines a folder to create, get, find, synchronize, or update.

XML

<Folder>

<FolderId/>

<ParentFolderId/>

<FolderClass/>

<DisplayName/>

<TotalCount/>

<ChildFolderCount/>

<ExtendedProperty/>

<ManagedFolderInformation/>

<UnreadCount/>

<PermissionSet/>

<EffectiveRights/>

</Folder>

FolderType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier and change key of a folder.

ParentFolderId Represents the identifier of the parent folder that contains the
folder.

FolderClass
Represents the folder class for a given folder.

DisplayName (string)
Contains the display name of a folder.

TotalCount
Represents the total count of items within a given folder.
Element Description

ChildFolderCount
Represents the number of child folders that are contained within a
folder. This property is read-only.

ExtendedProperty
Identifies extended properties on folders.

ManagedFolderInformation Contains information about a managed folder.

UnreadCount
Represents the count of unread items within a given folder.

PermissionSet Contains all the configured permissions for a folder. This element
(PermissionSetType)
was introduced in Microsoft Exchange Server 2007 Service Pack 1
(SP1).

EffectiveRights
Contains the client's rights based on the permission settings for the
item or folder. This element is read-only. This element was
introduced in Exchange 2007 SP1.

Parent elements

Element Description

AppendToFolderField Specifies data to append to a folder property during an UpdateFolder


operation.

Create (FolderSync)
Identifies a single folder to create in the local client store.

SetFolderField
Represents an update to a single property on a folder in an UpdateFolder
operation.

Update (FolderSync)
Identifies a single folder to update in the local client store.

Folders
Contains an array of folders that are used in folder operations.

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

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types
Name Value

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
SyncFolderItems operation

EWS XML elements in Exchange


FolderChange
Article • 03/29/2023 • 2 minutes to read

The FolderChange element represents a collection of changes to be performed on a


single folder.

UpdateFolder
FolderChanges
FolderChange

XML

<FolderChange>

<FolderId/>

<Updates/>

</FolderChange>

XML

<FolderChange>

<DistinguishedFolderId/>

<Updates/>

</FolderChange>

FolderChangeType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier and change key of a folder to update.

DistinguishedFolderId Identifies MicrosoftExchange Server 2007 folders that can be referenced


by name.
Element Description

Updates (Folder)
Defines the type of update that is performed on a folder that is identified
by either the FolderId or DistinguishedFolderId element.

Parent elements

Element Description

FolderChanges
Represents a collection of changes for a folder.
The following is the XPath expression to this element:
/UpdateFolder/FolderChanges

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

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
UpdateFolder operation
FolderChanges
Article • 03/29/2023 • 2 minutes to read

The FolderChanges element represents a collection of changes for a folder.

UpdateFolder

FolderChanges

XML

<FolderChanges>

<FolderChange/>

</FolderChanges>

NonEmptyArrayOfFolderChangesType

Attributes and elements


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

Attributes
None.

Child elements

Element Description

FolderChange
Represents a single change to be performed on a single folder.

Parent elements

Element Description

UpdateFolder
Represents the operation that is used to update properties for a folder.
The following is the XPath expression to this element:
/UpdateFolder

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

Element information
Element Example

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

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
UpdateFolder operation
FolderClass
Article • 03/29/2023 • 2 minutes to read

The FolderClass element represents the folder class for a folder.

XML

<FolderClass/>

string

Attributes and elements


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

Attributes
None.

Child elements
None.

Parent elements

Element Description

Folder
Represents a folder in a mailbox.

CalendarFolder
Represents a calendar folder in a mailbox.

ContactsFolder
Represents a contacts folder in a mailbox.

SearchFolder
Represents a search folder in a mailbox.

TasksFolder
Represents a task folder in a mailbox.

Text value
A text value is required. Folder classes typically start with "IPF."
Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
FolderId
Article • 03/29/2023 • 2 minutes to read

The FolderId element contains the identifier and change key of a folder.

XML

<FolderId Id="" ChangeKey="" />

FolderIdType

Attributes and elements


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

Attributes

Attribute Description

Id Contains a string that identifies a folder in the Exchange store. This attribute is
required.

ChangeKey Contains a string that identifies a version of a folder that is identified by the Id
attribute. This attribute is optional. Use this attribute to make sure that the correct
version of a folder is used.

Child elements
None.

Parent elements

Element Description

ContextFolderId
Indicates the folder that is targeted for actions that use folders.

CopiedEvent
Represents an event in which an item or folder is copied.

DestinationFolderId
Indicates the destination folder for copy and move actions.
Element Description

ParentFolderId Identifies the folder where a new folder or item is created.


(TargetFolderIdType)

The following are the XPath expressions to this element:

/CreateItem/ParentFolderId

/CreateFolder/ParentFolderId

BaseFolderIds Represents the collection of folders that will be mined to determine the
contents of a search folder.

Delete (FolderSync)
Identifies a single folder to delete in the local client store.

Folder
Represents a folder in a mailbox.

CalendarFolder
Represents a calendar folder in a mailbox.

FolderChange
Represents a collection of changes to be performed on a single folder.
The following is the XPath expression to this element:
/UpdateFolder/FolderChanges/FolderChange

ContactsFolder
Represents a contact folder in a mailbox.

SearchFolder
Represents a search folder in a mailbox.

TasksFolder
Represents a task folder in a mailbox.

ToFolderId
Represents the destination folder for a copied or moved item or folder.

The following are the XPath expressions to this element:

/MoveFolder/ToFolderId

/CopyFolder/ToFolderId

/MoveItem/ToFolderId

/CopyItem/ToFolderId

Element Description

SavedItemFolderId
Identifies the target folder for operations that update, send, and create
items in the Exchange store.

The following are the XPath expressions to this element:

/CreateItem/SavedItemFolderId

/UpdateItem/SavedItemFolderId

/SendItem/SavedItemFolderId

SyncFolderId
Represents the folder that contains the items to synchronize.

UserConfigurationName Represents the name of a user configuration object. The user


configuration object name is the identifier for a user configuration
object.

CopyToFolder
Identifies the ID of the folder that e-mail items will be copied to.

MoveToFolder
Identifies the ID of the folder that e-mail items will be moved to.

Text value
None.

Remarks
All FolderId elements are of the FolderIdType type. The FolderId element is required in
every case except in elements whose type extends the BaseFolderType or where the
FolderId element is a part of a choice. Review the schema for more information.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd


Element Type

Can be Empty False

See also
EWS XML elements in Exchange
Creating Folders (Exchange Web Services)
FolderIds
Article • 03/29/2023 • 2 minutes to read

The FolderIds element contains an array of folder identifiers that are used to identify
folders to copy, move, get, delete, or monitor for event notifications.

XML

<FolderIds>

<FolderId/>

<DistinguishedFolderId/>

</FolderIds>

NonEmptyArrayOfBaseFolderIdsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier and change key of a folder.

DistinguishedFolderId Identifies Microsoft Exchange Server folders that can be referenced by


name.

Parent elements

Element Description

GetFolder
Defines a request to get a folder from the Exchange store.
The following is the XPath expression to this element: /GetFolder

DeleteFolder
Defines a request to delete folders from the Exchange store.
The following is the XPath expression to this element: /DeleteFolder

Element Description

EmptyFolder
Defines a request to delete folders from the Exchange store.
The following is the XPath expression to this element: /EmptyFolder

MoveFolder
Defines a request to move a folder in the Exchange store.
The following is the XPath expression to this element: /MoveFolder

CopyFolder
Defines a request to copy a folder in the Exchange store.
The following is the XPath expression to this element: /CopyFolder

PushSubscriptionRequest Represents a subscription to a push-based event notification


subscription.

PullSubscriptionRequest
Represents a subscription to a pull-based event notification
subscription.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server that has the Client Access server
role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages and


https://schemas.microsoft.com/exchange/services/2006/types

Schema Messages schema; Types schema


Name

Validation Messages.xsd; Types.xsd


File

Can be False
Empty

See also
GetFolder operation

DeleteFolder operation
MoveFolder operation

CopyFolder operation

Subscribe operation
FolderIds (ArrayOfFolderIdType)
Article • 03/29/2023 • 2 minutes to read

The FolderIds element contains a list of folder identifiers.

XML

<FolderIds>

<FolderId/>

</FolderIds>

ArrayOfFolderIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
FolderId

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
FolderName
Article • 03/29/2023 • 2 minutes to read

The FolderName element identifies a single managed custom folder to add to a


mailbox.

CreateManagedFolder

FolderNames

FolderName

XML

<FolderName>...</FolderName>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

FolderNames
Contains an array of named managed custom folders to add to a mailbox.
The following is the XPath expression to this element:
/CreateManagedFolder/FolderNames

Text value
A text value is required. The text value represents a folder name.

Remarks
Although you can use Exchange Web Services to add managed custom folders to a
mailbox, you cannot use the same technology to access the list of available managed
custom folders. You can obtain a list of managed custom folders by using an Exchange
Management Shell command or by using an API that interfaces with the Active Directory
directory service. The folder name is the name of the corresponding Active Directory
object.

You can use the FindFolder operation to find managed custom folders. Use the
DeleteFolder operation to delete managed custom folders.

It is important to note that FolderName is the name of an existing managed custom


folder in the organization. An attempt to add a folder that is not in the organization will
result in an error response.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
FindFolder operation

Finding Folders

Adding Managed Folders


FolderNames
Article • 03/29/2023 • 2 minutes to read

The FolderNames element contains an array of named managed folders to add to a


mailbox.

CreateManagedFolder

FolderNames

XML

<FolderNames>

<FolderName/>

</FolderNames>

NonEmptyArrayOfFolderNamesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FolderName
Identifies a single managed folder to add to mailbox.

Parent elements

Element Description

CreateManagedFolder
The root element in a request to add a managed folder to a mailbox.
The following is the XPath expression to this element:
/CreateManagedFolder

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindFolder operation

Finding Folders

Adding Managed Folders


Folders
Article • 03/29/2023 • 2 minutes to read

The Folders element contains an array of folders that are used in folder operations.

XML

<Folders>

<Folder/>

</Folders>

XML

<Folders>

<ContactsFolder/>

</Folders>

XML

<Folders>

<TasksFolder/>

</Folders>

XML

<Folders>

<CalendarFolder/>

</Folders>

XML

<Folders>

<SearchFolder/>

</Folders>

ArrayOfFoldersType or NonEmptyArrayOfFoldersType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Folder
Identifies a folder to create, get, find, synchronize, or update.

CalendarFolder
Represents a folder that primarily contains calendar items.

ContactsFolder
Represents a Contacts folder in a mailbox.

SearchFolder
Represents a Search folder contained in a mailbox.

TasksFolder
Represents a Tasks folder in a mailbox.

Parent elements

Element Description

CopyFolderResponseMessage
Contains the status and result of a single CopyFolder
operation request.

CreateFolder
Defines a request to create a folder in the Exchange
store.

CreateFolderResponseMessage
Contains the status and result of a single CreateFolder
operation request.

CreateManagedFolderResponseMessage Contains the status and result of a single


CreateManagedFolder operation request.

GetFolderResponseMessage
Contains the status and result of a GetFolder operation
request.

MoveFolderResponseMessage
Contains the status and result of a MoveFolder
operation request.

ParentFolderId (TargetFolderIdType)
Identifies the folder where a new folder is created.

RootFolder Contains the results from searching a single root


(FindFolderResponseMessage)
folder during a FindFolder operation.

UpdateFolderResponseMessage
Contains the status and result of a single UpdateFolder
operation request.

Remarks
This element is a required child element of the ParentFolderId (TargetFolderIdType)
element.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
ParentFolderId (TargetFolderIdType)
FolderShape
Article • 03/29/2023 • 2 minutes to read

The FolderShape element identifies the folder properties to include in a GetFolder,


FindFolder, or SyncFolderHierarchy response.

XML

<FolderShape>

<BaseShape/>

<AdditionalProperties/>

</FolderShape>

FolderResponseShapeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

BaseShape
Identifies the basic configuration of properties to return in a response.

AdditionalProperties
Identifies additional properties to return in a response.

Parent elements

Element Description

FindFolder
Defines a request to identify folders in a mailbox.
The following is the XPath expression to this element:
/FindFolder

GetFolder
Defines a request to get a folder from the Exchange store.
The following is the XPath expression to this element:
/GetFolder

Element Description

SyncFolderHierarchy
Defines a request to synchronize a folder hierarchy on a client.
The following is the XPath expression to this element:
/SyncFolderHierarchy

Remarks
The FolderShape element is a required child element of the FindFolder element.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Example
The following example of a request demonstrates how to find all folders located in the
first level of the Inbox folder.

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://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
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema


Element Example

Validation File Messages.xsd

Can be Empty False

See also
FindFolder
FolderSize
Article • 03/29/2023 • 2 minutes to read

The FolderSize element describes the total size of all the contents of a managed folder.

XML

<FolderSize/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ManagedFolderInformation
Contains information about a managed folder.

Text value
The text value represents the total size of the folder in megabytes.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
CreateManagedFolder operation

EWS XML elements in Exchange


FoldersToIgnore
Article • 03/29/2023 • 2 minutes to read

The FoldersToIgnore element identifies a list of folders that are ignored when getting
items in a conversation. All conversation items in the ignored folders are not returned in
a GetConversationItems response.

XML

<FoldersToIgnore>

<FolderId/>

<DistinguishedFolderId/>

</FoldersToIgnore>

NonEmptyArrayOfBaseFolderIdsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
FolderId | DistinguishedFolderId

Parent elements
GetConversationItems

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


FormattedAddress
Article • 03/29/2023 • 2 minutes to read

The FormattedAddress element specifies the formatted display value of the associated
postal address.

XML

<FormattedAddress></FormattedAddress>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Value (PersonaPostalAddressType)
Specifies information associated with a postal
address.

PostalAddress Specifies the postal address of the location.


(PersonaPostalAddressType)

Text value
The text value of the FormattedAddress element is a string value that specifies the
formatted address.
Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ForwardAllowed
Article • 03/29/2023 • 2 minutes to read

The ForwardAllowed element specifies whether forwarding emails is enabled.

XML

<ForwardAllowed>true | false</ForwardAllowed>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

RightsManagementLicenseData
Specifies information about the rights management license.

Text value
A text value of true for the ForwardAllowed element indicates that forwarding emails is
allowed. A value of false indicates that forwarding is not allowed.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ForwardAsAttachmentToRecipients
Article • 03/29/2023 • 2 minutes to read

The ForwardAsAttachmentToRecipients element indicates the e-mail addresses to


which messages are to be forwarded as attachments.

XML

<ForwardAsAttachmentToRecipients>

<Address/>

</ForwardAsAttachmentToRecipients>

ArrayOfEmailAddressesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Address (EmailAddressType)
Represents a fully resolved e-mail address.

Parent elements

Element Description

Actions
Represents the set of actions that are available to be taken on a message when the
conditions are fulfilled.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
ForwardItem
Article • 03/29/2023 • 2 minutes to read

The ForwardItem element contains an Exchange store item to forward to recipients.

XML

<ForwardItem>

<Subject/>

<Body/>

<ToRecipients/>

<CcRecipients/>

<BccRecipients/>

<IsReadReceiptRequested/>

<IsDeliveryReceiptRequested/>

<From/>

<ReferenceItemId/>

<NewBodyContent/>

<ReceivedBy/>

<ReceivedRepresenting/>

</ForwardItem>

ForwardItemType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Subject
Represents the subject property of Exchange store items.

Body
Represents the actual body content of a message.

ToRecipients
Contains a set of recipients of an item. These are the primary recipients of an item.

CcRecipients
Represents a collection of recipients that will receive a copy of the message.

BccRecipients
Represents a collection of recipients to receive a blind carbon copy (Bcc) of an e-mail.

IsReadReceiptRequested
Indicates whether the sender of an item requests a read receipt.

IsDeliveryReceiptRequested Indicates whether the sender of an item requests a delivery receipt.

From
Represents the address from which the message was sent.

ReferenceItemId
Identifies the item to which the response object refers.

NewBodyContent
Represents the new body content of a message.

ReceivedBy
Identifies the delegate in a delegate access scenario. This element was introduced in Microsoft
Exchange Server 2007 Service Pack 1 (SP1).
Element Description

ReceivedRepresenting
Identifies the principal in a delegate access scenario. This element was introduced in Exchange
2007 SP1.

Parent elements

Element Description

AdjacentMeetings
Describes all items that are adjacent to a meeting time.

The following are some of the XPath expressions to this element:

/CalendarItem/AdjacentMeetings

/MeetingRequest/AdjacentMeetings

/SetItemField/CalendarItem/AdjacentMeetings

/AppendToItemField/CalendarItem/AdjacentMeetings

/AcceptItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/DeclineItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/TentativelyAcceptItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/SetItemField/CalendarItem/AdjacentMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/AppendToItemField/CalendarItem/AdjacentMeetings

/CreateAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/GetAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

ConflictingMeetings Describes all items that conflict with a meeting time.

The following are some of the XPath expressions to this element:

/CalendarItem/ConflictingMeetings

/MeetingRequest/ConflictingMeetings

/SetItemField/CalendarItem/ConflictingMeetings

/AppendToItemField/CalendarItem/ConflictingMeetings

/AcceptItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/DeclineItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/TentativelyAcceptItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/SetItemField/CalendarItem/ConflictingMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/AppendToItemField/CalendarItem/ConflictingMeetings
/CreateAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/GetAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

ResponseObjects
Contains a collection of all the response objects that are associated with an item in the Exchange
store.

Items Contains an array of items to create in the folder that is identified by the ParentFolderId
(NonEmptyArrayOfAllItemsType) (TargetFolderIdType) element.

Remarks
The From element should be set to the e-mail address of the principal if an item is forwarded by a delegate. If the
delegate does not set the From property, the item will appear to have been sent directly from the delegate's
mailbox.

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.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ForwardToRecipients
Article • 03/29/2023 • 2 minutes to read

The ForwardToRecipients element indicates the e-mail addresses to which messages are
to be forwarded.

XML

<ForwardToRecipients>

<Address/>

</ForwardToRecipients>

ArrayOfEmailAddressesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Address (EmailAddressType)
Represents a fully resolved e-mail address.

Parent elements

Element Description

Actions
Represents the set of actions that are available to be taken on a message when the
conditions are fulfilled.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
FractionalPageFolderView
Article • 03/29/2023 • 2 minutes to read

The FractionalPageFolderView element describes where the paged view starts and the
maximum number of folders returned in a FindFolder request.

FindFolder

FractionalPageFolderView

XML

<FractionalPageFolderView MaxEntriesReturned="" Numerator=""


Denominator=""/>

FractionalPageViewType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

MaxEntriesReturned Identifies the maximum number of results to return in the FindFolder


response. This attribute is optional.

Numerator
Represents the numerator of the fractional offset from the start of the
result set. This attribute is required. The numerator must be equal to or
less than the denominator. This attribute must represent an integral value
that is equal to or greater than zero. For more information, see Remarks
later in this topic.

Denominator
Represents the denominator of the fractional offset from the start of the
total number of folders in the result set. This attribute is required. This
attribute must represent an integral value that is greater than one. For
more information, see Remarks later in this topic.

Child elements
None.
Parent elements

Element Description

FindFolder
Defines a request to identify folders in a mailbox.
The following is the XPath expression to this element:
/FindFolder

Remarks
The paged view offset from the start of the set of found folders is described by a
fraction. The fraction, which is defined by the Numerator and Denominator attributes,
describes where the page of information starts. For example, if Numerator equals four
and Denominator equals five, the page of returned information starts at an entry
located four-fifths of the way in to the result set.

If the fraction evaluates to zero, that indicates the start of the results set. If the fraction
evaluates to one, that indicates the end of the result set.

7 Note

The fraction represents the start point of page, not how many results in the result
set will be returned.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindFolder operation

Finding Folders
FractionalPageItemView
Article • 03/29/2023 • 2 minutes to read

The FractionalPageItemView element describes where the paged view starts and the
maximum number of items returned in a FindItem request.

FindItem

FractionalPageItemView

XML

<FractionalPageItemView MaxEntriesReturned="" Numerator="" Denominator=""/>

FractionalPageViewType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

MaxEntriesReturned Identifies the maximum number of results to return in the FindItem


response. This attribute is optional. If this attribute is not specified, the call
will return all available items.

Numerator
Represents the numerator of the fractional offset from the start of the
result set. This attribute is required. The numerator must be equal to or
less than the denominator. This attribute must represent an integral value
that is equal to or greater than zero.
For more information, see Remarks later in this topic.

Denominator
Represents the denominator of the fractional offset from the start of the
total number of items in the result set. This attribute is required. This
attribute must represent an integral value that is greater than one.
For more information, see Remarks later in this topic.

Child elements
None.
Parent elements

Element Description

FindItem
Defines a request to find items in a mailbox.
The following is the XPath expression to this element:
/FindItem

Remarks
The paged view offset from the start of the set of found items is described by a fraction.
The fraction, which is defined by the Numerator and Denominator attributes, describes
where the page of information starts. For example, if Numerator equals four and
Denominator equals five, the page of returned information starts at an entry located
four-fifths of the way in to the result set.

If the fraction evaluates to zero, that indicates the start of the results set. If the fraction
evaluates to one, that indicates the end of the result set.

7 Note

The fraction represents the start point of page, not how many results in the result
set will be returned.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Example
The following example shows a FindItem request. The request returns items from the
search results that start after the second third of all the items in the result set.

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<FindItem Traversal="Shallow"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject"/>

</t:AdditionalProperties>
</ItemShape>

<FractionalPageItemView MaxEntriesReturned="12" Numerator="2"


Denominator="3"/>

<GroupBy Order="Descending">

<t:FieldURI FieldURI="item:Importance"/>

<t:AggregateOn Aggregate="Maximum">

<t:FieldURI FieldURI="item:Subject"/>

</t:AggregateOn>

</GroupBy>

<ParentFolderIds>

<t:DistinguishedFolderId Id="inbox"/>

</ParentFolderIds>

</FindItem>

</soap:Body>

</soap:Envelope>

For example, if the result set contains nine items, the paged view will return up to 12
items, starting at the item found two-thirds of the way in to the result set. In this case,
the page starts at the seventh item. The page will contain the seventh, eighth, and ninth
items. If the numerator is set to zero, the page view will return all the items in the result
set as long as the number is less than the MaxEntriesReturned attribute.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindItem operation

Finding Items
FreeBusyChangedEvent
Article • 03/29/2023 • 2 minutes to read

The FreeBusyChangedEvent element represents an event in which an item's free/busy


time has changed.

XML

<CreatedEvent>

<Watermark/>

<TimeStamp/>

<ItemId/>

<ParentFolderId/>

</CreatedEvent>

BaseObjectChangedEventType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Watermark
Represents an event bookmark in the mailbox events table.

TimeStamp
Represents the timestamp of a free/busy item mailbox event.

ItemId
Represents the identifier of the free/busy item.

ParentFolderId Represents the identifier of the parent folder of the free/busy item.

Parent elements

Element Description
Element Description

Notification Contains information about the subscription and the events that have occurred
since the last notification.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
Subscribe operation

GetEvents operation

Unsubscribe operation

Using Pull Subscriptions

Event notifications in EWS


FreeBusyResponse
Article • 03/29/2023 • 2 minutes to read

The FreeBusyResponse element contains the free/busy information for a single mailbox
user.

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

XML

<FreeBusyResponse>

<ResponseMessage>...</ResponseMessage>

<FreeBusyView>...</FreeBusyView>

</FreeBusyResponse>

FreeBusyResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessage
Provides descriptive information about the response status.

FreeBusyView
Contains availability information for a specific user.

Parent elements

Element Description
Element Description

FreeBusyResponseArray Contains the requested users' availability information and the response
status.
The following is the XPath expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray

Remarks
This element is not included in a GetUserAvailability response if free/busy information is
not requested.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


FreeBusyResponseArray
Article • 03/29/2023 • 2 minutes to read

The FreeBusyResponseArray element contains the requested users' availability


information and the response status.

GetUserAvailabilityResponse

FreeBusyResponseArray

XML

<FreeBusyResponseArray>

<FreeBusyResponse>...</FreeBusyResponse>

</FreeBusyResponseArray>

ArrayOfFreeBusyResponse

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FreeBusyResponse Contains the free/busy information for a single mailbox user and the
response status.

Parent elements

Element Description

GetUserAvailabilityResponse Contains the properties that define user availability information or


suggested meeting time information.
The following is the XPath expression to this element:
/GetUserAvailabilityResponse

Remarks
This element is not included in a GetUserAvailability response if free/busy information is
not requested.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


FreeBusyView
Article • 03/29/2023 • 2 minutes to read

The FreeBusyView element contains availability information for a specific user.

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

FreeBusyView

XML

<FreeBusyView>

<FreeBusyViewType>...</FreeBusyViewType>

<MergedFreeBusy>...</MergedFreeBusy>

<CalendarEventArray>...</CalendarEventArray>

<WorkingHours>...</WorkingHours>

</FreeBusyView>

FreeBusyView

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FreeBusyViewType
Represents the type of requested free/busy information returned in the
response.

MergedFreeBusy
Contains the merged free/busy stream of data.

CalendarEventArray Contains a set of unique calendar item occurrences that represent the
requested user's availability.
Element Description

WorkingHours
Represents the time zone settings and working hours for the requested
mailbox user.

Parent elements

Element Description

FreeBusyResponse
Contains the free/busy information for a single mailbox user.
The following is the XPath expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse

Remarks
All the child elements are listed in the sequence in which they occur. The level of detail
provided by this element depends on the permissions granted to the requestor.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


FreeBusyViewOptions
Article • 03/29/2023 • 2 minutes to read

The FreeBusyViewOptions element specifies the type of free/busy information returned


in the response.

GetUserAvailabilityRequest

FreeBusyViewOptions

XML

<FreeBusyViewOptions>

<TimeWindow>...</TimeWindow>

<MergedFreeBusyIntervalInMinutes>...</MergedFreeBusyIntervalInMinutes>

<RequestedView>...</RequestedView>

</FreeBusyViewOptions>

FreeBusyViewOptionsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

TimeWindow
Identifies the time span queried for the user availability
information.

MergedFreeBusyIntervalInMinutes Represents the time difference between two successive slots


in the FreeBusyMerged view.

RequestedView
Defines the type of calendar information that a client
requests.

Parent elements
Element Description

GetUserAvailabilityRequest Contains the arguments used to obtain user availability information.


This is a root element.
The following is the XPath to this element:
/GetUserAvailabilityRequest

Remarks
This element is not required and can only occur once if used. This value can be null if the
value of the SuggestionsViewOptions element is not null.

7 Note

The schema that describes this element is located in the /epi/ directory of the
computer that is running Microsoft® Exchange Server 2007 that has the Client
Access server role installed.

Example
The following example obtains a list of meetings and a free/busy stream in 60-minute
intervals.

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<GetUserAvailabilityRequest
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<TimeZone
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Bias>480</Bias>

<StandardTime>

<Bias>0</Bias>

<Time>02:00:00</Time>

<DayOrder>5</DayOrder>

<Month>10</Month>

<DayOfWeek>Sunday</DayOfWeek>

</StandardTime>

<DaylightTime>

<Bias>-60</Bias>

<Time>02:00:00</Time>

<DayOrder>1</DayOrder>

<Month>4</Month>

<DayOfWeek>Sunday</DayOfWeek>

</DaylightTime>

</TimeZone>

<MailboxDataArray>

<MailboxData
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Email>

<Name></Name>

<Address>[email protected]</Address>

<RoutingType>SMTP</RoutingType>

</Email>

<AttendeeType>Organizer</AttendeeType>

<ExcludeConflicts>false</ExcludeConflicts>

<ExcludeNonWorkingHours>false</ExcludeNonWorkingHours>

</MailboxData>

</MailboxDataArray>

<FreeBusyViewOptions
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<TimeWindow>

<StartTime>2006-02-06T00:00:00</StartTime>

<EndTime>2006-02-25T23:59:59</EndTime>

</TimeWindow>

<MergedFreeBusyIntervalInMinutes>60</MergedFreeBusyIntervalInMinutes>

<RequestedView>FreeBusyMerged</RequestedView>

</FreeBusyViewOptions>

</GetUserAvailabilityRequest>
</soap:Body>

</soap:Envelope>

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

Getting User Availability


FreeBusyViewType
Article • 03/29/2023 • 2 minutes to read

The FreeBusyViewType element represents the type of free/busy information returned


in the response.

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

FreeBusyView

FreeBusyViewType

XML

<FreeBusyViewType>None or MergedOnly or FreeBusy or FreeBusyMerged or


Detailed or DetailedMerged</FreeBusyViewType>

FreeBusyViewType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

FreeBusyView Contains availability information for a specific user.


The following is the XPath expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView
Text value
A text value is required. The following table lists the possible values for this element.

Value Description

None This value is not valid for requests. This value is valid for responses.

MergedOnly Represents an aggregated free/busy stream. In cross-forest scenarios in which


the target user in one forest does not have an Availability service configured,
the Availability service of the requestor retrieves the target user's free/busy
information from the free/busy public folder. Because public folders only store
free/busy information in merged form, MergedOnly is the only available
information.

FreeBusy Represents the legacy status information: free, busy, tentative, and OOF. This
also includes the start/end times of the appointments. This view is richer than
the legacy free/busy view because individual meeting start and end times are
provided instead of an aggregated free/busy stream.

FreeBusyMerged Represents all the properties in FreeBusy with a stream of merged free/busy
availability information.

Detailed Represents the legacy status information: free, busy, tentative, and OOF; the
start/end times of the appointments; and various properties of the
appointment such as subject, location, and importance. This requested view
will return the maximum amount of information for which the requesting user
is privileged. If merged free/busy information only is available, as with
requesting information for users in a Microsoft Exchange Server 2003 forest,
MergedOnly will be returned. Otherwise, FreeBusy or Detailed will be
returned.
If Detailed is specified for a distribution list, the free/busy information for the
members of the list is merged, and MergedOnly is returned.

DetailedMerged Represents all the properties in Detailed with a stream of merged free/busy
availability information. If only merged free/busy information is available, for
example if the mailbox exists on a computer running Exchange 2003,
MergedOnly will be returned. Otherwise, FreeBusyMerged or DetailedMerged
will be returned.

Remarks
This element is required if the FreeBusyView element is used. The type of free/busy
information returned is designated in the RequestedView element. The schema that
describes this element is located in the EWS virtual directory of the computer that is
running MicrosoftExchange Server 2007 that has the Client Access server role installed.
The following table shows what is returned for the different view types and the
corresponding MAPI property. Each view type builds upon the former view type.

FreeBusyViewType Properties MAPI Calendar Property

MergedOnly
MergedFreeBusyStream

FreeBusy
Classical status PropTag (0x80860003)

FreeBusy
Working hours

FreeBusy
Start time PR_START_DATE

FreeBusy
End time PR_END_DATE

FreeBusyMerged
Classical status PropTag (0x80860003)

FreeBusyMerged
Working hours

FreeBusyMerged
Start time PR_START_DATE

FreeBusyMerged
End time PR_END_DATE

FreeBusyMerged
MergedFreeBusyStream

Detailed
Classical status PropTag (0x80860003)

Detailed
Working hours

Detailed
Start time PR_START_DATE

Detailed
End time PR_END_DATE

Detailed
Subject PR_SUBJECT

Detailed
Location PR_LOCATION

Detailed
Entry-Id(unless private)

Detailed
Private Flag

Detailed
IsMeeting

Detailed
IsRecurring

Detailed
IsException

Detailed
IsReminderSet

Detailed
Out of Office Message (if requested)

DetailedMerged
Classical status PropTag (0x80860003)
FreeBusyViewType Properties MAPI Calendar Property

DetailedMerged
Working hours

DetailedMerged
Start time PR_START_DATE

DetailedMerged
End time PR_END_DATE

DetailedMerged
Subject PR_SUBJECT

DetailedMerged
Location PR_LOCATION

DetailedMerged
Entry-Id(unless private)

DetailedMerged
Private Flag

DetailedMerged
MergedFreeBusyStream

DetailedMerged
IsMeeting

DetailedMerged
IsRecurring

DetailedMerged
IsException

DetailedMerged
IsReminderSet

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


From
Article • 03/29/2023 • 2 minutes to read

The From element represents the address from which the message was sent.

XML

<From>

<Mailbox/>

</From>

SingleRecipientType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Mailbox
Identifies a mail-enabled Active Directory directory service object.

Parent elements

Element Description

RemoveItem
Removes an item from the Exchange store.

Message
Represents an Exchange e-mail message.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.


Element Description

AcceptItem
Represents an Accept reply to a meeting request.

TentativelyAcceptItem Represents a Tentative reply to a meeting request.

DeclineItem
Represents a Decline reply to a meeting request.

ReplyToItem
Contains a reply to the creator of an item in the Exchange store.

ReplyAllToItem
Contains a reply to all identified recipients of an item in the Exchange
store.

ForwardItem
Contains an Exchange store item to forward to recipients.

CancelCalendarItem
Represents the response object that is used to cancel a meeting.

PostItem
Represents a post item in the Exchange store. This element was
introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

Remarks
This element is used for "send on behalf of" e-mails.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
FromAddresses
Article • 03/29/2023 • 2 minutes to read

The FromAddresses element indicates the e-mail addresses from which incoming
messages must be sent in order for the condition or exception to apply.

XML

<FromAddresses>

<Address/>

</FromAddresses>

ArrayOfEmailAddressesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Address (EmailAddressType)
Represents a fully resolved e-mail address.

Parent elements

Element Description

Conditions
Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions
Represents all the available rule exception conditions for an Inbox rule.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Code Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
FromConnectedAccounts
Article • 03/29/2023 • 2 minutes to read

The FromConnectedAccounts element represents the e-mail account names from which
incoming messages have to have been aggregated in order for the condition or
exception to apply.

XML

<FromConnectedAccounts>

<String/>

</FromConnectedAccounts>

ArrayOfStringsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

String
Represents an e-mail account name from which incoming messages have to have been
aggregated in order for the condition or exception to apply.

Parent elements

Element Description

Conditions Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions Represents the exceptions that represent all the available rule exception conditions
for an Inbox rule.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
FromDate
Article • 03/29/2023 • 2 minutes to read

The FromDate element specifies the date that the message was sent.

XML

<FromDate></FromDate>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

FindMailboxStatisticsByKeywords Specifies a request to search for mailbox statistics by keyword.

Text value
The text value of the FromDate element is the date and time that a message was sent.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
FullName
Article • 03/29/2023 • 2 minutes to read

The FullName element represents the full name of a contact.

XML

<FullName/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CompleteName
Represents the complete name of a contact.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)


Generation
Article • 03/29/2023 • 2 minutes to read

The Generation element represents a generational abbreviation that follows the full
name of a contact.

XML

<Generation/>

String

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Text value
A text value is required if this element is used.

Remarks
This element represents the same information that is represented by the PR_Generation
MAPI property.
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)

Updating Contacts

Deleting Contacts
Generations
Article • 03/29/2023 • 2 minutes to read

The Generations element specifies an array of generation values and the identifiers of
their source attributions for the associated persona.

XML

<Generations>

<StringAttributedValue/>

</Generations>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

StringAttributedValue Specifies an instance in an array of attributes associated with a persona


element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
GetAppManifests
Article • 03/29/2023 • 2 minutes to read

The GetAppManifests element is the base element for a request to return the manifest
for apps.

XML

<GetAppManifests />

GetAppManifestsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ApiVersionSupported | SchemaVersionSupported

Parent elements
None.

Text value
None.

Remarks
The GetAppManifests element is applicable for clients that target Exchange Online and
versions of Microsoft Exchange Server starting with Exchange 2013.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
GetAppManifestsResponse
Article • 03/29/2023 • 2 minutes to read

The GetAppManifestsResponse element defines the response for a GetAppManifests


operation request.

XML

<GetAppManifestsResponse>

<ResponseCode/>

<Manifests/>

</GetAppManifestsResponse>

XML

<GetAppManifestsResponse>

<ResponseCode/>

<Apps/>

</GetAppManifestsResponse>

GetAppManifestsResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ResponseCode | Manifests | Apps

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File messages.xsd

Can Be Empty False

See also
EWS XML elements in Exchange
GetAppManifestsResponseMessage
Article • 03/29/2023 • 2 minutes to read

The GetAppManifestsResponseMessage element specifies the response message for a


GetAppManifests request.

XML

<GetAppManifestsResponseMessage ResponseClass=" Success | Warning | Error ">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</GetAppManifestsResponseMessage>

ResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass Indicates the class of the response.

ResponseClass

Value Description

Success Indicates success.

Warning Indicates a warning.

Error Indicates an error.

Child elements

Element Description

DescriptiveLinkKey
Currently unused and reserved for future use.
Element Description

MessageText
Provides a text description of the status of the response.

MessageXml
Provides additional error response information.

ResponseCode
Provides status information about the request.

Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
GetAppMarketplaceUrl
Article • 03/29/2023 • 2 minutes to read

The GetAppMarketplaceUrl element specifies the request to retrieve the URL for an
app.

XML

<GetAppMarketplaceUrl/>

GetAppMarketplaceUrlType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ApiVersionSupported | SchemaVersionSupported

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File messages.xsd

Can Be Empty true

See also
EWS XML elements in Exchange
GetAppMarketplaceUrlResponse
Article • 03/29/2023 • 2 minutes to read

The GetAppMarketplaceUrlResponse element specifies the response to a


GetAppMarketplaceUrl request.

XML

<GetAppMarketplaceUrlResponse ResponseClass=" Success | Warning | Error ">

<AppMarketplaceUrl/>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</GetAppMarketplaceUrlResponse>

GetAppMarketplaceUrlResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass Indicates the class of the response.

ResponseClass

Value Description

Success Indicates success.

Warning Indicates a warning.

Error Indicates an error.

Child elements

Element Description
Element Description

AppMarketplaceUrl
Specifies the URL for the app.

DescriptiveLinkKey
Currently unused and reserved for future use.

MessageText
Provides a text description of the status of the response.

MessageXml
Provides additional error response information.

ResponseCode
Provides status information about the request.

Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
GetAttachment
Article • 03/29/2023 • 2 minutes to read

The GetAttachment element is the root element in a request to get an attachment from
the Exchange store.

XML

<GetAttachment>

<AttachmentShape/>

<AttachmentIds/>

</GetAttachment>

GetAttachmentType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

AttachmentShape Identifies additional extended item properties to return in a response to a


GetAttachment request. This element is optional.

AttachmentIds
Contains an array of attachment identifiers.

Parent elements
None.

Remarks
The AttachmentShape element is not required to identify the properties returned in the
response. The GetAttachment operation returns the Name, ContentType, ContentId,
ContentLocation, and the Content properties for file attachments. For item attachments,
the returned properties are the Name, ContentType, ContentId, ContentLocation, and all
the attached item's properties. This is equivalent to using the AllProperties base shape in
a GetItem request.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetAttachment operation

GetAttachmentResponse
GetAttachmentResponse
Article • 03/29/2023 • 2 minutes to read

The GetAttachmentResponse element defines a response to a GetAttachment request.

XML

<GetAttachmentResponse>

<ResponseMessages/>

</GetAttachmentResponse>

GetAttachmentResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
GetAttachment operation

GetAttachment
GetAttachmentResponseMessage
Article • 03/29/2023 • 2 minutes to read

The GetAttachmentResponseMessage element contains the status and result of a single


GetAttachment operation request.

GetAttachmentResponse
ResponseMessages
GetAttachmentResponseMessage

XML

<GetAttachmentResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Attachments/>

</GetAttachmentResponseMessage>

AttachmentInfoResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of a GetAttachment operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass Attribute

Value Description
Value Description

Success Describes a request that is fulfilled.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes are moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota is exceeded.

Error Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

Attachments
Contains the items or files that are ttached to an item in the Exchange store.

Parent elements
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetAttachment
GetAttachment operation
GetClientAccessToken
Article • 03/29/2023 • 2 minutes to read

The GetClientAccessToken element contains a request to get a client access token.

XML

<GetClientAccessToken>

<TokenRequests/>

</GetClientAccessToken>

GetClientAccessTokenType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
TokenRequests

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
GetClientAccessTokenResponse
Article • 03/29/2023 • 2 minutes to read

The GetClientAccessTokenResponse element contains the response to a


GetClientAccessToken operation request.

XML

<GetClientAccessTokenResponse>

<ResponseMessages/>

</GetClientAccessTokenResponse>

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ResponseMessages

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty false


GetClientAccessTokenResponseMessage
Article • 03/29/2023 • 2 minutes to read

The GetClientAccessTokenResponseMessage element specifies the response message


for a GetClientAccessToken request.

XML

<GetClientAccessTokenResponseMessage ResponseClass=" Success | Warning |


Error ">

<Token/>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</GetClientAccessTokenResponseMessage>

GetClientAccessTokenResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass Indicates the class of the response.

ResponseClass

Value Description

Success Indicates success.

Warning Indicates a warning.

Error Indicates an error.

Child elements

Element Description
Element Description

Token (ClientAccessTokenType)
Specifies a client access token.

DescriptiveLinkKey
Currently unused and reserved for future use.

MessageText
Provides a text description of the status of the response.

MessageXml
Provides additional error response information.

ResponseCode
Provides status information about the request.

Parent elements

Element Description

ResponseMessages Contains the response messages for an Exchange Web Services (EWS)
request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
GetClientExtension
Article • 03/29/2023 • 2 minutes to read

The GetClientExtension element represents a request to get a client extension.

XML

<GetClientExtension>

<RequestedExtensionIds/>

<UserParameters/>

<IsDebug/>

</GetClientExtension>

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
RequestedExtensionIds | UserParameters | IsDebug

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
GetClientExtensionResponse
Article • 03/29/2023 • 2 minutes to read

The GetClientExtensionResponse element contains the response to get configuration


information about an app.

XML

<GetClientExtensionResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<ClientExtensions/>

<RawMasterTableXml/>
</GetClientExtensionResponse>

ClientExtensionResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml | ClientExtensions |
RawMasterTableXml

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


GetClientIntent
Article • 03/29/2023 • 2 minutes to read

The GetClientIntent element is intended for internal use only.

XML

<GetClientIntent />

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema


Name Value

Validation file messages.xsd

Can be empty
GetClientIntentResponseMessage
Article • 03/29/2023 • 2 minutes to read

The GetClientIntentResponseMessage element is intended for internal use only.

XML

<GetClientIntentResponseMessage />

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema


Name Value

Validation file messages.xsd

Can be empty
GetConversationItems
Article • 03/29/2023 • 2 minutes to read

The GetConversationItems element defines a request to get a set of items that are
related by being in the same conversation.

XML

<GetConversationItems>

<ItemShape/>

<FoldersToIgnore/>

<MaxItemsToReturn/>

<SortOrder/>

<MailboxScope/>

<Conversations/>

</GetConversationItems>

GetConversationItemsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ItemShape | FoldersToIgnore | MaxItemsToReturn | SortOrder
(ConversationNodeSortOrder) | MailboxScope | Conversations

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty false


GetConversationItemsResponse
Article • 03/29/2023 • 2 minutes to read

The GetConversationItemsResponse element defines a response to a


GetConversationItems request.

XML

<GetConversationItemsResponse>

<ResponseMessages/>

</GetConversationItemsResponse>

GetConversationItemsResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ResponseMessages

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
GetConversationItemsResponseMessage
Article • 03/29/2023 • 2 minutes to read

The GetConversationItemsResponseMessage element specifies the response message


for a GetConversationItems request.

XML

<GetConversationItemsResponseMessage ResponseClass="Success | Warning |


Error">

<Conversation/>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</GetConversationItemsResponseMessage>

GetConversationItemsResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass Indicates the class of the response.

ResponseClass

Value Description

Success Indicates success.

Warning Indicates a warning.

Error Indicates an error.

Child elements

Element Description
Element Description

Conversation Represents a single conversation returned in a


(ConversationResponseType)
GetConversationItems response.

DescriptiveLinkKey
Currently unused and reserved for future use.

MessageText
Provides a text description of the status of the response.

MessageXml
Provides additional error response information.

ResponseCode
Provides status information about the request.

Parent elements

Element Description

ResponseMessages Contains the response messages for an Exchange Web Services (EWS)
request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
GetDelegate
Article • 03/29/2023 • 2 minutes to read

The GetDelegate element defines a request to get information about delegates to a


mailbox. This element was introduced in Microsoft Exchange Server 2007 Service Pack 1
(SP1).

XML

<GetDelegate IncludePermissions="">

<Mailbox/>

<UserIds/>

</GetDelegate>

GetDelegateType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

IncludePermissions Indicates whether the response contains permission settings for each
delegate user.

IncludePermissions attribute values

Value Description

True
Delegate user permissions are returned in addition to the delegate user information that
is returned in the UserId element.

False
UserId information is returned.

Child elements

Element Description

Mailbox Identifies the principal's mailbox.


Element Description

UserIds
Contains an array of delegate users to get from a principal's mailbox. This element was
introduced in Exchange 2007 SP1.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetDelegate operation

EWS XML elements in Exchange


GetDelegateResponse
Article • 03/29/2023 • 2 minutes to read

The GetDelegateResponse element contains the status and result of a GetDelegate


operation request.

XML

<GetDelegateResponse>

<DeliverMeetingRequests/>

<ResponseMessages/>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</GetDelegateResponse>

GetDelegateResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

DeliverMeetingRequests
Defines how meeting requests are handled
between the delegate and the principal.

ResponseMessages Contains the response messages for an Exchange


(ArrayOfDelegateUserResponseMessageType) Web Services delegate management request.

MessageText
Provides a text description of the status of the
response.

ResponseCode
Provides an error code that identifies the specific
error that the request encountered.
Element Description

DescriptiveLinkKey
Currently unused and is reserved for future use. It
contains a value of 0.

MessageXml
Provides additional error response information.

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 2010 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetDelegate operation

EWS XML elements in Exchange


GetDiscoverySearchConfiguration
Article • 03/29/2023 • 2 minutes to read

The GetDiscoverySearchConfiguration element specifies a request to retrieve the


eDiscovery search configuration.

XML

<GetDiscoverySearchConfiguration>

<SearchId/>

<ExpandGroupMembership/>

</GetDiscoverySearchConfiguration>

GetDiscoverySearchConfigurationType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

SearchId
Specifies the identifier of the search.

ExpandGroupMembership Contains a Boolean value that indicates whether to expand the


membership of the group returned from a GetSearchableMailboxes
request.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
GetDiscoverySearchConfigurationRespo
nse
Article • 03/29/2023 • 2 minutes to read

The GetDiscoverySearchConfigurationResponse element specifies the response to a


GetDiscoverySearchConfiguration request.

XML

<GetDiscoverySearchConfigurationResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<DiscoverySearchConfigurations/>

</GetDiscoverySearchConfigurationResponse>

GetDiscoverySearchConfigurationResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml |
DiscoverySearchConfigurations

Parent elements
ResponseMessages

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


GetDiscoverySearchConfigurationRespo
nseMessage
Article • 03/29/2023 • 2 minutes to read

The GetDiscoverySearchConfigurationResponseMessage element specifies the


response message for a GetDiscoverySearchConfiguration request.

XML

<GetDiscoverySearchConfigurationResponseMessage>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<DiscoverySearchConfigurations/>

</GetDiscoverySearchConfigurationResponseMessage>

GetDiscoverySearchConfigurationResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml |
DiscoverySearchConfigurations

Parent elements
ResponseMessages

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


GetEncryptionConfiguration
Article • 03/29/2023 • 2 minutes to read

The GetEncryptionConfiguration element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
GetEncryptionConfigurationResponse
Article • 03/29/2023 • 2 minutes to read

The GetEncryptionConfigurationResponse element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
GetEncryptionConfigurationResponseM
essage
Article • 03/29/2023 • 2 minutes to read

The GetEncryptionConfigurationResponseMessage is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
GetEvents
Article • 03/29/2023 • 2 minutes to read

The GetEvents element represents the operation used by pull clients to request
notifications from the server.

GetEvents

XML

<GetEvents>

<SubscriptionId/>

<Watermark/>

</GetEvents>

GetEventsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

SubscriptionId Represents the identifier for a subscription that is queried for events.
(GetEvents)

Watermark
Represents the last watermark returned to the client. If GetEvents has not been
called for this subscription, the client uses the watermark returned from the
Subscribe request. Otherwise, the watermark from the last event in the last
GetEvents response is used.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false

See also
Subscribe operation

GetEvents operation

Unsubscribe operation
GetEventsResponse
Article • 03/29/2023 • 2 minutes to read

The GetEventsResponse element represents a response to a GetEvents request.

XML

<GetEventsResponse>

<ResponseMessages/>

</GetEventsResponse>

GetEventsResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False


GetEventsResponseMessage
Article • 03/29/2023 • 2 minutes to read

The GetEventsResponseMessage element contains the status and result of a single


GetEvents operation request.

XML

<GetEventsResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Notification/>

</GetEventsResponseMessage>

GetEventsResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of a GetEvents operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass Attribute

Value Description

Success Describes a request that is fulfilled.


Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The mailbox database (MDB) is offline.
- A password has expired.
- A quota was exceeded.

Error Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

Notification
Contains information about the subscription and the events that have
occurred since the last notification.

Parent elements
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetEvents
GetEventsResponse
GetEvents operation
GetFederatedDirectoryGroup
Article • 03/29/2023 • 2 minutes to read

The GetFederatedDirectoryGroup element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
GetFederatedDirectoryGroupResponse
Article • 03/29/2023 • 2 minutes to read

The GetFederatedDirectoryGroupResponse element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
GetFederatedDirectoryUser
Article • 03/29/2023 • 2 minutes to read

The GetFederatedDirectoryUser element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
GetFederatedDirectoryUserResponse
Article • 03/29/2023 • 2 minutes to read

The GetFederatedDirectoryUserResponse element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
GetFolder
Article • 03/29/2023 • 2 minutes to read

The GetFolder element defines a request to get a folder from a mailbox in the Exchange
store.

XML

<GetFolder>

<FolderShape/>

<FolderIds/>

</GetFolder>

GetFolderType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FolderShape Identifies the properties to get for each folder identified in the FolderIds element.

FolderIds
Contains an array of folder identifiers that are used to identify folders to get from a
mailbox in the Exchange store.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File Messages.xsd

Can be Empty False

See also
GetFolder operation
GetFolderResponse
Article • 03/29/2023 • 2 minutes to read

The GetFolderResponse element defines a response to a GetFolder request.

XML

<GetFolderResponse>

<ResponseMessages/>

</GetFolderResponse>

GetFolderResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
GetFolder

GetFolder operation

GetFolderResponseMessage
GetFolderResponseMessage
Article • 03/29/2023 • 2 minutes to read

The GetFolderResponseMessage element contains the status and result of a single


GetFolder operation request.

GetFolderResponse
ResponseMessages
GetFolderResponseMessage

XML

<GetFolderResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Folders/>

</GetFolderResponseMessage>

FolderInfoResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of a GetFolder operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass Attribute

Value Description
Value Description

Success
Describes a request that is fulfilled.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes are moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota is exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

Folders
Contains an array of folders that are used in folder operations.

Parent elements
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetFolder
GetFolderResponse
GetFolder operation
GetHoldOnMailboxes
Article • 03/29/2023 • 2 minutes to read

The GetHoldOnMailboxes element indicates the beginning of the GetHoldOnMailboxes


request.

XML

<GetHoldOnMailboxes>

<HoldId/>

</GetHoldOnMailboxes>

GetHoldOnMailboxesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
HoldId

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty false


GetHoldOnMailboxesResponse
Article • 03/29/2023 • 2 minutes to read

The GetHoldOnMailboxes element contains the request to get the hold status for a
mailbox.

XML

<GetHoldOnMailboxes>

<HoldId/>

</GetHoldOnMailboxes>

GetHoldOnMailboxesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
HoldId

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
GetHoldOnMailboxesResponseMessage
Article • 03/29/2023 • 2 minutes to read

The GetHoldOnMailboxesResponseMessage element specifies the response message


for a GetHoldOnMailboxes request.

XML

<GetHoldOnMailboxesResponseMessage ResponseClass=" Success | Warning | Error


">

<MailboxHoldResult/>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</GetHoldOnMailboxesResponseMessage>

GetHoldOnMailboxesResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass Indicates the class of the response.

ResponseClass

Value Description

Success Indicates success.

Warning Indicates a warning.

Error Indicates an error.

Child elements

Element Description
Element Description

MailboxHoldResult
Contains the result of the GetHoldOnMailboxes request.

DescriptiveLinkKey
Currently unused and reserved for future use.

MessageText
Provides a text description of the status of the response.

MessageXml
Provides additional error response information.

ResponseCode
Provides status information about the request.

Parent elements

Element Description

ResponseMessages Contains the response messages for an Exchange Web Services (EWS)
request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
GetImItemList
Article • 03/29/2023 • 2 minutes to read

The GetImItemList element defines a request to get a list of instant messaging groups
and contacts.

XML

<GetImItemList>

<ExtendedProperties/>

</GetImItemList>

GetImItemListType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ExtendedProperties (NonEmptyArrayOfExtendedFieldURIs)

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty true


GetImItemListResponse
Article • 03/29/2023 • 2 minutes to read

The GetImItemListResponse element defines a response to a GetImItemList request.

XML

<GetImItemListResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<ImItemList/>

</GetImItemListResponse>

GetImItemListResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml | ImItemList

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
GetImItems
Article • 03/29/2023 • 2 minutes to read

The GetImItems request element defines a request to get information about the
specified instant messaging groups and instant messaging contact personas.

XML

<GetImItems>

<ContactIds/>

<GroupIds/>

<ExtendedProperties/>

</GetImItems>

GetImItemsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ContactIds | GroupIds | ExtendedProperties (NonEmptyArrayOfExtendedFieldURIs)

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
GetImItemsResponse
Article • 03/29/2023 • 2 minutes to read

The GetImItemsResponse element defines a response to a GetImItems request.

XML

<GetImItemsResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<ImItemList/>

</GetImItemsResponse>

GetImItemsResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml | ImItemList

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
GetInboxRules
Article • 03/29/2023 • 2 minutes to read

The GetInboxRules element defines a request to get the Inbox rules on a mailbox in the
server store.

XML

<GetInboxRules>

<MailboxSmtpAddress/>

</GetInboxRules>

GetInboxRulesRequestType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

MailboxSmtpAddress Represents the SMTP address of the user whose Inbox rules are to be
retrieved.

Parent elements
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
GetInboxRules operation
GetInboxRulesResponse
Article • 03/29/2023 • 2 minutes to read

The GetInboxRulesResponse element defines a response to a GetInboxRules operation


request.

XML

<GetInboxRulesResponse ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<OutlookRuleBlobExists/>

<InboxRules/>

</GetInboxRulesResponse>

GetInboxRulesResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of a GetInboxRules operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass Attribute

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes are moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota is exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides text description of the status of the response.

ResponseCode
Provides status information about the request.

DescriptiveLinkKey
Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

OutlookRuleBlobExists Indicates whether a Microsoft Outlook rule blob exists in the user's
mailbox.

InboxRules
Represents an array of the rules in the user's mailbox.

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
GetInboxRules
GetInboxRules operation
GetItem
Article • 03/29/2023 • 2 minutes to read

The GetItem element defines a request to get an item from a mailbox in the Exchange
store.

XML

<GetItem>

<ItemShape/>

<ItemIds/>

</GetItem>

GetItemType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ItemShape Identifies the item properties and content to include in a GetItem response.

ItemIds
Contains the unique identities of items, occurrence items, and recurring master items
that are used to get items from the Exchange store. These items represent contacts,
tasks, messages, calendar items, meeting requests, and other valid items in a
mailbox.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File Messages.xsd

Can be Empty False

See also
GetItem operation
GetItemResponse
Article • 03/29/2023 • 2 minutes to read

The GetItemResponse element defines a response to a GetItem request.

XML

<GetItemResponse>

<ResponseMessages/>

</GetItemResponse>

GetItemResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
GetItem

GetItemResponseMessage

GetItem operation
GetItemResponseMessage
Article • 03/29/2023 • 2 minutes to read

The GetItemResponseMessage element contains the status and result of a single


GetItem operation request.

GetItemResponse
ResponseMessages
GetItemResponseMessage

XML

<GetItemResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Items/>

</GetItemResponseMessage>

ItemInfoResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of a GetItem operation response.

The following values are valid for this attribute:

- Success

- Warning

- Error

ResponseClass attribute values

Value Description
Value Description

Success
Describes a request that is fulfilled.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processed and subsequent items could not
be processed.

The following are examples of sources for warnings:

- The Exchange store is offline during the batch.

- Active Directory Domain Services (AD DS) is offline.

- Mailboxes are moved.

- MDB is offline.

- Password is expired.
- Quota is exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources for errors:

- Invalid attributes or elements

- Attributes or elements out of range

- Unknown tag

- Attribute or element not valid in the context

- Unauthorized access attempted by any client

- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

Items
Contains an array of returned items.

Parent elements
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetItem
GetItem operation
GetMailTips
Article • 03/29/2023 • 2 minutes to read

The GetMailTips element represents the recipients and types of mail tips to retrieve.

XML

<GetMailTips>

<SendingAs/>

<Recipients/>

<MailTipsRequested/>
</GetMailTips>

GetMailTipsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

SendingAs
Contains an e-mail address that a user is trying to send as.

Recipients (ArrayOfRecipientsType)
Contains a list of recipients to check for mail tips.

MailTipsRequested
Contains the types of mail tips requested from the service.

Parent elements
None.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
GetMailTipsResponse
Article • 03/29/2023 • 2 minutes to read

The GetMailTipsResponse element represents the response message for a GetMailTips


operation.

XML

<GetMailTipsResponse>

<ResponseMessages/>

</GetMailTipsResponse>

GetMailTipsResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessages Represents a list of mail tips response


(ArrayOfMailTipsResponseMessageType)
messages.

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetMailTips operation
EWS XML elements in Exchange
GetMessageTrackingReport
Article • 03/29/2023 • 2 minutes to read

The GetMessageTrackingReport element contains the request for the


GetMessageTrackingReport operation to retrieve the full message tracking report for the
specified ID.

XML

<GetMessageTrackingReport>

<Scope/>

<ReportTemplate/>

<RecipientFilter/>

<MessageTrackingReportId/>

<ReturnQueueEvents/>
<DiagnosticsLevel/>

<Properties/>

</GetMessageTrackingReport>

GetMessageTrackingReportRequestType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Scope (NonEmptyStringType)
Specifies where to perform the search. This element is required.

ReportTemplate
Specifies the type of tracking report to retrieve. This element is
required.

RecipientFilter
Specifies a recipient address to use with the specified tracking
report. This element is optional.

MessageTrackingReportId
Specifies an identity string that was obtained from the
FindMessageTrackingReport operation. This element is
required.
Element Description

ReturnQueueEvents
Specifies that the person who is running the task has a
privileged role. This element is optional.

DiagnosticsLevel
Specifies timing and performance information that will be used
to derive the tracking report. This element is optional.

Properties Specifies a list of one or more tracking properties. This element


(ArrayOfTrackingPropertiesType) is optional.

Parent elements
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetMessageTrackingReport operation

EWS XML elements in Exchange


GetMessageTrackingReportResponse
Article • 03/29/2023 • 2 minutes to read

The GetMessageTrackingReportResponse element contains the response for the


GetMessageTrackingReport operation.

XML

<GetMessageTrackingReportResponse ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<MessageTrackingReport/>

<Diagnostics/>

<Errors/>

<Properties/>

</GetMessageTrackingReportResponse>

GetMessageTrackingReportResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Serves (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:


Invalid attributes or elements

- Attributes or elements that are out of range


- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the
request encountered.

DescriptiveLinkKey
Currently unused and reserved for future use. This element
contains a value of 0.

MessageXml
Provides additional error response information.

MessageTrackingReport
Contains a single message that is returned in a
GetMessageTrackingReport operation.

Diagnostics Provides timing and performance information that is used for


reporting in a DataCenter.
Element Description

Errors
Contains a property bag to store errors that are returned
through the Web service.

Properties Contains a list of one or more tracking properties.


(ArrayOfTrackingPropertiesType)

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetMessageTrackingReport operation
EWS XML elements in Exchange
GetNonIndexableItemDetails
Article • 03/29/2023 • 2 minutes to read

The GetNonIndexableItemDetails element specifies a request to retrieve nonindexable


item details.

XML

<GetNonIndexableItemDetails>

<Mailboxes/>

<PageSize/>

<PageItemReference/>

<PageDirection/>

</GetNonIndexableItemDetails>

GetNonIndexableItemDetailsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Mailboxes Specifies an array of Mailbox elements.


(NonEmptyArrayOfLegacyDNsType)

PageSize
Contains the number of items to be returned in a single
page for a search result.

PageItemReference
Specifies the reference for a page item.

PageDirection Contains the direction for pagination in the search result.

Parent elements
None.
Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
GetNonIndexableItemDetailsResponse
Article • 03/29/2023 • 2 minutes to read

The GetNonIndexableItemDetailsResponse element specifies the response to a


GetNonIndexableItemDetails request.

XML

<GetNonIndexableItemDetailsResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<NonIndexableItemDetailsResult/>

</GetNonIndexableItemDetailsResponse>

GetNonIndexableItemDetailsResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml |
NonIndexableItemDetailsResult

Parent elements
ResponseMessages

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


GetNonIndexableItemDetailsResponseM
essage
Article • 03/29/2023 • 2 minutes to read

The GetNonIndexableItemDetailsResponseMessage element specifies the response


message for a GetNonIndexableItemDetails request.

XML

<GetNonIndexableItemDetailsResponseMessage>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<NonIndexableItemDetailsResult/>

</GetNonIndexableItemDetailsResponseMessage>

GetNonIndexableItemDetailsResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml |
NonIndexableItemDetailsResult

Parent elements
ResponseMessages

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


GetNonIndexableItemStatistics
Article • 03/29/2023 • 2 minutes to read

The GetNonIndexableItemStatistics element specifies a request to retrieve


nonindexable item statistics.

XML

<GetNonIndexableItemStatistics>

<Mailboxes/>

</GetNonIndexableItemStatistics>

GetNonIndexableItemStatisticsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Mailboxes (NonEmptyArrayOfLegacyDNsType)
Specifies an array of Mailbox elements.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
GetNonIndexableItemStatisticsResponse
Article • 03/29/2023 • 2 minutes to read

The GetNonIndexableItemStatisticsResponse element specifies the response to a


GetNonIndexableItemStatistics request.

XML

<GetNonIndexableItemStatisticsResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<NonIndexableItemStatistics/>

</GetNonIndexableItemStatisticsResponse>

GetNonIndexableItemStatisticsResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml |
GetNonIndexableItemStatistics

Parent elements
ResponseMessages

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Item Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


GetNonIndexableItemStatisticsResponse
Message
Article • 03/29/2023 • 2 minutes to read

The GetNonIndexableItemStatisticsResponseMessage element specifies the response


message for a GetNonIndexableItemStatistics request.

XML

<GetNonIndexableItemStatisticsResponseMessage>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<NonIndexableItemStatistics/>

</GetNonIndexableItemStatisticsResponseMessage>

GetNonIndexableItemStatisticsResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml |
GetNonIndexableItemStatistics

Parent elements
ResponseMessages

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Item Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


GetPasswordExpirationDate
Article • 03/29/2023 • 2 minutes to read

The GetPasswordExpirationDate element defines a request to get the password


expiration date for an email account. This element is the base element for the
GetPasswordExpirationDate operation operation.

XML

<GetPasswordExpirationDate>

<MailboxSmtpAddress/>

</GetPasswordExpirationDate>

GetPasswordExpirationDateType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element name Description

MailboxSmtpAddress Represents the email address of the email account for which the password
expiration date is to be returned.

Parent elements
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

This element was introduced in Exchange Server 2010 Service Pack 2 (SP2).
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetPasswordExpirationDate operation

EWS XML elements in Exchange


GetPasswordExpirationDateResponse
Article • 03/29/2023 • 2 minutes to read

The GetPasswordExpirationDateResponse element defines the response to a


GetPasswordExpirationDate operation operation request.

ResponseMessages
GetPasswordExpirationDateResponse

XML

<GetPasswordExpirationDateResponse>

<PasswordExpirationDate />

</GetPasswordExpirationDateResponse>

GetPasswordExpirationDateResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements.


- Attributes or elements that are out of range.
- An unknown tag.
- An attribute or element that is not valid in the context.
- An unauthorized access attempt by any client.
- A server-side failure in response to a valid client-side call.

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element name Description

PasswordExpirationDate Provides the password expiration date for the email account specified
in the request.

Parent elements

Element name Description

ResponseMessages Contains the response messages for an Exchange Web Services (EWS)
request.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

This element was introduced in Exchange Server 2010 Service Pack 2 (SP2).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetPasswordExpirationDate operation
EWS XML elements in Exchange
GetPersona
Article • 03/29/2023 • 2 minutes to read

The GetPersona element contains the request to get a persona.

XML

<GetPersona>

<PersonaId/>

</GetPersona>

GetPersonaType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
PersonaId

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
GetPersonaResponseMessage
Article • 03/29/2023 • 2 minutes to read

The GetPersonaResponseMessage contains the response data resulting from a


GetPersona request.

XML

<GetPersonaResponseMessage>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Persona/>

</GetPersonaResponseMessage>

GetUserPhotoResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml | Persona

Parent elements
ResponseMessages

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
GetPhoneCallInformation
Article • 03/29/2023 • 2 minutes to read

The GetPhoneCallInformation element specifies a request to get telephone call


information.

XML

<GetPhoneCallInformation>

<PhoneCallId/>

</GetPhoneCallInformation>

GetPhoneCallInformationType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

PhoneCallId
Specifies the identifier of a phone call.

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
GetPhoneCallInformationResponse
Article • 03/29/2023 • 2 minutes to read

The GetPhoneCallInformationResponse element defines a response to a single


GetPhoneCallInformation request.

XML

<GetPhoneCallInformationResponse ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/> <PhoneCallInformation/>

</GetPhoneCallInformationResponse>

GetPhoneCallInformationResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- The Active Directory directory service is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey
Currently unused and reserved for future use. This element contains a
value of 0.

MessageXml
Provides additional error response information.

PhoneCallInformation Specifies the state information for a phone call.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Exchange Server with the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
GetReminders
Article • 03/29/2023 • 2 minutes to read

The GetReminders element specifies a request to get reminders.

XML

<GetReminders>

<BeginTime/>

<EndTime/>

<MaxItems/>

<ReminderType/>

</GetReminders>

GetRemindersType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
BeginTime | EndTime (ReminderMessageDataType) | MaxItems | ReminderType

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
GetRemindersResponse
Article • 03/29/2023 • 2 minutes to read

The GetRemindersResponse element specifies the response to a GetReminders request.

XML

<GetRemindersResponse>

<Reminders></Reminders>

</GetRemindersResponse>

GetRemindersResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Reminders

Parent elements
ResponseMessages

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
ResponseMessages

EWS XML elements in Exchange


GetRoomLists
Article • 03/29/2023 • 2 minutes to read

The GetRoomLists element is the root element in a request for a list of email addresses
that represent a list of available rooms.

XML

<GetRoomLists/>

GetRoomListsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages
Name Value

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty true

See also
EWS XML elements in Exchange
GetRoomListsResponse
Article • 03/29/2023 • 2 minutes to read

The GetRoomListsResponse element defines the response from a GetRoomLists


operation request.

ResponseMessages
GetRoomListsResponse

XML

<GetRoomListsResponse ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<RoomLists/>

</GetRoomListsResponse>

GetRoomListsResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- The Active Directory directory service is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.
-

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and reserved for future use. This element contains a value
of 0.

MessageXml
Provides additional error response information.

RoomLists
Provides a list of e-mail addresses and display names that represent lists of
meeting rooms.
Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetRoomLists operation
EWS XML elements in Exchange
GetRooms
Article • 03/29/2023 • 2 minutes to read

The GetRooms element is the root element in a request to get a list of rooms within a
particular room list.

XML

<GetRooms>

<RoomList/>

</GetRooms>

GetRoomsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

RoomList
Represents an e-mail address that identifies a list of meeting rooms

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
GetRoomsResponse
Article • 03/29/2023 • 2 minutes to read

The GetRoomsResponse element defines a response to a GetRooms operation request.

ResponseMessages
GetRoomsResponse

XML

<GetRoomsResponse ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Rooms/>

</GetRoomsResponse>

GetRoomsResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and reserved for future use. This element contains a value
of 0.

MessageXml
Provides additional error response information.

Rooms
Provides a list of email addresses and display names that represent meeting
rooms.

Parent elements
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetRooms operation
EWS XML elements in Exchange
GetSearchableMailboxes
Article • 03/29/2023 • 2 minutes to read

The GetSearchableMailboxes element contains a request to get a list of mailboxes that


the client has permission to perform an eDiscovery search.

XML

<GetSearchableMailboxes>

<SearchFilter/>

<ExpandGroupMembership/>

</GetSearchableMailboxes>

GetSearchableMailboxesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
SearchFilter | ExpandGroupMembership

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
GetSearchableMailboxesResponse
Article • 03/29/2023 • 2 minutes to read

The GetSearchableMailboxesResponse element contains the response to a


GetSearchableMailboxes request.

XML

<GetSearchableMailboxesResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<SearchableMailboxes/>

<FailedMailboxes/>

</GetSearchableMailboxesResponse>

GetSearchableMailboxesResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml | SearchableMailboxes |
FailedMailboxes

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty false


GetSearchableMailboxesResponseMessa
ge
Article • 03/29/2023 • 2 minutes to read

The GetSearchableMailboxesResponseMessage element specifies the response


message for a GetSearchableMailboxes request.

XML

<GetSearchableMailboxesResponseMessage ResponseClass=" Success | Warning |


Error ">

<SearchableMailboxes/>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</GetSearchablemailboxesResponseMessage>

GetSearchableMailboxesResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass Indicates the class of the response.

ResponseClass

Value Description

Success Indicates success.

Warning Indicates a warning.

Error Indicates an error.

Child elements
Element Description

SearchableMailboxes Contains an array of the mailboxes returned from a


GetSearchableMailboxes request.

DescriptiveLinkKey
Currently unused and reserved for future use.

MessageText
Provides a text description of the status of the response.

MessageXml
Provides additional error response information.

ResponseCode
Provides status information about the request.

Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
GetServerTimeZones
Article • 03/29/2023 • 2 minutes to read

The GetServerTimeZones element is the root element in a request to retrieve time zone
definitions from the Exchange server.

XML

<GetServerTimeZones ReturnFullTimeZoneData=""> <Ids/></GetServerTimeZones>

GetServerTimeZonesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ReturnFullTimeZoneData Specifies whether the GetServerTimeZones operation returns the


complete definition or only the name and identifier for each time
zone. This attribute is optional. The default value is true.

ReturnFullTimeZoneData Attribute

Value Description

true
Return the complete definitions for each time zone.

false
Return only the name and identifier for each time zone.

Child elements

Element Description

Ids
Contains an array of time zone definition identifiers that specifies the requested time
zone definitions. This element is optional. If this element is not included in the
GetServerTimeZones operation request, all time zone definitions that are available on
the server are returned in the response.
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 that has the Client Access server
role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetServerTimeZones operation

GetServerTimeZonesResponse

EWS XML elements in Exchange


GetServerTimeZonesResponse
Article • 03/29/2023 • 2 minutes to read

The GetServerTimeZonesResponse element defines a response to a


GetServerTimeZones operation request.

XML

<GetServerTimeZonesResponse>

<ResponseMessages/>

</GetServerTimeZonesResponse>

GetServerTimeZonesResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
GetServerTimeZonesResponseMessage
Article • 03/29/2023 • 2 minutes to read

The GetServerTimeZonesResponseMessage element contains the status and result of a


single GetServerTimeZones operation request.

XML

<GetServerTimeZonesResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<TimeZoneDefinitions/>

</GetServerTimeZonesResponseMessage>

GetServerTimeZonesResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey
Currently unused and reserved for future use. This element contains a
value of 0.

MessageXml
Provides additional error response information.

TimeZoneDefinitions Contains an array of time zone definitions.

Parent elements
Element Description

ResponseMessages Contains the response messages for an Exchange Web Services (EWS)
request.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
GetServiceConfiguration
Article • 03/29/2023 • 2 minutes to read

The GetServiceConfiguration element defines a GetServiceConfiguration request.

XML

<GetServiceConfiguration>

<ActingAs/>

<RequestedConfiguration/>

</GetServiceConfiguration>

GetServiceConfigurationType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ActingAs
Identifies who the caller is sending as. This element is optional. If this
element is not present, the authenticated user is assumed to be the
sender. The ActingAs element must be included for requesting sender
hints. An ErrorInvalidArgument error can be returned in a response if
the ActingAs element is missing, does not include a routing type, does
not include an e-mail address, contains an invalid e-mail address, does
not resolve to a user in Active Directory Domain Services (AD DS), or
resolves to multiple users in AD DS.

RequestedConfiguration Contains the requested service configurations. This element is


required.

Parent elements
None.
Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
GetServiceConfigurationResponse
Article • 03/29/2023 • 2 minutes to read

The GetServiceConfigurationResponse element defines a response to a


GetServiceConfiguration request.

XML

<GetServiceConfigurationResponse ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<ResponseMessages/>

</GetServiceConfigurationResponse>

GetServiceConfigurationResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of
the response.

ResponseCode
Provides an error code that identifies the
specific error that the request
encountered.

DescriptiveLinkKey
Currently unused and reserved for future
use. This element contains a value of 0.

MessageXml
Provides additional error response
information.

ResponseMessages Contains an array of service configuration


(ArrayOfServiceConfigurationResponseMessageType) response messages.
Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
GetSharingFolder
Article • 03/29/2023 • 2 minutes to read

The GetSharingFolder element defines a request to get the local folder identifier of a
specified shared folder. It is the base element for the GetSharingFolder operation.

XML

<GetSharingFolder> <SmtpAddress/> <DataType/> <SharedFolderId/>


</GetSharingFolder>

GetSharingFolderType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

SmtpAddress
Represents the SMTP e-mail address of the other party in the sharing
relationship. This element is required.

DataType
Describes the type of data that is shared by a shared folder. This element is
optional.

SharedFolderId Represents the identifier of the shared folder whose local folder identifier
should be returned. This element is optional.

Parent elements
None.

Remarks
A GetSharingFolder element must contain an SmtpAddress element. A GetSharingFolder
element must also contain either a DataType element or a SharedFolderId element, but
cannot contain both.

The schema that describes this element is located in the IIS Virtual directory that hosts
Exchange Web Services of the computer that is running Microsoft Exchange Server that
has the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetSharingFolder operation

EWS XML elements in Exchange


GetSharingFolderResponse
Article • 03/29/2023 • 2 minutes to read

The GetSharingFolderResponse element defines a response to a GetSharingFolder


operation request.

XML

<GetSharingFolderResponse ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/> <SharingFolderId/>

</GetSharingFolderResponse>

GetSharingFolderResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- The Active Directory directory service or Active Directory Domain Services (AD DS) is
offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and reserved for future use. This element contains a value
of 0.

MessageXml
Provides additional error response information.

SharingFolderId
Represents the identifier of the local folder in a sharing relationship.

Parent elements
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
GetSharingFolderResponseMessage
Article • 03/29/2023 • 2 minutes to read

The GetSharingFolderResponseMessage element contains the status and result of a


single GetSharingFolder operation request.

XML

<GetSharingFolderResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/> <SharingFolderId/>

</GetSharingFolderResponseMessage>

GetSharingFolderResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- The Active Directory directory service is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and reserved for future use. This element contains a value
of 0.

MessageXml
Provides additional error response information.

SharingFolderId
Represents the identifier of the local folder in a sharing relationship.

Parent elements
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
The schema that describes this element is located in the IIS Virtual directory that hosts
Exchange Web Services of the computer that is running Microsoft Exchange Server that
has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
GetSharingMetadata
Article • 03/29/2023 • 2 minutes to read

The GetSharingMetadata element defines a request to get an opaque authentication


token that identifies the sharing invitation. This element is the base element for the
GetSharingMetadata operation.

XML

<GetSharingMetadata>

<IdOfFolderToShare/>
<SenderSmtpAddress/>
<Recipients/>

</GetSharingMetadata>

GetSharingMetadataType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

IdOfFolderToShare
Represents the identifier of the folder on the server that will be
shared. This element is required.

SenderSmtpAddress Represents the SMTP email address that corresponds to the mailbox
that contains the folder that is identified by the IdOfFolderToShare
element. This element is required.

Recipients Represents the SMTP email addresses of one or more entities that
(ArrayOfSmtpAddressType) will be granted access to the data in the folder that is identified by
the IdOfFolderToShare element. This element is required.

Parent elements
None.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetSharingMetadata operation

EWS XML elements in Exchange


GetSharingMetadataResponse
Article • 03/29/2023 • 2 minutes to read

The GetSharingMetadataResponse element defines a response to a


GetSharingMetadata operation request.

XML

<GetSharingMetadataResponse ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/> <EncryptedSharedFolderDataCollection/>
<InvalidRecipients/>

</GetSharingMetadataResponse>

GetSharingMetadataResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- The Active Directory directory service is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error
that the request encountered.

DescriptiveLinkKey
Currently unused and reserved for future use. This
element contains a value of 0.

MessageXml
Provides additional error response information.

EncryptedSharedFolderDataCollection Contains a collection of data structures that a client can


use to authorize the sharing of its calendar or contact
data with other clients.

InvalidRecipients
Represents recipients of the folder sharing request that
are invalid.
Parent elements
None.

Remarks
The schema that describes this element is located in the IIS Virtual directory that hosts
Exchange Web Services of the computer that is running Microsoft Exchange Server that
has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetSharingMetadata operation
EWS XML elements in Exchange
GetSharingMetadataResponseMessage
Article • 03/29/2023 • 2 minutes to read

The GetSharingMetadataResponseMessage element contains the status and result of a


single GetSharingMetadata operation request.

XML

<GetSharingMetadataResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/> <EncryptedSharedFolderDataCollection/>
<InvalidRecipients/>

</GetSharingMetadataResponseMessage>

GetSharingMetadataResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- The Active Directory directory service is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error
that the request encountered.

DescriptiveLinkKey
Currently unused and reserved for future use. This
element contains a value of 0.

MessageXml
Provides additional error response information.

EncryptedSharedFolderDataCollection Contains a collection of data structures that a client can


use to authorize the sharing of its calendar or contact
data with other clients.

InvalidRecipients
Represents recipients of the folder sharing request that
are invalid.
Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
The schema that describes this element is located in the IIS Virtual directory that hosts
Exchange Web Services of the computer that is running Microsoft Exchange Server that
has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetSharingMetadata operation
EWS XML elements in Exchange
GetStreamingEvents
Article • 03/29/2023 • 2 minutes to read

The GetStreamingEvents element represents the operation that is used by clients to


request streaming notifications from the server.

GetStreamingEvents

XML

<GetStreamingEvents>

<SubscriptionIds>

<SubscriptionId/>

</SubscriptionIds>

<ConnectionTimeout/>
</GetStreamingEvents>

GetStreamingEventsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

SubscriptionIds
Contains an array of subscription identifiers that identify the subscriptions
to get streaming events for.

ConnectionTimeout Represents the number of minutes to keep a connection open.

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
Subscribe operation

GetStreamingEvents operation

Unsubscribe operation

EWS XML elements in Exchange


GetStreamingEventsResponse
Article • 03/29/2023 • 2 minutes to read

The GetStreamingEventsResponse element represents a response to a


GetStreamingEvents element request.

XML

<GetStreamingEventsResponse>

<ResponseMessages/>

</GetStreamingEventsResponse>

GetStreamingEventsResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
GetStreamingEvents operation

EWS XML elements in Exchange


GetStreamingEventsResponseMessage
Article • 03/29/2023 • 2 minutes to read

The GetStreamingEventsResponseMessage element contains the status and result of a


single GetStreamingEvents operation request.

XML

<GetStreamingEventsResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Notifications/>

<ErrorSubscriptionIds/>

<ConnectionStatus/>

</GetStreamingEventsResponseMessage>

GetStreamingEventsResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of a GetStreamingEvents operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass Attribute

Value Description

Success Describes a request that is fulfilled.


Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The mailbox database (MDB) is offline.
- A password has expired.
- A quota was exceeded.

Error Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey
Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

Notifications
Contains a list of information about the subscription and the events that
have occurred since the last notification.

ErrorSubscriptionIds Contains a list of subscription IDs that are invalid.

ConnectionStatus
Provides a text description of the status of a streaming subscription.
Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetStreamingEvents
GetStreamingEventsResponse
GetStreamingEvents operation
GetUserAvailabilityRequest
Article • 03/29/2023 • 2 minutes to read

The GetUserAvailabilityRequest element contains the arguments used to obtain user


availability information. This is a root element.

XML

<GetUserAvailabilityRequest>

<TimeZone>...</TimeZone>

<MailboxDataArray>...</MailboxDataArray>

<FreeBusyViewOptions>...</FreeBusyViewOptions>

<SuggestionsViewOptions>...</SuggestionsViewOptions>

</GetUserAvailabilityRequest>

GetUserAvailabilityRequestType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

TimeZone (Availability)
Contains elements that identify time zone information. This element
also contains information about the transition between standard time
and daylight saving time.

MailboxDataArray
Contains a list of mailboxes to query for availability information.

FreeBusyViewOptions
Specifies the type of free/busy information returned in the response.

SuggestionsViewOptions Contains the options for obtaining meeting suggestion information.

Parent elements
None.
Remarks
The schema that describes this element is located in the /EWS/ directory of the
computer that is running Microsoft Exchange Server 2007 that has the Client Access
server role installed.

Example
The following example shows a request for free/busy information.

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<GetUserAvailabilityRequest
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<TimeZone
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Bias>480</Bias>

<StandardTime>

<Bias>0</Bias>

<Time>02:00:00</Time>

<DayOrder>5</DayOrder>

<Month>10</Month>

<DayOfWeek>Sunday</DayOfWeek>

</StandardTime>

<DaylightTime>

<Bias>-60</Bias>

<Time>02:00:00</Time>

<DayOrder>1</DayOrder>

<Month>4</Month>

<DayOfWeek>Sunday</DayOfWeek>

</DaylightTime>

</TimeZone>

<MailboxDataArray>

<MailboxData
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Email>

<Name></Name>

<Address>[email protected]</Address>

<RoutingType>SMTP</RoutingType>

</Email>

<AttendeeType>Organizer</AttendeeType>

<ExcludeConflicts>false</ExcludeConflicts>

<ExcludeNonWorkingHours>false</ExcludeNonWorkingHours>

</MailboxData>

</MailboxDataArray>

<FreeBusyViewOptions
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<TimeWindow>

<StartTime>2006-02-06T00:00:00</StartTime>

<EndTime>2006-02-30T23:59:59</EndTime>

</TimeWindow>

<MergedFreeBusyIntervalInMinutes>60</MergedFreeBusyIntervalInMinutes>

<RequestedView>FreeBusyMerged</RequestedView>

</FreeBusyViewOptions>

</GetUserAvailabilityRequest>
</soap:Body>

</soap:Envelope>

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


GetUserAvailabilityResponse
Article • 03/29/2023 • 2 minutes to read

The GetUserAvailabilityResponse element is the root element that contains the


properties that define user availability information or suggested meeting time
information.

XML

<GetUserAvailabilityResponse>

<FreeBusyResponseArray>...</FreeBusyResponseArray>

<SuggestionsResponse>...</SuggestionsResponse>

</GetUserAvailabilityResponse>

GetUserAvailabilityResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FreeBusyResponseArray Contains the requested users' availability information and the response
status.

SuggestionsResponse
Contains response status information and suggestion data for
requested meeting suggestions.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Example
The following example of a GetUserAvailability response shows a response to a
GetUserAvailability request.

<?xml version="1.0" encoding="utf-8" ?>

<GetUserAvailabilityResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<FreeBusyResponseArray
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<FreeBusyResponse>

<ResponseMessage ResponseClass="Success">

<Path select="/m:GetUserAvailabilityRequest/MailboxDataArray[0]" />

</ResponseMessage>

<FreeBusyView>

<FreeBusyViewType
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">Detailed<
/FreeBusyViewType>

<CalendarEventArray
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<CalendarEvent>

<StartTime>2006-02-28T19:00:00-08:00</StartTime>

<EndTime>2006-02-28T23:30:00-08:00</EndTime>

<BusyType>OOF</BusyType>

<IsPrivate>false</IsPrivate>

<CalendarEventDetails>

<ID>00000</ID>

<Subject>Exercise</Subject>

<Location>the gym</Location>

<IsMeeting>false</IsMeeting>

<IsRecurring>false</IsRecurring>

<IsException>false</IsException>

<IsReminderSet>true</IsReminderSet>

</CalendarEventDetails>

</CalendarEvent>

</CalendarEventArray>

<WorkingHours
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<TimeZone>

<Bias>480</Bias>

<StandardTime>

<Bias>0</Bias>

<Time>02:00:00</Time>

<DayOrder>5</DayOrder>

<Month>10</Month>

<DayOfWeek>Sunday</DayOfWeek>

</StandardTime>

<DaylightTime>

<Bias>-60</Bias>

<Time>02:00:00</Time>

<DayOrder>1</DayOrder>

<Month>4</Month>

<DayOfWeek>Sunday</DayOfWeek>

</DaylightTime>

</TimeZone>

<WorkingPeriodArray>

<WorkingPeriod>

<DayOfWeek>Monday Tuesday Wednesday Thursday


Friday</DayOfWeek>

<StartTimeInMinutes>480</StartTimeInMinutes>

<EndTimeInMinutes>1020</EndTimeInMinutes>

</WorkingPeriod>

</WorkingPeriodArray>

</WorkingHours>

</FreeBusyView>

</FreeBusyResponse>

</FreeBusyResponseArray>

</GetUserAvailabilityResponse>

The ID element contents were shortened to preserve readability.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetUserAvailabilityRequest

Getting User Availability


GetUserConfiguration
Article • 03/29/2023 • 2 minutes to read

The GetUserConfiguration element represent a request to get a user configuration


object.

XML

<GetUserConfiguration>

<UserConfigurationName/>

<UserConfigurationProperties/>

</GetUserConfiguration>

GetUserConfigurationType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

UserConfigurationName
Represents the name of a user configuration object. This element
must be present in a GetUserConfiguration request.

UserConfigurationProperties Specifies the user configuration property types to return. This


element must be present in a GetUserConfiguration request.

Parent elements
None.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
GetUserConfigurationResponse
Article • 03/29/2023 • 2 minutes to read

The GetUserConfigurationResponse element defines a response to a single


GetUserConfiguration request.

XML

<GetUserConfigurationResponse> <ResponseMessages/>
</GetUserConfigurationResponse>

GetUserConfigurationResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

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 2010 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
GetUserConfigurationResponseMessage
Article • 03/29/2023 • 2 minutes to read

The GetUserConfigurationResponseMessage element represents a response that


returns a user configuration object.

XML

<GetUserConfigurationResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<UserConfiguration/>
</GetUserConfigurationResponseMessage>

GetUserConfigurationResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and reserved for future use. This element contains a value
of 0.

MessageXml
Provides additional error response information.

UserConfiguration Contains a single user configuration object.

Parent elements
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
GetUserOofSettingsRequest
Article • 03/29/2023 • 2 minutes to read

The GetUserOofSettingsRequest element is the root element that contains the


arguments used to get a mailbox user's Out of Office (OOF) settings.

XML

<GetUserOofSettingsRequest>

<Mailbox>...</Mailbox>

</GetUserOofSettingsRequest>

GetUserOofSettingsRequest

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Mailbox Identifies the mailbox user for a SetUserOofSettings or GetUserOofSettings


(Availability)
request.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Example
The following is an example of a GetUserOofSettings request that gets a single user's
OOF information.

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<GetUserOofSettingsRequest
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<Mailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Name>David Alexander</Name>

<Address>[email protected]</Address>

<RoutingType>SMTP</RoutingType>

</Mailbox>

</GetUserOofSettingsRequest>

</soap:Body>

</soap:Envelope>

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetUserOofSettings operation
GetUserOofSettingsResponse
Article • 03/29/2023 • 2 minutes to read

The GetUserOofSettingsResponse element contains the response message and the Out
of Office (OOF) settings for a user.

XML

<GetUserOofSettingsResponse>

<ResponseMessage>...</ResponseMessage>

<OofSettings>...</OofSettings>

<AllowExternalOof>...</AllowExternalOof>

</GetUserOofSettingsResponse>

GetUserOofSettingsResponse

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessage
Provides descriptive information about the response status.

OofSettings
Contains the OOF settings.

AllowExternalOof
Contains a value that identifies to whom external OOF messages are sent.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetUserOofSettings operation

SetUserOofSettings operation
GetUserPhoto
Article • 03/29/2023 • 2 minutes to read

The GetUserPhoto element contains the request to get a user's photo.

XML

<GetUserPhoto>

<Email/>

<SizeRequested/>

</GetUserPhoto>

GetUserPhotoType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Email (String) | SizeRequested

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
GetUserPhotoResponse
Article • 03/29/2023 • 2 minutes to read

The GetUserPhotoResponse element contains the response to a GetUserPhoto request.

XML

<GetUserPhotoResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<HasChanged/>

<PictureData/>

</GetUserPhotoResponse>

GetUserPhotoResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml | HasChanged |
PictureData

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
GetUserPhotoResponseMessage
Article • 03/29/2023 • 2 minutes to read

The GetUserPhotoResponseMessage element contains the response to a GetUserPhoto


request.

XML

<GetUserPhotoResponseMessage>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<HasChanged/>

<PictureData/>

</GetUserPhotoResponseMessage>

GetUserPhotoResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml | HasChanged |
PictureData

Parent elements
ResponseMessages

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
GetUserRetentionPolicyTags
Article • 03/29/2023 • 2 minutes to read

The GetUserRetentionPolicyTags element is the request to get the retention tags


associated with the user.

XML

<GetUserRetentionPolicyTags/>

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages
Name Value

Schema name Messages schema

Validation file messages.xsd

Can be empty
GetUserRetentionPolicyTagsResponse
Article • 03/29/2023 • 2 minutes to read

The GetUserRetentionPolicyTagsResponse element contains the response to a


GetRetentionPolicyTags request.

XML

<GetUserRetentionPolicyTagsResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<RetentionPolicyTags/>

</GetUserRetentionPolicyTagsResponse>

GetUserRetentionPolicyTagsResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml | RetentionPolicyTags

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty false


GetUserRetentionPolicyTagsResponseM
essage
Article • 03/29/2023 • 2 minutes to read

The GetUserRetentionPolicyTagsResponseMessage element specifies the response


message for a GetUserRetentionPolicyTags request.

XML

<GetUserRetentionPolicyTagsResponseMessage>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<RetentionPolicyTags/>

</GetUserRetentionPolicyTagsResponseMessage>

GetUserRetentionPolicyTagsResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml | RetentionPolicyTags

Parent elements
ResponseMessages

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty false


GivenName
Article • 03/29/2023 • 2 minutes to read

The GivenName element contains a contact's given name.

XML

<GivenName/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Text value
A text value that represents a contact's given name is required if this element is used.

Remarks
A given name is usually a person's first name.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)

Updating Contacts

Deleting Contacts
GivenNames
Article • 03/29/2023 • 2 minutes to read

The GivenNames element specifies an array of given name values and the identifiers of
their source attributions for the associated persona.

XML

<GivenNames>

<StringAttributedValue/>

</GivenNames>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

StringAttributedValue Specifies an instance in an array of attributes associated with a persona


element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
GlobalCategories
Article • 03/29/2023 • 2 minutes to read

The GlobalCategories element contains the category list for all conversation items in a
mailbox.

FindConversationResponse

Conversations

Conversation (ConversationType)

GlobalCategories

XML

<GlobalCategories>

<String/>

</GlobalCategories>

ArrayOfStringsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

String
Contains a single category.

Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.
Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindConversation operation

ApplyConversationAction operation

Conversations in EWS
GlobalFlagStatus
Article • 03/29/2023 • 2 minutes to read

The GlobalFlagStatus element contains the aggregated flag status for all conversation
items in a mailbox.

FindConversationResponse

Conversations

Conversation (ConversationType)

GlobalFlagStatus

XML

<GlobalFlagStatus> NotFlagged | Flagged | Complete </GlobalFlagStatus>

FlagStatusType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.

Text value
The text value of the GlobalFlagStatus element is the aggregated flag status for
conversation items in the current folder. The following are the possible text values:

NotFlagged - Indicates the not-flagged status.

Flagged - Indicates the flagged status.

Complete - Indicates the complete flag status.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindConversation operation

ApplyConversationAction operation

Conversations in EWS
GlobalHasAttachments
Article • 03/29/2023 • 2 minutes to read

The GlobalHasAttachments element contains a value that indicates whether at least one
conversation item in a mailbox has an attachment.

FindConversationResponse

Conversations

Conversation (ConversationType)

GlobalHasAttachments

XML

<GlobalHasAttachments/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.

Text value
The value of the GlobalHasAttachments element indicates whether at least one
conversation item in a mailbox has an attachment. A text value that represents a
Boolean value is required. A value of true means that the conversation has at least one
visible attachment. A value of false means that the conversation either has no
attachments or has only hidden attachments.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindConversation operation

ApplyConversationAction operation

Conversations in EWS
GlobalHasIrm
Article • 03/29/2023 • 2 minutes to read

The GlobalHasIrm element specifies whether at least one message in the conversation
and across all folders is an IRM protected message.

XML

<GlobalHasIrm> true | false </GlobalHasIrm>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Conversation (ConversationType)

Text value
The text value of the GlobalHasIrm element is true if at least one message in the
conversation and across all folders is an IRM protected message. Otherwise the value is
false.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
Conversation (ConversationType)

EWS XML elements in Exchange


GlobalIconIndex
Article • 03/29/2023 • 2 minutes to read

The GlobalIconIndex element identifies the global icon index for all items in a
conversation.

XML

<IconIndex>Default | PostItem | MailRead | MailUnread | MailReplied |


MailForwarded | MailEncrypted | MailSmimeSigned | MailEncrytedReplied |
MailSmimeSignedReplied | MailEncryptedForwarded | MailSmimeSignedForwarded |
MailEncryptedRead | MailSmimeSignedRead | MailIrm | MaillrmForwarded |
MaillrmReplied | SmsSubmitted | SmsRoutedToDeliveryPoint |
SmsRoutedToExternalMessagingSystem | SmsDelivered |
OutlookDefaultForContacts | AppointmentItem | AppointmentRecur |
AppointmentMeet | AppointmentMeetRecur | AppointmentMeetNY |
AppointmentMeetYes | AppointmentMeetNo | AppointmentMeetMaybe |
AppointmentMeetCancel | AppointmentMeetInfo | TaskItem | TaskRecur |
TaskOwned | TaskDelegated</IconIndex>

IconIndexType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Conversation (ConversationType) | Item | Contact | DistributionList | Message |
CalendarItem | PostItem | Task

Text value
The following table contains the possible text values for the GlobalIconIndex element.
Value Description

Default Specifies the default icon.

PostItem Specifies the icon for a post item.

MailRead Specifies the mail read icon.

MailUnread Specifies the unread mail icon.

MailReplied Specifies the replied to mail icon.

MailForwarded Specifies the forwarded mail icon.

MailEncrypted Specifies the encrypted mail icon.

MailSmimeSigned Specifies the Secure/Multipurpose Internet Mail


Extensions (S/MIME) signed mail icon.

MailEncryptedReplied Specifies the encrypted replied to mail icon.

MailSmimeSignedReplied Specifies the S/MIME signed replied to mail icon.

MailEncryptedForwarded Specifies the encrypted forwarded mail icon.

MailSmimeSignedForwarded Specifies the S/MIME signed forwarded mail icon.

MailEncryptedRead Specifies the encrypted read mail icon.

MailSmimeSignedRead Specifies the S/MIME signed read mail icon.

MailIrm Specifies the Information Rights Management (IRM)-


protected mail icon.

MailIrmForwarded Specifies the IRM-protected forwarded mail icon.

MailIrmReplied Specifies the IRM-protected replied to mail icon.

SmsSubmitted Specifies the icon for mail submitted for Short Message
Service (SMS) routing.

SmsRoutedToDeliveryPoint Specifies the icon for SMS routing to an external


delivery point.

SmsRoutedToExternalMessagingSystem Specifies the icon for SMS routing to an external


messaging system.

SmsDelivered Specifies the SMS delivered mail icon.

OutlookDefaultForContacts Specifies the default icon for contacts.

AppointmentItem Specifies the appointment item icon.


Value Description

AppointmentRecur Specifies the recurring appointment icon.

AppointmentMeet Specifies the meeting icon.

AppointmentMeetRecur Specifies the recurring meeting icon.

AppointmentMeetNY Specifies the icon for a tentative response to the


meeting.

AppointmentMeetYes Specifies the meeting acceptance icon.

AppointmentMeetNo Specifies the meeting declined icon.

AppointmentMeetMaybe Specifies the icon for a maybe response to the meeting.

AppointmentMeetCancel Specifies the meeting cancel icon.

AppointmentMeetInfo Specifies the meeting information icon.

TaskItem Specifies the task item icon.

TaskRecur Specifies the recurring task icon.

TaskOwned Specifies the task owned icon.

TaskDelegated Specifies the task delegated icon.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


GlobalImportance
Article • 03/29/2023 • 2 minutes to read

The GlobalImportance element contains the aggregated importance for all conversation
items in a mailbox.

FindConversationResponse

Conversations

Conversation (ConversationType)

GlobalImportance

XML

<GlobalImportance> Low | Normal | High </GlobalImportance>

ImportanceChoicesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.

Text value
A text value is required. The following are the possible values for this element:

Low

Normal

High

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindConversation operation

ApplyConversationAction operation

Conversations in EWS
GlobalItemClasses
Article • 03/29/2023 • 2 minutes to read

The GlobalItemClasses element contains a list of item classes that represents all the
item classes of the conversation items in a mailbox.

FindConversationResponse

Conversations

Conversation (ConversationType)

GlobalItemClasses

XML

<GlobalItemClasses>

<String/>

</GlobalItemClasses>

ArrayOfItemClassType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ItemClass
Represents the message class of an item.

Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.
Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindConversation operation

ApplyConversationAction operation

Conversations in EWS
GlobalItemIds
Article • 03/29/2023 • 2 minutes to read

The GlobalItemIds element contains the collection of item identifiers for all conversation
items in a mailbox.

FindConversationResponse

Conversations

Conversation (ConversationType)

GlobalItemIds

XML

<ItemIds>

<ItemId/>

<OccurrenceItemId/>

<RecurringMasterItemId/>

</ItemIds>

NonEmptyArrayOfBaseItemIdsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ItemId
Contains the unique identifier and change key of an item in the
Exchange store.

OccurrenceItemId
Identifies a single occurrence of a recurring item.

RecurringMasterItemId Identifies a recurrence master item by identifying one of its related


occurrence items' identifiers.
Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindConversation operation

ApplyConversationAction operation

Conversations in EWS
GlobalLastDeliveryTime
Article • 03/29/2023 • 2 minutes to read

The GlobalLastDeliveryTime element contains the delivery time of the message that was
last received in this conversation across all folders in the mailbox.

FindConversationResponse

Conversations

Conversation (ConversationType)

GlobalLastDeliveryTime

XML

<GlobalLastDeliveryTime/>

xs:dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.

Text value
The text value of the GlobalLastDeliveryTime element is the date and time of the
message that was last received in this conversation across all folders in the mailbox.

Remarks
This element was introduced in Exchange Server 2010 Service Pack 1 (SP1).The schema
that describes this element is located in the IIS virtual directory that hosts Exchange Web
Services.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindConversation operation

ApplyConversationAction operation

Conversations in EWS
GlobalMessageCount
Article • 03/29/2023 • 2 minutes to read

The GlobalMessageCount element contains the total number of conversation items in


the mailbox.

FindConversationResponse

Conversations

Conversation (ConversationType)

GlobalMessageCount

XML

<GlobalMessageCount/>

xs:int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.

Text value
The text value of the GlobalMessageCount element is the total number of conversation
items in a mailbox.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindConversation operation

ApplyConversationAction operation

Conversations in EWS
GlobalObjectId
Article • 03/29/2023 • 2 minutes to read

The GlobalObjectId element is not used.

GetUserAvailabilityRequest

SuggestionsViewOptions

GlobalObjectId

XML

<GlobalObjectId>...</GlobalObjectId>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

SuggestionsViewOptions
Contains the options for obtaining meeting suggestion information.
The following is the XPath to this element:
/GetUserAvailabilityRequest/SuggestionViewOptions

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
Getting User Availability
GlobalObjectId (GetClientIntentType)
Article • 03/29/2023 • 2 minutes to read

The GlobalObjectId element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
GlobalParentFolderIds
Article • 03/29/2023 • 2 minutes to read

The GlobalParentFolderIds element specifies the identifiers of the global parent folders.

XML

<GlobalParentFolderIds>

<FolderId/>

<DistinguishedFolderId/>

</GlobalParentFolderIds>

NonEmptyArrayOfBaseFolderIdsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier and change key of a folder.

DistinguishedFolderId
Identifies folders that can be referenced by name.

Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
GlobalSize
Article • 03/29/2023 • 2 minutes to read

The GlobalSize element contains the size of the conversation calculated from the size of
all conversation items in the mailbox.

FindConversationResponse

Conversations

Conversation (ConversationType)

GlobalSize

XML

<GlobalSize/>

xs:int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.

Text value
The text value of the GlobalSize element is the size of the conversation calculated from
the size of all conversation items in the mailbox.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindConversation operation

ApplyConversationAction operation

Conversations in EWS
GlobalUniqueRecipients
Article • 03/29/2023 • 2 minutes to read

The GlobalUniqueRecipients element contains the recipient list of a conversation


aggregated across a mailbox.

FindConversationResponse

Conversations

Conversation (ConversationType)

GlobalUniqueRecipients

XML

<GlobalUniqueRecipients>

<String/>

</GlobalUniqueRecipients>

ArrayOfStringsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

String
Contains a single conversation recipient.

Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.
Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file types.xsd

Can be empty False

See also
FindConversation operation

ApplyConversationAction operation

Conversations in EWS
GlobalUniqueSenders
Article • 03/29/2023 • 2 minutes to read

The GlobalUniqueSender element contains a list of all the senders of conversation items
in the mailbox.

FindConversationResponse

Conversations

Conversation (ConversationType)

GlobalUniqueSenders

XML

<GlobalUniqueSender>

<String/>

</GlobalUniqueSender>

ArrayOfStringsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

String
Contains a single conversation sender.

Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.
Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindConversation operation

ApplyConversationAction operation

Conversations in EWS
GlobalUniqueUnreadSenders
Article • 03/29/2023 • 2 minutes to read

The GlobalUniqueUnreadSenders element specifies a list of all the people who have
sent messages that are currently unread in this conversation across all folders in the
mailbox.

FindConversationResponse

Conversations

Conversation (ConversationType)

GlobalUniqueUnreadSenders

XML

<GlobalUniqueUnreadSenders>

<String/>

</GlobalUniqueUnreadSenders>

ArrayOfStringsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

String
Contains a single conversation sender.

Parent elements

Element Description
Element Description

Conversation (ConversationType)
Represents a single conversation.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindConversation operation

ApplyConversationAction operation

Conversations in EWS
GlobalUnreadCount
Article • 03/29/2023 • 2 minutes to read

The GlobalUnreadCount element contains a count of all the unread conversation items
in the mailbox.

FindConversationResponse

Conversations

Conversation (ConversationType)

GlobalUnreadCount

XML

<GlobalUnreadCount/>

xs:int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.

Text value
The text value of the GlobalUnreadCount element is an integer value that represents a
count of all the unread conversation items in the mailbox.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindConversation operation

ApplyConversationAction operation

Conversations in EWS
GoodThreshold
Article • 03/29/2023 • 2 minutes to read

The GoodThreshold element specifies the percentage of attendees that must have the
time period open in order for the time period to qualify as a Good suggested meeting
time.

GetUserAvailabilityRequest

SuggestionsViewOptions

GoodThreshold

XML

<GoodThreshold>...</GoodThreshold>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

SuggestionsViewOptions
Contains the options for obtaining meeting suggestion information.
The following is the XPath to this element:
/GetUserAvailabilityRequest/SuggestionViewOptions

Text value
A text value is required. The expected integer values are between 0 and 50.

Remarks
This element is required if the SuggestionsViewOptions element is used. The
GoodThreshold element also determines what meetings are considered Fair. It the
percentage of attendees with conflicts is less than the Good Threshold and higher than
50 percent, the suggested meeting time qualifies as Fair. The Good Threshold plus 50
equals the percentage that defines the Good/Fair threshold.

7 Note

The schema that describes this element is located in the EWS virtual directory of
the computer that is running MicrosoftExchange Server 2007 that has the Client
Access server role installed.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

Getting User Availability


Group
(ArrayOfFederatedDirectoryGroupsType)
Article • 03/29/2023 • 2 minutes to read

The Group (ArrayOfFederatedDirectoryGroupsType) element is intended for internal


use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Group (MailboxAssociationType)
Article • 03/29/2023 • 2 minutes to read

The Group (MailboxAssociationType) element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
GroupAttendeeConflictData
Article • 03/29/2023 • 2 minutes to read

The GroupAttendeeConflictData element contains aggregate conflict information about the number of users who are available, the
number of users who have conflicts, and the number of users who do not have availability information in a distribution list for a suggested
meeting time.

GetUserAvailabilityResponse
SuggestionsResponse
SuggestionDayResultArray
SuggestionDayResult
SuggestionArray
Suggestion
AttendeeConflictDataArray
GroupAttendeeConflictData

XML

<GroupAttendeeConflictData>

<NumberOfMembers>...</NumberOfMembers>

<NumberOfMembersAvailable>...</NumberOfMembersAvailable>

<NumberOfMembersWithConflict>...</NumberOfMembersWithConflict>

<NumberOfMembersWithNoData>...</NumberOfMembersWithNoData>

</GroupAttendeeConflictData>

GroupAttendeeConflictData

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

NumberOfMembers
Represents the number of users, resources, and rooms in a distribution list.

NumberOfMembersAvailable
Represents the number of distribution list members who are available for a suggested meeting time. This element
represents members for whom the status is Free.

NumberOfMembersWithConflict Represents the number of distribution list members who have a conflict with a suggested meeting time. This element
represents members who have a Busy, OOF, or Tentative status.

NumberOfMembersWithNoData Represents the number of group members who do not have published free/busy data to compare to a suggested
meeting time. This element represents members of a distribution list that is too large or members who have No Data
status.

Parent elements

Element Description

AttendeeConflictDataArray Contains an array of conflict data for queried attendees identified in the GetUserAvailability operation.
The following is the XPath expression to this element:
/GetUserAvailabilityResponse/SuggestionsResponse/SuggestionDayResultArray/SuggestionDayResult[i]/SuggestionArray/Suggestion[i]/At

Remarks
The GroupAttendeeConflictData element is present in the response when an attendee in the GetUserAvailabilityRequest is resolved to a
distribution list. The GroupAttendeeConflictData element identifies three states for members of a distribution list: available, conflicted, or
no data. Distribution list expansion will support up to 100 members. Therefore, the NumberOfMembers element can contain a maximum of
100 members. Distribution list expansion is recursive. If a distribution list contains a child distribution list that expands the total parent
membership to over 100 members, the child distribution list will not be expanded and will count as a single entry of the
NumberOfMembersWithNoData element count. If a child distribution list can be expanded and the total parent membership does not
expand to over 100 members, its membership is expanded and the member counts are added to the child elements of the
GroupAttendeeConflictData element.

The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server
2007 that has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
GetUserAvailabilityResponse
Getting User Availability
GroupBy
Article • 03/29/2023 • 2 minutes to read

The GroupBy element specifies an arbitrary grouping for FindItem queries.

FindItem
GroupBy

XML

<GroupBy Order="">

<FieldURI/>

<AggregateOn/>

</GroupBy>

XML

<GroupBy Order="">

<ExtendededFieldURI/>

<AggregateOn/>

</GroupBy>

XML

<GroupBy Order="">

<IndexedFieldURI/>

<AggregateOn/>

</GroupBy>

GroupByType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Order
Determines the order of the groups in the grouped item array that is returned in the
response. This attribute is of type SortDirectionType.
Order attribute values

Value Description

Ascending The groups are ordered in ascending order.

Descending The groups are ordered in descending order.

Child elements

Element Description

FieldURI
Identifies frequently referenced properties by URI.

IndexedFieldURI
Identifies individual members of a dictionary.

ExtendedFieldURI Identifies extended MAPI properties to get, set, or create.

AggregateOn
Represents the field that is used to determine the order of groups in a
response.

Parent elements

Element Description

FindItem
Defines a request to find items in a mailbox.

The following is the XPath expression to this element: /FindItem

Remarks
The FindItem response will contain a collection of groups. Each group will contain all
items that had matching values for the GroupBy property. The property that determines
the grouping is identified in the FieldURI, IndexedFieldURI, or ExtendedFieldURI element.

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.

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindItem operation
EWS XML elements in Exchange
Finding Items
GroupedItems
Article • 03/29/2023 • 2 minutes to read

The GroupedItems element represents a collection of items that are the result of a
grouped FindItem operation call.

FindItemResponse

ResponseMessages

FindItemResponseMessage

RootFolder (FindItemResponseMessage)

Groups

GroupedItems

XML

<GroupedItems>

<GroupIndex/>

<Items/>

</GroupedItems>

GroupedItemsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

GroupIndex Represents the property value that is used to group items in a grouped FindItem
operation call.

Items
Contains an array of grouped items.
Parent elements

Element Description

Groups
Contains a collection of groups that are found with the search and aggregation criteria
that is identified in the FindItem operation request.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindItem operation

Finding Items
GroupId
Article • 03/29/2023 • 2 minutes to read

The GroupId element uniquely identifies a group.

XML

<GroupId Id="" ChangeKey=""/>

ItemIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id The text value of the Id attribute is the identifier of the group.

ChangeKey The text value of the ChangeKey attribute is the change key of the group.

Child elements
None.

Parent elements
AddNewImContactToGroup | AddNewTelUriContactToGroup | AddImContactToGroup |
RemoveContactFromImList | RemoveImContactFromGroup | RemoveImGroup |
RemoveDistributionGroupFromImList | SetImGroup

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
GroupIdentifier
Article • 03/29/2023 • 2 minutes to read

The GroupIdentifier element represents a single security identifier and attribute for an
Active Directory directory service object group of which the account is a member.

XML

<GroupIdentifier>

<SecurityIdentifier/>

</GroupIdentifier>

SidAndAttributesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Attributes Contains group attributes.

Child elements

Element Description

SecurityIdentifier Represents the security descriptor definition language (SDDL) form of a


security identifier (SID) that represents the group.

Parent elements

Element Description

GroupSids Represents a collection of Active Directory group object security identifiers that make
up an account token for token serialization. Token serialization is not supported.

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.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
GroupIds
Article • 03/29/2023 • 2 minutes to read

The GroupIds element identifies an array of instant messaging group identifiers.

XML

<GroupIds>

<ItemId/>

<OccurrenceItemId/>

<RecurringMasterItemId/>

<RecurringMasterItemIdRanges/>

</GroupIds>

NonEmptyArrayOfBaseItemIdsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ItemId | OccurrenceItemId | RecurringMasterItemId | RecurringMasterItemIdRanges

Parent elements
GetImItems

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
GroupIndex
Article • 03/29/2023 • 2 minutes to read

The GroupIndex element represents the property value that is used to group items for the
current group of items in a FindItem operation call.

FindItemResponse

ResponseMessages

FindItemResponseMessage

RootFolder (FindItemResponseMessage)

Groups

GroupedItems

GroupIndex

XML

<GroupIndex/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

GroupedItems Represents a collection of items that are the result of a grouped FindItem operation call.
The following is the XPath expression to this element:
/FindItemResponse/ResponseMessages/FindItemResponseMessage/RootFolder/Groups/GroupedItems[i]
Text value
A text value is required. This property is read-only.

Remarks
This element only occurs in a FindItem operation response.

The schema that describes this element is located in the EWS virtual directory of the computer
that is running Microsoft Exchange Server 2010 that has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindItem operation

Finding Items
GroupingAction
Article • 03/29/2023 • 2 minutes to read

The GroupingAction element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
GroupingAction (ItemType)
Article • 03/29/2023 • 2 minutes to read

The GroupingAction (ItemType) element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Groups
Article • 03/29/2023 • 2 minutes to read

The Groups element contains a collection of groups that are found with the search and
aggregation criteria that is identified in the FindItem operation request.

XML

<Groups>

<GroupedItems/>

</Groups>

ArrayOfGroupedItemsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

GroupedItems Represents a collection of items that are the result of a grouped FindItem
operation call.

Parent elements

Element Description

RootFolder Contains the results from a search of a single root folder during a
(FindItemResponseMessage) FindItem operation operation.

Remarks
One GroupedItems instance will occur for each distinct group within the result.
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindItem operation

Finding Items
Groups
(ArrayOfFederatedDirectoryGroupsType)
Article • 03/29/2023 • 2 minutes to read

The Groups (ArrayOfFederatedDirectoryGroupsType) element is intended for internal


use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Groups (ArrayOfImGroupType)
Article • 03/29/2023 • 2 minutes to read

The Groups element represents an array of instant messaging (IM) groups.

XML

<Groups>

<ImGroup/>

</Groups>

ArrayOfImGroupType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ImGroup

Parent elements
ImItemList

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
GroupSids
Article • 03/29/2023 • 2 minutes to read

The GroupSids element represents a collection of Active Directory directory service


group object security identifiers.

XML

<GroupSids>

<GroupIdentifier/>

</GroupSids>

NonEmptyArrayOfGroupIdentifiersType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

GroupIdentifier Represents a single security identifier and attribute for an Active Directory
object group of which the account is a member.

Parent elements

Element Description

SerializedSecurityContext Used in the Simple Object Access Protocol (SOAP) header for token
serialization in server-to-server authentication. Token serialization is
not supported.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
GroupType
Article • 03/29/2023 • 2 minutes to read

The GroupType element specifies the group class of an instant messaging (IM) group.

XML

<GroupType></GroupType>

NonEmptyStringType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ImGroup
Represents an instant messaging group.

Text value
The text value of the GroupType element is a string value that specifies type of the
group.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty False

See also
EWS XML elements in Exchange
GroupType
(FederatedDirectoryGroupType)
Article • 03/29/2023 • 2 minutes to read

The GroupType (FederatedDirectoryGroupType) element is intended for internal use


only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
GroupType (MasterMailboxType)
Article • 03/29/2023 • 2 minutes to read

The GroupType (MasterMailboxType) element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Guid
Article • 03/29/2023 • 2 minutes to read

The Guid element specifies the globally unique identifier of the mailbox.

XML

<Guid></Guid>

GuidType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

SearchableMailbox
Specifies a mailbox returned from a GetSearchableMailboxes request.

Text value
The text value of the Guid element is a GUID value that uniquely identifies a mailbox.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
HasAttachment
Article • 03/29/2023 • 2 minutes to read

The HasAttachment element specifies a Boolean value to indicate whether the item has
attachments.

XML

<HasAttachment> true | false </HasAttachment

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

SearchPreviewItem Specifies the first 256 characters of a mailbox item for preview without
opening the item.

Text value
A text value of true for the HasAttachment element indicates that the item has an
attachment. A value of false indicates that the item does not have an attachment.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
HasAttachments
Article • 03/29/2023 • 2 minutes to read

The HasAttachments element represents a property that is set to true if an item has at
least one visible attachment or if a conversation contains at least one item that has an
attachment. This property is read-only.

XML

<HasAttachments/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Conditions
Represents the conditions that, when fulfilled, will trigger the rule
actions for that rule.

Contact
Represents an Exchange contact item.

Conversation Represents a single conversation.


(ConversationType)

DistributionList
Represents a distribution list.
Element Description

Exceptions
Represents all the available rule exception conditions for the Inbox
rule.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Message
Represents an Exchange e-mail message.

Task
Represents a task in the Exchange store.

Text value
A text value that represents a Boolean value is required. A value of true means that the
item or conversation has at least one visible attachment. A value of false means that the
item or conversation either has no attachments or has only hidden attachments.

Remarks
The HasAttachments property is calculated from the Boolean AllAttachmentsHidden
MAPI property. If an item does not have an attachment, the AllAttachmentsHidden
property does not exist. If all the attachments on the item are hidden, the
AllAttachmentsHidden property is true. The AllAttachmentsHidden property is false if
it has at least one attachment and at least one of the attachments is visible. Use the
AllAttachmentsHidden MAPI property for searching, grouping, and sorting items.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema


Element Example

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

EWS reference for Exchange


HasBeenProcessed
Article • 03/29/2023 • 2 minutes to read

The HasBeenProcessed element indicates whether a meeting message item has been
processed.

XML

<HasBeenProcessed/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Text value
A text value of true indicates that the meeting message has been processed.
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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
HasBlockedImages
Article • 03/29/2023 • 2 minutes to read

The HasBlockedImages element specifies a Boolean value that indicates whether the
item has blocked images.

XML

<HasBlockedImages> true | false </HasBlockedImages>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Item
Represents a generic item in the Exchange store.

Text value
A text value of true for the HasBlockedImages element indicates that the item has
blocked images. A value of false indicates that the item does not have any blocked
images.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
HasChanged
Article • 03/29/2023 • 2 minutes to read

The HasChanged element indicates whether a user's photo has changed.

XML

<HasChanged> true | false </HasChanged>

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
GetUserPhotoResponse

Text value
A text value of true for the HasChanged element indicates that the photo has changed
since the last time it was returned. A value of false indicates that the photo has not
changed since the last time it was returned.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
HasEndTimeChanged
Article • 03/29/2023 • 2 minutes to read

The HasEndTimeChanged element specifies whether the end time for a meeting has
changed.

XML

<HasEndTimeChanged>true | false</HasEndTimeChanged>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ChangeHighlights Specifies what has changed between two versions of a meeting request
message.

Text value
A text value of true for the HasEndTimeChanged element indicates that the end time of
a meeting has changed. A value of false indicates that the end time of a meeting has
not changed.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
HasIrm
Article • 03/29/2023 • 2 minutes to read

The HasIrm element specifies whether at least one message in the conversation and the
current folder is an IRM protected message.

XML

<HasIrm> true | false </HasIrm>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Conversation (ConversationType)

Text value
The text value of the HasIrm element is true if at least one message in the conversation
and the current folder has IRM. Otherwise, the value is false.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
Conversation (ConversationType)

EWS XML elements in Exchange


HasLocationChanged
Article • 03/29/2023 • 2 minutes to read

The HasLocationChanged element specifies whether the location property of a meeting


has changed.

XML

<HasLocationChanged> true | false </HasLocationChanged>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ChangeHighlights Specifies what has changed between two versions of a meeting request
message.

Text value
A text value of true for the HasLocationChanged element indicates that the location
property of a meeting has changed. A value false indicates that the location property of
a meeting has not changed.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Code Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
HasPicture
Article • 03/29/2023 • 2 minutes to read

The HasPicture element indicates whether the contact item has a file attachment that
represents the contact's picture.

Contact

HasPicture

XML

<HasPicture>true or false</HasPicture>

boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents a contact item in the Exchange store.

Text value
The text value of the HasPicture element can be either true or false. The default value is
false.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
HasQuota
Article • 03/29/2023 • 2 minutes to read

The HasQuota element indicates whether the managed folder has a quota.

XML

<HasQuota/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ManagedFolderInformation
Contains information about a managed folder.

Text value
The text value represents a Boolean value. A value of true indicates that the folder has a
quota; a value of false indicates that the folder does not have a quota.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
HasStartTimeChanged
Article • 03/29/2023 • 2 minutes to read

The HasStartTimeChanged element specifies whether the start time for a meeting has
changed.

XML

<HasStartTimeChanged> true | false </HasStartTimeChanged>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ChangeHighlights Specifies what has changed between two versions of a meeting request
message.

Text value
A text value of true for the HasStartTimeChanged element indicates that the start time
for a meeting has changed. A value of false indicates that the start time has not
changed.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
HiddenRecipient
Article • 03/29/2023 • 2 minutes to read

The HiddenRecipient element indicates that the recipient was added by an organization
policy that should be hidden from unprivileged users.

XML

<HiddenRecipient>true | false</HiddenRecipient>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

RecipientTrackingEvent
Contains information for a single event for a recipient.

Text value
This element can be either true or false. A value of true indicates that the user was
added by an organization policy; a value of false indicates that the user was not added
by an organization policy.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
HighlightTerms
Article • 03/29/2023 • 2 minutes to read

The HighlightTerms element identifies the highlighted terms returned in a FindItem


operation and a FindConversation operation response.

XML

<HighlightTerms>

<Term/>

</HighlightTerms>

ArrayOfHighlightTermsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Term

Parent elements
FindConversationResponse | FindItemResponseMessage

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
Hobbies
Article • 03/29/2023 • 2 minutes to read

The Hobbies element specifies an array of hobbies and the identifiers of their source
attributions for the associated persona.

XML

<Hobbies>

<StringAttributedValue/>

</Hobbies>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

StringAttributedValue Specifies an instance in an array of attributes associated with a persona


element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
HoldId
Article • 03/29/2023 • 2 minutes to read

The HoldId element contains the mailbox hold identifier.

XML

<HoldId></HoldId>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
GetHoldOnMailboxes | SetHoldOnMailboxes | MailboxHoldResult

Text value
The text value of the HoldId element is the unique identifier of a mailbox hold.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
HomeAddresses
Article • 03/29/2023 • 2 minutes to read

The HomeAddresses element specifies an array of home addresses and the identifiers of
their source attributions for the associated persona.

XML

<HomeAddresses>

<PostalAddressAttributedValue/>

</HomeAddresses>

ArrayOfPostalAddressAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

PostalAddressAttributedValue Specifies an instance of an array of postal addresses and their


associated attributions.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
HomeCity
Article • 03/29/2023 • 2 minutes to read

The HomeCity element specifies the city of the home address of the associated persona.

XML

<HomeCity></HomeCity>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Text value
The text value of the HomeCity element is a string value that specifies the city.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
HomeCitySortKey
Article • 03/29/2023 • 2 minutes to read

The HomeCitySortKey element represents the sort key for the home city.

XML

<HomeCitySortKey></HomeCitySortKey>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Persona

Text value
The text value of the HomeCitySortKey element is the sort key for the home city name
of the persona.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
HomeFaxes
Article • 03/29/2023 • 2 minutes to read

The HomeFaxes element specifies an array of home fax numbers and the identifiers of
their source attributions for the associated persona.

XML

<HomeFaxes>

<PhoneNumberAttributedValue/>

</HomeFaxes>

ArrayOfPhoneNumberAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

PhoneNumberAttributedValue
Contains a single attributed phone number for a persona.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
HomePage
Article • 03/29/2023 • 2 minutes to read

The HomePage element specifies the URL that will be the default home page for the
managed folder.

XML

<HomePage/>

String

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ManagedFolderInformation
Contains information about a managed folder.

Text value
The text value is a string value that represents a URL.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
CreateManagedFolder operation

EWS XML elements in Exchange

Adding Managed Folders


HomePhones
Article • 03/29/2023 • 2 minutes to read

The HomePhones element specifies an array of home phone numbers and the
identifiers of their source attributions for the associated persona.

XML

<HomePhones>

<PhoneNumberAttributedValue/>

</HomePhones>

ArrayOfPhoneNumberAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

PhoneNumberAttributedValue
Contains a single attributed phone number for a persona.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
HomePhones2
Article • 03/29/2023 • 2 minutes to read

The HomePhones2 element specifies an array of HomePhone2 values and the


identifiers of their source attributions for the associated persona.

XML

<HomePhones2>

<PhoneNumberAttributedValue/>

</HomePhones2>

ArrayOfPhoneNumberAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

PhoneNumberAttributedValue
Contains a single attributed phone number for a persona.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
IconIndex
Article • 03/29/2023 • 2 minutes to read

The IconIndex element identifies the icon index for an item or conversation.

XML

<IconIndex>Default | PostItem | MailRead | MailUnread | MailReplied |


MailForwarded | MailEncrypted | MailSmimeSigned | MailEncrytedReplied |
MailSmimeSignedReplied | MailEncryptedForwarded | MailSmimeSignedForwarded |
MailEncryptedRead | MailSmimeSignedRead | MailIrm | MailIrmForwarded |
MailIrmReplied | SmsSubmitted | SmsRoutedToDeliveryPoint |
SmsRoutedToExternalMessagingSystem | SmsDelivered |
OutlookDefaultForContacts | AppointmentItem | AppointmentRecur |
AppointmentMeet | AppointmentMeetRecur | AppointmentMeetNY |
AppointmentMeetYes | AppointmentMeetNo | AppointmentMeetMaybe |
AppointmentMeetCancel | AppointmentMeetInfo | TaskItem | TaskRecur |
TaskOwned | TaskDelegated</IconIndex>

IconIndexType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Conversation (ConversationType) | Item | Contact | DistributionList | Message |
CalendarItem | PostItem | Task

Text value
The following table contains the possible text values for the IconIndex element.
Value Description

Default Specifies the default icon.

PostItem Specifies the icon for a post item.

MailRead Specifies the mail read icon.

MailUnread Specifies the unread mail icon.

MailReplied Specifies the replied to mail icon.

MailForwarded Specifies the forwarded mail icon.

MailEncrypted Specifies the encrypted mail icon.

MailSmimeSigned Specifies the Secure/Multipurpose Internet Mail


Extensions (S/MIME) signed mail icon.

MailEncryptedReplied Specifies the encrypted replied to mail icon.

MailSmimeSignedReplied Specifies the S/MIME signed replied to mail icon.

MailEncryptedForwarded Specifies the encrypted forwarded mail icon.

MailSmimeSignedForwarded Specifies the S/MIME signed forwarded mail icon.

MailEncryptedRead Specifies the encrypted read mail icon.

MailSmimeSignedRead Specifies the S/MIME signed read mail icon.

MailIrm Specifies the Information Rights Management (IRM)-


protected mail icon.

MailIrmForwarded Specifies the IRM-protected forwarded mail icon.

MailIrmReplied Specifies the IRM-protected replied to mail icon.

SmsSubmitted Specifies the icon mail submitted for Short Message


Service (SMS) routing.

SmsRoutedToDeliveryPoint Specifies the icon for SMS routing to an external


delivery point.

SmsRoutedToExternalMessagingSystem Specifies the icon for SMS routing to an external


messaging system.

SmsDelivered Specifies the SMS delivered mail icon.

OutlookDefaultForContacts Specifies the default icon for contacts.

AppointmentItem Specifies the appointment item icon.


Value Description

AppointmentRecur Specifies the recurring appointment icon.

AppointmentMeet Specifies the meeting icon.

AppointmentMeetRecur Specifies the recurring meeting icon.

AppointmentMeetNY Specifies the icon for a tentative response to the


meeting.

AppointmentMeetYes Specifies the meeting acceptance icon.

AppointmentMeetNo Specifies the meeting declined icon.

AppointmentMeetMaybe Specifies the icon for a maybe response to the meeting.

AppointmentMeetCancel Specifies the meeting cancel icon.

AppointmentMeetInfo Specifies the meeting information icon.

TaskItem Specifies the task item icon.

TaskRecur Specifies the recurring task icon.

TaskOwned Specifies the task owned icon.

TaskDelegated Specifies the task delegated icon.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


ID
Article • 03/29/2023 • 2 minutes to read

The ID element represents the entry ID of the calendar item.

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

FreeBusyView

CalendarEventArray

CalendarEvent

CalendarEventDetails

ID

XML

<ID>...</ID>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarEventDetails Provides additional information for a calendar event.


The following is the XPath expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/CalendarEventArray/CalendarEvent[i]/CalendarEventDeta

Text value
A text value is required if this element is returned in the response. This element is required if the CalendarEventDetails element is used.

Remarks
The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server
2007 that has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema


Element Example

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


ID (String)
Article • 03/29/2023 • 2 minutes to read

The ID element specifies the identifier of an app.

XML

<ID></ID>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
DisableApp | UninstallApp

Text value
The text value of the ID element is the identifier of app.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


Id (EmailAddressType)
Article • 03/29/2023 • 2 minutes to read

The Id element identifies a meeting room within the Exchange server organization.

Room

Id (EmailAddressType)

XML

<Id>

<Name/>

<EmailAddress/>

<RoutingType/>

<MailboxType/>

<ItemId/>

</Id>

EmailAddressType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Name Defines the name of the meeting room. This element is optional.
(EmailAddressType)

EmailAddress Defines the Simple Mail Transfer Protocol (SMTP) address of a meeting
(NonEmptyStringType) room. This element is optional.

RoutingType Defines the routing that is used for the mailbox. The default is SMTP.
(EmailAddress)
This element is optional.

MailboxType
Defines the mailbox type of a mailbox user. This element is optional.
Element Description

ItemId
Defines the item identifier of a contact or private distribution list for
recipients from a user's contacts folder. This element is optional.

Parent elements

Element Description

Room
Defines a meeting room in the Exchange server organization.

Remarks
The schema that describes this element is located in the EWS directory of the computer
that is running Microsoft Exchange Server that has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetRooms operation

EWS XML elements in Exchange


ID (ItemIdType)
Article • 03/29/2023 • 2 minutes to read

The Id element specifies the identifier of an item.

XML

<Id Id="" ChangeKey=""/>

ItemIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id The text value of the Id attribute is the identifier of the item.

ChangeKey The text value of the ChangeKey attribute is the change key of the item.

Child elements
None.

Parent elements
SearchPreviewItem

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Id (TimeZone)
Article • 03/29/2023 • 2 minutes to read

The Id element identifies a single time zone definition.

XML

<Id>...</Id>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Ids
Contains an array of time zone definition identifiers.

Text value
A text value is required. The text value represents the unique identifier for time zone
definition.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server that has the Client Access server
role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Identity
Article • 03/29/2023 • 2 minutes to read

The Identity element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
IdentityDetails
Article • 03/29/2023 • 2 minutes to read

The IdentityDetails element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
IdOfFolderToShare
Article • 03/29/2023 • 2 minutes to read

The IdOfFolderToShare element represents the identifier of the folder on the server that
will be shared.

<IdOfFolderToShare Id="" ChangeKey="" />

FolderIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id Contains a string that identifies a folder in the Exchange store. This attribute is
required.

ChangeKey Contains a string that identifies a version of a folder that is identified by the Id
attribute. This attribute is optional. Use this attribute to make sure that the correct
version of a folder is used.

Child elements
None.

Parent elements

Element Description

GetSharingMetadata Defines a request to get an opaque authentication token that identifies the
sharing invitation.

Remarks
The schema that describes this element is located in the IIS Virtual directory that hosts
Exchange Web Services of the computer that is running Microsoft Exchange Server that
has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetSharingMetadata operation

EWS XML elements in Exchange


Ids
Article • 03/29/2023 • 2 minutes to read

The Ids element contains an array of time zone definition identifiers.

XML

<Ids>

<Id/>

</Ids>

NonEmptyArrayOfTimeZoneIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Id (TimeZone)
The element that identifies a single time zone definition.

Parent elements

Element Description

GetServerTimeZones Defines a request to retrieve time zone definitions from the Exchange
server.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages
Name Value

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Ignore
Article • 03/29/2023 • 2 minutes to read

The Ignore element identifies items to skip during synchronization.

SyncFolderItems

Ignore

XML

<Ignore>

<ItemId/>

</Ignore>

ArrayOfBaseItemIdsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ItemId
Contains the unique identifier and change key of an item in the Exchange store.

Parent elements

Element Description

SyncFolderItems
Defines a request to synchronize items in an Exchange store folder.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
SyncFolderItems operation

EWS XML elements in Exchange


ImAddress (NonEmptyStringType)
Article • 03/29/2023 • 2 minutes to read

The ImAddress element contains the instant messaging address of a new contact that
will be added to an instant messaging group.

XML

<ImAddress></ImAddress>

NonEmptyStringType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
AddNewImContactToGroup

Text value
The text value of the ImAddress element is an instant messaging address.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
ImAddress (String)
Article • 03/29/2023 • 2 minutes to read

The ImAddress element contains the primary instant messaging address of a persona.

XML

<ImAddress></ImAddress>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Persona

Text value
The text value of the ImAddress element is the primary instant messaging address of a
persona.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
ImAddresses
Article • 03/29/2023 • 2 minutes to read

The ImAddresses element represents a collection of instant messaging addresses for a


contact.

XML

<ImAddresses>

<Entry/>

</ImAddresses>

ImAddressDictionaryType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Entry (IMAddress)
Represents an instant messaging address for a contact.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
ImAddresses
(ArrayOfStringAttributedValuesType)
Article • 03/29/2023 • 2 minutes to read

The ImAddresses element specifies an array of instant message addresses and the
identifiers of their source attributions for the associated persona.

XML

<ImAddresses>

<StringAttributedValue/>

</ImAddresses>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

StringAttributedValue Specifies an instance in an array of attributes associated with a persona


element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ImAddresses2
Article • 03/29/2023 • 2 minutes to read

The ImAddresses2 element specifies an array of instant message addresses and the
identifiers of their source attributions for the associated persona.

XML

<ImAddresses2>

<StringAttributedValue/>

</ImAddresses2>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

StringAttributedValue Specifies an instance in an array of attributes associated with a persona


element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ImAddresses3
Article • 03/29/2023 • 2 minutes to read

The ImAddresses3 element specifies an array of instant message addresses and the
identifiers of their source attributions for the associated persona.

XML

<ImAddresses3>

<StringAttributedValue/>

</ImAddresses3>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

StringAttributedValue Specifies an instance in an array of attributes associated with a persona


element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
ImageBase64
(EncryptionConfigurationResponseType)
Article • 03/29/2023 • 2 minutes to read

The ImageBase64 element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
ImageBase64
(SetEncryptionConfigurationType)
Article • 03/29/2023 • 2 minutes to read

The ImageBase64 (SetEncryptionConfigurationType) element is intended for internal


use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
ImContactSipUriAddress
Article • 03/29/2023 • 2 minutes to read

The ImContactSipUriAddress element contains the SIP URI address of a contact that is
added to an instant messaging (IM) group.

XML

<ImContactSipUriAddress></ImContactSipUriAddress>

NonEmptyStringType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
AddNewTelUriContactToGroup

Text value
The text value of the ImContactSipUriAddress element is the SIP URI address of a
contact.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False


ImGroup
Article • 03/29/2023 • 2 minutes to read

The ImGroup element represents an instant messaging group.

XML

<ImGroup>

<DisplayName/>

<GroupType/>

<ExchangeStoreId/>

<MemberCorrelationKey/>

<ExtendedProperties/>

<SmtpAddress/>

</ImGroup>

ImGroupType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
DisplayName (NonEmptyStringType) | GroupType | ExchangeStoreId |
MemberCorrelationKey | ExtendedProperties (NonEmptyArrayOfExtendedPropertyType) |
SmtpAddress

Parent elements
Groups (ArrayOfImGroupType) | AddDistributionGroupToImListResponse |
AddImGroupResponse

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
ImItemList
Article • 03/29/2023 • 2 minutes to read

The ImItemList element contains a list of instant messaging groups and instant
messaging contacts.

XML

<ImItemList>

<Groups/>

<Personas/>

</ImItemList>

ImItemListType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Groups (ArrayOfImGroupType) | Personas

Parent elements
GetImItemsResponse | GetImItemListResponse

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
ImListMigrationCompleted
Article • 03/29/2023 • 2 minutes to read

The ImListMigrationCompleted element indicates whether the Exchange store contains


the instant messaging items used by instant messaging clients.

XML

<ImListMigrationCompleted>true | false</ImListMigrationCompleted>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SetImListMigrationCompleted

Text value
A text value of true for the ImListMigrationCompleted element indicates that the
instant messaging contacts store has been migrated to the Exchange store. A value of
false indicates that the instant message contacts store has not been migrated.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
Importance
Article • 03/29/2023 • 2 minutes to read

The Importance element describes the importance of an item or the aggregated


importance of all items in a conversation in the current folder.

XML

<Importance/>

ImportanceChoicesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Conditions
Represents the conditions that, when fulfilled, will trigger the rule
actions for that rule.

Conversation Represents a single conversation.


(ConversationType)

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Exceptions
Represents the exceptions that represent all the available rule exception
conditions for the Inbox rule.
Element Description

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

Text value
A text value is required. The following are the possible values for this element:

Low

Normal

High

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


See also
EWS XML elements in Exchange
ImTelephoneNumber
Article • 03/29/2023 • 2 minutes to read

The ImTelephoneNumber element represents the telephone number for a contact that
is added to an instant messaging (IM) group.

XML

<ImTelephoneNumber></ImTelephoneNumber>

NonEmptyStringType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
AddNewTelUriContactToGroup

Text value
The text value of the ImTelephoneNumber element is the telephone number of a
contact.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False


InboxFolderPermissionLevel
Article • 03/29/2023 • 2 minutes to read

The InboxFolderPermissionLevel element contains the permissions for the default Inbox
folder. This element was introduced in Microsoft Exchange Server 2007 Service Pack 1
(SP1).

XML

<InboxFolderPermissionLevel>

None or Editor or Reviewer or Author or Custom

</InboxFolderPermissionLevel>

DelegateFolderPermissionLevelType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

DelegatePermissions Contains the delegate permission level settings for a user. This element
was introduced in Exchange 2007 SP1.

Text value
The following table lists the text values that represent the permission levels.

Permission level text values


Permission level Description

None The delegate user has no access permissions to the Inbox folder.

Reviewer The delegate user can read items in the Inbox folder.

Author The delegate user can read and create items in the Inbox folder.

Editor The delegate user can read, create, and modify items in the Inbox folder.

Custom The delegate user has custom access permissions to the Inbox folder.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
AddDelegate operation

UpdateDelegate operation

EWS XML elements in Exchange

Adding Delegates
InboxRules
Article • 03/29/2023 • 2 minutes to read

The InboxRules element represents an array of rules in the user's mailbox.

GetInboxRulesResponse

InboxRules

XML

<InboxRules>

<Rule/>

</InboxRules>

ArrayOfRulesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Rule (RuleType)
Contains a single rule and represents a rule in the user's mailbox.

Parent elements

Element Description

GetInboxRulesResponse
Defines a response to a GetInboxRules operation request.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
GetInboxRules

GetInboxRules operation

EWS XML elements in Exchange


InboxUrl
(FederatedDirectoryGroupType)
Article • 03/29/2023 • 2 minutes to read

The InboxUrl (FederatedDirectoryGroupType) element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
InboxUrl (MasterMailboxType)
Article • 03/29/2023 • 2 minutes to read

The InboxUrl (MasterMailboxType) element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
IncludeMimeContent
Article • 03/29/2023 • 2 minutes to read

The IncludeMimeContent element specifies whether the Multipurpose Internet Mail


Extensions (MIME) content of an item or attachment is returned in the response.

XML

<IncludeMimeContent>true or false</IncludeMimeContent>

boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

AttachmentShape Identifies additional properties to return in a response to a GetAttachment


request.

The following is the XPath expression to this element:

/GetAttachment/AttachmentShape

Element Description

ItemShape
Identifies the item properties and content to include in a GetItem, FindItem,
or SyncFolderItems response.

The following are the XPath expressions to this element:

/GetItem/ItemShape

/FindItem/ItemShape

/SyncFolderItems/ItemShape

Text value
This element can be either true or false. The default value is false. This is a Boolean data
type.

Remarks
This element is optional.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Example
The following example of a request demonstrates a how to set the
IncludeMimeContent element.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<GetAttachment
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<AttachmentShape>
<t:IncludeMimeContent>true</t:IncludeMimeContent>

<t:BodyType>Best</t:BodyType>

</AttachmentShape>

<AttachmentIds>

<t:AttachmentId Id="ASkAS="/>

</AttachmentIds>

</GetAttachment>

</soap:Body>

</soap:Envelope>

The attachment Id attribute is truncated to preserve readability.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


IncludeNonIndexableItems
Article • 03/29/2023 • 2 minutes to read

The IncludeNonIndexableItems element contains a Boolean value to indicate whether


to include items that cannot be indexed.

XML

<IncludeNonIndexableItems>true | false</IncludeNonIndexableItems>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SetHoldOnMailboxes

Text value
A text value of true for the IncludeNonIndexableItems element indicates that items that
cannot be indexed are included with mailbox holds. A value of false indicates that the
items that cannot be indexed are not included in mailbox holds.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


IncludePersonalArchive
Article • 03/29/2023 • 2 minutes to read

The IncludePersonalArchive element specifies whether to include the personal archive


in the search.

XML

<IncludePersonalArchive>true | false</IncludePersonalArchive>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

FindMailboxStatisticsByKeywords Specifies a request to search for mailbox statistics by keyword.

Text value
A text value of true for the IncludePersonalArchive element indicates that the personal
archive is included in the search. A value of false indicates that the personal archive is
not included in the search.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
IncludesLastFolderInRange
Article • 03/29/2023 • 2 minutes to read

The IncludesLastFolderInRange element indicates whether the last item to synchronize


has been included in the response.

SyncFolderHierarchyResponse

ResponseMessages

SyncFolderHierarchyResponseMessage

IncludesLastFolderInRange

XML

<IncludesLastFolderInRange/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

SyncFolderHierarchyResponseMessage Contains the status and result of a SyncFolderHierarchy


request.

Text value
A text value that represents a Boolean value is required.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
SyncFolderHierarchy operation

EWS reference for Exchange

EWS XML elements in Exchange


IncludesLastItemInRange
Article • 03/29/2023 • 2 minutes to read

The IncludesLastItemInRange element indicates whether the last item to synchronize


has been included in the response.

SyncFolderItemsResponse

ResponseMessages

SyncFolderItemsResponseMessage

IncludesLastItemInRange

XML

<IncludesLastItemInRange/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

SyncFolderItemsResponseMessage Contains the status and result of a SyncFolderItems request.

Text value
A text value that represents a Boolean value is required.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
SyncFolderItems operation

EWS XML elements in Exchange


IncludeUnsearchableItems
Article • 03/29/2023 • 2 minutes to read

The IncludeUnsearchableItems element specifies whether to include items that cannot


be searched.

XML

<IncludeUnsearchableItems>true | false</IncludeUnsearchableItems>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

FindMailboxStatisticsByKeywords Specifies a request to search for mailbox statistics by keyword.

Text value
A text value of true for the IncludeUnsearchableItems element indicates that statistics
are not included for items that are not searchable. A value of false indicates that
statistics are included for items that are not searchable.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
IndexedFieldURI
Article • 03/29/2023 • 2 minutes to read

The IndexedFieldURI element identifies individual members of a dictionary.

XML

<IndexedFieldURI FieldURI="" FieldIndex="" />

PathToIndexedFieldType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

FieldURI
Identifies the dictionary that contains the member to return. This attribute is
required.

FieldIndex Identifies the member of the dictionary to return. This attribute is required.

FieldURI Attribute

Value Description

item:InternetMessageHeader Represents the message header of an item.

contacts:ImAddress Represents the instant messaging address of a contact.

contacts:PhysicalAddress:Street Represents the street address of a contact.

contacts:PhysicalAddress:City Represents the city of a contact.

contacts:PhysicalAddress:State Represents the state of a contact.

contacts:PhysicalAddress:Country Represents the country/region of a contact.

contacts:PhysicalAddress:PostalCode Represents the postal code of a contact.

contacts:PhoneNumber Represents the phone number of a contact.


Value Description

contacts:EmailAddress Represents the e-mail address of a contact.

distributionlist:Members:Member Represents a member of a distribution list.

Child elements
None.

Parent elements

Element Description

AdditionalProperties Identifies additional properties to get, set, or create.

AggregateOn
Represents the property that is used to determine the order of grouped
items for a grouped FindItem result set.

GroupBy
Specifies an arbitrary grouping for FindItem queries.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IndexedOffset
Article • 03/29/2023 • 2 minutes to read

The IndexedOffset element indicates the index offset for a paged FindConversation
response.

XML

<IndexedOffset></IndexedOffset>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
FindConversationResponse

Text value
The text value of the IndexedOffset element is the page index offset for
FindConversation responses.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
IndexedPageFolderView
Article • 03/29/2023 • 2 minutes to read

The IndexedPageFolderView element describes how paged item information is returned


in a FindFolder response.

FindFolder

IndexedPageFolderView

XML

<IndexedPageFolderView MaxEntriesReturned="" Offset="" BasePoint="" />

IndexedPageViewType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

MaxEntriesReturned Describes the maximum number of folders to return in the response. This
attribute is optional.

Offset
Describes the offset from the BasePoint. Offset must be greater than or
equal to zero. If BasePoint is equal to Beginning, the offset is positive. If
BasePoint is equal to End, the offset is handled as if it were negative.
This identifies which folder will be the first folder delivered in the
response. This attribute is required.

BasePoint
Describes whether the page of folders will start from the start or the end
of the set of folders that are found with the search criteria. Seeking from
the end always searches backward. This attribute is required.

BasePoint Attribute

Value Description

Beginning The paged view starts at the beginning of the found folder set.
Value Description

End The paged view starts at the end of the found folder set.

Child elements
None.

Parent elements

Element Description

FindFolder
Defines a request to find folders in a mailbox.
The following is the XPath expression to this element:
/FindFolder

Remarks
Seeking from end involves moving to the origin identified by the offset. Additionally, the
pointer is moved back by the number of requested records. For example, if there are
100 records and the offset is 25 from the end, the search starts from 75. If 10 records are
returned, the pointer is moved backward an additional 10 records to 65 and returns
records 65 through 75. The next index is 64. The next offset from the end for a page is
100 minus 64 which equals 36. The value for the next offset from the end to get the next
indexed page is 36.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False


IndexedPageItemView
Article • 03/29/2023 • 2 minutes to read

The IndexedPageItemView element describes how paged conversation or item


information is returned for a FindItem operation or FindConversation operation request.

XML

<IndexedPageViewItemView MaxEntriesReturned="" Offset="" BasePoint=""/>

IndexedPageViewType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

MaxEntriesReturned Describes the maximum number of items or conversations to return in the


response. This attribute is optional.

Offset
Describes the offset from the BasePoint. If BasePoint is equal to
Beginning, the offset is positive. If BasePoint is equal to End, the offset is
handled as if it were negative. This identifies which item or conversation
will be the first to be delivered in the response. This attribute is required.

BasePoint
Describes whether the page of items or conversations will start from the
beginning or the end of the set of items or conversations that are found
by using the search criteria. Seeking from the end always searches
backward. This attribute is required.

BasePoint Attribute

Value Description

Beginning The paged view starts at the beginning of the found conversation or item set.

End The paged view starts at the end of the found conversation or item set.

Child elements
None.

Parent elements

Element Description

FindItem
Defines a request to find items in a mailbox.
The following is the XPath expression to this element:
/FindItem

FindConversation
Defines a request to find conversations in a mailbox.

Remarks
Seeking from the end involves moving to the origin identified by the offset. Additionally,
the pointer is moved back by the number of requested records. For example, if there are
100 records and the offset is 25 from the end, the search starts from 75. If 10 records are
returned, the pointer is moved backward an additional 10 records to 65 and returns
records 65 through 75. The next index is 64. The next offset from the end for a page is
100 minus 64 which equals 36. 36 is the value for the next offset from the end to get the
next indexed page.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Example
The following example shows a FindItem operation request. Each item is returned with
its ID and subject. A maximum of six items are returned in the response, as specified by
the MaxEntriesReturned attribute. The items are listed in ascending order grouped by
importance. Items in a group are aggregated by subject.

XML

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<FindItem Traversal="Shallow"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject"/>

</t:AdditionalProperties>

</ItemShape>

<IndexedPageItemView MaxEntriesReturned="6" BasePoint="Beginning"


Offset="0" />

<GroupBy Order="Ascending">

<t:FieldURI FieldURI="item:Importance"/>

<t:AggregateOn Aggregate="Maximum">

<t:FieldURI FieldURI="item:Subject"/>

</t:AggregateOn>

</GroupBy>

<ParentFolderIds>
<t:DistinguishedFolderId Id="inbox"/>

</ParentFolderIds>

</FindItem>

</soap:Body>

</soap:Envelope>

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindItem operation

FindConversation operation

Finding Items
IndividualAttendeeConflictData
Article • 03/29/2023 • 2 minutes to read

The IndividualAttendeeConflictData element contains a user's or contact's free/busy status for a time window that occurs at the same time
as the suggested meeting time identified in the Suggestion element.

GetUserAvailabilityResponse

SuggestionsResponse

SuggestionDayResultArray

SuggestionDayResult

SuggestionArray

Suggestion

AttendeeConflictDataArray

IndividualAttendeeConflictData

XML

<IndividualAttendeeConflictData>

<BusyType>...</BusyType>

</IndividualAttendeeConflictData>

IndividualAttendeeConflictData

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

BusyType
Represents the free/busy status of a user for a suggested meeting time.

Parent elements

Element Description

AttendeeConflictDataArray Contains an array of conflict data for attendees identified in the GetUserAvailabilityRequest.
The following is the XPath expression to this element:
/GetUserAvailabilityResponse/SuggestionsResponse/SuggestionDayResultArray/SuggestionDayResult[i]/SuggestionArray/Suggestion[i]/At

Remarks
The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server
2007 that has the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema


Name Value

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


Initials
Article • 03/29/2023 • 2 minutes to read

The Initials element represents the initials of a contact.

XML

<Initials/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CompleteName
Represents the complete name of a contact.

Contact
Represents an Exchange contact item.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)


Initials
(ArrayOfStringAttributedValuesType)
Article • 03/29/2023 • 2 minutes to read

The Initials element specifies an array of initials values and the identifiers of their source
attributions for the associated persona.

XML

<Initials>

<StringAttributedValue/>

</Initials>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

StringAttributedValue Specifies an instance in an array of attributes associated with a persona


element.

Parent elements

Element Description

Persona
Specifies a set of persona data returned by a GetPersona request.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
InlineImageUrlTemplate
Article • 03/29/2023 • 2 minutes to read

The InlineImageUrlTemplate element specifies a template for an inline image URL.

XML

<InlineImageUrlTemplate></InlineImageUrlTemplate>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ItemShape Identifies a set of properties to return in a GetItem operation, FindItem operation, or


SyncFolderItems operation response.

Text value
The text value of the InlineImageUrlTemplate element specifies a template for an inline
image URL.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
InPlaceHoldConfigurationOnly
Article • 03/29/2023 • 2 minutes to read

The InPlaceHoldConfigurationOnly element specifies whether to include the in-place


hold configuration.

XML

<InPlaceHoldConfigurationOnly>true | false</InPlaceHoldConfigurationOnly>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
GetDiscoverySearchConfiguration

Text value
A text value of true for the InPlaceHoldConfigurationOnly element indicates that the
in-place hold configuration is included. A value of false indicates that the in-place hold
configuration is not included.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
InPlaceHoldIdentity
Article • 03/29/2023 • 2 minutes to read

The InPlaceHoldIdentity element specifies the identity of a hold that preserves the
mailbox items.

XML

<InPlaceHoldIdentity></InPlaceHoldIdentity>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SetHoldOnMailboxes | DiscoverySearchConfiguration

Text value
The text value of the InPlaceHoldIdentity element is the mailbox hold identifier.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
SetHoldOnMailboxes operation

EWS XML elements in Exchange


InReplyTo
Article • 03/29/2023 • 2 minutes to read

The InReplyTo element represents the identifier of the item to which this item is a reply.

XML

<InReplyTo/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

Text value
The text value represents a string that identifies an item.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
InstallApp
Article • 03/29/2023 • 2 minutes to read

The InstallApp element specifies the request to install an app.

XML

<InstallApp>

<Manifest/>

</InstallApp>

InstallAppType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Manifest
Contains the base64-encoded app manifest file.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
InstallAppResponse
Article • 03/29/2023 • 2 minutes to read

The InstallAppResponse element specifies the response to an InstallApp request.

XML

<InstallAppResponse ResponseClass="">

<MessageText></MessageText>

<ResponseCode></ResponseCode>

<DescriptiveLinkKey></DescriptiveLinkKey>

<MessageXml></MessageXml>

</InstallAppResponse>

InstallAppResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass Indicates the class of the response.

ResponseClass

Value Description

Success Indicates success.

Warning Indicates a warning.

Error Indicates an error.

Child elements

Element Description

DescriptiveLinkKey
Currently unused and reserved for future use.
Element Description

MessageText
Provides a text description of the status of the response.

MessageXml
Provides additional error response information.

ResponseCode
Provides status information about the request.

Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Text value
None.

Remarks
The GetAppManifestsResponseMessage element is applicable for clients that target
Exchange Online and versions of Microsoft Exchange Server starting with Exchange
2013.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File messages.xsd

Can Be Empty

See also
EWS XML elements in Exchange
InstanceKey
Article • 03/29/2023 • 2 minutes to read

The InstanceKey element specifies an instance key for an item or conversation.

XML

<InstanceKey></InstanceKey>

base64Binary

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.

Item
Represents a generic item in the Exchange store.

Text value
The text value of the InstanceKey element is the instance key for an item or
conversation.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
IntendedFreeBusyStatus
Article • 03/29/2023 • 2 minutes to read

The IntendedFreeBusyStatus element represents the intended status for the calendar
item that is associated with the meeting request.

XML

<IntendedFreeBusyStatus/>

LegacyFreeBusyType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MeetingRequest
Represents a meeting request in the Exchange store.

Text value
A text value is required. The following are the possible values for this element:

Free

Tentative

Busy
OOF

NoData

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Intent
Article • 03/29/2023 • 2 minutes to read

The Intent element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
InternalDomains (SmtpDomainList)
Article • 03/29/2023 • 2 minutes to read

The InternalDomains element identifies the list of internal SMTP domains of the
organization.

XML

<InternalDomains>

<Domain/>

</InternalDomains>

SmtpDomainList

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Domain
Identifies a single SMTP domain.

Parent elements

Element Description

MailTipsConfiguration Contains service configuration information for the mail


(MailTipsServiceConfiguration)
tips service.

ProtectionRulesConfiguration
Contains service configuration information for the
protection rules service.

Text value
None.

Remarks
This element is required.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
InternalId
Article • 03/29/2023 • 2 minutes to read

The InternalId element represents an integer value for the event identification.

XML

<InternalId/>

nonNegativeInteger

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

RecipientTrackingEvent
Contains information for a single event for a recipient.

Text value
A text value that represents an integer is required if this element is used.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
InternalReply
Article • 03/29/2023 • 2 minutes to read

The InternalReply element contains the out of office (OOF) response sent to other users
in the user's domain or trusted domains.

XML

<InternalReply>

<Message/>

</InternalReply>

ReplyBody

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

xml:lang Specifies the language used in the InternalReply message. The possible values of this
attribute are defined by IETF RFC 3066.

Child elements

Element Description

Message (Availability)
Contains the OOF response.

Parent elements

Element Description

UserOofSettings
Specifies the OOF settings.
The following is the XPath expression to this element:
/SetUserOofSettingsRequest/UserOofSettings

Element Description

OofSettings
Contains the OOF settings.
The following is the XPath expression to this element:
/GetUserOofSettingsResponse/OofSettings

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Example
The following example of a SetUserOofSettings request sets the OofState to Enabled,
sets the duration of OOF for 10 days, and sets the internal and external OOF messages.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<SetUserOofSettingsRequest
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<Mailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Name>David Alexander</Name>

<Address>[email protected]</Address>

<RoutingType>SMTP</RoutingType>

</Mailbox>

<UserOofSettings
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<OofState>Enabled</OofState>

<ExternalAudience>All</ExternalAudience>

<Duration>

<StartTime>2005-10-05T00:00:00</StartTime>

<EndTime>2005-10-25T00:00:00</EndTime>

</Duration>

<InternalReply>

<Message>I am out of office. This is my internal reply.</Message>

</InternalReply>

<ExternalReply>

<Message>I am out of office. This is my external reply.</Message>

</ExternalReply>

</UserOofSettings>

</SetUserOofSettingsRequest>

</soap:Body>

</soap:Envelope>

Element information
Element Type

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserOofSettings operation

SetUserOofSettings operation
InternetMessageHeader
Article • 03/29/2023 • 2 minutes to read

The InternetMessageHeader element represents the Internet message header for a


given header within the headers collection. To get the entire collection of Internet
message headers, use the PR_TRANSPORT_MESSAGE_HEADERS property. For more
information about EWS and Internet message headers, see "Getting Internet message
headers in EWS, MIME, and the missing Internet message headers .

XML

<InternetMessageHeader HeaderName=""/>

InternetHeaderType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

HeaderName
Identifies the header name.

Child elements
None.

Parent elements

Element Description

InternetMessageHeaders Represents the collection of all Internet message headers that are
contained in an item in a mailbox.

Text value
The text value represents the value for the header.
Remarks
The following is the EWS Managed API extended property definition for the
PR_TRANSPORT_MESSAGE_HEADERS property.

C#

ExtendedPropertyDefinition transportMsgHdr = new


ExtendedPropertyDefinition(0x007D, MapiPropertyType.String);

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

EWS, MIME, and the missing Internet message headers


InternetMessageHeaders
Article • 03/29/2023 • 2 minutes to read

The InternetMessageHeaders element contains a collection of some of the Internet


message headers that are contained in an item in a mailbox. To get the entire collection
of Internet message headers, use the PR_TRANSPORT_MESSAGE_HEADERS property.
For more information about EWS and Internet message headers, see "Getting Internet
message headers" in EWS, MIME, and the missing Internet message headers .

XML

<InternetMessageHeaders>

<InternetMessageHeader/>

</InternetMessageHeaders>

NonEmptyArrayOfInternetHeadersType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

InternetMessageHeader Represents the Internet message header for a given header within the
headers collection.

Parent elements

Element Description

AcceptItem
Represents an Accept reply to a meeting request.

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.
Element Description

DeclineItem
Represents a Decline reply to a meeting request.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

TentativelyAcceptItem
Represents a tentatively accepted reply to a meeting request.

Remarks
The following is the EWS Managed API extended property definition for the
PR_TRANSPORT_MESSAGE_HEADERS property.

C#

ExtendedPropertyDefinition transportMsgHdr = new


ExtendedPropertyDefinition(0x007D, MapiPropertyType.String);

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd


Name Value

Can be Empty False

See also
EWS XML elements in Exchange

EWS, MIME, and the missing Internet message headers


InternetMessageId
Article • 03/29/2023 • 2 minutes to read

The InternetMessageId element represents the Internet message identifier of an item.

XML

<InternetMessageId/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

RemoveItem
Removes an item from the Exchange store.

Message
Represents an Exchange e-mail message.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

AcceptItem
Represents an Accept reply to a meeting request.

TentativelyAcceptItem Represents a Tentative reply to a meeting request.


Element Description

DeclineItem
Represents a Decline reply to a meeting request.

ReplyToItem
Contains a reply to the creator of an item in the Exchange store.

ReplyAllToItem
Contains a reply to all identified recipients of an item in the Exchange
store.

ForwardItem
Contains an Exchange store item to forward to recipients.

CancelCalendarItem
Represents the response object that is used to cancel a meeting.

PostItem
Represents a post item in the Exchange store. This element was
introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

Text value
The text value represents the Internet message identifier.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Interval
Article • 03/29/2023 • 2 minutes to read

The Interval element defines the interval between two consecutive recurring items.

XML

<Interval/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

AbsoluteMonthlyRecurrence Represents a monthly recurrence pattern.

DailyRegeneration
Describes the frequency, in days, in which a task is regenerated.

DailyRecurrence
Describes the frequency, in days, in which a task recurs.

MonthlyRegeneration
Describes the frequency, in months, in which a task is regenerated.

RelativeMonthlyRecurrence
Describes a relative monthly pattern for a recurring task.

WeeklyRecurrence
Describes the frequency, in weeks, in which and the days on which
a task recurs.

WeeklyRegeneration
Describes the frequency, in weeks, in which a task is regenerated.

YearlyRegeneration
Describes the frequency, in years, in which a task is regenerated.
Text value
A text value that represents an integer is required.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
InvalidRecipient
Article • 03/29/2023 • 2 minutes to read

The InvalidRecipient element contains the SMTP address of the invalid recipient and
information about why the recipient is invalid.

XML

<InvalidRecipient>

<SmtpAddress/>

<ResponseCode/>

<MessageText/>

</InvalidRecipient>

InvalidRecipientType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

SmtpAddress
Contains the SMTP address of the invalid recipient. This
element is required.

ResponseCode Provides an error code that identifies the specific error that
(InvalidRecipientResponseCodeType) the request encountered. This element is required.

MessageText
Provides a text description of the status of the response.
This element is optional.

Parent elements

Element Description
Element Description

InvalidRecipients
Represents the recipients of a folder sharing request that are invalid.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
-GetSharingMetadata operation

EWS XML elements in Exchange


InvalidRecipient (MailTips)
Article • 03/29/2023 • 2 minutes to read

The InvalidRecipient element indicates whether the recipient is invalid.

XML

<InvalidRecipient>true | false</InvalidRecipient>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MailTips
Represents values for various types of mail tips.

Text value
The text value of this element is true if the recipient is invalid. The value is false if the
recipient is not invalid.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
InvalidRecipients
Article • 03/29/2023 • 2 minutes to read

The InvalidRecipients element represents the recipients of a folder sharing request that
are invalid.

XML

<InvalidRecipients>

<InvalidRecipient/>

</InvalidRecipients>

ArrayOfInvalidRecipientsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

InvalidRecipient Contains the SMTP address of the invalid recipient and information about why
the recipient is invalid.

Parent elements

Element Description

GetSharingMetadataResponse
Defines a response to a GetSharingMetadata operation
request.

GetSharingMetadataResponseMessage Contains the status and result of a single


GetSharingMetadata operation request.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetSharingMetadata operation

EWS XML elements in Exchange


IsAllDayEvent
Article • 03/29/2023 • 2 minutes to read

The IsAllDayEvent element indicates whether a calendar item or meeting request


represents an all-day event.

XML

<IsAllDayEvent/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Text value
A text value that represents a Boolean value is required if this element is included. A
value of true indicates that the item represents an all-day event. A value of false
indicates that the item spans less than a user's working hours.

Remarks
An all-day event spans the duration of working hours that is defined for a mailbox.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
IsApprovalRequest
Article • 03/29/2023 • 2 minutes to read

The IsApprovalRequest element indicates whether incoming messages must be


approval requests in order for the condition or exception to apply.

XML

<IsApprovalRequest/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conditions
Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions
Represents all the available rule exception conditions for an Inbox rule.

Text value
A text value of true indicates that the message must be an approval request in order for
the condition or exception to apply. A value of false indicates that the message must
not be an approval request in order for the condition or exception to apply.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
IsArchive
Article • 03/29/2023 • 2 minutes to read

The IsArchive element specifies a Boolean value that indicates whether the mailbox is an
archive mailbox.

XML

<IsArchive>true | false</IsArchive>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
FailedMailbox | RetentionPolicyTag

Text value
A text value of true for the IsArchive element indicates that the target mailbox is an
archive mailbox. A value of false indicates that the target mailbox is not an archive
mailbox.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
IsAssignmentEditable
Article • 03/29/2023 • 2 minutes to read

The IsAssignmentEditable element represents the task type.

XML

<IsAssignmentEditable/>

integer

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Task
Represents a task in the Exchange store.

Text value
This property is read-only. The following table lists the possible values.

Value Description

0 The default for all task items.

1 A task request.

2 A task acceptance from a recipient of a task request.


Value Description

3 A task declination from a recipient of a task request.

4 An update to a previous task request.

5 Not used.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsAssociated
Article • 03/29/2023 • 2 minutes to read

The IsAssociated element indicates whether the item is associated with a folder.

XML

<IsAssociated/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

Message
Represents an Exchange e-mail message.

PostItem
Represents a post item in the Exchange store.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

Text value
A text value of true indicates that the item is associated with a folder; a value of false
indicates that the item is not associated with a folder.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsAutomaticForward
Article • 03/29/2023 • 2 minutes to read

The IsAutomaticForward element indicates whether incoming messages must be


automatic forwards in order for the condition or exception to apply.

XML

<IsAutomaticForward/> true | false</IsAutomaticForward>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conditions
Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions
Represents all the available rule exception conditions for an Inbox rule.

Text value
A text value of true indicates that the message must be an automatic forward in order
for the condition or exception to apply. A value of false indicates that the message must
not be an automatic forward in order for the condition or exception to apply.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
IsAutomaticReply
Article • 03/29/2023 • 2 minutes to read

The IsAutomaticReply element indicates whether incoming messages must be


automatic replies in order for the condition or exception to apply.

XML

<IsAutomaticReply> true | false</IsAutomaticReply>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conditions
Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions
Represents all the available rule exception conditions for an Inbox rule.

Text value
A text value of true indicates that the message must be an automatic reply in order for
the condition or exception to apply. A value of false indicates that the message does not
have to be an automatic reply in order for the condition or exception to apply.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
IsCancelled
Article • 03/29/2023 • 2 minutes to read

The IsCancelled element indicates whether an appointment or meeting has been


canceled.

XML

<IsCancelled/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Text value
A text value that represents a Boolean value is required if this element is included. A
value of true indicates that the calendar item has been canceled. A value of false
indicates that a calendar item has not been canceled.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
IsClutter
Article • 03/29/2023 • 2 minutes to read

The IsClutter element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
IsComplete
Article • 03/29/2023 • 2 minutes to read

The IsComplete element indicates whether the task has been completed.

XML

<IsComplete/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Task
Represents a task in the Exchange store.

Text value
The text value is a Boolean value that indicates whether the task has been completed.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Tasks

Deleting Tasks
IsContactPhoto
Article • 03/29/2023 • 2 minutes to read

The IsContactPhoto element indicates whether the file attachment is a contact picture.

XML

<IsContactPhoto>true or false</IsContactPhoto>

boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

FileAttachment
Represents a file that is attached to an item in the Exchange store.

Text value
This element can be either true or false. The default value is false.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server that has the Client Access server
role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsDebug
Article • 03/29/2023 • 2 minutes to read

The IsDebug element is not used.

XML

<IsDebug>true | false</IsDebug>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
GetClientExtensionResponse

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages
Element Example

Schema name Messages schema

Validation file Messages.xsd

Can be empty
IsDelegated
Article • 03/29/2023 • 2 minutes to read

The IsDelegated element indicates whether a meeting was handled by an account that
has delegate access.

XML

<IsDelegated/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Text value
A text value of true indicates that the meeting was handled by an account that has
delegate access.
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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsDeliveryReceiptRequested
Article • 03/29/2023 • 2 minutes to read

The IsDeliveryReceiptRequested element indicates whether the sender of an item


requests a delivery receipt.

XML

<IsDeliveryReceiptRequested/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

RemoveItem
Removes an item from the Exchange store.

Message
Represents an Exchange e-mail message.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

AcceptItem
Represents an Accept reply to a meeting request.

TentativelyAcceptItem Represents a Tentative reply to a meeting request.


Element Description

DeclineItem
Represents a Decline reply to a meeting request.

ReplyToItem
Contains a reply to the creator of an item in the Exchange store.

ReplyAllToItem
Contains a reply to all identified recipients of an item in the Exchange
store.

ForwardItem
Contains an Exchange store item to forward to recipients.

CancelCalendarItem
Represents the response object that is used to cancel a meeting.

Text value
A text value of true indicates that a delivery receipt is requested from the recipient of
the item.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsDraft
Article • 03/29/2023 • 2 minutes to read

The IsDraft element indicates whether an item has not yet been sent.

XML

<IsDraft/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

Text value
A text value that represents a Boolean value is required. A value of true indicates that a
message has not yet been sent. A value of false indicates that a message has been sent.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsEnabled
Article • 03/29/2023 • 2 minutes to read

The IsEnabled element indicates whether the rule is enabled.

XML

<IsEnabled/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Rule (RuleType)
Represents a rule in the user's mailbox.

Text value
A text value of true indicates that the rule is enabled and can be executed. A value of
false indicates that the rule cannot be executed.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
IsEncrypted
Article • 03/29/2023 • 2 minutes to read

The IsEncrypted element indicates whether incoming messages must be S/MIME


encrypted in order for the condition or exception to apply.

XML

<IsEncrypted>true | false</IsEncrypted>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conditions
Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions
Represents all the available rule exception conditions for an Inbox rule.

Text value
A text value of true indicates that the message must be S/MIME encrypted in order for
the condition or exception to apply. A value of false indicates that the message does not
have to be S/MIME in order for the condition or exception to apply.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
IsEqualTo
Article • 03/29/2023 • 2 minutes to read

The IsEqualTo element represents a search expression that compares a property with
either a constant value or another property and evaluates to true if they are equal.

XML

<IsEqualTo>

<FieldURI/>

<FieldURIOrConstant/>

</IsEqualTo>

XML

<IsEqualTo>

<ExtendedFieldURI/>

<FieldURIOrConstant/>

</IsEqualTo>

XML

<IsEqualTo>

<IndexedFieldURI/>

<FieldURIOrConstant/>

</IsEqualTo>

IsEqualToType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FieldURI
Identifies frequently referenced properties by URI.
Element Description

IndexedFieldURI
Identifies individual members of a dictionary.

ExtendedFieldURI
Identifies MAPI properties.

FieldURIOrConstant Represents either a property or a constant value to be used when


comparing with another property.

Parent elements

Element Description

Restriction Represents the restriction or query that is used to filter items or folders in
FindItem/FindFolder and search folder operations.

Not
Represents a search expression that negates the Boolean value of the search
expression that it contains.

And
Represents a search expression that allows you to perform a Boolean And operation
between two or more search expressions. The result of the And operation is true if all
of the search expressions contained within the And are true.

Or
Represents a search expression that performs a logical OR on the search expression
that it contains. Or will return true if any of its children return true. Or must have two
or more children.

Remarks
To perform string comparisons, consider using the Contains element, as it provides
options for matching parameters, such as case and white space. Use the Not element in
conjunction with the Contains element to negate the result.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema


Name Value

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsException
Article • 03/29/2023 • 2 minutes to read

The IsException element indicates whether an instance of a recurring calendar item is changed from the master.

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

FreeBusyView

CalendarEventArray

CalendarEvent

CalendarEventDetails

IsException

XML

<IsException/>

boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarEventDetails Provides additional information about a calendar event.


The following is the XPath 2.0 expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/CalendarEventArray/CalendarEvent[i]/CalendarEventDeta

Text value
A text value is required if this element is returned in the response. This element is required if the CalendarEventDetails element is used.

Remarks
The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server
2007 that has the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema


Name Value

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


IsExternalMailbox
Article • 03/29/2023 • 2 minutes to read

The IsExternalMailbox element indicates whether the mailbox is external to the


organization.

XML

<IsExternalMailbox>true | false</IsExternalMailbox>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SearchableMailbox

Text value
A text value of true for the IsExternalMailbox element indicates that the mailbox is in an
external organization. A value of false indicates that the mailbox is in the organization.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
IsFolderContact
Article • 03/29/2023 • 2 minutes to read

The IsFolderContact element indicates whether a user is a contact for a folder. This
element was introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

XML

<IsFolderContact/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Permission
Defines the access that a user has to a folder. This element was introduced
in Exchange 2007 SP1.

CalendarPermission Defines the access that a user has to a Calendar folder. This element was
introduced in Exchange 2007 SP1.

Text value
A text value of true indicates that the user is a contact for the specified folder. A value of
false indicates that the user is not a contact for the specified folder.
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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


IsFolderOwner
Article • 03/29/2023 • 2 minutes to read

The IsFolderOwner element indicates whether a user is the owner of a folder. This
element was introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

XML

<IsFolderOwner/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Permission
Defines the access that a user has to a folder. This element was introduced
in Exchange 2007 SP1.

CalendarPermission Defines the access that a user has to a Calendar folder. This element was
introduced in Exchange 2007 SP1.

Text value
A text value of true indicates that the user is the owner of the folder. A value of false
indicates that the user is not the owner of the folder.
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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


IsFolderVisible
Article • 03/29/2023 • 2 minutes to read

The IsFolderVisible element indicates whether a user can view a folder. This element was
introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

XML

<IsFolderVisible/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Permission
Defines the access that a user has to a folder. This element was introduced
in Exchange 2007 SP1.

CalendarPermission Defines the access that a user has to a Calendar folder. This element was
introduced in Exchange 2007 SP1.

Text value
A text value of true indicates that the user can view the folder. A value of false indicates
that the user cannot view the folder.
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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


IsFromMe
Article • 03/29/2023 • 2 minutes to read

The IsFromMe element indicates whether a user sent an item to him or herself.

XML

<IsFromMe/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

Text value
A text value of true indicates that the item was sent by a user to him or herself. A value
of false indicates that the item was not sent by the user to him or herself.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsGreaterThan
Article • 03/29/2023 • 2 minutes to read

The IsGreaterThan element represents a search expression that compares a property


with either a constant value or another property and returns true if the first property is
greater.

XML

<IsGreaterThan>

<FieldURI/>

<FieldURIOrConstant/>

</IsGreaterThan>

XML

<IsGreaterThan>

<IndexedFieldURI/>

<FieldURIOrConstant/>

</IsGreaterThan>

XML

<IsGreaterThan>

<ExtendedFieldURI/>

<FieldURIOrConstant/>

</IsGreaterThan>

IsGreaterThanType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description
Element Description

FieldURI
Identifies frequently referenced properties by URI.

IndexedFieldURI
Identifies individual members of a dictionary.

ExtendedFieldURI
Identifies MAPI properties.

FieldURIOrConstant Represents either a property or a constant value to be used when


comparing with another property.

Parent elements

Element Description

Restriction Represents the restriction or query that is used to filter items or folders in
FindItem/FindFolder and search folder operations.

Not
Represents a search expression that negates the Boolean value of the search
expression that it contains.

And
Represents a search expression that enables you to perform a Boolean And
operation between two or more search expressions. The result of the And operation
is true if all the search expressions contained within the And are true.

Or
Represents a search expression that performs a logical OR on the search expression
it contains. Or will return true if any of its children return true.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


See also
EWS XML elements in Exchange
IsGreaterThanOrEqualTo
Article • 03/29/2023 • 2 minutes to read

The IsGreaterThanOrEqualTo element represents a search expression that compares a


property with either a constant value or another property and returns true if the first
property is greater than or equal to the second.

XML

<IsGreaterThanOrEqualTo>

<FieldURI/>

<FieldURIOrConstant/>

</IsGreaterThanOrEqualTo>

XML

<IsGreaterThanOrEqualTo>

<IndexedFieldURI/>

<FieldURIOrConstant/>

</IsGreaterThanOrEqualTo>

XML

<IsGreaterThanOrEqualTo>

<ExtendedFieldURI/>
<FieldURIOrConstant/>

</IsGreaterThanOrEqualTo>

IsGreaterThanOrEqualToType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description
Element Description

FieldURI
Identifies frequently referenced properties by URI.

IndexedFieldURI
Identifies individual members of a dictionary.

ExtendedFieldURI
Identifies MAPI properties.

FieldURIOrConstant Represents either a property or a constant value to be used when


comparing with another property.

Parent elements

Element Description

Restriction Represents the restriction or query that is used to filter items or folders in
FindItem/FindFolder and search folder operations.

Not
Represents a search expression that negates the Boolean value of the search
expression it contains.

And
Represents a search expression that enables you to perform a Boolean And
operation between two or more search expressions. The result of the And operation
is true if all of the search expressions contained within the And are true.

Or
Represents a search expression that performs a logical OR on the search expression
it contains. Or will return true if any of its children return true. Or must have two or
more children.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


See also
EWS XML elements in Exchange
IsHidden
Article • 03/29/2023 • 2 minutes to read

The IsHidden element contains a Boolean value that indicates whether the underlying
contact should be hidden or displayed as part of the persona.

XML

<IsHidden>true | false</IsHidden>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Attribution Specifies an instance in an array of attributes for a Persona


(PersonaAttributionType)
element.

Text value
A text value of true for the IsHidden element indicates that the underlying contact
should be hidden or displayed as part of the persona. A value of false indicates that the
underlying contact should not be hidden or displayed as part of the persona.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
IsInError
Article • 03/29/2023 • 2 minutes to read

The IsInError element indicates whether the rule is in an error condition.

XML

<IsInError/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Rule (RuleType)
Represents a rule in the user's mailbox.

Text value
A text value of true indicates that the rule is in an error condition. A value of false
indicates that the rule is not in an error condition.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
IsInline
Article • 03/29/2023 • 2 minutes to read

The IsInline element represents whether the attachment appears inline within an item.

XML

<IsInline>true or false</IsInline>

boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

FileAttachment
Represents a file that is attached to an item in the Exchange store.

ItemAttachment
Represents an Exchange item that is attached to another Exchange item.

Text value
This element can be either true or false. The default value is false.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server that has the Client Access server
role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsLessThan
Article • 03/29/2023 • 2 minutes to read

The IsLessThan element represents a search expression that compares a property with
either a constant value or another property and returns true if the first property is less
than the second.

XML

<IsLessThan>

<FieldURI/>

<FieldURIOrConstant/>

</IsLessThan>

XML

<IsLessThan>

<IndexedFieldURI/>

<FieldURIOrConstant/>

</IsLessThan>

XML

<IsLessThan>

<ExtendedFieldURI/>

<FieldURIOrConstant/>

</IsLessThan>

IsLessThanType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description
Element Description

FieldURI
Identifies frequently referenced properties by URI.

IndexedFieldURI
Identifies individual members of a dictionary.

ExtendedFieldURI
Identifies MAPI properties.

FieldURIOrConstant Represents either a property or a constant value to be used when


comparing with another property.

Parent elements

Element Description

Restriction Represents the restriction or query that is used to filter items or folders in
FindItem/FindFolder and search folder operations.

Not
Represents a search expression that negates the Boolean value of the search
expression that it contains.

And
Represents a search expression that enables you to perform a Boolean And
operation between two or more search expressions. The result of the And operation
is true if all of the search expressions contained within the And are true.

Or
Represents a search expression that performs a logical OR on the search expression
it contains. Or will return true if any of its children return true. Or must have two or
more children.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


See also
EWS XML elements in Exchange
IsLessThanOrEqualTo
Article • 03/29/2023 • 2 minutes to read

The IsLessThanOrEqualTo element represents a search expression that compares a


property with either a constant value or another property and returns true if the first
property is less than or equal to the second.

XML

<IsLessThanOrEqualTo>

<FieldURI/>

<FieldURIOrConstant/>

</IsLessThanOrEqualTo>

XML

<IsLessThanOrEqualTo>

<IndexedFieldURI/>

<FieldURIOrConstant/>

</IsLessThanOrEqualTo>

XML

<IsLessThanOrEqualTo>

<ExtendedFieldURI/>
<FieldURIOrConstant/>

</IsLessThanOrEqualTo>

IsLessThanOrEqualToType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description
Element Description

FieldURI
Identifies frequently referenced properties by URI.

IndexedFieldURI
Identifies individual members of a dictionary.

ExtendedFieldURI
Identifies MAPI properties.

FieldURIOrConstant Represents either a property or a constant value to be used when


comparing with another property.

Parent elements

Element Description

Restriction Represents the restriction or query that is used to filter items or folders in
FindItem/FindFolder and search folder operations.

Not
Represents a search expression that negates the Boolean value of the search
expression it contains.

And
Represents a search expression that enables you to perform a Boolean And
operation between two or more search expressions. The result of the And operation
is true if all of the search expressions contained within the And are true.

Or
Represents a search expression that performs a logical OR on the search expression
it contains. Or will return true if any of its children return true. Or must have two or
more children.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


See also
EWS XML elements in Exchange
IsManagedFoldersRoot
Article • 03/29/2023 • 2 minutes to read

The IsManagedFoldersRoot element indicates whether the managed folder is the root
for all managed folders.

XML

<IsManagedFoldersRoot/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ManagedFolderInformation
Contains information about a managed folder.

Text value
A text value that represents a Boolean value is required if this element is present. A
value of true indicates that the folder is the root folder of the managed folder; a value of
false indicates that the folder is not the root folder of the managed folder.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
IsMeeting
Article • 03/29/2023 • 2 minutes to read

The IsMeeting element indicates whether the calendar item is a meeting or an


appointment.

XML

<IsMeeting/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Text value
A text value that represents a Boolean value is required if this element is included. A
value of true indicates that the calendar item is a meeting. A value of false indicates that
the calendar item is an appointment.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
IsMeeting (CalendarEventDetails)
Article • 03/29/2023 • 2 minutes to read

The IsMeeting element indicates whether the calendar event is a meeting or an appointment.

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

FreeBusyView

CalendarEventArray

CalendarEvent

CalendarEventDetails

IsMeeting (CalendarEventDetails)

XML

<IsMeeting>true or false</IsMeeting>

boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarEventDetails Provides additional information for a calendar event.


The following is the XPath expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/CalendarEventArray/CalendarEvent[i]/CalendarEventDeta

Text value
A text value is required if this element is returned in the response. This element is required if the CalendarEventDetails element is used.

Remarks
The difference between a meeting and an appointment is that a meeting is a calendar item that includes attendees; an appointment is a
calendar item that does not include attendees.

The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server
2007 that has the Client Access server role installed.

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


IsMeetingRequest
Article • 03/29/2023 • 2 minutes to read

The IsMeetngRequest element indicates whether incoming messages must be a


meeting request in order for the condition or exception to apply.

XML

<IsMeetingRequest>true | false</IsMeetingRequest>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conditions
Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions
Represents all the available rule exception conditions for an Inbox rule.

Text value
A text value of true indicates that the message must be a meeting request in order for
the condition or exception to apply. A value of false indicates that the message must
not be a meeting request in order for the condition or exception to apply.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
IsMeetingResponse
Article • 03/29/2023 • 2 minutes to read

The IsMeetngResponsequest element indicates whether incoming messages must be a


meeting response in order for the condition or exception to apply.

XML

<IsMeetingResponse/>true | false</IsMeetingResponse>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conditions
Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions
Represents all the available rule exception conditions for an Inbox rule.

Text value
A text value of true indicates that the message must be a meeting response in order for
the condition or exception to apply. A text value of false indicates that the message
must not be a meeting response in order for the condition or exception to apply.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
IsMember
Article • 03/29/2023 • 2 minutes to read

The IsMember element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
IsMember
(FederatedDirectoryGroupType)
Article • 03/29/2023 • 2 minutes to read

The IsMember (FederatedDirectoryGroupType) element is intended for internal use


only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
IsMembershipGroup
Article • 03/29/2023 • 2 minutes to read

The IsMembershipGroup element specifies a Boolean value that indicates whether the
entity is a distribution group or a mailbox.

XML

<IsMembershipGroup>true | false</IsMembershipGroup>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

SearchableMailbox
Specifies a mailbox returned from a GetSearchableMailboxes request.

Text value
A text value of true for the IsMembershipGroup element indicates that the entity is a
distribution group or a mailbox. A value of false indicates that the entity is not a
distribution group or a mailbox.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
IsModerated
Article • 03/29/2023 • 2 minutes to read

The IsModerated element indicates whether the recipient's mailbox is being moderated.

XML

<IsModerated>true | false</IsModerated>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MailTips
Represents values for various types of mail tips.

Text value
The text value for this element is true if the recipient's mailbox is being moderated. The
value is false if the recipient's mailbox is not being moderated.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsNDR
Article • 03/29/2023 • 2 minutes to read

The IsNDR element indicates whether incoming messages must be non-delivery reports
(NDRs) in order for the condition or exception to apply.

XML

<IsNDR>true | false</IsNDR>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conditions
Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions
Represents all the available rule exception conditions for an Inbox rule.

Text value
A text value of true indicates that the message must be an NDR in order for the
condition or exception to apply. A value of false indicates that the message must not be
an NDR in order for the condition or exception to apply.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
IsNotEqualTo
Article • 03/29/2023 • 2 minutes to read

The IsNotEqualTo element represents a search expression that compares a property


with either a constant value or another property and returns true if the values are not
the same.

XML

<IsNotEqualTo>

<FieldURI/>

<FieldURIOrConstant/>

</IsNotEqualTo>

XML

<IsNotEqualTo>

<ExtendedFieldURI/>
<FieldURIOrConstant/>

</IsNotEqualTo>

XML

<IsNotEqualTo>

<IndexedFieldURI/>

<FieldURIOrConstant/>

</IsNotEqualTo>

IsNotEqualToType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description
Element Description

FieldURI
Identifies frequently referenced properties by URI.

IndexedFieldURI
Identifies individual members of a dictionary.

ExtendedFieldURI
Identifies MAPI properties.

FieldURIOrConstant Represents either a property or a constant value to be used when


comparing with another property.

Parent elements

Element Description

Restriction Represents the restriction or query that is used to filter items or folders in
FindItem/FindFolder and search folder operations.

Not
Represents a search expression that negates the Boolean value of the search
expression that it contains.

And
Represents a search expression that allows you to perform a Boolean And operation
between two or more search expressions. The result of the And operation is true if all
of the search expressions contained within the And are true.

Or
Represents a search expression that performs a logical OR on the search expression
that it contains. Or will return true if any of its children return true. Or must have two
or more children.

Remarks
To perform string comparisons, consider using the Contains element, as it provides
options for matching parameters such as case and white space. Use the Not element in
conjunction with the Contains element to negate the result.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types
Name Value

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsNotSupported
Article • 03/29/2023 • 2 minutes to read

The IsNotSupported element indicates whether the rule cannot be modified by using
the managed code APIs.

XML

<IsNotSupported/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Rule (RuleType)
Represents a rule in the user's mailbox.

Text value
A text value of true indicates that the rule cannot be modified by using the managed
code APIs. A value of false indicates that the rule can be modified by using the managed
code APIs.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
IsOccurrencePresent
Article • 03/29/2023 • 2 minutes to read

The IsOccurrencePresent element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
IsOnlineMeeting
Article • 03/29/2023 • 2 minutes to read

The IsOnlineMeeting element indicates whether the meeting is online.

XML

<IsOnlineMeeting/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MeetingRequest
Represents a meeting in the Exchange store.

CalendarItem
Represents an Exchange calendar item.

Text value
A text value that represents a Boolean value is required if this element is used. A value of
true indicates that the meeting is online. A value of false indicates that the meeting is
not online.

Remarks
The IsOnlineMeeting property is read-only.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange 2007 that has the Client Access server role
installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
IsOrganizer
Article • 03/29/2023 • 2 minutes to read

The IsOrganizer element specifies a Boolean value that indicates whether this person is
the organizer of the meeting.

XML

<IsOrganizer>true | false</IsOrganizer>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingMessage
Represents a meeting message.

Text value
A text value of true for the IsOrganizer element indicates that the calendar item or
meeting message was created by the user. A value of false indicates that the calendar
item or meeting message was not created bv the user.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
IsOutOfDate
Article • 03/29/2023 • 2 minutes to read

The IsOutOfDate element indicates whether a meeting message, request, response, or


cancellation is out-of-date.

XML

<IsOutOfDate/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Text value
A text value of true indicates that the meeting item is out-of-date.
Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsOwner
Article • 03/29/2023 • 2 minutes to read

The IsOwner element specifies whether the specified email user is the owner.

XML

<IsOwner>true | false</IsOwner>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

RightsManagementLicenseData
Specifies information about the rights management license.

Text value
A text value of true for the IsOwner element indicates that the user is the owner of
rights issued on an item. A value of false indicates that the user is not the owner of
rights issued on an item.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty

See also
EWS XML elements in Exchange
IsPartiallyIndexed
Article • 03/29/2023 • 2 minutes to read

The IsPartiallyIndexed element indicates whether the item is partially indexed.

XML

<IsPartiallyIndexed>true | false</IsPartiallyIndexed>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
NonIndexableItemDetail

Text value
A text value of true for the IsPartiallyIndexed element indicates that the mailbox item is
partially indexed. A value of false indicates that the mailbox item is not partially indexed.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


IsPermanentFailure
Article • 03/29/2023 • 2 minutes to read

The IsPermanentFailure element indicates whether a previous attempt to index the item
was unsuccessful.

XML

<IsPermanentFailure>true | false</IsPermanentFailure>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
NonIndexableItemDetail

Text value
A text value of true for the IsPermanentFailure element indicates that a previous
attempt to index the mailbox item was unsuccessful. A value of false indicates that a
previous attempt to index the mailbox item was successful.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


IsPermissionControlled
Article • 03/29/2023 • 2 minutes to read

The IsPermissionControlled element indicates whether incoming messages must be


permission controlled (RMS protected) in order for the condition or exception to apply.

XML

<IsPermissionControlled>true | false</IsPermissionControlled>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conditions
Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions
Represents all the available rule exception conditions for an Inbox rule.

Text value
A text value of true indicates that the message must be RMS protected in order for the
condition or exception to apply. A value of false indicates that the message must not be
RMS protected in order for the condition or exception to apply.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
IsPin
Article • 03/29/2023 • 2 minutes to read

The IsPin element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
IsPinned
(FederatedDirectoryGroupType)
Article • 03/29/2023 • 2 minutes to read

The IsPinned (FederatedDirectoryGroupType) element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
IsPrivate
Article • 03/29/2023 • 2 minutes to read

The IsPrivate element indicates whether the calendar item is private.

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

FreeBusyView

CalendarEventArray

CalendarEvent

CalendarEventDetails

IsPrivate

XML

<IsPrivate>true or false</IsPrivate>

boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarEventDetails Provides additional information about a calendar event.


The following is the XPath expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/CalendarEventArray/CalendarEvent[i]/CalendarEventDeta

Text value
A text value that represents a Boolean value is required.

Remarks
If this element is used, the other elements in the CalendarEventDetails element will not be included in the response.

The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server
2007 that has the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types
Name Value

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


IsQuickContact
Article • 03/29/2023 • 2 minutes to read

The IsQuickContact element specifies a Boolean value that indicates whether the
underlying contact is a quick contact.

XML

<IsQuickContact>true | false</IsQuickContact>

boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Attribution Specifies an instance in an array of attributes for a Persona


(PersonaAttributionType)
element.

Text value
A text value of true for the IsQuickContact element indicates that the contact is a quick
contact. A value of false indicates that the contact is not a quick contact.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Type schema

Validation File types.xsd

Can Be Empty false

See also
EWS XML elements in Exchange
IsRead
Article • 03/29/2023 • 2 minutes to read

The IsRead element indicates whether a message has been read.

XML

<IsRead/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

RemoveItem
Removes an item from the Exchange store.

Message
Represents an Exchange e-mail message.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

PostItem
Represents a post item in the Exchange store. This element was introduced
in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

ConversationAction
Contains a single action to be applied to a single conversation.
Text value
A text value of true indicates that the message has been read. A text value of false
indicates that the message has not been read.

Remarks
If IsReadReceiptRequested is true, setting IsRead to true sends a read receipt. The
recipient can suppress read receipts by submitting the SuppressReadReceipt response
object before setting the IsRead property.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsReadReceipt
Article • 03/29/2023 • 2 minutes to read

The IsReadReceipt element indicates whether incoming messages must be read receipts
in order for the condition or exception to apply.

XML

<IsReadReceipt> true | false</IsReadReceipt>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conditions Represents the conditions that, when fulfilled, will trigger the rule actions for that
rule.

Exceptions Represents all the available rule exception conditions for the Inbox rule.

Text value
A text value of true indicates that the message must be a read receipt in order for the
condition or exception to apply. If the message does not have to be a read receipt for
the condition or exception to apply, the value is false.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
IsReadReceiptRequested
Article • 03/29/2023 • 2 minutes to read

The IsReadReceiptRequested element indicates whether the sender of an item requests


a read receipt.

XML

<IsReadReceiptRequested/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

RemoveItem
Removes an item from the Exchange store.

Message
Represents an Exchange e-mail message.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

AcceptItem
Represents an Accept reply to a meeting request.

TentativelyAcceptItem Represents a Tentative reply to a meeting request.


Element Description

DeclineItem
Represents a Decline reply to a meeting request.

ReplyToItem
Contains a reply to the creator of an item in the Exchange store.

ReplyAllToItem
Contains a reply to all identified recipients of an item in the Exchange
store.

ForwardItem
Contains an Exchange store item to forward to recipients.

CancelCalendarItem
Represents the response object thatis used to cancel a meeting.

Text value
A text value of true indicates that a read receipt is requested from the recipient of the
item.

Remarks
If IsReadReceiptRequested is true, setting IsRead to true sends a read receipt. The
recipient can suppress read receipts by submitting the SuppressReadReceipt response
object before setting the IsRead property.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsRecurring
Article • 03/29/2023 • 2 minutes to read

The IsRecurring element indicates whether a calendar item, meeting request, or task is
part of a recurring item. This element is read-only.

XML

<IsRecurring/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Task
Represents a task in the Exchange store.

Text value
A text value that represents a Boolean value is required.

Remarks
The following table shows how the IsRecurring property is set for different calendar
item types for organizers and attendees and for meeting requests and updates.

CalendarItem Type Organizer Attendee Meeting request/update


(IsRecurring) (IsRecurring) (IsRecurring)

Single Occurrence FALSE


FALSE
FALSE

Recurring Master FALSE


TRUE
TRUE

Recurring Exception TRUE


TRUE
TRUE

The IsRecurring property value that is set for recurring master calendar items for the
organizer is incorrect; this value should be set to TRUE.

7 Note

The GetUserAvailability operation also has an IsRecurring (CalendarEventDetails)


element.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
TaskType.IsRecurring

CalendarEventDetails.IsRecurring

CalendarItemType.IsRecurring
MeetingRequestMessageType.IsRecurring

CalendarItemType.IsRecurringSpecified

MeetingRequestMessageType.IsRecurringSpecified

TaskType.IsRecurringSpecified

EWS XML elements in Exchange


IsRecurring (CalendarEventDetails)
Article • 03/29/2023 • 2 minutes to read

The IsRecurring element indicates whether the calendar event is an instance of a recurring calendar item or a single calendar item.

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

FreeBusyView

CalendarEventArray

CalendarEvent

CalendarEventDetails

IsRecurring (CalendarEventDetails)

XML

<IsRecurring>true or false</IsRecurring>

boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarEventDetails Provides additional information about a calendar event.


The following is the XPath expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/CalendarEventArray/CalendarEvent[i]/CalendarEventDeta

Text value
A text value is required if this element is returned in the response. This element is required if the CalendarEventDetails element is used.

Remarks
The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server
2007 that has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema


Element Example

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


IsReminderSet
Article • 03/29/2023 • 2 minutes to read

The IsReminderSet element indicates whether a reminder has been set for the calendar event.

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

FreeBusyView

CalendarEventArray

CalendarEvent

CalendarEventDetails

IsReminderSet

XML

<IsReminderSet>true or false</IsReminderSet>

boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarEventDetails Provides additional information about a calendar event.


The following is the XPath expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/CalendarEventArray/CalendarEvent[i]/CalendarEventDeta

Text value
A text value is required if this element is returned in the response. This element is required if the CalendarEventDetails element is used
unless the IsPrivate element is set to true.

Remarks
The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server
2007 that has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types
Element Example

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


IsResend
Article • 03/29/2023 • 2 minutes to read

The IsResend element indicates whether the item had previously been sent.

XML

<IsResend/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

Text value
A text value of true indicates that the item had previously been sent.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsResponseRequested
Article • 03/29/2023 • 2 minutes to read

The IsResponseRequested element indicates whether a response to an item is


requested.

XML

<IsResponseRequested/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

RemoveItem
Removes an item from the Exchange store.

Message
Represents an Exchange e-mail message.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

CalendarItem
Represents an Exchange calendar item.
Text value
A text value of true indicates that a response is requested.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsSigned
Article • 03/29/2023 • 2 minutes to read

The IsSigned element indicates whether incoming messages must be signed in order for
the condition or exception to apply.

XML

<IsSigned>true | false</IsSigned>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conditions Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions Represents the exceptions that represent all the available rule exception conditions
for an Inbox rule.

Text value
A text value of true indicates that the message must be signed in order for the condition
or exception to apply. A text value of false indicates that the message does not have to
be signed for the condition or exception to apply.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
IsSubmitted
Article • 03/29/2023 • 2 minutes to read

The IsSubmitted element indicates whether an item has been submitted to the Outbox
default folder.

XML

<IsSubmitted/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

Text value
A text value of true indicates that the item has been submitted to the Outbox folder.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsTeamTask
Article • 03/29/2023 • 2 minutes to read

The IsTeamTask element indicates whether the task is owned by a team.

XML

<IsTeamTask/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Task
Represents a task in the Exchange store.

Text value
The text value represents a Boolean value that indicates whether a task is owned by a
team. This is a read-only property.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Creating Tasks

Deleting Tasks
IsTranscriptionEnabledInMailboxConfig
Article • 03/29/2023 • 2 minutes to read

The IsTranscriptionEnabledInMailboxConfig element is intended for internal use only.

XML

<IsTranscriptionEnabledInMailboxConfig />

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
IsUndecidedApprovalRequest
Article • 03/29/2023 • 2 minutes to read

The IsUndecidedApprovalRequest element specifies whether an approval request


message has been acted on.

XML

<IsUndecidedApprovalRequest> true | false </IsUndecidedApprovalRequest>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
ApprovalRequestData

Text value
The text value of the IsUndecidedApprovalRequest element is true if an approval
request message has not been acted on. A value of false indicates that the approval
request has been decided.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
ApprovalRequestData

EWS XML elements in Exchange


IsUnmodified
Article • 03/29/2023 • 2 minutes to read

The IsUnmodified element indicates whether the item has been modified.

XML

<IsUnmodified/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

Text value
A text value of true indicates that the item is unmodified. A text value of false indicates
that the item has been modified.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
IsVisible
Article • 03/29/2023 • 2 minutes to read

The IsVisible element indicates whether the retention policy is visible to users.

XML

<IsVisible> true | false</IsVisible>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
RetentionPolicyTag

Text value
A text value of true for the IsVisible element indicates that the retention policy is visible
to a user. A value of false indicates the retention policy is not visible to users.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
IsVoicemail
Article • 03/29/2023 • 2 minutes to read

The IsVoicemail element indicates whether incoming messages must be voice mail
messages in order for the condition or exception to apply.

XML

<IsVoicemail>true | false</IsVoicemail>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conditions Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions Represents the exceptions that represent all the available rule exception conditions
for an Inbox rule.

Text value
A text value of true indicates that the message must be a voice mail message in order
for the condition or exception to apply. A value of false indicates that the message must
not be a voice mail message in order for the condition or exception to apply.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Item Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
IsWorkTime
Article • 03/29/2023 • 2 minutes to read

The IsWorkTime element represents whether the suggested meeting time occurs during scheduled work hours.

GetUserAvailabilityResponse

SuggestionsResponse

SuggestionDayResultArray

SuggestionDayResult

SuggestionArray

Suggestion

IsWorkTime

XML

<IsWorkTime>true or false</IsWorkTime>

boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Suggestion Represents a single meeting time suggestion.


The following is the XPath expression to this element:
/GetUserAvailabilityResponse/SuggestionsResponse/SuggestionDayResultArray/SuggestionDayResult[i]/SuggestionArray/Suggestion[i]

Text value
A text value that represents a Boolean value is required.

Remarks
The schema that describes this element is located in the EWS virtual directory of the computer that is running
MicrosoftExchange Server 2007 that has the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


IsWritable
Article • 03/29/2023 • 2 minutes to read

The IsWritable element specifies whether the underlying contact or Active Directory
recipient can be written to.

XML

<IsWritable> true | false </IsWritable>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Attribution (PersonaAttributionType)

Text value
A text value of true for the IsWritable element indicates that the contact or Active
Directory object is available for write access. A value of false indicates that the contact
or Active Directory object is not available for write access.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Item
Article • 03/29/2023 • 4 minutes to read

The Item element represents a generic item in the Exchange store.

XML

<Item>

<MimeContent/>

<ItemId/>

<ParentFolderId/>

<ItemClass/>

<Subject/>

<Sensitivity/>

<Body/>

<Attachments/>

<DateTimeReceived/>

<Size/>

<Categories/>

<Importance/>

<InReplyTo/>

<IsSubmitted/>

<IsDraft/>

<IsFromMe/>

<IsResend/>

<IsUnmodified/>

<InternetMessageHeaders/>

<DateTimeSent/>

<DateTimeCreated/>

<ResponseObjects/>

<ReminderDueBy/>

<ReminderIsSet/>

<ReminderMinutesBeforeStart/>

<DisplayCc/>

<DisplayTo/>

<HasAttachments/>

<ExtendedProperty/>

<Culture/>

<EffectiveRights/>

<LastModifiedName/>

<LastModifiedTime/>

<IsAssociated/>

<WebClientReadFormQueryString/>

<WebClientEditFormQueryString/>

<ConversationId/>

<UniqueBody/>

</Item>

ItemType
Attributes and elements
The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

MimeContent
Contains the native Multipurpose Internet Mail Extensions
(MIME) stream of an object that is represented in base64Binary
format.

ItemId
Contains the unique identifier and change key of an item in the
Exchange store. This property is read-only.

ParentFolderId Represents the identifier of the parent folder that contains the
item or folder. This property is read-only.

ItemClass
Represents the message class of an item.

Subject
Represents the subject for Exchange store items and response
objects. The subject is limited to 255 characters.

Sensitivity
Indicates the sensitivity level of an item.

Body
Represents the actual body content of a message.

Attachments
Contains the items or files that are attached to an item in the
Exchange store.

DateTimeReceived
Represents the date and time that an item in a mailbox was
received.

Size
Represents the size in bytes of an item. This property is read-
only.

Categories
Represents a collection of strings that identify to which
categories an item in the mailbox belongs.

Importance
Describes the importance of an item.

InReplyTo
Represents the identifier of the item to which this item is a
reply.
Element Description

IsSubmitted
Indicates whether an item has been submitted to the Outbox
default folder.

IsDraft
Represents whether an item has not yet been sent.

IsFromMe
Indicates whether a user sent an item to itself.

IsResend
Indicates whether the item had previously been sent.

IsUnmodified
Indicates whether the item has been modified.

InternetMessageHeaders
Represents the collection of all Internet message headers that
are contained within an item in a mailbox.

DateTimeSent
Represents the date and time that an item in a mailbox was
sent.

DateTimeCreated
Represents the date and time that a given item in the mailbox
was created.

ResponseObjects
Contains a collection of all the response objects that are
associated with an item in the Exchange store.

ReminderDueBy
Represents the date and time when the event occurs. This is
used by the ReminderMinutesBeforeStart element to
determine when the reminder is displayed.

ReminderIsSet
Indicates whether a reminder has been set for an item in the
Exchange store.

ReminderMinutesBeforeStart
Represents the number of minutes before an event when a
reminder is displayed.

DisplayCc
Represents the display string that is used for the contents of
the Cc box. This is the concatenated string of all Cc recipient
display names.

DisplayTo
Represents the display string that is used for the contents of
the To box. This is the concatenated string of all To recipient
display names.

HasAttachments
Represents a property that is set to true if an item has
attachments at least one visible attachment. This property is
read-only.

ExtendedProperty
Identifies extended properties on folders and items.

Culture
Represents the culture for a given item in a mailbox.
Element Description

EffectiveRights
Contains the client's rights based on the permission settings
for the item or folder. This element is read-only.

LastModifiedName
Contains the display name of the last user to modify an item.

LastModifiedTime
Indicates when an item was last modified.

IsAssociated
Indicates whether the item is associated with a folder.

WebClientReadFormQueryString Represents a URL to concatenate to the Microsoft Office


Outlook Web App endpoint to read an item in Outlook Web
App.

WebClientEditFormQueryString
Represents a URL to concatenate to the Outlook Web App
endpoint to edit an item in Outlook Web App.

ConversationId
Contains the identifier of an item or conversation.

UniqueBody
Represents an HTML fragment or plain text which represents
the unique body of this conversation.

Parent elements

Element Description

AdjacentMeetings
Describes all calendar items that are adjacent to a meeting
time.

AppendToItemField Identifies data to append to a single property of an item/folder


during an UpdateItem operation.

ConflictingMeetings Identifies all items that conflict with a meeting time.

Create (ItemSync)
Identifies a single item to create in the local client store.

ItemAttachment
Represents an Exchange item that is attached to another
Exchange item.

Items
Contains an array of items.

Items Contains an array of items to create in the folder that is


(NonEmptyArrayOfAllItemsType) identified by the ParentFolderId (TargetFolderIdType) element.

SetItemField
Represents an update to a single property of an item in an
UpdateItem operation.

Update (ItemSync)
Identifies a single item to update in the local client store.
Text value
None.

Remarks
It is important to note that ItemType is the base type for Task, CalendarItem, Contact,
DistributionList, and Message.

Message elements represent e-mail messages and all other items that are not strongly
typed by the Exchange Web Services (EWS) schema. Items such as IPM.Sharing and
IPM.InfoPath are returned as Message elements. Microsoft Exchange Server 2010 does
not return the base Item element in responses.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

EWS reference for Exchange


Item (UploadItemType)
Article • 03/29/2023 • 2 minutes to read

The Item element represents a single item to upload into a mailbox.

UploadItems

Items (NonEmptyArrayOfUploadItemsType)

Item (UploadItemType)

XML

<Item CreateAction="" IsAssociated="">

<ParentFolderId/>

<ItemId/>

<Data/>

</Item>

UploadItemType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

CreateAction Specifies the action for uploading an item into a mailbox. This attribute is
required.

IsAssociated
Specifies whether the uploaded item is a folder associated item. This attribute is a
Boolean value. A value of true indicates that the item is a folder associated item.
This attribute is optional.

CreateAction Attribute

Value Description

CreateNew
Indicates that a new copy of the original item is uploaded to the mailbox. The
ItemId element must not be present if the CreateNew value is used. The new
item identifier is returned in the response.
Value Description

Update
Specifies that the item indicated by the ItemId element will be updated. An
error is returned if the ItemId element is not present or if the item does not
exist in the folder identified by the ParentFolderId element.

UpdateOrCreate Indicates that an attempt is first made to update the item. If the item does not
exist in the folder specified by the ParentFolderId element, a new item is
created.

Child elements

Element Description

ParentFolderId Represents the identifier of the parent folder where a new item is created or that
contains the item to update.

ItemId
Contains the unique identifier and change key of an item to create or update in
the Exchange store.

Data Contains the data of a single item to upload into a mailbox.


(base64Binary)

Parent elements

Element Description

Items (NonEmptyArrayOfUploadItemsType)
Contains an array of item to upload into a mailbox.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
ExportItems operation

UploadItems operation
ItemAttachment
Article • 03/29/2023 • 2 minutes to read

The ItemAttachment element represents an Exchange item that is attached to another


Exchange item.

XML

<ItemAttachment>

<AttachmentId/>

<Name/>

<ContentType/>

<ContentId/>

<ContentLocation/>

<Size/>

<LastModifiedTime/>

<IsInline/>

<Item/>

</ItemAttachment>

XML

<ItemAttachment>

<AttachmentId/>

<Name/>

<ContentType/>

<ContentId/>

<ContentLocation/>

<Size/>

<LastModifiedTime/>

<IsInline/>

<Message/>

</ItemAttachment>

XML

<ItemAttachment>

<AttachmentId/>

<Name/>

<ContentType/>

<ContentId/>

<ContentLocation/>

<Size/>

<LastModifiedTime/>

<IsInline/>

<CalendarItem/>

</ItemAttachment>

XML

<ItemAttachment>

<AttachmentId/>

<Name/>

<ContentType/>

<ContentId/>

<ContentLocation/>

<Size/>

<LastModifiedTime/>

<IsInline/>

<Contact/>

</ItemAttachment>

XML

<ItemAttachment>

<AttachmentId/>

<Name/>

<ContentType/>

<ContentId/>

<ContentLocation/>

<Size/>

<LastModifiedTime/>

<IsInline/>

<Task/>

</ItemAttachment>

XML

<ItemAttachment>

<AttachmentId/>

<Name/>

<ContentType/>

<ContentId/>

<ContentLocation/>

<Size/>

<LastModifiedTime/>

<IsInline/>

<MeetingMessage/>

</ItemAttachment>

XML

<ItemAttachment>

<AttachmentId/>

<Name/>

<ContentType/>

<ContentId/>

<ContentLocation/>

<Size/>

<LastModifiedTime/>

<IsInline/>

<MeetingRequest/>

</ItemAttachment>

XML

<ItemAttachment>

<AttachmentId/>

<Name/>

<ContentType/>

<ContentId/>

<ContentLocation/>

<Size/>

<LastModifiedTime/>

<IsInline/>

<MeetingResponse/>

</ItemAttachment>

XML

<ItemAttachment>

<AttachmentId/>

<Name/>

<ContentType/>

<ContentId/>

<ContentLocation/>

<Size/>

<LastModifiedTime/>

<IsInline/>

<MeetingCancellation/>

</ItemAttachment>

ItemAttachmentType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Element Description

AttachmentId
Identifies the attachment.

Name Represents the name of the attachment.


(AttachmentType)

ContentType
Describes the Multipurpose Internet Mail Extensions (MIME) type of the
attachment content.

ContentId
Represents an identifier to the contents of the attachment. ContentId can
be set to any string value. Applications can use ContentId to implement
their own identification mechanisms.

ContentLocation
Contains the Uniform Resource Identifier (URI) that corresponds to the
location of the content of the attachment.

Size
Represents the size in bytes of the file attachment.

LastModifiedTime
Represents when the attachment was last modified.

IsInline
Represents whether the attachment appears inline within an item.

Item
Represents a generic Exchange item attachment.

Message
Represents an Exchange e-mail message attachment.

CalendarItem
Represents an Exchange calendar item attachment.

Contact
Represents an Exchange contact item attachment.

Task
Represents an Exchange task attachment.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

Parent elements

Element Description

Attachments Contains the items and/or files that are attached to an item in the Exchange store.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ItemChange
Article • 03/29/2023 • 2 minutes to read

The ItemChange element contains an item identifier and the updates to apply to the
item.

UpdateItem
ItemChanges
ItemChange

XML

<ItemChange>

<ItemId/>

<Updates>...</Updates>

</ItemChange>

XML

<ItemChange>

<OccurrenceItemId>...</OccurrenceItemId>

<Updates>...</Updates>

</ItemChange>

XML

<ItemChange>

<RecurringMasterItemId>...</RecurringMasterItemId>

<Updates>...</Updates>

</ItemChange>

ItemChangeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Element Description

ItemId
Contains the unique identifier and change key of an item in the
Exchange store. This element is required if the OccurrenceItemId or
RecurringMasterItemId element is not used.

OccurrenceItemId
Identifies a single occurrence of a recurring item. This element is
required if used. This element is required if the RecurringMasterItemId
or ItemId element is not used.

RecurringMasterItemId Identifies a recurrence master item by identifying one of its related


occurrence items' identifiers. This element is required if used. This
element is required if the OccurrenceItemId or ItemId element is not
used.

Updates (Item)
Contains an array that defines append, set, and delete changes to item
properties. This element is required.

Parent elements

Element Description

ItemChanges Contains an array of ItemChange elements that identify items and the updates to
apply to the items.
The following is the XPath expression to this element:
/UpdateItem/ItemChanges

Remarks
Only a single ItemId, OccurrenceItemId, or RecurringMasterItemId element can be used
in an ItemChange element.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd


Name Value

Can be Empty False

See also
UpdateItem operation
ItemChanges
Article • 03/29/2023 • 2 minutes to read

The ItemChanges element contains an array of ItemChange elements that identify items
and the updates to apply to the items.

UpdateItem

ItemChanges

XML

<ItemChanges>

<ItemChange/>

</ItemChanges>

NonEmptyArrayOfItemChangesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ItemChange
Contains an item identifier and the updates to apply to the item.

Parent elements

Element Description

UpdateItem
Defines a request to update items in a mailbox.
The following is the XPath expression to this element:
/UpdateItem

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
UpdateItem operation
ItemClass
Article • 03/29/2023 • 2 minutes to read

The ItemClass element represents the message class of an item.

XML

<ItemClass/>

ItemClassType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

AcceptItem
Represents an Accept reply to a meeting request.

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

Conversation Represents a single conversation.


(ConversationType)

DeclineItem
Represents a Decline reply to a meeting request.

DistributionList
Represents a distribution list.

GlobalItemClasses
Contains a list of item classes that represents all the item classes of the
conversation items in a mailbox.
Element Description

Item
Represents a generic Exchange item.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

TentativelyAcceptItem
Represents a Tentative reply to a meeting request.

Text value
A text value that is consistent with the item's type may be required. For example, if you
are creating or updating a message, the IPM.Note or another class that is consistent
with a message is required. An empty value is not allowed. But if you are creating or
updating an item, an empty type is valid.

An error is returned if the ItemClass is set to a value that is inconsistent with the item
type. For example, a message's ItemClass cannot be set to the ItemClass value for a
Task.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Item Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd


Item Value

Can be Empty True

See also
EWS XML elements in Exchange
ItemClasses
Article • 03/29/2023 • 2 minutes to read

The ItemClasses element represents the item classes that must be stamped on incoming
messages in order for the condition or exception to apply.

XML

<ItemClasses>

<String/>

</ItemClasses>

ArrayOfStringsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

String
Represents a single item class.

Parent elements

Element Description

Conditions Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions Represents the exceptions that represent all the available rule exception conditions
for an Inbox rule.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
ItemClasses (ArrayOfItemClassType)
Article • 03/29/2023 • 2 minutes to read

The ItemClasses element contains a list of item classes that represents all the item
classes of the conversation items in the current folder.

FindConversationResponse

Conversations

Conversation (ConversationType)

ItemClasses (ArrayOfItemClassType)

XML

<ItemClasses>

<String/>

</ItemClasses>

ArrayOfItemClassType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ItemClass
Represents the message class of an item.

Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.
Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be Empty False

See also
FindConversation operation

ApplyConversationAction operation

Conversations in EWS
ItemCount
Article • 03/29/2023 • 2 minutes to read

The ItemCount element specifies the total number of items in a search result.

XML

<ItemCount></ItemCount>

long

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SearchMailboxesResult | MailboxStat | NonIndexableItemStatistic

Text value
The text value of the ItemCount element identifies the total number of items in a search
result.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
ItemHits
Article • 03/29/2023 • 2 minutes to read

The ItemHits element identifies how many times a keyword was found.

XML

<ItemHits></ItemHits>

integer

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
KeywordStat

Text value
The text value of the ItemHits element is the number of times a keyword was found in a
keyword search.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
ItemHoldPeriod
Article • 03/29/2023 • 2 minutes to read

The ItemHoldPeriod element specifies the amount of time to hold content that matches
the mailbox query.

XML

<ItemHoldPeriod/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SetHoldOnMailboxes

Text value
The text value can be "Unlimited" or the string value of any Timespan value.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
SetHoldOnMailboxes

EWS XML elements in Exchange


ItemId
Article • 03/29/2023 • 3 minutes to read

The ItemId element contains the unique identifier and change key of an item in the
Exchange store.

XML

<ItemId Id="" ChangeKey="" />

ItemIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id
Identifies a specific item in the Exchange store. Id is case-sensitive; therefore,
comparisons between Ids must be case-sensitive or binary.

ChangeKey Identifies a specific version of an item.

A ChangeKey is required for the following scenarios:

- The UpdateItem element requires a ChangeKey if the ConflictResolution attribute


is set to AutoResolve. AutoResolve is a default value. If the ChangeKey attribute is
not included, the response will return a ResponseCode value equal to
ErrorChangeKeyRequired.

- The SendItem element requires a ChangeKey to test whether the attempted


operation will act upon the most recent version of an item. If the ChangeKey
attribute is not included in the ItemId or if the ChangeKey is empty, the response
will return a ResponseCode value equal to ErrorStaleObject.

Child elements
None.

Parent elements
Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

CopiedEvent
Represents an event when an item or folder is copied.

CreatedEvent
Represents an event when an item or folder is created.

Delete (ItemSync)
Identifies a single item to delete in the local client store.

DeletedEvent
Represents an event when an item or folder is deleted.

DistributionList
Represents a distribution list.

ExportItemsResponseMessage
Contains the status and results of a request to export a single
mailbox item.

FirstOccurrence
Represents the first occurrence of a recurring calendar item.

GlobalItemIds
Contains the collection of item identifiers for all conversation
items in a mailbox.

Ignore
Identifies items to skip during synchronization.

Item
Represents a generic Exchange item.

Item (UploadItemType)
Represents a single item to upload into a mailbox.

ItemChange
Contains an item identifier and the updates to apply to the
item.

The following is the XPath expression to this element:

/UpdateItem/ItemChanges/ItemChange[i]

ItemIds
Contains the unique identities of items, occurrence items, and
recurring master items used to delete, send, get, move, or copy
items in the Exchange store.

The following are the XPath expressions to this element:

/DeleteItem/ItemIds

/SendItem/ItemIds

/GetItem/ItemIds

/MoveItem/ItemIds

/CopyItem//ItemIds

ItemIds Contains an array of item identifiers that identify the items to


(NonEmptyArrayOfItemIdsType) export from a mailbox.
Element Description

LastOccurrence
Represents the last occurrence of a recurring calendar item.

Mailbox
Identifies a mail-enabled Active Directory directory service
object.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Message
Represents an Exchange e-mail message.

ModifiedEvent
Represents an event that occurs when an item is modified.

MovedEvent
Represents an event that occurs when an item is moved from
one parent folder to another parent folder.

NewMailEvent
Represents an event that is triggered by a new mail item in a
mailbox.

Occurrence Represents a single modified occurrence of a recurring calendar


item.

PlayOnPhone (Exchange Web Represents a request to read an item on a telephone.


Services)

RemoveItem
Removes an item from the Exchange store.

RoomList
Represents an e-mail address that identifies a list of meeting
rooms.

Task
Represents a task in the Exchange store.

UploadItemsResponseMessage
Contains the status and results of a request to upload a single
mailbox item.

UserConfiguration
Defines a single user configuration object.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
ExportItems operation
UploadItems operation
FindConversation operation
EWS XML elements in Exchange
ItemIds
Article • 03/29/2023 • 2 minutes to read

The ItemIds element contains the unique identities of items, occurrence items, and
recurring master items that are used to delete, send, get, move, or copy items in the
Exchange store.

XML

<ItemIds>

<ItemId/>

<OccurrenceItemId/>

<RecurringMasterItemId/>

</ItemIds>

NonEmptyArrayOfBaseItemIdsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ItemId
Contains the unique identifier and change key of an item in the
Exchange store.

OccurrenceItemId
Identifies a single occurrence of a recurring item.

RecurringMasterItemId Identifies a recurrence master item by identifying one of its related


occurrence items' identifiers.

Parent elements

Element Description
Element Description

Conversation Represents a single conversation.


(ConversationType)

DeleteItem
Defines a request to delete items in the Exchange store.
The following is the XPath expression to this element:
/DeleteItem

SendItem
The root element that defines a request to send items in the
Exchange store.
The following is the XPath expression to this element:
/SendItem

GetItem
Defines a request to get items from the Exchange store.
The following is the XPath expression to this element:
/GetItem

MoveItem
Defines a request to move items in the Exchange store.
The following is the XPath expression to this element:
/MoveItem

CopyItem
Defines a request to copy items in the Exchange store.
The following is the XPath expression to this element:
/CopyItem

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
DeleteItem operation
SendItem operation
GetItem operation
MoveItem operation
CopyItem operation
FindConversation operation
ItemIds (NonEmptyArrayOfItemIdsType)
Article • 03/29/2023 • 2 minutes to read

The ItemIds element contains an array of item identifiers that identify the items to
export from a mailbox.

ExportItems

ItemIds (NonEmptyArrayOfItemIdsType)

XML

<ItemIds>

<ItemId/>

</ItemIds>

NonEmptyArrayOfItemIdsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ItemId
Contains the unique identifier and change key of an item in the Exchange store.

Parent elements

Element Description

ExportItems
Represents a request to export items from a mailbox.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File Messages.xsd

Can be Empty False

See also
ExportItems operation

UploadItems operation
Items
Article • 03/29/2023 • 2 minutes to read

The Items element contains an array of items.

XML

<Items>

<Item/>

<Message/>

<CalendarItem/>

<Contact/>

<DistributionList/>

<MeetingMessage/>

<MeetingRequest/>

<MeetingResponse/>

<MeetingCancellation/>

<Task/>

<PostItem/>

</Items>

ArrayOfRealItemsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Item
Represents an item in the Exchange store.

Message
Represents an Exchange e-mail message.

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.
Element Description

MeetingMessage
Represents a meeting message in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

Task
Represents a task in the Exchange store.

PostItem
Represents a post item in the Exchange store.

Parent elements

Element Description

CopyItemResponseMessage
Contains the status and result of a CopyItem operation request.

CreateItemResponseMessage
Contains the status and result of a single CreateItem operation
request.

GetItemResponseMessage
Contains the status and result of a GetItem operation request.

GroupedItems Represents a collection of items that are the result of a grouped


FindItem operation call.

MoveItemResponseMessage
Contains the status and result of a MoveItem operation request.

RootFolder Contains the results of a search of a single root folder during a


(FindItemResponseMessage)
FindItem operation.

UpdateItemResponseMessage Contains the status and result of an UpdateItem operation


request.

Remarks
For information about the set of items in a CreateItem operation request, see Items
(NonEmptyArrayOfAllItemsType).

Message elements represent e-mail messages and all other items that are not strongly
typed by the Exchange Web Services (EWS) schema. Items such as IPM.Sharing and
IPM.InfoPath are returned as Message elements. Versions of Exchange starting with
Exchange Server 2010 do not return the base Item element in responses.
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Exchange that has the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS reference for Exchange

EWS XML elements in Exchange


Items
(ArrayOfNonIndexableItemDetailsType)
Article • 03/29/2023 • 2 minutes to read

The Items element contains an array of item details for non-indexable items.

XML

<Items>

<NonIndexableItemDetail/>

</Items>

ArrayOfNonIndexableItemDetailsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
NonIndexableItemDetail

Parent elements
NonIndexableItemDetailsResult

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
GetNonIndexableItemDetails operation

EWS XML elements in Exchange


Items (ArrayOfSearchPreviewItemsType)
Article • 03/29/2023 • 2 minutes to read

The Items element specifies a list of items available for preview as the results of a
SearchMailboxes operation.

XML

<Items>

<SearchPreviewItem>

</Items>

ArrayOfSearchPreviewItemsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
SearchPreviewItem

Parent elements
SearchMailboxesResult

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Items (NonEmptyArrayOfAllItemsType)
Article • 03/29/2023 • 2 minutes to read

The Items element contains a set of items to create.

XML

<Items>

<Item/>

<Message/>

<CalendarItem/>

<Contact/>

<DistributionList/>

<MeetingMessage/>

<MeetingRequest/>

<MeetingResponse/>

<MeetingCancellation/>

<Task/>

<ReplyToItem/>

<ForwardItem/>

<ReplyAllToItem/>

<AcceptItem/>

<TentativelyAcceptItem/>

<DeclineItem/>

<CancelCalendarItem/>

<RemoveItem/>

<PostReplyItem/>

<SuppressReadReceipt/>

<AcceptSharingInvitation/>

</Items>

NonEmptyArrayOfAllItemsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description
Element Description

Item
Represents an item in the Exchange store.

Message
Represents an Exchange email message.

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

MeetingMessage
Represents a meeting message in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

Task
Represents a task in the Exchange store.

ReplyToItem
Contains a reply to the sender of an item in the Exchange store.

ForwardItem
Contains an Exchange store item to forward to recipients.

ReplyAllToItem
Contains a reply to the sender and all identified recipients of an item in
the Exchange store.

AcceptItem
Represents an Accept reply to a meeting request.

TentativelyAcceptItem
Represents a Tentative reply to a meeting request.

DeclineItem
Represents a Decline reply to a meeting request.

CancelCalendarItem
Represents the response object that is used to cancel a meeting.

RemoveItem
Represents a response object that is used to remove a meeting item
when a MeetingCancellation message is received.

PostReplyItem
Contains a reply to a post item.

SuppressReadReceipt
Used to suppress read receipts.

AcceptSharingInvitation Used to accept an invitation that allows access to another user's


calendar or contacts data.

Parent elements

Element Description
Element Description

CreateItem
Defines the request to create an item in the Exchange store.
The following is the XPath expression to this element: /CreateItem

ConversationNode
Identifies a single node in a conversation.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File Messages.xsd

Can be Empty False

See also
CreateFolder operation

CreateItem operation

Creating Folders (Exchange Web Services)


Items
(NonEmptyArrayOfUploadItemsType)
Article • 03/29/2023 • 2 minutes to read

The Items element contains an array of items to upload into a mailbox.

UploadItems

Items (NonEmptyArrayOfUploadItemsType)

XML

<Items>

<Item/>

</Items>

NonEmptyArrayOfUploadItemsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Item (UploadItemType)
Represents a single item to upload into a mailbox.

Parent elements

Element Description

UploadItems
Represents a request to upload items into a mailbox.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File Messages.xsd

Can be Empty False

See also
ExportItems operation

UploadItems operation
ItemShape
Article • 03/29/2023 • 2 minutes to read

The ItemShape element identifies a set of properties to return in a GetItem operation,


FindItem operation, or SyncFolderItems operation response.

XML

<ItemShape>

<BaseShape/>

<IncludeMimeContent/>

<BodyType/>

<FilterHtmlContent/>
<ConvertHtmlCodePageToUTF8/>

<AdditionalProperties/>

</ItemShape>

ItemResponseShapeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

BaseShape
Identifies the basic configuration of properties to return in an
item or folder response.

IncludeMimeContent
Specifies whether the Multipurpose Internet Mail Extensions
(MIME) content of an item is returned in the response.

BodyType
Identifies how the body text is formatted in the response.

ConvertHtmlCodePageToUTF8 Indicates whether the item HTML body is converted to UTF8.

FilterHtmlContent
Specifies whether HTML content filtering is enabled.

AdditionalProperties
Identifies additional properties to return in a response.
Parent elements

Element Description

GetItem
Defines a request to retrieve items from a mailbox in the Exchange store.
The following is the XPath expression to this element:
/GetItem

FindItem
Defines a request to find all items that are contained in a folder.
The following is the XPath expression to this element:
/FindItem

SyncFolderItems
Defines a request to synchronize items in an Exchange store folder.
The following is the XPath expression to this element:
/SyncFolderItems

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetItem operation

FindItem operation
SyncFolderItems operation

EWS XML elements in Exchange


ItemVersion
Article • 03/29/2023 • 2 minutes to read

The ItemVersion element is intended for internal use only.

XML

<ItemVersion />

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
JobTitle
Article • 03/29/2023 • 2 minutes to read

The JobTitle element represents the job title of a contact.

XML

<JobTitle/>

String

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Text value
A text value is required if this element is used.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)

Updating Contacts

Deleting Contacts
JoinDate
Article • 03/29/2023 • 2 minutes to read

The JoinDate element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
JoinDate
(FederatedDirectoryGroupType)
Article • 03/29/2023 • 2 minutes to read

The JoinDate (FederatedDirectoryGroupType) element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
JoinedBy
Article • 03/29/2023 • 2 minutes to read

The JoinedBy element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
JoinOnlineMeetingUrl
Article • 03/29/2023 • 2 minutes to read

The JoinOnlineMeetingUrl element specifies the URL to join an online meeting.

XML

<JoinOnlineMeetingUrl></JoinOnlineMeetingUrl>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
CalendarItem

Text value
The text value of the JoinOnlineMeetingUrl element is the URL to the online meeting.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
JournalFolderPermissionLevel
Article • 03/29/2023 • 2 minutes to read

The JournalFolderPermissionLevel element contains the permissions for the default


Journal folder. This element was introduced in Microsoft Exchange Server 2007 Service
Pack 1 (SP1).

XML

<JournalFolderPermissionLevel>

None or Editor or Reviewer or Author or Custom

</JournalFolderPermissionLevel>

DelegateFolderPermissionLevelType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

DelegatePermissions Contains the delegate permission level settings for a user. This element
was introduced in Exchange 2007 SP1.

Text value
The following table lists the text values that represent the permission levels.

Permission level text values


Permission level Description

None The delegate user has no access permissions to the Journal folder.

Reviewer The delegate user can read items in the Journal folder.

Author The delegate user can read and create items in the Journal folder.

Editor The delegate user can read, create, and modify items in the Journal folder.

Custom The delegate user has custom access permissions to the Journal folder.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
AddDelegate operation

UpdateDelegate operation

EWS XML elements in Exchange

Adding Delegates
KeepProperties
Article • 03/29/2023 • 2 minutes to read

The KeepProperties element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False


See also
EWS XML elements in Exchange
Keyword
Article • 03/29/2023 • 2 minutes to read

The Keyword element specifies a single keyword.

XML

<Keyword></Keyword>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
KeywordStat

Text value
The text value of the Keyword element is the name of a single keyword that represents a
single keyword statistic.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Keywords
Article • 03/29/2023 • 2 minutes to read

The Keywords element specifies keywords for a FindMailboxStatisticsByKeywords


operation search.

XML

<KeyWords>

<String/>

</KeyWords>

ArrayOfStringsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
String

Parent elements
FindMailboxStatisticsByKeywords

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
KeywordStat
Article • 03/29/2023 • 2 minutes to read

The KeywordStat element specifies keyword statistic information.

XML

<KeywordStat>

<Keyword/>

<ItemHits>

<Size/>

</KeywordStat>

KeywordStatisticsSearchResultType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Keyword | ItemHits | Size (long)

Parent elements
KeywordStats

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
KeywordStatisticsSearchResult
Article • 03/29/2023 • 2 minutes to read

The KeywordStatisticsSearchResult element contains a single keyword search result.

XML

<KeywordStatisticsSearchResult>

<Keyword/>

<ItemHits/>

<Size/>

</KeywordStatisticsSearchResult>

KeywordStatisticsSearchResultType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Keyword | ItemHits | Size (long)

Parent elements
MailboxStatisticsSearchResult

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
KeywordStats
Article • 03/29/2023 • 2 minutes to read

The KeywordStats element specifies a list of one or more KeywordStat elements.

XML

<KeywordStats>

<KeywordStat/>

</KeywordStats>

ArrayOfKeywordStatisticsSearchResultsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
KeywordStat

Parent elements
SearchMailboxesResult

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Language
Article • 03/29/2023 • 2 minutes to read

The Language element contains the language used for the search query.

XML

<Language></Language>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SetHoldOnMailboxes | SearchMailboxes

Text value
The text value of the Language element is the language used in a discovery search.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
Language
(DiscoverySearchConfigurationType)
Article • 03/29/2023 • 2 minutes to read

The Language (DiscoverySearchConfigurationType) element identifies the culture to be


used for the culture-specific format of date ranges. It also specifies the language used in
a search query.

XML

<Language />

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
DiscoverySearchConfiguration

Text value
The text value of the Language (DiscoverySearchConfigurationType) element is a
culture or language.

Remarks
This element specifies the format of date ranges specified in the SearchMailboxes
operation or the SetHoldOnMailboxes operation.

This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
DiscoverySearchConfiguration

EWS XML elements in Exchange


LargeAudienceCap
Article • 03/29/2023 • 2 minutes to read

The LargeAudienceCap element specifies the maximum number of recipients for an


email message.

XML

<LargeAudienceCap></LargeAudienceCap>

integer

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
MailTipsConfiguration (MailTipsServiceConfiguration)

Text value
The text value of the LargeAudienceCap element is the maximum number of recipients
that can be addressed in an email message.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
LargeAudienceThreshold
Article • 03/29/2023 • 2 minutes to read

The LargeAudienceThreshold element represents the large audience threshold for a


client.

XML

<LargeAudienceThreshold/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MailTipsConfiguration Contains service configuration information for the


(MailTipsServiceConfiguration)
mail tips service.

Text value
The text value is an integer that represents the audience threshold that indicates that
the message is going to more than one person.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
LastAttemptTime
Article • 03/29/2023 • 2 minutes to read

The LastAttemptTime element contains the time and date at which the last attempt to
index the item was made.

XML

<LastAttemptTime></LastAttemptTime>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
NonIndexableItemDetail

Text value
The text value of the LastAttemptTime element represents a time and date at which the
last attempt to index the item was made.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
LastDeliveryTime
Article • 03/29/2023 • 2 minutes to read

The LastDeliveryTime element contains the delivery time of the message that was last
received in this conversation in the current folder.

FindConversationResponse

Conversations

Conversation (ConversationType)

LastDeliveryTime

XML

<LastDeliveryTime/>

xs:dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.

Text value
The text value of the LastDeliveryTime element is the date and time of the message that
was last received in this conversation in the current folder.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindConversation operation

ApplyConversationAction operation

EWS XML elements in Exchange

Conversations in EWS
LastModifiedName
Article • 03/29/2023 • 2 minutes to read

The LastModifiedName element contains the display name of the last user to modify an
item. This element is read-only. This element was introduced in Microsoft Exchange
Server 2007 Service Pack 1 (SP1).

XML

<LastModifiedName/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents a generic Exchange item.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.
Element Description

MeetingResponse
Represents a meeting response in the Exchange store.

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

PostItem
Represents a post item in the Exchange store. This element was introduced
in Exchange 2007 SP1.

Text value
The text value is a string value that represents the display name of the last user to
modify the item.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

EWS reference for Exchange


LastModifiedTime
Article • 03/29/2023 • 2 minutes to read

The LastModifiedTime element indicates when an item was last modified. This element
is read-only.

XML

<LastModifiedTime/>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

FileAttachment
Represents a file that is attached to an item in the Exchange store.

Item
Represents a generic Exchange item.

ItemAttachment
Represents an Exchange item that is attached to another Exchange item.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.
Element Description

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

PostItem
Represents a post item in the Exchange store. This element was introduced
in Exchange 2007 SP1.

Text value
The text value represents the time at which the last user modified the item.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

EWS reference for Exchange


LastName
Article • 03/29/2023 • 2 minutes to read

The LastName element represents the last name of a contact.

XML

<LastName/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CompleteName
Represents the complete name of a contact.

Text value
The text value is a string that represents the last name of a contact.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)


LastOccurrence
Article • 03/29/2023 • 2 minutes to read

The LastOccurrence element represents the last occurrence of a recurring calendar item.

XML

<LastOccurrence>

<ItemId/>

<Start/>

<End/>

<OriginalStart/>

</LastOccurrence>

OccurrenceInfoType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ItemId
Contains the unique identifier and change key of the last occurrence of a recurring
calendar item.

Start
Represents the start time of the last occurrence of a recurring calendar item.

End Represents the end time of the last occurrence of a recurring calendar item.

OriginalStart Represents the original start time of the last occurrence of a recurring calendar
item.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.
Element Description

MeetingRequest
Represents a meeting request in the Exchange store.

Remarks
This element is valid if CalendarItemType has the RecurringMaster value.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

EWS reference for Exchange


LastResponseTime
Article • 03/29/2023 • 2 minutes to read

The LastResponseTime element represents the date and time of the latest response
received.

XML

<LastResponseTime/>

DateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Attendee
Represents attendees and resources for a meeting.

Text value
A text value that represents the date and time of the latest response is required.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange 2007 that has the Client Access server role
installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Latitude
Article • 03/29/2023 • 2 minutes to read

The Latitude element specifies the latitude of the location of the associated postal
address.

XML

<Latitude></Latitude>

double

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Value (PersonaPostalAddressType) | PostalAddress (PersonaPostalAddressType)

Text value
The text value of the Latitude element is the latitude of the associated postal address.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
LegacyDN
Article • 03/29/2023 • 2 minutes to read

The LegacyDN element identifies a mailbox by its legacy distinguished name.

XML

<LegacyDN></LegacyDN>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Mailboxes (NonEmptyArrayOfLegacyDNsType)

Text value
The text value of LegacyDN element is the legacy distinguished name of the target
mailbox.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
LegacyDn
(FederatedDirectoryGroupType)
Article • 03/29/2023 • 2 minutes to read

The LegacyDn (FederatedDirectoryGroupType) element is intended for internal use


only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
LegacyDn
(NonEmptyArrayOfLegacyDNsType)
Article • 03/29/2023 • 2 minutes to read

The LegacyDn (NonEmptyArrayOfLegacyDNsType) element is intended for internal use


only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
LegacyFreeBusyStatus
Article • 03/29/2023 • 2 minutes to read

The LegacyFreeBusyStatus element represents the free/busy status of the calendar item.

XML

<LegacyFreeBusyStatus/>

LegacyFreeBusyType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Text value
A text value is required for this element. The following are the possible text values for
this element:

Free
Tentative
Busy
OOF
WorkingElsewhere
NoData

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
LobbyBypass
Article • 03/29/2023 • 2 minutes to read

The LobbyBypass element specifies the online meeting setting to bypass the virtual
lobby.

XML

<LobbyBypass> Disabled | EnabledForGatewayParticipants </LobbyBypass>

LobbyBypassType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
OnlineMeetingSettings

Text value
The text value of the LobbyBypass element can be either Disabled or
EnabledForGatewayParticipants. The Disabled value indicates that the lobby bypass is
disabled so all meeting attendees must access through the virtual lobby. The
EnabledForGatewayParticipants value indicates that the lobby bypass is enabled for
telephone participants.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Location
Article • 03/29/2023 • 2 minutes to read

The Location element represents the location of a meeting, appointment, or persona.

XML

<Location/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Text value
A text value that represents the location of a meeting or appointment is required.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Location (CalendarEventDetails)
Article • 03/29/2023 • 2 minutes to read

The Location element represents the location field of the calendar item.

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

FreeBusyView

CalendarEventArray

CalendarEvent

CalendarEventDetails

Location (CalendarEventDetails)

XML

<Location/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarEventDetails Provides additional information for a calendar event.


The following is the XPath expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/CalendarEventArray/CalendarEvent[i]/CalendarEventDeta

Text value
A text value is required if this element is returned in the response. This element can contain an empty string. This element is optional if the
CalendarEventDetails element is used.

Remarks
This element maps to a PR_Location MAPI named property.

The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server
2007 that has the Client Access server role installed.

Element information
Name Value
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


Location (ReminderMessageDataType)
Article • 03/29/2023 • 2 minutes to read

The Location (ReminderMessageDataType) element specifies the location of the


calendar item that the reminder is for.

XML

<Location/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Reminder

Text value
The text value of the Location element is the location of the calendar item.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
Reminder

EWS XML elements in Exchange


LocationBasedStateDefinition
Article • 03/29/2023 • 2 minutes to read

The LocationBasedStateDefinition element is intended for internal use only.

XML

<LocationBasedStateDefinition />

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Locations
Article • 03/29/2023 • 2 minutes to read

The Locations element specifies an array of location values and the identifiers of their
source attributions for the associated persona.

XML

<Locations>

<StringAttributedValue/>

<Locations>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
StringAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
LocationSource
Article • 03/29/2023 • 2 minutes to read

The LocationSource element specifies information about the origin of the associated
postal address, for example, a contact or a telephone book.

XML

<LocationSource> None | LocationServices | PhonebookServices | Device |


Contact | Resource </LocationSource>

LocationSourceType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Value (PersonaPostalAddressType) | PostalAddress (PersonaPostalAddressType)

Text value
The text values for the LocationSource element are listed in the following table:

LocationSource element text values

Value Description

None There is no location source.

LocationServices The information was obtained from location services.


Value Description

PhonebookServices The information was obtained from phonebook services.

Device The information was obtained from the device.

Contact The information was obtained from a contact.

Resource The information was obtained from a resource.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
LocationUri
Article • 03/29/2023 • 2 minutes to read

The LocationUri element contains a string specifying a Uniform Resource Identifier (URI)
of the associated postal address.

XML

<LocationUri></LocationUri>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Value (PersonaPostalAddressType) | PostalAddress (PersonaPostalAddressType)

Text value
The text value of the LocationUri element is a string that specifies a URI to information
about a postal address.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Longitude
Article • 03/29/2023 • 2 minutes to read

The Longitude element specifies the longitude of the location of the associated postal
address.

XML

<Longitude></Longitude>

double

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Value (PersonaPostalAddressType) | PostalAddress (PersonaPostalAddressType)

Text value
The text value of the Longitude element is the longitudinal coordinates of the postal
address.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Mailbox
Article • 03/29/2023 • 2 minutes to read

The Mailbox element identifies a mail-enabled Active Directory object.

XML

<Mailbox>

<Name/>

<EmailAddress/>

<RoutingType/>

<MailboxType/>

<ItemId/>

</Mailbox>

EmailAddressType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Name Defines the name of the mailbox user. This element is optional.
(EmailAddressType)

EmailAddress Defines the Simple Mail Transfer Protocol (SMTP) address of a mailbox
(NonEmptyStringType) user. This element is optional.

RoutingType Defines the routing that is used for the mailbox. The default is SMTP.
(EmailAddress)
This element is optional.

MailboxType
Defines the mailbox type of a mailbox user. This element is optional.

ItemId
Defines the item identifier of a contact or private distribution list for
recipients from a user's contacts folder. This element is optional.
Parent elements

Element Description

ExpandDL
Defines a request to expand a distribution list.

The following is the XPath expression to this element: /ExpandDL

ToRecipients
Contains an array of recipients of an item.

CcRecipients
Represents a collection of recipients that will receive a copy of the
message.

BccRecipients
Represents a collection of recipients to receive a blind carbon copy (Bcc)
of an e-mail.

ReplyTo
Identifies an array of e-mail addresses to which replies should be sent.

Sender
Identifies the sender of an item.

From
Represents the addressee from whom the message was sent.

Organizer
Represents the organizer of a meeting.

DistinguishedFolderId Identifies default Microsoft Exchange Server 2007 folders.

The following are the XPath expressions to this element:

/CreateItem/ParentFolderId/DistinguishedFolderId

/CreateFolder/ParentFolderId/DistinguishedFolderId

Resolution
Contains a single resolved entity.

DLExpansion
Contains an array of mailboxes that are contained in a distribution list.

Attendee
Represents attendees and resources for a calendar item.

CreateManagedFolder Defines a request to add managed folders to a mailbox.

AddDelegate
Defines a request to add delegates to a mailbox.

GetDelegate
Defines a request to get information about delegates to a mailbox.

RemoveDelegate
Defines a request to remove delegates from a mailbox.

UpdateDelegate
Defines a request to update delegates in a mailbox.

ReceivedBy
Describes the delegate in a delegate access scenario.

ReceivedRepresenting Describes the principal in a delegate access scenario.

Member
Represents a member of a distribution list.
Text value
None.

Remarks
The EmailAddress (NonEmptyStringType) and ItemId elements identify a mailbox or
distribution list.

The EmailAddress (NonEmptyStringType) element identifies a mailbox or distribution list


by SMTP address.

The ItemId element identifies a mailbox by an item identifier, which is associated with a
particular mailbox.

The ItemId element cannot be used for sending a message to a distribution list or a
contact in a public contacts folder. An error will be thrown if this is used in a CreateItem,
UpdateItem, or SendItem operation when an attempt is made to send a message to a
distribution list or contact in a contacts public folder. Use the ExpandDL operation to get
the SMTP address and then send the message by using the EmailAddress
(NonEmptyStringType) element instead of the ItemId element.

Another element, Mailbox (Availability), provides information for availability operations.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Mailbox (string)
Article • 03/29/2023 • 2 minutes to read

The Mailbox element contains an identifier for a mailbox.

XML

<Mailbox></Mailbox>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
NonIndexableItemStatistic | MailboxHoldStatus | FailedMailbox | MailboxSearchScope

Text value
The text value for the Mailbox element is the identifier for a mailbox.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Mailbox (Availability)
Article • 03/29/2023 • 2 minutes to read

The Mailbox element represents the mailbox user for a SetUserOofSettings or


GetUserOofSettings request.

XML

<Mailbox>

<Name>...</Name>

<Address>...</Address>

<RoutingType>...</RoutingType>

</Mailbox>

EmailAddressType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Name Represents the display name of the mailbox user. This element is optional in the
(EmailAddress) SetUserOofSettingsRequest. The GetUserOofSettingsRequest will return this
element.

Address Represents the e-mail address of the mailbox user. This element is required.
(string)

RoutingType Represents the routing protocol for the message. This element is optional in the
(EmailAddress) SetUserOofSettingsRequest. The GetUserOofSettingsRequest will return this
element.

Parent elements

Element Description
Element Description

GetUserOofSettingsRequest Used to get a mailbox user's Out of Office (OOF) settings and
messages.
The following is the XPath expression to this element:
/GetUserOofSettingsRequest

SetUserOofSettingsRequest Used to set a mailbox user's OOF settings and messages.


The following is the XPath expression to this element:
/SetUserOofSettingsRequest

Remarks
The e-mail address is used to identify the calendar folder that contains the OOF settings.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserOofSettings operation
SetUserOofSettings operation
Mailbox (PreviewItemMailboxType)
Article • 03/29/2023 • 2 minutes to read

The Mailbox element contains the mailbox identifier and the user's primary Simple Mail
Transfer Protocol (SMTP) address.

XML

<Mailbox>

<MailboxId/>

<PrimarySmtpAddress/>

</Mailbox>

PreviewItemMailboxType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MailboxId | PrimarySmtpAddress (string)

Parent elements
SearchPreviewItem

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


MailboxCulture
Article • 03/29/2023 • 2 minutes to read

The MailboxCulture element indicates the culture to use when opening a mailbox. This
element occurs in the SOAP header.

XML

<MailboxCulture/>

MailboxCultureType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Text value
The text value indicates the language that is used in the Exchange Web Service
operations. The possible values for this element are described by RFC 3066.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Exchange Server with the Client Access server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MailboxData
Article • 03/29/2023 • 2 minutes to read

The MailboxData element represents an individual mailbox user and options for the
type of data to be returned about the mailbox user.

GetUserAvailabilityRequest

MailboxDataArray

MailboxData

XML

<MailboxData>

<Email>...</Email>

<AttendeeType>...</AttendeeType>

<ExcludeConflicts>...</ExcludeConflicts>

<MailboxData>

MailboxData

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Email Represents the mailbox user for a GetUserAvailability query.


(EmailAddressType)

AttendeeType
Represents the type of attendee identified in the Email (EmailAddressType)
element. This is used in requests for meeting suggestions.

ExcludeConflicts
Specifies whether to return suggested times for calendar times that conflict
among the attendees.
Parent elements

Element Description

MailboxDataArray
Contains a list of mailboxes to query for availability information.
The following is the XPath to this element:
/GetUserAvailabilityRequest/MailboxDataArray[i]

Remarks
A client application can define one to many MailboxData elements.

7 Note

The schema that describes this element is located in the EWS virtual directory of
the computer that is running Exchange Server 2007 that has the Client Access
server role installed.

Example
XML

<MailboxDataArray>

<MailboxData
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Email>

<Name></Name>

<Address>[email protected]</Address>

<RoutingType>SMTP</RoutingType>

</Email>

<AttendeeType>Organizer</AttendeeType>

<ExcludeConflicts>false</ExcludeConflicts>

</MailboxData>

</MailboxDataArray>

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema


Element Example

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
GetUserAvailabilityRequest
Getting User Availability
MailboxDataArray
Article • 03/29/2023 • 2 minutes to read

The MailboxDataArray element contains a list of mailboxes to query for availability


information.

GetUserAvailabilityRequest

MailboxDataArray

MailboxData

XML

<MailboxDataArray>

<MailboxData>...</MailboxData>

</MailboxDataArray>

ArrayOfMailboxData

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

MailboxData Represents an individual mailbox user and options for the type of data to be
returned about the mailbox user.

Parent elements

Element Description
Element Description

GetUserAvailabilityRequest Contains the arguments used to obtain user availability information.


This is a root element.
The following is the XPath to this element:
/GetUserAvailabilityRequest

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetUserAvailability operation
GetUserAvailabilityRequest
Getting User Availability
Mailboxes (ArrayOfStringsType)
Article • 03/29/2023 • 2 minutes to read

The Mailboxes element contains a list of mailboxes affected by the hold.

XML

<Mailboxes>

<String/>

</Mailboxes>

ArrayOfStringsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
String

Parent elements
SetHoldOnMailboxes

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
Mailboxes (ArrayOfUserMailboxesType)
Article • 03/29/2023 • 2 minutes to read

The Mailboxes element contains an array of mailboxes.

XML

<Mailboxes>

<UserMailbox/>

</Mailboxes>

ArrayOfUserMailboxesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
UserMailbox

Parent elements
FindMailboxStatisticsByKeywords

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
Mailboxes
(NonEmptyArrayOfLegacyDNsType)
Article • 03/29/2023 • 2 minutes to read

The Mailboxes element specifies an array of mailboxes identified by legacy


distinguished name.

XML

<Mailboxes>

<LegacyDN/>

</Mailboxes>

NonEmptyArrayofLegacyDNsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
LegacyDN

Parent elements
GetNonIndexableItemStatistics

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
MailboxFull
Article • 03/29/2023 • 2 minutes to read

The MailboxFull element indicates whether the mailbox for the recipient is full.

XML

<MailboxFull>true | false</MailboxFull>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MailTips
Represents values for various types of mail tips.

Text value
This element can be either true or false. A value of true indicates that the mailbox has
reached its capacity; a value of false indicates that it has not reached capacity.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MailboxHoldResult
Article • 03/29/2023 • 2 minutes to read

The MailboxHoldResult element contains the result of the GetHoldOnMailboxes


request.

XML

<MailboxHoldResult>

<HoldId/>

<Query/>

<MailboxHoldStatuses/>

</MailboxHoldResult>

MailboxHoldResultType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
HoldId | Query | MailboxHoldStatuses

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
MailboxHoldStatus
Article • 03/29/2023 • 2 minutes to read

The MailboxHoldStatus element specifies the hold status of the mailbox.

XML

<MailboxHoldStatus>

<Mailbox/>

<Status/>

<AdditionalInfo/>

</MailboxHoldStatus>

MailboxHoldStatusType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Mailbox (string) | Status (HoldStatusType) | AdditionalInfo

Parent elements
MailboxHoldStatuses

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
MailboxHoldStatuses
Article • 03/29/2023 • 2 minutes to read

The MailboxHoldStatuses element specifies a list of one or more MailboxHoldStatus


elements.

XML

<MailboxHoldStatuses>

<MailboxHoldStatus/>
</MailboxHoldStatuses>

ArrayOfMailboxHoldStatusType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MailboxHoldStatus

Parent elements
MailboxHoldResult

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
MailboxId
Article • 03/29/2023 • 2 minutes to read

The MailboxId element specifies an identifier for the mailbox that is accessed by
discovery search.

XML

<MailboxId></MailboxId>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
MailboxStat | Mailbox (PreviewItemMailboxType)

Text value
The text value of the MailboxId element is the mailbox identifier of a mailbox that is
accessed for discovery search.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
MailboxQuery
Article • 03/29/2023 • 2 minutes to read

The MailboxQuery element specifies a query and the scope of a discovery search.

XML

<MailboxQuery>

<Query/>

<MailboxSearchScopes/>

</MailboxQuery>

MailboxQueryType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Query | MailboxSearchScopes

Parent elements
SearchQueries

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
MailboxScope
Article • 03/29/2023 • 2 minutes to read

The MailboxScope element identifies whether a search or fetch for a conversation


should span either the primary mailbox, archive mailbox, or both the primary and
archive mailbox.

XML

<MailboxScope> PrimaryOnly | ArchiveOnly | All </MailboxScope>

MailboxSearchLocationType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
FindConversation | GetConversationItems | Conversation (ConversationType)

Text value
The text value of the MailboxScope element is the scope for finding or getting items in
a conversation across either primary mailboxes, archive mailboxes, or both primary and
archive mailboxes. A text value of PrimaryOnly indicates a scope that targets the
primary mailbox for a user. A text value of ArchiveOnly indicates a scope that targets
the archive mailbox for a user. A text value of All indicates a scope that targets both the
primary mailbox and archive mailbox.
Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


MailboxSearchScope
Article • 03/29/2023 • 2 minutes to read

The MailboxSearchScope element specifies a mailbox and a search scope for a


discovery search.

XML

<MailboxSearchScope>

<Mailbox/>

<SearchScope/>

<MailboxSearchScope>

MailboxSearchScopeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Mailbox (string) | SearchScope

Parent elements
MailboxSearchScopes

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
MailboxSearchScopes
Article • 03/29/2023 • 2 minutes to read

The MailboxSearchScopes element specifies a list of one or more mailboxes and


associated search scopes for a discovery search.

XML

<MailboxSearchScopes>

<MailboxSearchScope/>

<MailboxSearchScope>

MailboxSearchScopeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MailboxSearchScope

Parent elements
MailboxQuery

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


MailboxSmtpAddress
Article • 03/29/2023 • 2 minutes to read

The MailboxSmtpAddress element represents the SMTP address of the user whose
Inbox rules are to be retrieved or updated; or whose password expiration date is to be
retrieved.

XML

<MailboxSmtpAddress/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

GetInboxRules
Defines a request to get the Inbox rules on a mailbox in the server
store.

GetPasswordExpirationDate Defines a request to get the password expiration date of an email


account.

UpdateInboxRules
Defines a request to update the Inbox rules in a mailbox in the
server store.

Text value
None.
Remarks
The MailboxSmtpAddress element is an optional element. If the MailboxSmtpAddress
element is omitted, the address of the logged on user is used.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
GetInboxRules operation
GetPasswordExpirationDate operation
UpdateInboxRules operation
EWS XML elements in Exchange
MailboxStat
Article • 03/29/2023 • 2 minutes to read

The MailboxStat element specifies statistics for a mailbox searched by discovery search.

XML

<MailboxStat>

<MailboxId/>

<DisplayName/>

<ItemCount/>

<Size/>

</MailboxStat>

MailboxStatisticsItemType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MailboxId | DisplayName (string) | ItemCount | Size (long)

Parent elements
MailboxStats

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


MailboxStatisticsSearchResult
Article • 03/29/2023 • 2 minutes to read

The MailboxStatisticsSearchResult element contains the results of a keyword search.

XML

<MailboxStatisticsSearchResult>

<UserMailbox/>

<KeywordStatisticsSearchResult/>

</MailboxStatisticsSearchResult>

MailboxStatisticsSearchResultType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
UserMailbox | KeywordStatisticsSearchResult

Parent elements
FindMailboxStatisticsByKeywordsResponseMessage

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name messages schema

Validation file messages.xsd

Can be empty
MailboxStats
Article • 03/29/2023 • 2 minutes to read

The MailboxStats element specifies a list of one or more MailboxStat elements.

XML

<MailboxStats>

<MailboxStat/>

</MailboxStats>

ArrayOfMailboxStatisticsItemsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MailboxStat

Parent elements
SearchMailboxesResult

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
MailboxType
Article • 03/29/2023 • 2 minutes to read

The MailboxType element represents the type of mailbox that is represented by the e-
mail address.

XML

<MailboxType>Mailbox | PublicDL | PrivateDL | Contact | PublicFolder |


Unknown | OneOff | GroupMailbox</MailboxType>

MailboxTypeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Mailbox
Identifies a fully resolved e-mail address.

RoomList
Identifies a list of meeting rooms.

Text value
The following table lists the possible values for the MailboxType element.

Value Description

Mailbox Represents a mail-enabled Active Directory object.


Value Description

PublicDL Represents a public distribution list.

PrivateDL Represents a private distribution list in a user's mailbox.

Contact Represents a contact in a user's mailbox.

PublicFolder Represents a public folder.

Unknown Represents an unknown type of mailbox.

OneOff Represents a one-off member of a personal distribution list.

GroupMailbox Represents a group mailbox.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MailboxType (MasterMailboxType)
Article • 03/29/2023 • 2 minutes to read

The MailboxType (MasterMailboxType) element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
MailTips
Article • 03/29/2023 • 2 minutes to read

The MailTips element represents values for various types of mail tips.

XML

<MailTips>

<RecipientAddress/>

<PendingMailTips/>

<OutOfOffice/>

<MailboxFull/>

<CustomMailTip/>

<TotalMemberCount/>

<ExternalMemberCount/>

<MaxMessageSize/>

<DeliveryRestricted/>

<IsModerated/>

<InvalidRecipient/>

</MailTips>

MailTips

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

RecipientAddress
Represents the mailbox of the recipient.

PendingMailTips
Indicates that the mail tips in this element could not be evaluated before
the server's processing timeout expired.

OutOfOffice
Represents the response message and a duration time for sending the
response message.

MailboxFull
Indicates whether the mailbox for the recipient is full.
Element Description

CustomMailTip
Represents a customized mail tip message.

TotalMemberCount
Represents the count of all members in a group.

ExternalMemberCount Represents the count of external members in a group.

MaxMessageSize
Represents the maximum message size the recipient can accept.

DeliveryRestricted
Indicates whether delivery restrictions will prevent the sender's message
from reaching the recipient.

IsModerated
Indicates whether the recipient's mailbox is being moderated.

InvalidRecipient Indicates whether the recipient is invalid.


(MailTips)

Parent elements

Element Description

MailTipsResponseMessageType
Represents mail tips settings.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False


See also
EWS XML elements in Exchange
MailTipsConfiguration
(MailTipsServiceConfiguration)
Article • 03/29/2023 • 2 minutes to read

The MailTipsConfiguration element contains service configuration information for the


mail tips service.

XML

<MailTipsConfiguration>

<MailTipsEnabled/>

<MaxRecipientsPerGetMailTipsRequest/>

<MaxMessageSize/>

<LargeAudienceThreshold/>

<ShowExternalRecipientCount/>

<InternalDomains/>

</MailTipsConfiguration>

MailTipsServiceConfiguration

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

MailTipsEnabled
Indicates whether the mail tips service is available. This
element is required.

MaxRecipientsPerGetMailTipsRequest Indicates the maximum number of recipients that can be


passed to the GetMailTips operation. This element is
required.

MaxMessageSize
Represents the maximum message size a recipient can
accept. This element is required.
Element Description

LargeAudienceThreshold
Represents the large audience threshold for a client. This
element is required.

ShowExternalRecipientCount
Indicates whether consumers of the GetMailTips
operation have to show mail tips that indicate the number
of external recipients to which a message is addressed.
This element is required.

InternalDomains (SmtpDomainList)
Identifies the list of internal SMTP domains of the
organization. This element is required.

Parent elements

Element Description

ServiceConfigurationResponseMessageType
Contains service configuration settings.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MailTipsEnabled
Article • 03/29/2023 • 2 minutes to read

The MailTipsEnabled element indicates whether the mail tips service is available.

XML

<MailTipsEnabled>true | false</MailTipsEnabled>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MailTipsConfiguration Contains service configuration information for the


(MailTipsServiceConfiguration)
mail tips service.

Text value
The text value of this element is true if the mail tips service is available. The value is false
if the mail tips service is not available.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MailTipsRequested
Article • 03/29/2023 • 2 minutes to read

The MailTipsRequested element contains the types of mail tips requested from the
service.

XML

<MailTipsRequested/>

MailTipTypes

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

GetMailTips
Contains the recipients and types of mail tips to retrieve.

Text value
The following table lists the possible values for the MailTipsRequested element.

Value Description

All Represents all available mail tips.

OutOfOfficeMessage Represents the Out of Office (OOF) message.


Value Description

MailboxFullStatus Represents the status for a mailbox that is full.

CustomMailTip Represents a custom mail tip.

ExternalMemberCount Represents the count of external members.

TotalMemberCount Represents the count of all members.

MaxMessageSize Represents the maximum message size a recipient can accept.

DeliveryRestriction Indicates whether delivery restrictions will prevent the sender's message
from reaching the recipient.

ModerationStatus Indicates whether the sender's message will be reviewed by a moderator.

InvalidRecipient Indicates whether the recipient is invalid.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MailTipsResponseMessageType
Article • 03/29/2023 • 2 minutes to read

The MailTipsResponseMessageType element represents mail tips settings.

XML

<MailTipsResponseMessageType ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<MailTips/>

</MailTipsResponseMessageType>

MailTipsResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and reserved for future use. This element contains a value
of 0.

MessageXml
Provides additional error response information.

MailTips
Represents values for various types of mail tips.

Parent elements
Element Description

ResponseMessages Represents a list of mail tips response


(ArrayOfMailTipsResponseMessageType)
messages.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MakeItemImmutable
Article • 03/29/2023 • 2 minutes to read

The MakeItemImmutable element specifies a Boolean value that indicates whether an


item should be made read-only.

XML

<MakeItemImmutable>true | false</MakeItemImmutable>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
UpdateItemInRecoverableItems

Text value
A text value of true for the MakeItemImmutable element indicates that the item should
be made read-only. A value of false indicates that the item allows read-write access.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
ManagedByOrganization
Article • 03/29/2023 • 2 minutes to read

The ManagedByOrganization element specifies the managing organization.

XML

<ManagedByOrganization></ManagedByOrganization>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
DiscoverySearchConfiguration

Text value
The text value of the ManagedByOrganization element identifies the organization that
manages the discovery search.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
ManagedFolderId
Article • 03/29/2023 • 2 minutes to read

The ManagedFolderId element contains the folder ID of the managed folder.

XML

<ManagedFolderId/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ManagedFolderInformation
Contains information about a managed folder.

Text value
A text value is required for this element.

Remarks
The ManagedFolderId identifier value is the equivalent of the Guid property that is
retrieved by the Get-ManagedFolder Microsoft Windows Powershell command. It is also
the value of the objectGUID attribute for the managed folder in the Active Directory
directory service.
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
CreateManagedFolder operation

EWS XML elements in Exchange

Deleting Folders

Adding Managed Folders


ManagedFolderInformation
Article • 03/29/2023 • 2 minutes to read

The ManagedFolderInformation element contains information about a managed


custom folder.

XML

<ManagedFolderInformation>

<CanDelete/>

<CanRenameOrMove/>

<MustDisplayComment/>

<HasQuota/>

<IsManagedFoldersRoot/>

<ManagedFolderId/>

<Comment/>

<StorageQuota/>

<FolderSize/>

<HomePage/>

</ManagedFolderInformation>

ManagedFolderInformationType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

CanDelete
Indicates whether a managed folder can be deleted by a customer.

CanRenameOrMove
Indicates whether a given managed folder can be renamed or moved by
the customer.

MustDisplayComment
Indicates whether the managed folder comment must be displayed.

HasQuota
Indicates whether the managed folder has a quota.
Element Description

IsManagedFoldersRoot Indicates whether the managed folder is the root for all managed
folders.

ManagedFolderId
Contains the folder ID of the managed folder.

Comment
Contains the comment that is associated with a managed folder.

StorageQuota
Describes the storage quota for the managed folder.

FolderSize
Describes the total size of all the contents of a managed folder.

HomePage
Specifies the URL that will be the default home page for the managed
folder.

Parent elements

Element Description

Folder
Represents a folder in the Exchange store. Managed custom folders can only be
subfolders of the folder named Managed Folders.

CalendarFolder Not applicable.

ContactsFolder Not applicable.

SearchFolder
Not applicable.

TasksFolder
Not applicable.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd


Element Example

Can be empty False

See also
CreateManagedFolder operation

EWS XML elements in Exchange

Adding Managed Folders


ManagementRole
Article • 03/29/2023 • 2 minutes to read

The ManagementRole element specifies a list of user and application management


roles.

XML

<ManagementRole>

<UserRoles/>

<ApplicationRoles/>

</ManagementRole>

ManagementRoleType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
UserRoles | ApplicationRoles

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Manager
Article • 03/29/2023 • 2 minutes to read

The Manager element represents a contact's manager.

XML

<Manager/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Text value
A text value is required if this element is used.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)

Updating Contacts

Deleting Contacts
Managers
Article • 03/29/2023 • 2 minutes to read

The Managers element specifies an array of manager names and the identifiers of their
source attributions for a persona.

XML

<Managers>

<StringAttributedValue/>

</Managers>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
StringAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
ManagerMailbox
Article • 03/29/2023 • 2 minutes to read

The ManagerMailbox element contains SMTP information that identifies the mailbox of
the contact's manager.

XML

<ManagerMailbox>

<Mailbox/>

</ManagerMailbox>

SingleRecipientType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Mailbox
Identifies a mail enabled Active Directory object that identifies the sender.

Parent elements

Element name Description

Contact
Represents a contact item in the Exchange store.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

This element was introduced in Exchange Server 2010 Service Pack 2 (SP2).
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)


Manifest
Article • 03/29/2023 • 2 minutes to read

The Manifest element contains the base64-encoded app manifest file.

XML

<Manifest></Manifest>

base64Binary

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Manifests | InstallApp | ClientExtension

Text value
The text value of the Manifest element is an ASCII representation of the base64 binary
encoded form of the client app manifest file.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Manifests
Article • 03/29/2023 • 2 minutes to read

The Manifests element contains a collection of base64-encoded app manifests that are
installed for the email account.

XML

<Manifests>

<Manifest/>

</Manifests>

ArrayOfAppManifestsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Manifest

Parent elements
GetAppManifestsResponse

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
MarkAllItemsAsRead
Article • 03/29/2023 • 2 minutes to read

The MarkAllItemsAsRead element contains the request to mark all the items in a folder
as read.

XML

<MarkAllItemsAsRead>

<ReadFlag/>

<SuppressReadReceipts/>

<FolderIds/>

</MarkAllItemsAsRead>

MarkAllItemsAsReadType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ReadFlag | SuppressReadReceipts | FolderIds

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
MarkAllItemsAsReadResponse
Article • 03/29/2023 • 2 minutes to read

The MarkAllItemsAsReadResponse element specifies the response to a


MarkAllItemsAsRead request.

XML

<MarkAllItemsAsReadResponse>

<ResponseMessages/>

</MarkAllItemsAsReadResponse>

MarkAllItemsAsReadResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ResponseMessages

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
MarkAllItemsAsReadResponseMessage
Article • 03/29/2023 • 2 minutes to read

The MarkAllItemsAsReadResponseMessage element specifies the response message


for a MarkAllItemsAsRead request.

XML

<MarkAllItemsAsReadResponseMessage>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</MarkAllItemsAsReadResponseMessage>

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml

Parent elements
ResponseMessages

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
MarkAsJunk
Article • 03/29/2023 • 2 minutes to read

The MarkAsJunk element specifies the request to move an item to the junk mail folder
and to add the sender to the blocked sender list.

XML

<MarkAsJunk IsJunk="true | false" MoveItem="true | false">

<ItemIds/>

</MarkAsJunk>

MarkAsJunkType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

IsJunk A text value of true for the IsJunk attribute indicates that the email sender is added
to the blocked sender list. A value of false indicates that the email sender is removed
from the blocked sender list, if the email sender is already on the list.

MoveItem A text value of true for the MoveItem attribute indicates that the item is moved to
the default junk mail folder. A value of false indicates that the item is not moved to
the default junk mail folder.

Child elements
ItemIds

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
MarkAsJunkResponse
Article • 03/29/2023 • 2 minutes to read

The MarkAsJunkResponse element specifies the response to a MarkAsJunk request.

XML

<MarkAsJunkResponse>

<ResponseMessages/>

</MarkAsJunkResponse>

MarkAsJunkResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ResponseMessages

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
MarkAsJunkResponseMessage
Article • 03/29/2023 • 2 minutes to read

The MarkAsJunkResponseMessage element specifies the response message for a


MarkAsJunk request.

XML

<MarkAsJunkResponseMessage>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<MovedItemId/>

</MarkAsJunkResponseMessage>

MarkAsJunkResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml | MovedItemId

Parent elements
ResponseMessages

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
MarkAsRead
Article • 03/29/2023 • 2 minutes to read

The MarkAsRead element indicates whether messages are to be marked as read.

XML

<MarkAsRead>true | false</MarkAsRead>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Actions
Represents the set of actions that are available to be taken on a message when the
conditions are fulfilled.

Text value
A text value of true indicates that the message must be marked as read. A value of false
indicates that messages must not be marked as read.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
MarkImportance
Article • 03/29/2023 • 2 minutes to read

The MarkImportance element specifies the importance that is to be stamped on


messages.

XML

<MarkImportance/>

ImportanceChoicesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Actions
Represents the set of actions that are available to be taken on a message when the
conditions are fulfilled.

Text value
The text value for this element is restricted to one of the following string values:

Low

Normal

High
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
Master
Article • 03/29/2023 • 2 minutes to read

The Master element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
MaxChangesReturned
Article • 03/29/2023 • 2 minutes to read

The MaxChangesReturned element describes the maximum number of changes that


can be returned in a synchronization response.

SyncFolderItems

MaxChangesReturned

XML

<MaxChangesReturned/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

SyncFolderItems
Defines a request to synchronize items in an Exchange store folder.

Text value
The text value represents an integer that describes the maximum number of items that
are returned in a single synchronization call. The value must be between 1 and 512,
inclusive.
Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
SyncFolderItems operation

EWS XML elements in Exchange


MaximumBodySize
Article • 03/29/2023 • 2 minutes to read

The MaximumBodySize element specifies the maximum size of the item body to return
in a response.

XML

<MaximumBodySize></MaximumBodySize>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
ItemShape

Text value
The text value of the MaximumBodySize element indicates the maximum size of the
Body property returned in the response. This is measured in kilobytes.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
MaximumNonWorkHourResultsByDay
Article • 03/29/2023 • 2 minutes to read

The MaximumNonWorkHourResultsByDay element specifies the number of suggested


results for meeting times outside regular working hours per day.

GetUserAvailabilityRequest

SuggestionsViewOptions

MaximumNonWorkHourResultsByDay

XML

<MaximumNonWorkHourResultsByDay>...</MaximumNonWorkHourResultsByDay>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

SuggestionsViewOptions
Contains the options for obtaining meeting suggestion information.
The following is the XPath to this element:
/GetUserAvailabilityRequest/SuggestionViewOptions

Text value
A text value is required. The text value represents an integer.

Remarks
This element is required if the SuggestionsViewOptions element is used.

7 Note

The schema that describes this element is located in the EWS virtual directory of
the computer that is running MicrosoftExchange Server 2007 that has the Client
Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

Getting User Availability


MaximumResultsByDay
Article • 03/29/2023 • 2 minutes to read

The MaximumResultsByDay element specifies the number of suggested meeting times


per a day returned in the response.

GetUserAvailabilityRequest

SuggestionsViewOptions

MaximumResultsByDay

XML

<MaximumResultsByDay>...</MaximumResultsByDay>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

SuggestionsViewOptions
Contains the options for obtaining meeting suggestion information.
The following is the XPath to this element:
/GetUserAvailabilityRequest/SuggestionViewOptions

Text value
A text value is required. The text value represents an integer.

Remarks
This element is required if the SuggestionsViewOptions element is used.

7 Note

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
Getting User Availability
MaximumSize
Article • 03/29/2023 • 2 minutes to read

The MaximumSize element represents the maximum size that a message must be in
order for the condition or exception to apply.

XML

<Maximum/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

WithinSizeRange Specifies the minimum and maximum sizes that incoming messages must be
in order for the condition or exception to apply.

Text value
The text value is an integer that identifies the maximum size of the message in bytes.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
MinimumSize

EWS XML elements in Exchange


MaxItems
Article • 03/29/2023 • 2 minutes to read

The MaxItems element specifies the maximum number of items to return in the request.

XML

<MaxItems/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
GetReminders

Text value
The text value of the MaxItems element is the maximum number of items to return in
the request. This number cannot be less than zero or greater than 200.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetReminders

EWS XML elements in Exchange


MaxItemsToReturn
Article • 03/29/2023 • 2 minutes to read

The MaxItemsToReturn element identifies the maximum number of conversations items


to return in a GetConversationItems response.

XML

<MaxItemsToReturn></MaxItemsToReturn>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
GetConversationItems

Text value
The text value of the MaxItemsToReturn element is the maximum number of
conversation items to return in a response.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
MaxMessageSize
Article • 03/29/2023 • 2 minutes to read

The MaxMessageSize element represents the maximum message size a recipient can
accept.

XML

<MaxMessageSize/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MailTips
Represents values for various types of mail tips.

MailTipsConfiguration Contains service configuration information for the


(MailTipsServiceConfiguration)
mail tips service.

Text value
The text value is an integer that represents the maximum message size a recipient can
accept. This value can be measured in kilobytes or megabytes.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MaxRecipientsPerGetMailTipsRequest
Article • 03/29/2023 • 2 minutes to read

The MaxRecipientsPerGetMailTipsRequest element indicates the maximum number of


recipients that can be passed to the GetMailTips operation.

XML

<MaxRecipientsPerGetMailTipsRequest/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MailTipsConfiguration Contains service configuration information for the


(MailTipsServiceConfiguration)
mail tips service.

Text value
The text value is an integer that represents the maximum number of recipients that can
be passed to the GetMailTips operation.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetMailTips operation

EWS XML elements in Exchange


MeetingCancellation
Article • 03/29/2023 • 5 minutes to read

The MeetingCancellation element represents a meeting cancellation in the Exchange


store.

XML

<MeetingCancellation>

<MimeContent/>

<ItemId/>

<ParentFolderId/>

<ItemClass/>

<Subject/>

<Sensitivity/>

<Body/>

<Attachments/>

<DateTimeReceived/>

<Size/>

<Categories/>

<Importance/>

<InReplyTo/>

<IsSubmitted/>

<IsDraft/>

<IsFromMe/>

<IsResend/>

<IsUnmodified/>

<InternetMessageHeaders/>

<DateTimeSent/>

<DateTimeCreated/>

<ResponseObjects/>

<ReminderDueBy/>

<ReminderIsSet/>

<ReminderMinutesBeforeStart/>

<DisplayCc/>

<DisplayTo/>

<HasAttachments/>

<ExtendedProperty/>

<Culture/>

<EffectiveRights/>

<ReceivedBy/>

<ReceivedRepresenting/>

<LastModifiedName/>

<LastModifiedTime/>

<IsAssociated/>

<WebClientReadFormQueryString/>

<WebClientEditFormQueryString/>

<ConversationId/>

<UniqueBody/>

<Sender/>

<ToRecipients/>

<CcRecipients/>

<BccRecipients/>

<IsReadReceiptRequested/>

<IsDeliveryReceiptRequested/>

<ConversationIndex/>
<ConversationTopic/>
<From/>

<InternetMessageId/>
<IsRead/>

<IsResponseRequested/>

<References/>

<ReplyTo/>

<AssociatedCalendarItemId/>

<IsDelegated/>

<IsOutOfDate/>

<HasBeenProcessed/>

<ResponseType/>

</MeetingCancellation>

MeetingCancellationMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

MimeContent
Contains the native MIME stream of an object that is
represented in base64Binary format.

ItemId
Contains the unique identifier and change key of an item in the
Exchange store. This property is read-only.

ParentFolderId Represents the identifier of the parent folder that contains the
item or folder. This property is read-only.

ItemClass
Represents the message class of an item.

Subject
Represents the subject for Exchange store items and response
objects. The subject is limited to 255 characters.

Sensitivity
Indicates the sensitivity level of an item.
Element Description

Body
Represents the actual body content of a message.

Attachments
Contains the items or files that are attached to an item in the
Exchange store.

DateTimeReceived
Represents the date and time that an item in a mailbox was
received.

Size
Represents the size in bytes of an item. This property is read-
only.

Categories
Represents a collection of strings that identify to which
categories an item in the mailbox belongs.

Importance
Describes the importance of an item.

InReplyTo
Represents the identifier of the item to which this item is a
reply.

IsSubmitted
Indicates whether an item has been submitted to the Outbox
default folder.

IsDraft
Represents whether an item has not yet been sent.

IsFromMe
Indicates whether a user sent an item to him or herself.

IsResend
Indicates whether the item had previously been sent.

IsUnmodified
Indicates whether the item has been modified.

InternetMessageHeaders
Represents the collection of all Internet message headers that
are contained within an item in a mailbox.

DateTimeSent
Represents the date and time that an item in a mailbox was
sent.

DateTimeCreated
Represents the date and time that a given item in the mailbox
was created.

ResponseObjects
Contains a collection of all the response objects that are
associated with an item in the Exchange store.

ReminderDueBy
Represents the date and time when the event occurs. This is
used by the ReminderMinutesBeforeStart element to
determine when the reminder is displayed.

ReminderIsSet
Indicates whether a reminder has been set for an item in the
Exchange store.
Element Description

ReminderMinutesBeforeStart
Represents the number of minutes before an event that a
reminder is displayed.

DisplayCc
Represents the display string that is used for the contents of
the Cc box. This is the concatenated string of all Cc recipient
display names.

DisplayTo
Represents the display string that is used for the contents of
the To box. This is the concatenated string of all To recipient
display names.

HasAttachments
Represents a property that is set to true if an item has at least
one visible attachment. This property is read-only.

ExtendedProperty
Identifies extended properties on folders and items.

Culture
Represents the culture for a given item in a mailbox.

EffectiveRights
Contains the client's rights based on the permission settings
for the item or folder. This element is read-only.

ReceivedBy
Identifies the delegate in a delegate access scenario.

ReceivedRepresenting
Identifies the principal in a delegate access scenario.

LastModifiedName
Contains the display name of the last user to modify an item.

LastModifiedTime
Indicates when an item was last modified.

IsAssociated
Indicates whether the item is associated with a folder.

WebClientReadFormQueryString Represents a URL to concatenate to the Microsoft Office


Outlook Web App endpoint to read an item in Outlook Web
App.

WebClientEditFormQueryString
Represents a URL to concatenate to the Outlook Web App
endpoint to edit an item in Outlook Web App.

ConversationId
Contains the identifier of an item or conversation.

UniqueBody
Represents an HTML fragment or plain text which represents
the unique body of this conversation.

Sender
Identifies the sender of an item.

ToRecipients
Contains a set of recipients of a message.

CcRecipients
Represents a collection of recipients that will receive a copy of
the message.
Element Description

BccRecipients
Represents a collection of recipients to receive a blind carbon
copy (Bcc) of an e-mail.

IsReadReceiptRequested
Indicates whether the sender of an item requests a read
receipt.

IsDeliveryReceiptRequested
Indicates whether the sender of an item requests a delivery
receipt.

ConversationIndex
Contains a binary ID that represents the thread to which this
message belongs.

ConversationTopic
Represents the conversation identifier.

From
Represents the addressee from whom the message was sent.

InternetMessageId
Represents the Internet message identifier of an item.

IsRead
Indicates whether a message has been read.

IsResponseRequested
Indicates whether a response to an e-mail message is
requested.

References
Represents the Usenet header that is used to correlate replies
with their original messages.

ReplyTo
Identifies a set of addresses to which replies should be sent.

AssociatedCalendarItemId
Represents the calendar item that is associated with a
MeetingMessage.

IsDelegated
Indicates whether a meeting was handled by an account with
delegate access.

IsOutOfDate
Indicates whether a meeting message is out-of-date.

HasBeenProcessed
Indicates whether a meeting message item has been
processed.

ResponseType
Represents the type of recipient response received for a
meeting.

EffectiveRights
Contains the client's rights based on the permission settings
for the item or folder. This element is read-only. This element
was introduced in Microsoft Exchange Server 2007 Service Pack
1 (SP1).

ReceivedBy
Identifies the delegate in a delegate access scenario. This
element was introduced in Exchange 2007 SP1.
Element Description

ReceivedRepresenting
Identifies the principal in a delegate access scenario. This
element was introduced in Exchange 2007 SP1.

UID
Identifies a calendar item.

RecurrenceId
Used to identify a specific instance of a recurring calendar
item.

DateTimeStamp
Indicates the date and time that an instance of an iCalendar
object was created.

Parent elements

Element Description

AdjacentMeetings
Identifies all calendar items that are adjacent to a meeting
time.

AppendToItemField Identifies data to append to a single property of an item


during an UpdateItem operation.

ConflictingMeetings Identifies all items that conflict with a meeting time.

Create (ItemSync)
Identifies a single item to create in the local client store.

Items
Contains an array of items.

Items Contains an array of items to create.


(NonEmptyArrayOfAllItemsType)

ItemAttachment
Represents an Exchange item that is attached to another
Exchange item.

SetItemField
Represents an update to a single property of an item in an
UpdateItem operation.

Update (ItemSync)
Identifies a single item to update in the local client store.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MeetingDurationInMinutes
Article • 03/29/2023 • 2 minutes to read

The MeetingDurationInMinutes element specifies the duration of the meeting to be


suggested.

GetUserAvailabilityRequest

SuggestionsViewOptions

MeetingDurationInMinutes

XML

<MeetingDurationInMinutes>...</MeetingDurationInMinutes>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

SuggestionsViewOptions
Contains the options for obtaining meeting suggestion information.
The following is the XPath to this element:
/GetUserAvailabilityRequest/SuggestionViewOptions

Text value
A text value is required. The text value represents an integer.

Remarks
This element is required if the SuggestionsViewOptions element is used.

7 Note

The schema that describes this element is located in the EWS virtual directory of
the computer that is running MicrosoftExchange Server 2007 that has the Client
Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

Getting User Availability


MeetingMessage
Article • 03/29/2023 • 5 minutes to read

The MeetingMessage element represents a meeting in the Exchange store.

XML

<MeetingMessage>

<MimeContent/>

<ItemId/>

<ParentFolderId/>

<ItemClass/>

<Subject/>

<Sensitivity/>

<Body/>

<Attachments/>

<DateTimeReceived/>

<Size/>

<Categories/>

<Importance/>

<InReplyTo/>

<IsSubmitted/>

<IsDraft/>

<IsFromMe/>

<IsResend/>

<IsUnmodified/>

<InternetMessageHeaders/>

<DateTimeSent/>

<DateTimeCreated/>

<ResponseObjects/>

<ReminderDueBy/>

<ReminderIsSet/>

<ReminderMinutesBeforeStart/>

<DisplayCc/>

<DisplayTo/>

<HasAttachments/>

<ExtendedProperty/>

<Culture/>

<Sender/>

<ToRecipients/>

<CcRecipients/>

<BccRecipients/>

<IsReadReceiptRequested/>

<IsDeliveryReceiptRequested/>

<ConversationIndex/>
<ConversationTopic/>
<From/>

<InternetMessageId/>
<IsRead/>

<IsResponseRequested/>

<References/>

<ReplyTo/>

<AssociatedCalendarItemId/>

<IsDelegated/>

<IsOutOfDate/>

<HasBeenProcessed/>

<ResponseType/>

<EffectiveRights/>

<ReceivedBy/>

<ReceivedRepresenting/>

<LastModifiedName/>

<LastModifiedTime/>

<IsAssociated/>

<WebClientReadFormQueryString/>

<WebClientEditFormQueryString/>

<ConversationId/>

<UniqueBody/>

</MeetingMessage>

MeetingMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

MimeContent
Contains the native MIME stream of an object that is
represented in base64Binary format.

ItemId
Contains the unique identifier and change key of an item in the
Exchange store. This property is read-only.

ParentFolderId Represents the identifier of the parent folder that contains the
item or folder. This property is read-only.

ItemClass
Represents the message class of an item.

Subject
Represents the subject for Exchange store items and response
objects. The subject is limited to 255 characters.

Sensitivity
Contains the status for an item's sensitivity.

Body
Represents the actual body content of a message.
Element Description

Attachments
Contains the items or files that are attached to an item in the
Exchange store.

DateTimeReceived
Represents the date and time that an item in a mailbox was
received.

Size
Represents the size in bytes of an item. This property is read-
only.

Categories
Represents a collection of strings that identify to which
categories an item in the mailbox belongs.

Importance
Describes the importance of an item.

InReplyTo
Represents the identifier of the item to which this item is a
reply.

IsSubmitted
Indicates whether an item has been submitted to the Outbox
default folder.

IsDraft
Represents whether an item has not yet been sent.

IsFromMe
Indicates whether a user sent an item to him or herself.

IsResend
Indicates whether the item had previously been sent.

IsUnmodified
Indicates whether the item has been modified.

InternetMessageHeaders
Represents the collection of all Internet message headers that
are contained within an item in a mailbox.

DateTimeSent
Represents the date and time that an item in a mailbox was
sent.

DateTimeCreated
Represents the date and time that a given item in the mailbox
was created.

ResponseObjects
Contains a collection of all the response objects that are
associated with an item in the Exchange store.

ReminderDueBy
Represents the date and time when the event occurs. This is
used by the ReminderMinutesBeforeStart element to
determine when the reminder is displayed.

ReminderIsSet
Indicates whether a reminder has been set for an item in the
Exchange store.

ReminderMinutesBeforeStart
Represents the number of minutes before an event when a
reminder is displayed.
Element Description

DisplayCc
Represents the display string that is used for the contents of
the Cc box. This is the concatenated string of all Cc recipient
display names.

DisplayTo
Represents the display string that is used for the contents of
the To box. This is the concatenated string of all To recipient
display names.

HasAttachments
Represents a property that is set to true if an item has at least
one visible attachment. This property is read only.

ExtendedProperty
Identifies extended properties on folders and items.

Culture
Represents the culture for a given item in a mailbox.

Sender
Identifies the sender of an item.

ToRecipients
Contains a set of recipients of a message.

CcRecipients
Represents a collection of recipients that will receive a copy of
the message.

BccRecipients
Represents a collection of recipients to receive a blind carbon
copy (Bcc) of an e-mail.

IsReadReceiptRequested
Indicates whether the sender of an item requests a read
receipt.

IsDeliveryReceiptRequested
Indicates whether the sender of an item requests a delivery
receipt.

ConversationIndex
Contains a binary ID that represents the thread to which this
message belongs.

ConversationTopic
Represents the conversation identifier.

From
Represents the addressee from whom the message was sent.

InternetMessageId
Represents the Internet message identifier of an item.

IsRead
Indicates whether a message has been read.

IsResponseRequested
Indicates whether a response to an e-mail message is
requested.

References
Represents the Usenet header that is used to correlate replies
with their original messages.

ReplyTo
Identifies a set of addresses to which replies should be sent.
Element Description

AssociatedCalendarItemId
Represents the calendar item that is associated with a
MeetingMessage.

IsDelegated
Indicates whether a meeting was handled by an account with
delegate access.

IsOutOfDate
Indicates whether a meeting message is out-of-date.

HasBeenProcessed
Indicates whether a meeting message item has been
processed.

ResponseType
Represents the type of recipient response received for a
meeting.

EffectiveRights
Contains the client's rights based on the permission settings
for the item or folder. This element is read-only. This element
was introduced in Microsoft Exchange Server 2007 Service Pack
1 (SP1).

ReceivedBy
Identifies the delegate in a delegate access scenario.

ReceivedRepresenting
Identifies the principal in a delegate access scenario.

LastModifiedName
Contains the display name of the last user to modify an item.

LastModifiedTime
Indicates when an item was last modified.

IsAssociated
Indicates whether the item is associated with a folder.

WebClientReadFormQueryString Represents a URL to concatenate to the Microsoft Office


Outlook Web App endpoint to read an item in Outlook Web
App.

WebClientEditFormQueryString
Represents a URL to concatenate to the Outlook Web App
endpoint to edit an item in Outlook Web App.

ConversationId
Contains the identifier of an item or conversation.

UniqueBody
Represents an HTML fragment or plain text which represents
the unique body of this conversation.

UID
Identifies a calendar item.

RecurrenceId
Used to identify a specific instance of a recurring calendar
item.

DateTimeStamp
Indicates the date and time that an instance of an iCalendar
object was created.
Parent elements

Element Description

AdjacentMeetings
Describes all calendar items that are adjacent to a meeting
time.

AppendToItemField Identifies data to append to a single property of an item


during an UpdateItem operation.

ConflictingMeetings Identifies all items that conflict with a meeting time.

Create (ItemSync)
Identifies a single item to create in the local client store.

Update (ItemSync)
Identifies a single item to update in the local client store.

Items
Contains an array of items.

Items Contains an array of items to create in the folder identified by


(NonEmptyArrayOfAllItemsType) the ParentFolderId (TargetFolderIdType) element.

SetItemField
Represents an update to a single property of an item in an
UpdateItem operation.

ItemAttachment
Represents an Exchange item that is attached to another
Exchange item.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd


Element Example

Can be Empty False

See also
EWS XML elements in Exchange
MeetingRequest
Article • 03/29/2023 • 8 minutes to read

The MeetingRequest element represents a meeting request in the Exchange store.

XML

<MeetingRequest>

<MimeContent/>

<ItemId/>

<ParentFolderId/>

<ItemClass/>

<Subject/>

<Sensitivity/>

<Body/>

<Attachments/>

<DateTimeReceived/>

<Size/>

<Categories/>

<Importance/>

<InReplyTo/>

<IsSubmitted/>

<IsDraft/>

<IsFromMe/>

<IsResend/>

<IsUnmodified/>

<InternetMessageHeaders/>

<DateTimeSent/>

<DateTimeCreated/>

<ResponseObjects/>

<ReminderDueBy/>

<ReminderIsSet/>

<ReminderMinutesBeforeStart/>

<DisplayCc/>

<DisplayTo/>

<HasAttachments/>

<ExtendedProperty/>

<Culture/>

<Sender/>

<ToRecipients/>

<CcRecipients/>

<BccRecipients/>

<IsReadReceiptRequested/>

<IsDeliveryReceiptRequested/>

<ConversationIndex/>
<ConversationTopic/>
<From/>

<InternetMessageId/>
<IsRead/>

<IsResponseRequested/>

<References/>

<ReplyTo/>

<AssociatedCalendarItemId/>

<IsDelegated/>

<IsOutOfDate/>

<HasBeenProcessed/>

<ResponseType/>

<MeetingRequestType/>

<IntendedFreeBusyStatus/>

<Start/>

<End/>

<OriginalStart/>

<IsAllDayEvent/>

<LegacyFreeBusyStatus/>

<Location/>

<When/>

<IsMeeting/>

<IsCancelled/>

<IsRecurring/>

<MeetingRequestWasSent/>

<CalendarItemType/>

<MyResponseType/>

<Organizer/>

<RequiredAttendees/>
<OptionalAttendees/>
<Resources/>

<ConflictingMeetingCount/>

<AdjacentMeetingCount/>

<ConflictingMeetings/>

<AdjacentMeetings/>

<Duration/>

<TimeZone/>

<AppointmentReplyTime/>

<AppointmentSequenceNumber/>

<AppointmentState/>

<Recurrence/>

<FirstOccurrence/>

<LastOccurrence/>

<ModifiedOccurrences/>

<DeletedOccurrences/>

<MeetingTimeZone/>

<StartTimeZone/>

<EndTimeZone/>

<ConferenceType/>

<AllowNewTimeProposal/>

<IsOnlineMeeting/>

<MeetingWorkspaceUrl/>

<NetShowUrl/>

<EffectiveRights/>

<ReceivedBy/>

<ReceivedRepresenting/>

<LastModifiedName/>

<LastModifiedTime/>

<IsAssociated/>

<WebClientReadFormQueryString/>

<WebClientEditFormQueryString/>

<ConversationId/>

<UniqueBody/>

</MeetingRequest>

MeetingRequestMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

MimeContent
Contains the native Multipurpose Internet Mail Extensions
(MIME) stream of an object represented in base64Binary
format.

ItemId
Contains the unique identifier and change key of an item in the
Exchange store. This property is read-only.

ParentFolderId Represents the identifier of the parent folder that contains the
item or folder. This property is read-only.

ItemClass
Represents the message class of an item.

Subject
Represents the subject for Exchange store items and response
objects. The subject is limited to 255 characters.

Sensitivity
Indicates the sensitivity level of an item.

Body
Represents the actual body content of a message.

Attachments
Contains the items or files that are attached to an item in the
Exchange store.

DateTimeReceived
Represents the data and time that an item in a mailbox was
received.

Size
Represents the size in bytes of an item. This property is read-
only.

Categories
Represents a collection of strings that identify to which
categories an item in the mailbox belongs.
Element Description

Importance
Describes the importance of an item.

InReplyTo
Represents the identifier of the item to which this item is a
reply.

IsSubmitted
Indicates whether an item has been submitted to the Outbox
default folder.

IsDraft
Indicates whether an item has not yet been sent.

IsFromMe
Indicates whether a user sent an item to itself.

IsResend
Indicates whether the item had previously been sent.

IsUnmodified
Indicates whether the item has been modified.

InternetMessageHeaders
Represents the collection of all Internet message headers
contained within an item in a mailbox.

DateTimeSent
Represents the date and time that an item in a mailbox was
sent.

DateTimeCreated
Represents the date and time that a given item in the mailbox
was created.

ResponseObjects
Contains a collection of all the response objects that are
associated with an item in the Exchange store.

ReminderDueBy
Represents the date and time when the event occurs. This is
used by the ReminderMinutesBeforeStart element to
determine when the reminder is displayed.

ReminderIsSet
Indicates whether a reminder has been set for an item in the
Exchange store.

ReminderMinutesBeforeStart
Represents the number of minutes before an event when a
reminder is displayed.

DisplayCc
Represents the display string that is used for the contents of
the CC line. This is the concatenated string of all CC recipient
display names.

DisplayTo
Represents the display string that is used for the contents of
the To line. This is the concatenated string of all To recipient
display names.

HasAttachments
Represents a property that is set to true if an item has at least
one visible attachment. This property is read only.

ExtendedProperty
Identifies extended properties on folders and items.
Element Description

Culture
Represents the culture for a given item in a mailbox.

Sender
Identifies the sender of an item.

ToRecipients
Contains a set of recipients of a message.

CcRecipients
Represents a collection of recipients that will receive a copy of
the message.

BccRecipients
Represents a collection of recipients to receive a blind carbon
copy (Bcc) of an e-mail.

IsReadReceiptRequested
Indicates whether the sender of an item requests a read
receipt.

IsDeliveryReceiptRequested
Indicates whether the sender of an item requests a delivery
receipt.

ConversationIndex
Contains a binary ID that represents the thread to which this
message belongs.

ConversationTopic
Represents the conversation identifier.

From
Represents the addressee from whom the message was sent.

InternetMessageId
Represents the Internet message identifier of an item.

IsRead
Indicates whether a message has been read.

IsResponseRequested
Indicates whether a response to an e-mail message is
requested.

References
Represents the Usenet header that is used to correlate replies
with their original messages.

ReplyTo
Identifies a set of addresses to which replies should be sent.

AssociatedCalendarItemId
Represents the calendar item that is associated with a
MeetingMessage.

IsDelegated
Indicates whether a meeting was handled by an account with
delegate access.

IsOutOfDate
Indicates whether a meeting message is out of date.

HasBeenProcessed
Indicates whether a meeting message item has been
processed.

ResponseType
Represents the kind of recipient response that is received for a
meeting.
Element Description

MeetingRequestType
Describes the type of the meeting request.

IntendedFreeBusyStatus
Represents the intended status for the calendar item that is
associated with the meeting request.

Start
Represents the start of a calendar item. This element only
applies to a single occurrence of a calendar item.

End Represents the end of a duration. This element only applies to


a single occurrence of a calendar item.

OriginalStart
Represents the original start time of a calendar item.

IsAllDayEvent
Indicates whether a calendar item or meeting request
represents an all-day event.

LegacyFreeBusyStatus
Represents the free/busy status of the calendar item.

Location
Represents the location of a meeting or appointment.

When
Provides a description of when a meeting occurs.

IsMeeting Indicates whether the calendar item is either a meeting or


appointment.

IsCancelled
Indicates whether an appointment or meeting has been
cancelled.

IsRecurring
Indicates whether a calendar item is part of a recurring item.
This element is read-only.

MeetingRequestWasSent
Indicates whether a meeting request has been sent to
requested attendees.

CalendarItemType
Represents the occurrence type of a calendar item.

MyResponseType
Contains the status of or response to a calendar item.

Organizer
Represents the organizer of a meeting.

RequiredAttendees
Represents attendees that are required to attend a meeting.

OptionalAttendees
Represents attendees that are not required to attend a
meeting.

Resources
Represents a scheduled resource for a meeting.

ConflictingMeetingCount
Represents the number of meetings that conflict with the
meeting request.
Element Description

AdjacentMeetingCount
Represents the total number of calendar items that are
adjacent to a meeting time.

ConflictingMeetings Identifies all items that conflict with a meeting time.

AdjacentMeetings
Describes all calendar items that are adjacent to a meeting
time.

Duration (Items)
Represents the duration of a calendar item.

TimeZone (Item)
Provides a text description of a time zone.

AppointmentReplyTime
Represents the date and time when an attendee replied to a
meeting request.

AppointmentSequenceNumber
Specifies the sequence number of a version of an appointment.

AppointmentState
Specifies the status of the appointment.

Recurrence (RecurrenceType)
Contains the recurrence pattern for calendar items and
meeting requests.

FirstOccurrence
Represents the first occurrence of a recurring calendar item.
This element is valid if CalendarItemType has the
RecurringMaster value.

LastOccurrence
Represents the last occurrence of a recurring calendar item.
This element is valid if CalendarItemType has the
RecurringMaster value.

ModifiedOccurrences
Contains an array of recurring calendar item occurrences that
have been modified so that they are different than the
recurrence master item.
This element is valid if CalendarItemType has the
RecurringMaster value.

DeletedOccurrences
Contains an array of deleted occurrences of a recurring
calendar item.
This element is valid if CalendarItemType has the
RecurringMaster value.

MeetingTimeZone
Represents the time zone of the location where the meeting is
hosted.

StartTimeZone
Represents the start time zone of the calendar item.

EndTimeZone
Represents the end time zone of the calendar item.

ConferenceType
Describes the type of conferencing that is performed with a
calendar item.
Element Description

AllowNewTimeProposal
Represents whether a new meeting time can be proposed for a
meeting.

IsOnlineMeeting
Indicates whether the meeting is online.

MeetingWorkspaceUrl
Contains the URL for the meeting workspace that is linked to
by the calendar item.

NetShowUrl
Specifies the URL for a Microsoft Netshow online meeting.

EffectiveRights
Contains the rights of the client based on the permission
settings for the item or folder. This element is read-only.

ReceivedBy
Identifies the delegate in a delegate access scenario.

ReceivedRepresenting
Identifies the principal in a delegate access scenario.

LastModifiedName
Contains the display name of the last user to modify an item.

LastModifiedTime
Indicates when an item was last modified.

IsAssociated
Indicates whether the item is associated with a folder.

WebClientReadFormQueryString Represents a URL to concatenate to the Microsoft Office


Outlook Web App endpoint to read an item in Outlook Web
App.

WebClientEditFormQueryString
Represents a URL to concatenate to the Outlook Web App
endpoint to edit an item in Outlook Web App.

ConversationId
Contains the identifier of an item or conversation.

UniqueBody
Represents an HTML fragment or plain text which represents
the unique body of this conversation.

UID
Identifies a calendar item.

RecurrenceId
Used to identify a specific instance of a recurring calendar
item.

DateTimeStamp
Indicates the date and time that an instance of an iCalendar
object was created.

Parent elements

Element Description
Element Description

AdjacentMeetings
Identifies all calendar items that are adjacent to a meeting
time.

AppendToItemField Identifies data to append to a single property of an item


during an UpdateItem operation.

ConflictingMeetings Identifies all items that conflict with a meeting time.

Create (ItemSync)
Identifies a single item to create in the local client store.

Items
Contains an array of items.

Items Contains an array of items to create.


(NonEmptyArrayOfAllItemsType)

ItemAttachment
Represents an Exchange item that is attached to another
Exchange item.

SetItemField
Represents an update to a single property of an item in an
UpdateItem operation.

Update (ItemSync)
Identifies a single item to update in the local client store.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


See also
EWS XML elements in Exchange
MeetingRequestType
Article • 03/29/2023 • 2 minutes to read

The MeetingRequestType element describes the type of the meeting request.

XML

<MeetingRequestType/>

MeetingRequestTypeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MeetingRequest
Represents a meeting request in the Exchange store.

Text value
A text value is required. The following table lists the possible text values for this element.

Value Description

FullUpdate Identifies the meeting request as a full update to an existing request. A full
update has updated time and informational content.

InformationalUpdate Identifies the meeting request as only containing updated informational


content.
Value Description

NewMeetingRequest Identifies the meeting request as a new meeting request.

None Indicates that the meeting request type is not defined.

Outdated Identifies the meeting request as outdated.

PrincipalWantsCopy Indicates that the meeting request belongs to a principal who has
forwarded meeting messages to a delegate and has his copies marked as
informational.

SilentUpdate Identifies the meeting request as a silent update to an existing meeting.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MeetingRequestWasSent
Article • 03/29/2023 • 2 minutes to read

The MeetingRequestWasSent element indicates whether a meeting request has been


sent to requested attendees.

XML

<MeetingRequestWasSent/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Text value
A text value that represents a Boolean value is required if this element is included. A
value of true indicates that a meeting request was sent. A value of false indicates that a
meeting request has not been sent.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
MeetingResponse
Article • 03/29/2023 • 5 minutes to read

The MeetingResponse element represents a meeting response in the Exchange store.

XML

<MeetingResponse>

<MimeContent/>

<ItemId/>

<ParentFolderId/>

<ItemClass/>

<Subject/>

<Sensitivity/>

<Body/>

<Attachments/>

<DateTimeReceived/>

<Size/>

<Categories/>

<Importance/>

<InReplyTo/>

<IsSubmitted/>

<IsDraft/>

<IsFromMe/>

<IsResend/>

<IsUnmodified/>

<InternetMessageHeaders/>

<DateTimeSent/>

<DateTimeCreated/>

<ResponseObjects/>

<ReminderDueBy/>

<ReminderIsSet/>

<ReminderMinutesBeforeStart/>

<DisplayCc/>

<DisplayTo/>

<HasAttachments/>

<ExtendedProperty/>

<Culture/>

<Sender/>

<ToRecipients/>

<CcRecipients/>

<BccRecipients/>

<IsReadReceiptRequested/>

<IsDeliveryReceiptRequested/>

<ConversationIndex/>
<ConversationTopic/>
<From/>

<InternetMessageId/>
<IsRead/>

<IsResponseRequested/>

<References/>

<ReplyTo/>

<AssociatedCalendarItemId/>

<IsDelegated/>

<IsOutOfDate/>

<HasBeenProcessed/>

<ResponseType/>

<EffectiveRights/>

<ReceivedBy/>

<ReceivedRepresenting/>

<ProposedStart/>

<ProposedEnd/>

</MeetingResponse>

MeetingResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

MimeContent
Contains the native MIME stream of an object that is represented
in base64Binary format.

ItemId
Contains the unique identifier and change key of an item in the
Exchange store. This property is read-only.

ParentFolderId Represents the identifier of the parent folder that contains the
item or folder. This property is read-only.

ItemClass
Represents the message class of an item.

Subject
Represents the subject for Exchange store items and response
objects. The subject is limited to 255 characters.

Sensitivity
Indicates the sensitivity level of an item.

Body
Represents the actual body content of a message.

Attachments
Contains the items or files that are attached to an item in the
Exchange store.
Element Description

DateTimeReceived
Represents the data and time that an item in a mailbox was
received.

Size
Represents the size in bytes of an item. This property is read-only.

Categories
Represents a collection of strings that identify to which categories
an item in the mailbox belongs.

Importance
Describes the importance of an item.

InReplyTo
Represents the identifier of the item to which this item is a reply.

IsSubmitted
Indicates whether an item has been submitted to the Outbox
default folder.

IsDraft
Represents whether an item has not yet been sent.

IsFromMe
Indicates whether a user sent an item to him or herself.

IsResend
Indicates whether the item had previously been sent.

IsUnmodified
Indicates whether the item has been modified.

InternetMessageHeaders
Represents the collection of all Internet message headers that are
contained within an item in a mailbox.

DateTimeSent
Represents the date and time that an item in a mailbox was sent.

DateTimeCreated
Represents the date and time that a given item in the mailbox was
created.

ResponseObjects
Contains a collection of all the response objects that are
associated with an item in the Exchange store.

ReminderDueBy
Represents the date and time when the event occurs. This is used
by the ReminderMinutesBeforeStart element to determine when
the reminder is displayed.

ReminderIsSet
Indicates whether a reminder has been set for an item in the
Exchange store.

ReminderMinutesBeforeStart Represents the number of minutes before an event when a


reminder is displayed.

DisplayCc
Represents the display string that is used for the contents of the
Cc box. This is the concatenated string of all Cc recipient display
names.
Element Description

DisplayTo
Represents the display string that is used for the contents of the
To box. This is the concatenated string of all To recipient display
names.

HasAttachments
Represents a property that is set to true if an item has at least one
visible attachment. This property is read-only.

ExtendedProperty
Identifies extended properties on folders and items.

Culture
Represents the culture for a given item in a mailbox.

Sender
Identifies the sender of an item.

ToRecipients
Contains a set of recipients of a message.

CcRecipients
Represents a collection of recipients that will receive a copy of the
message.

BccRecipients
Represents a collection of recipients to receive a blind carbon copy
(Bcc) of an e-mail.

IsReadReceiptRequested
Indicates whether the sender of an item requests a read receipt.

IsDeliveryReceiptRequested
Indicates whether the sender of an item requests a delivery
receipt.

ConversationIndex
Contains a binary ID that represents the thread to which this
message belongs.

ConversationTopic
Represents the conversation identifier.

From
Represents the addressee from whom the message was sent.

InternetMessageId
Represents the Internet message identifier of an item.

IsRead
Indicates whether a message has been read.

IsResponseRequested
Indicates whether a response to an e-mail message is requested.

References
Represents the Usenet header that is used to correlate replies with
their original messages.

ReplyTo
Identifies a set of addresses to which replies should be sent.

AssociatedCalendarItemId
Represents the calendar item that is associated with a
MeetingMessage.

IsDelegated
Indicates whether a meeting was handled by an account with
delegate access.

IsOutOfDate
Indicates whether a meeting message is out-of-date.
Element Description

HasBeenProcessed
Indicates whether a meeting message item has been processed.

ResponseType
Represents the type of recipient response that is received for a
meeting.

EffectiveRights
Contains the client's rights based on the permission settings for
the item or folder. This element is read-only. This element was
introduced in Microsoft Exchange Server 2007 Service Pack 1
(SP1).

ReceivedBy
Identifies the delegate in a delegate access scenario. This element
was introduced in Exchange 2007 SP1.

ReceivedRepresenting
Identifies the principal in a delegate access scenario. This element
was introduced in Exchange 2007 SP1.

ProposedStart
Specifies the proposed start time of a meeting. This element was
introduced in Microsoft Exchange Server 2013.

ProposedEnd
Specifies the proposed end time of a meeting. This element was
introduced in Microsoft Exchange Server 2013.

UID
Identifies a calendar item.

RecurrenceId
Used to identify a specific instance of a recurring calendar item.

DateTimeStamp
Indicates the date and time that an instance of an iCalendar object
was created.

Parent elements

Element Description

AdjacentMeetings
Identifies all calendar items that are adjacent to a meeting
time.

AppendToItemField Identifies data to append to a single property of an item


during an UpdateItem operation.

ConflictingMeetings Identifies all items that conflict with a meeting time.

Create (ItemSync)
Identifies a single item to create in the local client store.

Items
Contains an array of items.

Items Contains an array of items to create.


(NonEmptyArrayOfAllItemsType)
Element Description

ItemAttachment
Represents an Exchange item that is attached to another
Exchange item.

SetItemField
Represents an update to a single property of an item in an
UpdateItem operation.

Update (ItemSync)
Identifies a single item to update in the local client store.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MeetingString
Article • 03/29/2023 • 2 minutes to read

The MeetingString element specifies the name of the meeting as the result of entity
extraction.

XML

<MeetingString></MeetingString>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
MeetingSuggestion

Text value
The text value for the MeetingString element is the name of the meeting.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
MeetingSuggestion
Article • 03/29/2023 • 2 minutes to read

The MeetingSuggestion element specifies a proposed meeting.

XML

<MeetingSuggestion>

<Attendees/>

<Location/>

<Subject/>

<MeetingString/>

<StartTime/>

<EndTime/>

</MeetingSuggestion>

MeetingSuggestionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Attendees | Location | Subject | MeetingString | StartTime | EndTime

Parent elements
MeetingSuggestions

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
MeetingSuggestions
Article • 03/29/2023 • 2 minutes to read

The MeetingSuggestions element specifies an array of MeetingSuggestion elements


that contain entity extraction results.

XML

<MeetingSuggestions>

<MeetingSuggestion/>
</MeetingSuggestions>

ArrayOfMeetingSuggestionsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MeetingSuggestion

Parent elements
EntityExtractionResult

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
MeetingTime
Article • 03/29/2023 • 2 minutes to read

The MeetingTime element represents a suggested meeting time.

GetUserAvailabilityResponse

SuggestionsResponse

SuggestionDayResultArray

SuggestionDayResult

SuggestionArray

Suggestion

MeetingTime

XML

<MeetingTime>...</MeetingTime

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Suggestion Represents a single meeting time suggestion.


The following is the XPath expression to this element:
/GetUserAvailabilityResponse/SuggestionsResponse/SuggestionDayResultArray/SuggestionDayResult[i]/SuggestionArray/Suggestion[i]

Text value
A text value that represents a dateTime value is required.

Remarks
The MeetingTime element is a required child element of the Suggestion element.

The schema that describes this element is located in the EWS virtual directory of the computer that is running
MicrosoftExchange Server 2007 that has the Client Access server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


MeetingTimeZone
Article • 03/29/2023 • 2 minutes to read

The MeetingTimeZone element represents the time zone of the location where the
meeting is hosted.

XML

<MeetingTimeZone>

<BaseOffset/>

<Standard/>

<Daylight/>

</MeetingTimeZone>

TimeZoneType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

TimeZoneName
Describes the name of the time zone.

Child elements

Element Description

BaseOffset Represents the hourly offset from UTC for the current time zone.

Standard
Represents the date and time when the time changes from daylight saving time to
standard time.

Daylight
Represents the date and time when the time changes from standard time to daylight
saving time.

Parent elements

Element Description
Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MeetingWorkspaceUrl
Article • 03/29/2023 • 2 minutes to read

The MeetingWorkspaceUrl element contains the URL for the meeting workspace that is
included in the calendar item. A meeting workspace is a shared Web site for planning
the meeting and tracking the results.

XML

<MeetingWorkspaceUrl/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MeetingRequest
Represents a meeting in the Exchange store.

CalendarItem
Represents an Exchange calendar item.

Text value
A text value that represents a URL is required if this element is used.

Remarks
The MeetingWorkspaceUrl property is read-writable for the organizer's calendar item. It
is read-only for meeting requests and for attendees' calendar items.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Member
Article • 03/29/2023 • 2 minutes to read

The Member element represents a member of a distribution list.

XML

<Member Key="">

<Mailbox/>

<Status/>

</Member>

MemberType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Key Provides a unique identifier for the distribution list member. This attribute is optional.

Child elements

Element Description

Mailbox
Represents the e-mail address of the distribution list member. This
element is optional.

Status Provides information about the status of a distribution list member. This
(MemberStatusType)
element is optional.

Parent elements

Element Description

Members (MemberListType)
Contains a list of distribution list members.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Members
Article • 03/29/2023 • 2 minutes to read

The Members element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Members (MemberListType)
Article • 03/29/2023 • 2 minutes to read

The Members element provides the list of members for a distribution list.

XML

<Members>

<Member/>

</Members>

MemberListType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Member Provides an identifier for a fully resolved e-mail address, and the status of that address
on the server. This element is optional.

Parent elements

Element Description

DistributionList
Represents a distribution list.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MemberCorrelationKey
Article • 03/29/2023 • 2 minutes to read

The MemberCorrelationKey element specifies the identifiers of the contacts that are
part of the instant messaging (IM) group.

XML

<MemberCorrelationKey>

<ItemId/>

</MemberCorrelationKey>

NonEmptyArrayOfItemIdsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ItemId

Parent elements
ImGroup

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
MergedFreeBusy
Article • 03/29/2023 • 2 minutes to read

The MergedFreeBusy element contains the merged free/busy stream of data.

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

FreeBusyView

MergedFreeBusy

XML

<MergedFreeBusy>...</MergedFreeBusy>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

FreeBusyView Contains availability information for a specific user.


The following is the XPath expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView
Text value
A text value is provided by the server if the value for the FreeBusyViewType element is
one of the following:

DetailedMerged

FreeBusyMerged

MergedOnly

The text value is a stream of free/busy information.

Remarks
The stream of data provided by this element is defined by the
MergedFreeBusyIntervalInMinutes and TimeWindow elements. The TimeWindow
element defines the time span queried for availability. The
MergedFreeBusyIntervalInMinutes element defines how the time from the TimeWindow
element is broken into intervals returned in the MergedFreeBusy element. Each number
in the MergedFreeBusy stream represents a single interval defined by the
MergedFreeBusyIntervalInMinutes element. The following table lists the possible values
for an individual interval.

Digit Availability

0 Free

1 Tentative

2 Busy

3 Out of Office (OOF)

4 No data

For example, a request for free/busy data includes a TimeWindow element that
represents four hours and a MergedFreeBusyIntervalInMinutes element that represents
60 minutes. If the requested user's calendar is OOF for the first 60 minutes, busy for the
following 90 minutes, and unscheduled for the final 90 minutes in the time window, the
MergedFreeBusy stream will be 3220. If an interval contains more than one availability
classification, the highest number is used to classify that interval.

The level of detail provided by this element depends on the permissions granted to the
requestor.
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


MergedFreeBusyIntervalInMinutes
Article • 03/29/2023 • 2 minutes to read

The MergedFreeBusyIntervalInMinutes element represents the time difference between


two successive slots in the FreeBusyMerged view.

GetUserAvailabilityRequest

FreeBusyViewOptions

MergedFreeBusyIntervalInMinutes

XML

<MergedFreeBusyIntervalInMinutes>...</MergedFreeBusyIntervalInMinutes>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

FreeBusyViewOptions
Specifies the type of free/busy information returned in the response.
The following is the XPath to this element:
/GetUserAvailabilityRequest/FreeBusyViewOptions

Text value
A text value is required. The text value represents time in minutes. The default value is
30 minutes. Five minutes is the minimum interval and one day (1440 minutes) is the
maximum interval for this element.

Remarks
This value is used only if the RequestedView element is equal to MergedOnly,
FreeBusyMerged, or DetailedMerge. This is an integer data type. The stream that
contains the intervals defined by this element is returned in the MergedFreeBusy
element.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserOofSettings operation

Getting User Availability


Message
Article • 03/29/2023 • 5 minutes to read

The Message element represents a Microsoft Exchange e-mail message.

XML

<Message>

<MimeContent/>

<ItemId/>

<ParentFolderId/>

<ItemClass/>

<Subject/>

<Sensitivity/>

<Body/>

<Attachments/>

<DateTimeReceived/>

<Size/>

<Categories/>

<Importance/>

<InReplyTo/>

<IsSubmitted/>

<IsDraft/>

<IsFromMe/>

<IsResend/>

<IsUnmodified/>

<InternetMessageHeaders/>

<DateTimeSent/>

<DateTimeCreated/>

<ResponseObjects/>

<ReminderDueBy/>

<ReminderIsSet/>

<ReminderMinutesBeforeStart/>

<DisplayCc/>

<DisplayTo/>

<HasAttachments/>

<ExtendedProperty/>

<Culture/>

<Sender/>

<ToRecipients/>

<CcRecipients/>

<BccRecipients/>

<IsReadReceiptRequested/>

<IsDeliveryReceiptRequested/>

<ConversationIndex/>
<ConversationTopic/>
<From/>

<InternetMessageId/>
<IsRead/>

<IsResponseRequested/>

<References/>

<ReplyTo/>

<EffectiveRights/>

<ReceivedBy/>

<ReceivedRepresenting/>

<LastModifiedName/>

<LastModifiedTime/>

<IsAssociated/>

<WebClientReadFormQueryString/>

<WebClientEditFormQueryString/>

<ConversationId/>

<UniqueBody/>

<ReminderMessageData/>

</Message>

MessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

MimeContent
Contains the native Multipurpose Internet Mail Extensions
(MIME) stream of an object that is represented in base64Binary
format.

ItemId
Contains the unique identifier and change key of an item in the
Exchange store. This property is read-only.

ParentFolderId Represents the identifier of the parent folder that contains the
item or folder. This property is read-only.

ItemClass
Represents the message class of an item.

Subject
Represents the subject for Exchange store items and response
objects. The subject is limited to 255 characters.

Sensitivity
Indicates the sensitivity level of an item.

Body
Represents the actual body content of a message.
Element Description

Attachments
Contains the items or files that are attached to an item in the
Exchange store.

DateTimeReceived
Represents the date and time that an item in a mailbox was
received.

Size
Represents the size in bytes of an item. This property is read-
only.

Categories
Represents a collection of strings that identify to which
categories an item in the mailbox belongs.

Importance
Describes the importance of an item.

InReplyTo
Represents the identifier of the item to which this item is a
reply.

IsSubmitted
Indicates whether an item has been submitted to the Outbox
default folder.

IsDraft
Represents whether an item has not yet been sent.

IsFromMe
Indicates whether a user sent an item to him or herself.

IsResend
Indicates whether the item had previously been sent.

IsUnmodified
Indicates whether the item has been modified.

InternetMessageHeaders
Represents the collection of all Internet message headers that
are contained within an item in a mailbox.

DateTimeSent
Represents the date and time that an item in a mailbox was
sent.

DateTimeCreated
Represents the date and time that a given item in the mailbox
was created.

ResponseObjects
Contains a collection of all the response objects that are
associated with an item in the Exchange store.

ReminderDueBy
Represents the date and time when the event occurs. This is
used by the ReminderMinutesBeforeStart element to
determine when the reminder is displayed.

ReminderIsSet
Indicates whether a reminder has been set for an item in the
Exchange store.

ReminderMinutesBeforeStart
Represents the number of minutes before an event when a
reminder is displayed.
Element Description

DisplayCc
Represents the display string that is used for the contents of
the CC line. This is the concatenated string of all CC recipient
display names.

DisplayTo
Represents the display string that is used for the contents of
the To box. This is the concatenated string of all To recipient
display names.

HasAttachments
Represents a property that is set to true if an item has at least
one visible attachment. This property is read-only.

ExtendedProperty
Identifies extended properties on folders and items.

Culture
Represents the culture for a given item in a mailbox.

Sender
Identifies the sender of an item.

ToRecipients
Contains a set of recipients of a message.

CcRecipients
Represents a collection of recipients that will receive a copy of
the message.

BccRecipients
Represents a collection of recipients to receive a blind carbon
copy (Bcc) of an e-mail message.

IsReadReceiptRequested
Indicates whether the sender of an item requests a read
receipt.

IsDeliveryReceiptRequested
Indicates whether the sender of an item requests a delivery
receipt.

ConversationIndex
Contains a binary ID that represents the thread to which this
message belongs.

ConversationTopic
Represents the conversation identifier.

From
Represents the addressee from whom the message was sent.

InternetMessageId
Represents the Internet message identifier of an item.

IsRead
Indicates whether a message has been read.

IsResponseRequested
Indicates whether a response to an e-mail message is
requested.

References
Represents the Usenet header that is used to correlate replies
with their original messages.

ReplyTo
Identifies a set of addresses to which replies should be sent.
Element Description

EffectiveRights
Contains the client's rights based on the permission settings
for the item or folder. This element is read-only.

ReceivedBy
Identifies the delegate in a delegate access scenario.

ReceivedRepresenting
Identifies the principal in a delegate access scenario.

LastModifiedName
Contains the display name of the last user to modify an item.

LastModifiedTime
Indicates when an item was last modified.

IsAssociated
Indicates whether the item is associated with a folder.

WebClientReadFormQueryString Represents a URL to concatenate to the Microsoft Office


Outlook Web App endpoint to read an item in Outlook Web
App.

WebClientEditFormQueryString
Represents a URL to concatenate to the Outlook Web App
endpoint to edit an item in Outlook Web App.

ConversationId
Contains the identifier of an item or conversation.

UniqueBody
Represents an HTML fragment or plain text which represents
the unique body of this conversation.

ReminderMessageData
Contains the data for a reminder message.

Parent elements

Element Description

AdjacentMeetings
Describes all calendar items that are adjacent to a meeting
time.

AppendToItemField Identifies data to append to a single property of an item


during an UpdateItem operation.

ConflictingMeetings Identifies all items that conflict with a meeting time.

Create (ItemSync)
Identifies a single item to create in the local client store.

ItemAttachment
Represents an Exchange item that is attached to another
Exchange item.

Items
Contains an array of items.

Items Contains an array of items to create in the folder that is


(NonEmptyArrayOfAllItemsType) identified by the ParentFolderId (TargetFolderIdType) element.
Element Description

SetItemField
Represents an update to a single property of an item in an
UpdateItem operation.

Update (ItemSync)
Identifies a single item to update in the local client store.

Text value
None.

Remarks
Another Message element, Message (Availability) is used by the Availability operations
to return OOF messages.

Message elements represent e-mail messages and all other items that are not strongly
typed by the Exchange Web Services (EWS) schema. Items such as IPM.Sharing and
IPM.InfoPath are returned as Message elements. Exchange 2010 does not return the
base Item element in responses.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Message (Availability)
Article • 03/29/2023 • 2 minutes to read

The Message element contains the out of Office (OOF) response.

XML

<Message/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

InternalReply
Contains the OOF message sent to other users in the sender's domain.

The following are the possible XPath expressions to this element:

/SetUserOofSettingsRequest/UserOofSettings/InternalReply

/GetUserOofSettingsResponse/OofSettings/InternalReply

ExternalReply Contains the OOF message that is sent to addresses outside the sender's domain.

The following are the possible XPath expressions to this element:

/SetUserOofSettingsRequest/UserOofSettings/ExternalReply

/GetUserOofSettingsResponse/OofSettings/ExternalReply

Element Description

ReplyBody
Contains an OOF message and the language used for the message.

Text value
A text value is required to set the OOF message.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Example
The following example of a SetUserOofSettings operation request sets the OofState to
Enabled, sets the duration of OOF to 10 days, and sets the internal and external OOF
messages.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<SetUserOofSettingsRequest
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<Mailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Name>David Alexander</Name>

<Address>[email protected]</Address>

<RoutingType>SMTP</RoutingType>

</Mailbox>

<UserOofSettings
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<OofState>Enabled</OofState>

<ExternalAudience>All</ExternalAudience>

<Duration>

<StartTime>2005-10-05T00:00:00</StartTime>

<EndTime>2005-10-25T00:00:00</EndTime>

</Duration>

<InternalReply>

<Message>I am out of office. This is my internal reply.</Message>

</InternalReply>

<ExternalReply>

<Message>I am out of office. This is my external reply.</Message>

</ExternalReply>

</UserOofSettings>

</SetUserOofSettingsRequest>

</soap:Body>

</soap:Envelope>

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
SetUserOofSettings operation
EWS XML elements in Exchange
MessageClassifications
Article • 03/29/2023 • 2 minutes to read

The MessageClassifications element represents the message classifications that must be


stamped on incoming messages in order for the condition or exception to apply.

XML

<MessageClassifications>

<String/>

</MessageClassifications>

ArrayOfStringsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None

Child elements

Element Description

String
Represents a message classification.

Parent elements

Element Description

Conditions Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions Represents the exceptions that represent all the available rule exception conditions
for an Inbox rule.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
MessageCount
Article • 03/29/2023 • 2 minutes to read

The MessageCount element contains the total number of conversation items in the
current folder.

FindConversationResponse

Conversations

Conversation (ConversationType)

MessageCount

XML

<MessageCount/>

xs:int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conversation (ConversationType)
Represents a single conversation.

Text value
The text value of the MessageCount element is the total number of conversation items
in a folder.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
FindConversation operation

ApplyConversationAction operation

EWS XML elements in Exchange

Conversations in EWS
MessageId
Article • 03/29/2023 • 2 minutes to read

The MessageId element represents the message identification to search for.

XML

<MessageId/>

NonEmptyStringType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

FindMessageTrackingReport
Specifies criteria for the types of messages to find.

Text value
A text value that represents a string is required if this element is used.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MessageText
Article • 03/29/2023 • 2 minutes to read

The MessageText element provides a text description of the status of the response.

XML

<MessageText/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None

Child elements
None.

Parent elements

Element Description

ResponseMessage
Provides descriptive information about the response status.

The following are some of the possible XPath expressions to this element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/ResponseMessage

/GetUserAvailabilityResponse/SuggestionsResponse/ResponseMessage

/SetUserOofSettingsResponse/ResponseMessage

/GetUserOofSettingsResponse/ResponseMessage

DeleteItemResponseMessage
Contains the status and result of a single DeleteItem request.

SendItemResponseMessage
Contains the status and result of a single SendItem request.

DeleteFolderResponseMessage
Contains the status and result of a single DeleteFolder request.

DeleteAttachmentResponseMessage
Contains the status and result of a single DeleteAttachment request.

UnsubscribeResponseMessage
Contains the status and result of a single Unsubscribe request.

CreateFolderResponseMessage
Contains the status and result of a single CreateFolder request.

GetFolderResponseMessage
Contains the status and result of a single GetFolder request.

UpdateFolderResponseMessage
Contains the status and result of a single UpdateFolder request.

MoveFolderResponseMessage
Contains the status and result of a single MoveFolder request.
Element Description

CopyFolderResponseMessage
Contains the status and result of a single CopyFolder request.

CreateManagedFolderResponseMessage
Contains the status and result of a single CreateManagedFolder request.

FindFolderResponseMessage
Contains the status and result of a single FindFolder request.

CreateItemResponseMessage
Contains the status and result of a single CreateItem request.

GetItemResponseMessage
Contains the status and result of a single GetItem request.

UpdateItemResponseMessage
Contains the status and result of a single UpdateItem request.

MoveItemResponseMessage
Contains the status and result of a single MoveItem request.

CopyItemResponseMessage
Contains the status and result of a single CopyItem request.

CreateAttachmentResponseMessage
Contains the status and result of a single CreateAttachment request.

GetAttachmentResponseMessage
Contains the status and result of a single GetAttachment request.

FindItemResponseMessage
Contains the status and result of a single FindItem request.

ResolveNamesResponseMessage
Contains the status and result of a ResolveNames request.

ExpandDLResponseMessage
Contains the status and result of a single ExpandDL request.

SubscribeResponseMessage
Contains the status and result of a single Subscribe request.

GetEventsResponseMessage
Contains the status and result of a single GetEvents request.

SendNotificationResponseMessage
Contains the status and result of a single SendNotification request.

SyncFolderHierarchyResponseMessage
Contains the status and result of a SyncFolderHierarchy request.

SyncFolderItemsResponseMessage
Contains the status and result of a SyncFolderItems request.

ConvertIdResponseMessage
Contains the status and result of a ConvertId request.

AddDelegateResponse
Contains the status and result of an AddDelegate request.

GetServerTimeZonesResponseMessage
Contains the status and result of a GetServerTimeZones request.

GetSharingFolderResponseMessage
Contains the status and result of a GetSharingFolder request.

GetSharingFolderResponse
Defines a response to a GetSharingFolder request.

GetSharingMetadataResponseMessage
Contains the status and result of a GetSharingMetadata request.

GetSharingMetadataResponse
Defines a response to a GetSharingMetadata request.

RefreshSharingFolderResponseMessage
Contains the status and result of a RefreshSharingFolder request.

RefreshSharingFolderResponse
Defines a response to a RefreshSharingFolder request.

InvalidRecipient
Represents an invalid recipient for a GetSharingMetadata request.

FindConversationResponse
Contains the status and results of a FindConversation response.

EmptyFolderResponseMessage
Contains the status and result of a single EmptyFolder request.

UpdateInboxRulesResponse
Contains a response to an UpdateInboxRules request.

GetInboxRulesResponse
Contains a response to a GetInboxRules request.

GetServiceConfigurationResponse
Contains a response to a GetServiceConfiguration request.
Element Description

ServiceConfigurationResponseMessageType Contains service configuration settings.

Remarks
This element is not required and is not included in all responses. This element is included when error messages
are returned.

The schema that describes this element is located in the IIS virtual directory that hosts Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MessageTrackingReport
Article • 03/29/2023 • 2 minutes to read

The MessageTrackingReport element contains a single message that is returned in a


GetMessageTrackingReport operation.

XML

<MessageTrackingReport>

<Sender/>

<PurportedSender/>

<Subject/>

<SubmitTime/>

<OriginalRecipients/>

<RecipientTrackingEvents/>

<Properties/>

</MessageTrackingReport>

MessageTrackingReportType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Sender (EmailAddressType)
Contains contact information for the sender of the e-mail
message.

PurportedSender
Contains contact information for the alleged sender of an e-
mail message.

Subject
Contains the subject of the e-mail message.

SubmitTime
Contains the time of day that the e-mail message was
submitted.

OriginalRecipients
Contains a list of the recipients of the e-mail message.
Element Description

RecipientTrackingEvents
Contains a list of one or more tracking events for the
recipients.

Properties Contains a list of one or more tracking properties.


(ArrayOfTrackingPropertiesType)

Parent elements

Element Description

GetMessageTrackingReportResponse Contains the result of a single GetMessageTrackingReport


operation request.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindMessageTrackingReport operation

GetMessageTrackingReport operation
EWS XML elements in Exchange

EWS XML elements in Exchange


MessageTrackingReportId
Article • 03/29/2023 • 2 minutes to read

The MessageTrackingReportId element represents the message by its message ID, the
organization where the message was found, the server on which the message was
submitted, and an internal ID that uniquely identifies the message.

XML

<MessageTrackingReportId/>

NonEmptyStringType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

GetMessageTrackingReport
Contains the request for the GetMessageTrackingReport
operation to retrieve the full message tracking report for the
specified ID.

MessageTrackingSearchResult Contains a single message result for a


FindMessageTrackingReportResponse element.

Text value
A text value that represents a string is required if this element is used.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetMessageTrackingReport operation

EWS XML elements in Exchange


MessageTrackingSearchResult
Article • 03/29/2023 • 2 minutes to read

The MessageTrackingSearchResult element contains a single message result for a


FindMessageTrackingReportResponse element.

XML

<MessageTrackingSearchResult>

<Subject/>

<Sender/>

<PurportedSender/>

<Recipients/>

<SubmittedTime/>

<MessageTrackingReportId/>

<PreviousHopServer/>
<FirstHopServer/>

<Properties/>

</MessageTrackingSearchResult>

FindMessageTrackingSearchResultType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Subject
Contains the e-mail message subject.

Sender (EmailAddressType)
Contains the e-mail message sender's address.

PurportedSender
Contains contact information for the alleged sender of an e-
mail message.

Recipients Contains a list of e-mail addresses that received this message.


(ArrayOfRecipientsType)

Element Description

SubmittedTime
Contains the time that the message was submitted.

MessageTrackingReportId
Contains an internal ID that identifies the message in the
transport database.

PreviousHopServer
Contains the name of the server in the forest that previously
accepted the message.

FirstHopServer
Contains the name of the server in the forest that first
accepted the message.

Properties Contains a list of one or more tracking properties.


(ArrayOfTrackingPropertiesType)

Parent elements

Element Description

MessageTrackingSearchResults
Contains a list of messages that match the search criteria.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


See also
FindMessageTrackingReport operation

EWS XML elements in Exchange


MessageTrackingSearchResults
Article • 03/29/2023 • 2 minutes to read

The MessageTrackingSearchResults element contains a list of records that match the


search criteria.

XML

<MessageTrackingSearchResults>

<MessageTrackingSearchResult/>

</MessageTrackingSearchResults>

ArrayOfFindMessageTrackingSearchResultType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

MessageTrackingSearchResult Contains a single message result for a


FindMessageTrackingReportResponse element.

Parent elements

Element Description

FindMessageTrackingReportResponse Contains the status and result of a single


FindMessageTrackingReport operation request.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MessageTypes
Article • 03/29/2023 • 2 minutes to read

The MessageTypes element specifies an array of messages to search.

XML

<MessageTypes>

<SearchItemKind/>

</MessageTypes>

ArrayOfSearchItemKindsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
SearchItemKind

Parent elements
FindMailboxStatisticsByKeywords

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
MessageXml
Article • 03/29/2023 • 3 minutes to read

The MessageXml element provides additional error response information.

ResponseMessage
MessageXml

XML

<MessageXml/>

xs:any

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ResponseMessage
Provides descriptive information about the response status.

The following are some of the possible XPath expressions to this element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/ResponseMessage

/GetUserAvailabilityResponse/SuggestionsResponse/ResponseMessage

/SetUserOofSettingsResponse/ResponseMessage

/GetUserOofSettingsResponse/ResponseMessage

DeleteItemResponseMessage
Contains the status and result of a single DeleteItem request.

SendItemResponseMessage
Contains the status and result of a single SendItem request.

DeleteFolderResponseMessage
Contains the status and result of a single DeleteFolder request.

DeleteAttachmentResponseMessage
Contains the status and result of a single DeleteAttachment request.

UnsubscribeResponseMessage
Contains the status and result of a single Unsubscribe request.

CreateFolderResponseMessage
Contains the status and result of a single CreateFolder request.

GetFolderResponseMessage
Contains the status and result of a single GetFolder request.
Element Description

UpdateFolderResponseMessage
Contains the status and result of a single UpdateFolder request.

MoveFolderResponseMessage
Contains the status and result of a single MoveFolder request.

CopyFolderResponseMessage
Contains the status and result of a single CopyFolder request.

CreateManagedFolderResponseMessage
Contains the status and result of a single CreateManagedFolder request.

FindFolderResponseMessage
Contains the status and result of a single FindFolder request.

CreateItemResponseMessage
Contains the status and result of a single CreateItem request.

GetItemResponseMessage
Contains the status and result of a single GetItem request.

UpdateItemResponseMessage
Contains the status and result of a single UpdateItem request.

MoveItemResponseMessage
Contains the status and result of a single MoveItem request.

CopyItemResponseMessage
Contains the status and result of a single CopyItem request.

CreateAttachmentResponseMessage
Contains the status and result of a single CreateAttachment request.

GetAttachmentResponseMessage
Contains the status and result of a single GetAttachment request.

FindItemResponseMessage
Contains the status and result of a single FindItem request.

ResolveNamesResponseMessage
Contains the status and result of a ResolveNames request.

ExpandDLResponseMessage
Contains the status and result of a single ExpandDL request.

SubscribeResponseMessage
Contains the status and result of a single Subscribe request.

GetEventsResponseMessage
Contains the status and result of a single GetEvents request.

SendNotificationResponseMessage
Contains the status and result of a single SendNotification request.

SyncFolderHierarchyResponseMessage
Contains the status and result of a SyncFolderHierarchy request.

SyncFolderItemsResponseMessage
Contains the status and result of a SyncFolderItems request.

ConvertIdResponseMessage
Contains the status and result of a ConvertId request.

AddDelegateResponse
Contains the status and result of an AddDelegate request.

GetServerTimeZonesResponseMessage
Contains the status and result of a GetServerTimeZones request.

GetSharingFolderResponseMessage
Contains the status and result of a GetSharingFolder request.

GetSharingFolderResponse
Defines a response to a GetSharingFolder request.

GetSharingMetadataResponseMessage
Contains the status and result of a GetSharingMetadata request.

GetSharingMetadataResponse
Defines a response to a GetSharingMetadata request.

RefreshSharingFolderResponseMessage
Contains the status and result of a RefreshSharingFolder request.

RefreshSharingFolderResponse
Defines a response to a RefreshSharingFolder request.

FindConversationResponse
Contains the status and results of a FindConversation response.

EmptyFolderResponseMessage
Contains the status and result of an EmptyFolder request.

UpdateInboxRulesResponse
Contains a status and result of an UpdateInboxRules request.

UploadItemsResponseMessage
Contains a status and result of an UploadItemsResponse request.
Element Description

GetInboxRulesResponse
Contains a response to a GetInboxRules request.

GetServiceConfigurationResponse
Contains a response to a GetServiceConfiguration request.

ServiceConfigurationResponseMessageType Contains service configuration settings.

Remarks
This element is not required and is not included in all responses. It is included for error messages. In requests that
involve folders or items, the MessageXML element will contain one or more elements that contain the URIs to the
properties that caused the error. An example of this is the FieldURI element.

The MessageXML element is of type xs:any, which means that any well-formed XML is valid content for the this
element.

The schema that describes this element is located in the IIS virtual directory that hosts Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Metadata
Article • 03/29/2023 • 2 minutes to read

The Metadata element contains metadata about the mail app.

XML

<Metadata>

<EndNodeUrl/>

<AppStatus/>

<ActionUrl/>

</Metadata>

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
EndNodeUrl | AppStatus | ActionUrl

Parent elements
App

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Not applicable

Can be Empty False

See also
App

EWS XML elements in Exchange


MiddleName
Article • 03/29/2023 • 2 minutes to read

The MiddleName element represents the middle name of a contact.

XML

<MiddleName/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CompleteName
Represents the complete name of a contact.

Contact
Represents an Exchange contact item.

Text value
A string that represents the middle name of a contact.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)


MiddleNames
Article • 03/29/2023 • 2 minutes to read

The MiddleNames element specifies an array of middle name values and the identifiers
of their source attributions for the associated persona.

XML

<MiddleNames>

<StringAttributedValue/>

</MiddleNames>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
StringAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Mileage
Article • 03/29/2023 • 2 minutes to read

The Mileage element represents mileage for a task or contact item.

XML

<Mileage/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents a contact item in the Exchange store.

Task
Represents a task in the Exchange store.

Text value
A text value is required if this element is used.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
MimeContent
Article • 03/29/2023 • 2 minutes to read

The MimeContent element contains the ASCII MIME stream of an object that is
represented in base64Binary format and supports [RFC2045] .

XML

<MimeContent CharacterSet="" />

MimeContentType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

CharacterSet
If set, the value for this attribute is ignored by the server.

Child elements
None.

Parent elements
CalendarItem | Contact | DistributionList | Item | MeetingCancellation | MeetingMessage
| MeetingRequest | MeetingResponse | Message | RemoveItem | Task

Text value
A text value that represents a base64Binary MIME stream is required if this element is
used.

Remarks
The message content goes through the following three levels of encoding before it is
stored in the MimeContent value:

1. Message text — This is the body encoding, such as iso-2022-jp for Japanese
characters.

2. MIME stream — This is the ASCII encoding of the message text for the
MimeContent element, or the UTF8 encoding of the message text for the
MimeContentUTF8 element.

3. XML document — This is always the base64-encoded ASCII stream of the MIME
stream, where characters such as '<', which are meaningful to XML, are hidden
from XML parsers.

Each level is independent of the level that precedes it.

The MimeContent element might contain the same data that other properties that are
returned with an item contain.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MimeContentUTF8
Article • 03/29/2023 • 2 minutes to read

The MimeContentUTF8 element contains the UTF-8 MIME stream of an object that is
represented in base64Binary format and supports email address internationalization and
[RFC6530] .

XML

<MimeContentUTF8 CharacterSet="" />

MimeContentType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

CharacterSet
If set, the value for this attribute is ignored by the server.

Child elements
None.

Parent elements
CalendarItem | Contact | DistributionList | Item | MeetingCancellation | MeetingMessage
| MeetingRequest | MeetingResponse | Message | RemoveItem | Task

Text value
A text value that represents a base64binary MIME stream is required if this element is
used.

Remarks
The message content goes through the following three levels of encoding before it is
stored in the MimeContentUTF8 value:

1. Message text — This is the body encoding, such as iso-2022-jp for Japanese
characters.

2. MIME stream — This is the UTF8 encoding of the message text for the
MimeContentUTF8 element, or the ASCII encoding of the message text for the
MimeContent element.

3. XML document — This is always the base64-encoded ASCII stream of the MIME
stream, where characters such as '<', which are meaningful to XML, are hidden
from XML parsers.

Each level is independent of the level that precedes it.

The MimeContentUTF8 element might contain the same data that other properties that
are returned with an item contain.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Version differences
This element is available in versions of Exchange starting with build 15.00.0986.00.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
MinimumSize
Article • 03/29/2023 • 2 minutes to read

The MinimumSize element represents the minimum size that a message must be in
order for the condition or exception to apply.

XML

<MinimumSize/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

WithinSizeRange Specifies the minimum and maximum sizes that incoming messages must be
in order for the condition or exception to apply.

Text value
The text value is an integer that identifies the minimum size of the message in bytes.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
MaximumSize

EWS XML elements in Exchange


MinimumSuggestionQuality
Article • 03/29/2023 • 2 minutes to read

The MinimumSuggestionQuality element defines the quality of meeting suggestions to


be returned in the response.

GetUserAvailabilityRequest

SuggestionsViewOptions

MinimumSuggestionQuality

XML

<MinimumSuggestionQuality>...</MinimumSuggestionQuality>

SuggestionQuality

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

SuggestionsViewOptions
Contains the options for obtaining meeting suggestion information.
The following is the XPath to this element:
/GetUserAvailabilityRequest/SuggestionViewOptions

Text value
A text value is required. The following table lists the possible values for this element:

Value Description

Excellent
0% of the attendees have a conflict with the suggested meeting time.

Good
The percentage that is considered good is set by using the GoodThreshold element.

Fair
The percentage that is considered fair is set by using the GoodThreshold element.

Poor
50% or more of the attendees have a conflict with the suggested meeting time.

Remarks
This element is required if the SuggestionsViewOptions element is used.

7 Note

The schema that describes this element is located in the EWS virtual directory of
the computer that is running MicrosoftExchange Server 2007 that has the Client
Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

Getting User Availability


MobilePhones
Article • 03/29/2023 • 2 minutes to read

The MobilePhones element specifies an array of mobile phone numbers and the
identifiers of their source attributions for the associated persona.

XML

<MobilePhones>

<PhoneNumberAttributedValue/>

</MobilePhones>

ArrayOfPhoneNumberAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
PhoneNumberAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
MobilePhones2
Article • 03/29/2023 • 2 minutes to read

The MobilePhones2 element specifies an array of MobilePhone values and the


identifiers of their source attributions for the associated persona.

XML

<MobilePhones2>

<PhoneNumberAttributedValue/>

</MobilePhones2>

ArrayOfPhoneNumberAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
PhoneNumberAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
ModifiedEvent
Article • 03/29/2023 • 2 minutes to read

The ModifiedEvent element represents an event in which an item or folder is modified.

XML

<ModifiedEvent>

<Watermark/>

<TimeStamp/>

<FolderId/>

<ParentFolderId/>

<UnreadCount/>

</ModifiedEvent>

XML

<ModifiedEvent>

<Watermark/>

<TimeStamp/>

<ItemId/>

<ParentFolderId/>

<UnreadCount/>

</ModifiedEvent>

ModifiedEventType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Watermark
Represents an event bookmark in the mailbox events table.

TimeStamp
Represents the timestamp of a modified item or folder mailbox event.

FolderId
Represents the identifier of the modified folder.
Element Description

ItemId
Represents the identifier of the modified item.

ParentFolderId Represents the identifier of the parent folder of the modified item or folder.

UnreadCount
Represents the count of unread items within a given folder.

Parent elements

Element Description

Notification Contains information about the subscription and the events that have occurred
since the last notification.

Remarks
Two modified events are generated for each modification of an item in a folder. One
event is relevant to the item that changed. The other event is relevant to the parent
folder of the item. This is the same folder that the subscription was created against. The
event that is associated with the folder is used to communicate a potential change to
the UnreadCount property on the folder.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
Subscribe operation
GetEvents operation
Unsubscribe operation
ModifiedOccurrences
Article • 03/29/2023 • 2 minutes to read

The ModifiedOccurrences element contains an array of recurring calendar item


occurrences that have been modified so that they are different than the recurrence
master item.

XML

<ModifiedOccurrences>

<Occurrence/>

</ModifiedOccurrences>

NonEmptyArrayOfOccurrenceInfoType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Occurrence Represents a single modified occurrence of a recurring calendar item.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Remarks
This element is valid if CalendarItemType has the RecurringMaster value.
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Modify
Article • 03/29/2023 • 2 minutes to read

The Modify element indicates whether a client can modify a folder or item. This element
was introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

XML

<Modify>true or false</Modify>

boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

EffectiveRights Contains the rights of the client based on the permission settings for the item or
folder. This element was introduced in Exchange 2007 SP1.

Text value
A text value of true indicates that a client can modify an item or folder.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


ModifyRecipientsAllowed
Article • 03/29/2023 • 2 minutes to read

The ModifyRecipientsAllowed element specifies whether modification of the recipients


is enabled.

XML

<ModifyRecipientsAllowed> true | false </ModifyRecipientsAllowed>

boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
RightsManagementLicenseData

Text value
A text value of true for the ModifyRecipientsAllowed element indicates that the item
recipient list is modifiable for an item with rights management enabled on it. A value of
false indicates that the recipient list is not modifiable.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Month
Article • 03/29/2023 • 2 minutes to read

The Month element represents the transition month of the year to and from standard time and daylight saving time.

XML

<Month>...</Month>

Short

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

StandardTime Represents an offset from the time relative to Coordinated Universal Time (UTC) represented by the Bias (UTC) element.
This element also contains information about the transition to standard time from daylight saving time in regions where
daylight saving time is observed.

The following are the XPath expressions to the StandardTime element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/WorkingHours/TimeZone/StandardTime

/GetUserAvailabilityRequest/TimeZone/StandardTime

DaylightTime
Represents an offset from the time relative to UTC represented by the Bias (UTC) element in regions where daylight saving
time is observed. This element also contains information about when the transition to daylight saving time from standard
time occurs.

The following are the XPath expressions to the DaylightTime element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/WorkingHours/TimeZone/DaylightTime

/GetUserAvailabilityRequest/TimeZone/DaylightTime

Text value
A text value is required. The value represents the ordinal rank of the month by occurrence and must be a number
between 1 and 12. This is a short integer data type.

Remarks
A StandardTime element that contains a DayOrder element that has a value of 5, a Month element that has a value of
10, and a DayOfWeek (TimeZone) element that has a value of Sunday means that the transition from standard time to
daylight saving time occurs on the fifth Sunday of the tenth month.

Element information
Item Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
Getting User Availability
Month (Time Zone Transition)
Article • 03/29/2023 • 2 minutes to read

The Month element represents the month in which the time zone transition occurs.

XML

<Month/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

RecurringDateTransition Represents a time zone transition that occurs on a specific date each
year.

RecurringDayTransition
Represents a time zone transition that occurs on the same day each
year.

Text value
The text value is an integer that represents the month in which the time zone transition
occurs.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server that has the Client Access server
role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Month (Item Recurrence)
Article • 03/29/2023 • 2 minutes to read

The Month element describes the month when a yearly recurring item occurs.

XML

<Month/>

MonthNamesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

AbsoluteYearlyRecurrence
Represents a yearly recurrence pattern.

RelativeYearlyRecurrence
Describes a relative yearly recurrence pattern.

Text value
A text value is required. The following are the possible text values for this element:

January

February

March
April

May

June

July

August

September

October

November

December

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
MonthlyRegeneration
Article • 03/29/2023 • 2 minutes to read

The MonthlyRegeneration element describes the frequency, in months, of which task is


regenerated.

XML

<MonthlyRegeneration>

<Interval/>

</MonthlyRegeneration>

MonthlyRegeneratingPatternType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Interval
Defines the interval, in months, between two consecutive recurring items.

Parent elements

Element Description

Recurrence (TaskRecurrenceType)
Contains recurrence information for recurring tasks.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
MoreEvents
Article • 03/29/2023 • 2 minutes to read

The MoreEvents element indicates whether there are more events in the queue to be
delivered to the client.

XML

<MoreEvents/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Notification Contains information about the subscription and the events that have occurred
since the last notification.

Text value
The text value represents a Boolean value. A value of true indicates that more events are
in the queue. A value of false indicates that no more events are in the queue. This
property is read-only.

Remarks
In the case of Pull notifications, a true value in this element indicates to the client that
another GetEvents request should be issued to get the remaining events. Assuming that
the client specifications require minimum latency for event notifications, GetEvents
requests should continue in a continuous succession until a false MoreEvents value is
returned.

In the case of Push notifications, a true value for MoreEvents indicates to the client that
another notification request will be sent to the client to deliver the remaining events.
Similar to Pull notifications, these follow-up requests will continue in continuous
succession until the event queue on the Client Access server is empty.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
Subscribe operation

GetEvents operation

Unsubscribe operation
MovedEvent
Article • 03/29/2023 • 2 minutes to read

The MovedEvent element represents an event in which an item or folder is moved from
one parent folder to another parent folder.

XML

<MovedEvent>

<Watermark/>

<TimeStamp/>

<ItemId/>

<ParentFolderId/>

<OldItemId/>

<OldParentFolderId/>
</MovedEvent>

XML

<MovedEvent>

<Watermark/>

<TimeStamp/>

<FolderId/>

<ParentFolderId/>

<OldFolderId/>

<OldParentFolderId/>
</MovedEvent>

MovedCopiedEventType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Watermark
Represents an events bookmark in the mailbox events table.
Element Description

TimeStamp
Represents the timestamp of a move item/folder mailbox event.

FolderId
Represents the identifier of the moved folder.

ItemId
Represents the identifier of the moved item.

ParentFolderId Represents the identifier of the folder that contains the moved item or folder.

OldFolderId
Contains the folder identifier of the original folder before it was moved or
copied.

OldItemId
Contains the unique identifier of the original item before it was moved.

OldParentFolderId Contains the identifier of the original parent folder of an item or folder that
was moved.

Parent elements

Element Description

Notification Contains information about the subscription and the events that have occurred
since the last notification.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
Subscribe operation
GetEvents operation
Unsubscribe operation
MovedItemId
Article • 03/29/2023 • 2 minutes to read

The MovedItemId element specifies the identifier of the item that was moved by the
MarkAsJunk operation.

XML

<MovedItemId Id="" ChangeKey=""/>

ItemIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id The value of the Id attribute is the item identifier of the item that is moved by the
MarkAsJunk operation. The item identifier will remain the same after the move.

ChangeKey The value of the ChangeKey attribute is the change key of the moved item. The
change key changes after the item is moved by the MarkAsJunk operation.

Child elements
None.

Parent elements
MarkAsJunkResponseMessage

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
MoveFolder
Article • 03/29/2023 • 2 minutes to read

The MoveFolder element defines a request to move a folder in the Exchange store.

XML

<MoveFolder>

<ToFolderId/>

<FolderIds/>

</MoveFolder>

MoveFolderType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ToFolderId Represents the destination folder for a moved folder.

FolderIds
Contains an array of folders to move to the folder identified by the ToFolderId
element.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
MoveFolder operation
MoveFolderResponse
Article • 03/29/2023 • 2 minutes to read

The MoveFolderResponse element defines a response to a MoveFolder request.

XML

<MoveFolderResponse>

<ResponseMessages/>

</MoveFolderResponse>

MoveFolderResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False


MoveFolderResponseMessage
Article • 03/29/2023 • 2 minutes to read

The MoveFolderResponseMessage element contains the status and result of a single


MoveFolder operation request.

MoveFolderResponse
ResponseMessages
MoveFolderResponseMessage

XML

<MoveFolderResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Folders/>

</MoveFolderResponseMessage>

FolderInfoResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of a MoveFolder operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass Attribute

Value Description
Value Description

Success
Describes a request that is fulfilled.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota was exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Any unauthorized access attempt by any client
- Any server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
A text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

Folders
Contains an array of moved folders.

Parent elements
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
MoveFolder
MoveFolder operation
MoveItem
Article • 03/29/2023 • 2 minutes to read

The MoveItem element defines a request to move an item in the Exchange store.

XML

<MoveItem>

<ToFolderId/>

<ItemIds/>

<ReturnNewItemIds/>

</MoveItem>

MoveItemType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ToFolderId
Represents the destination folder for a moved item.

ItemIds
Contains an array of identified items to move to the folder represented by
the ToFolderId element.

ReturnNewItemIds Indicates whether the item identifiers of new items are returned in the
response.

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
MoveItem operation

EWS XML elements in Exchange


MoveItemResponse
Article • 03/29/2023 • 2 minutes to read

The MoveItemResponse element defines a response to a MoveItem request.

XML

<MoveItemResponse>

<ResponseMessages/>

</MoveItemResponse>

MoveItemResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False


MoveItemResponseMessage
Article • 03/29/2023 • 2 minutes to read

The MoveItemResponseMessage element contains the status and result of a single


MoveItem operation request.

XML

<MoveItemResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Items/>

</MoveItemResponseMessage>

ItemInfoResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of a MoveItem operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass Attribute

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes are moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota was exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Any unauthorized access attempted by any client
- Any server-side failure in response to a valid client-side call.

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
A text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

Items
Contains an array of moved items.

Parent elements

Element Description
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Exchange Server with the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
MoveItem operation
MoveItem
MoveToFolder
Article • 03/29/2023 • 2 minutes to read

The MoveToFolder element specifies the identifier of the folder to which email items
can be moved.

XML

<MoveToFolder>

<FolderId></FolderId>

<DistinguishedFolderId></DistinguisedFolderId>

</MoveToFolder>

TargetFolderIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier of a destination folder for a copied or moved item
or folder.

DistinguishedFolderId Identifies a named destination folder for a copied or moved item or


folder.

Parent elements

Element Description

Actions
Represents the set of actions that are available to be taken on a message when the
conditions are fulfilled..
Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
CopyToFolder

EWS XML elements in Exchange


MSExchangeCertificate
Article • 03/29/2023 • 2 minutes to read

The MSExchangeCertificate element contains a value that encodes the Microsoft


Exchange certificate of a contact.

XML

<MSExchangeCertificate/>

ArrayOfBinaryType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element name Description

Base64Binary
Contains a Base64-encoded value.

Parent elements

Element name Description

Contact
Represents a contact item in the Exchange store.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

This element was introduced in Exchange Server 2010 Service Pack 2 (SP2).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)


MustDisplayComment
Article • 03/29/2023 • 2 minutes to read

The MustDisplayComment element indicates whether the managed folder comment


must be displayed.

XML

<MustDisplayComment/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ManagedFolderInformation
Contains information about a managed folder.

Text value
The text value represents a Boolean value. A value of true indicates that the comment
must be displayed; a value of false indicates that the comment does not have to be
displayed.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
CreateManagedFolder operation

EWS XML elements in Exchange


MyResponseType
Article • 03/29/2023 • 2 minutes to read

The MyResponseType element contains the status of or response to a calendar item.

XML

<MyResponseType/>

ResponseTypeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Text value
A text value is required. The following are the possible text values for this element:

Unknown

Organizer

Tentative
Accept

Decline

NoResponseReceived

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Name (AttachmentType)
Article • 03/29/2023 • 2 minutes to read

The Name element represents the name of the attachment.

XML

<Name/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

FileAttachment
Represents a file that is attached to an item in the Exchange store.

ItemAttachment
Represents an Exchange item that is attached to another Exchange item.

Text value
The text value is a string value that represents the name of the attachment.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Name (EmailAddressType)
Article • 03/29/2023 • 2 minutes to read

The Name element represents the name of a mailbox user.

XML

<Name/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Mailbox
Identifies a fully resolved e-mail address.

RoomList
Identifies a list of meeting rooms.

Text value
A text value that represents a string is required if this element is used.

Remarks
This element is optional. The Name element exists in the AttachmentType,
EmailAddressType, and EmailAddress types. The Name element in the EmailAddress
type is described in the Name (EmailAddress) element topic.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Name (EmailAddress)
Article • 03/29/2023 • 2 minutes to read

The Name element represents the display name of the mailbox user.

XML

<Name/>

String

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Email Represents the mailbox user for a GetUserAvailability query.


(EmailAddressType)

The following is the XPath to this element:

/GetUserAvailabilityRequest/MailboxDataArray/MailboxData[i]/Email

Mailbox (Availability)
Represents the mailbox user for a SetUserOofSettings or
GetUserOofSettings request.

The following are the XPath expressions to this element:

/GetUserOofSettingsRequest/Mailbox

/SetUserOofSettingsRequest/Mailbox

Text value
A text value is required if this element is used.

Remarks
This element can occur at most one time in the Email (EmailAddressType) element. This
element is not required.

7 Note

The schema that describes this element is located in the EWS virtual directory of
the computer that is running MicrosoftExchange Server 2007 that has the Client
Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
GetUserAvailabilityRequest
Getting User Availability
Name (ExtendedAttributeType)
Article • 03/29/2023 • 2 minutes to read

The Name (ExtendedAttributeType) element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Name (Message Tracking)
Article • 03/29/2023 • 2 minutes to read

The Name element represents the property name for a message tracking report.

XML

<Name/>

String

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

TrackingPropertyType Represents a name and value pair of strings that is used to create
properties for message tracking reports.

Text value
A text value is required if this element is used.

Remarks
This element can occur at most one time in the TrackingPropertyType element.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Name (string)
Article • 03/29/2023 • 2 minutes to read

The Name element specifies a search refiner name.

XML

<Name></Name>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Refiner

Text value
The text value of the Name element is the name of the search refiner.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
NetShowUrl
Article • 03/29/2023 • 2 minutes to read

The NetShowUrl element specifies the URL for a Microsoft NetShow online meeting.

XML

<NetShowUrl/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MeetingRequest
Represents a meeting in the Exchange store.

CalendarItem
Represents an Exchange calendar item.

Text value
A text value that represents a URL is required if this element is used.

Remarks
This NetShowUrl property is read-writable for the organizer's calendar item. It is read-
only for meeting requests and for attendees.
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
NewBodyContent
Article • 03/29/2023 • 2 minutes to read

The NewBodyContent element represents the new body content of a message.

XML

<NewBodyContent BodyType=""/>

BodyType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

BodyType
Represents the actual body content of a message.

BodyType Attribute

Value Description

HTML
Converts all bodies to HTML.

Text
Converts all bodies to plain text.

Child elements
None.

Parent elements

Element Description

ReplyToItem
Contains a reply to the sender of an item in the Exchange store.
Element Description

ReplyAllToItem
Contains a reply to the sender and all identified recipients of an item in the
Exchange store.

ForwardItem
Contains an Exchange store item to forward to recipients.

CancelCalendarItem Represents the response object that is used to cancel a meeting.

PostReplyItem
Contains a reply to a post item. This element was introduced in Microsoft
Exchange Server 2007 Service Pack 1 (SP1).

Text value
The text value represents the new body content of a message.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
Exchange server that has the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
NewDisplayName
Article • 03/29/2023 • 2 minutes to read

The NewDisplayName element contains the updated display name of an instant


messaging group.

XML

<NewDisplayName></NewDisplayName>

NonEmptyStringType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SetImGroup

Text value
The text value of the NewDisplayName element is the updated display name of an
instant messaging group.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
NewMailEvent
Article • 03/29/2023 • 2 minutes to read

The NewMailEvent element represents an event that is triggered by a new mail item in a
mailbox.

XML

<NewMailEvent>

<Watermark/>

<TimeStamp/>

<ItemId/>

<ParentFolderId/>

</NewMailEvent>

BaseObjectChangedEventType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Watermark
Represents an event bookmark in the mailbox events table.

TimeStamp
Represents the timestamp of the arrival of a new mail item in a mailbox.

ItemId
Represents the identifier of a new mail item.

ParentFolderId Represents the identifier of the parent folder of the new mail item.

Parent elements

Element Description
Element Description

Notification Contains information about the subscription and the events that have occurred
since the last notification.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
Subscribe operation

GetEvents operation

Unsubscribe operation
NewReminderTime
Article • 03/29/2023 • 2 minutes to read

The NewReminderTime element specifies a new time for a reminder.

XML

<NewReminderTime/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
ReminderItemAction

Text value
The text value of the NewReminderTime element is a new time for the reminder. The
NewReminderTime element is used when the ActionType element is set to Snooze, in
order to delay the reminder. The value of the NewReminderTime must be greater than
the ReminderTime returned by the GetReminders operation.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
ReminderItemAction

EWS XML elements in Exchange


NextPredictedAction
Article • 03/29/2023 • 2 minutes to read

The NextPredictedAction element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
NextPredictedAction (ItemType)
Article • 03/29/2023 • 2 minutes to read

The NextPredictedAction (ItemType) element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Nickname
Article • 03/29/2023 • 2 minutes to read

The Nickname element represents the nickname of a contact.

XML

<Nickname/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CompleteName
Represents the complete name of a contact.

Contact
Represents an Exchange contact item.

Text value
The Nickname element takes a string value.

Remarks
This element is optional.
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Creating Contacts (Exchange Web Services)
Nicknames
Article • 03/29/2023 • 2 minutes to read

The Nicknames element specifies an array of nickname values and the identifiers of their
source attributions for the associated persona.

XML

<Nicknames>

<StringAttributedValue/>

</Nicknames>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
StringAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
NoEndRecurrence
Article • 03/29/2023 • 2 minutes to read

The NoEndRecurrence element describes the start date of an item recurrence pattern
that does not have a defined end date.

XML

<NoEndRecurrence>

<StartDate/>

</NoEndRecurrence>

NoEndRecurrenceRangeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

StartDate (Recurrence)
Represents the start date of a recurring task or calendar item.

Parent elements

Element Description

Recurrence (RecurrenceType)
Contains the recurrence pattern for calendar items and meeting
requests.

Recurrence Contains recurrence information for recurring tasks.


(TaskRecurrenceType)

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
NonIndexableItemDetail
Article • 03/29/2023 • 2 minutes to read

The NonIndexableItemDetail element specifies detail information about an item that


cannot be indexed.

XML

<NonIndexableItemDetail>

<ItemId/>

<ErrorCode/>

<ErrorDescription/>

<IsPartiallyIndexed/>

<IsPermanentFailure/>

<SortValue/>

<AttemptCount/>

<LastAttemptTime/>

<AdditionalInfo/>

</NonIndexableItemDetail>

NonIndexableItemDetailType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ItemId | ErrorCode (ItemIndexErrorType) | ErrorDescription | IsPartiallyIndexed |
IsPermanentFailure | SortValue | AttemptCount | LastAttemptTime | AdditionalInfo

Parent elements
Items (ArrayOfNonIndexableItemDetailsType)

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
NonIndexableItemDetailsResult
Article • 03/29/2023 • 2 minutes to read

The NonIndexableItemDetailsResult element specifies the results of the


GetNonIndexableItemDetails WSDL operation.

XML

<NonIndexableItemDetailsResult>

<Items/>

<FailedMailboxes/>

</NonIndexableItemDetailsResult>

NonIndexableItemDetailResultType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Items (ArrayOfNonIndexableItemDetailsType) , FailedMailboxes

Parent elements
GetNonIndexableItemDetailsResponse , GetNonIndexableItemDetailsResponseMessage

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
GetNonIndexableItemDetails operation

EWS XML elements in Exchange


NonIndexableItemStatistic
Article • 03/29/2023 • 2 minutes to read

The NonIndexableItemStatistic element contains a single statistic for an item that could
not be indexed

XML

<NonIndexableItemStatistic>

<Mailbox/>

<ItemCount/>

<ErrorMessage/>

</NonIndexableItemStatistic>

NonIndexableItemStatisticType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Mailbox (string) | ItemCount | ErrorMessage

Parent elements
NonIndexableItemStatistics

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False


NonIndexableItemStatistics
Article • 03/29/2023 • 2 minutes to read

The NonIndexableItemStatistics element contains an array of statistics for items that


could not be indexed.

XML

<NonIndexableItemStatistics>

<NonIndexableItemStatistic/>

</NonIndexableItemStatistics>

ArrayOfNonIndexableItemStatisticsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
NonIndexableItemStatistic

Parent elements
GetNonIndexableItemStatisticsResponse ,
GetNonIndexableItemStatisticsResponseMessage

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
GetNonIndexableItemStatistics operation

EWS XML elements in Exchange


NormalizedBody
Article • 03/29/2023 • 2 minutes to read

The NormalizedBody element specifies an HTML representation of the Body property of


an item as a fragment that can be inserted into another HTML body.

XML

<NormalizedBody BodyType="Text | HTML" IsTruncated="true | false">


</NormalizedBody>

BodyType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

BodyType Indicates the body type. The value of Text for the BodyType attribute indicates that
the body is in plain text form. The value of HTML for the BodyType attribute
indicates that the body is in HTML form. The BodyType attribute is required.

IsTruncated Indicates that the body contents have been truncated. A text value of false for the
IsTruncated attribute indicates that the body contents have not been truncated. The
normalized body will be truncated if the normalized body length is longer than the
value set in the MaximumBodySize element.

Child elements
None.

Parent elements
Item | Message | MeetingMessage | MeetingRequest | MeetingResponse |
MeetingCancellation | Task | PostItem | CalendarItem | Contact | DistributionList

Text value
The text value of the NormalizedBody element is the normalized body of the item.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
NormalizedBodyType
Article • 03/29/2023 • 2 minutes to read

The NormalizedBodyType element specifies whether the normalized body is returned in


text or HTML format.

XML

<NormalizedBodyType> Best | HTML | Text </NormalizedBodyType>

BodyTypeResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
ItemShape

Text value
The text value of the NormalizedBodyType element indicates format the normalized
body is returned in. The following table lists the possible values for this element.

Value Description

Best The response will return the richest available content of body text. This is useful if it is
unknown whether the content is text or HTML.
The returned body will be text if the stored body is plain text. Otherwise, the response
will return HTML if the stored body is in either HTML or RTF format.
This is the default value.
Value Description

HTML The response will return a normalized body as HTML.

Text The response will return a normalized body as plain text.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
ItemShape

EWS XML elements in Exchange


Not
Article • 03/29/2023 • 2 minutes to read

The Not element represents a search expression that negates the Boolean value of the
search expression that it contains.

XML

<Not>

<SearchExpression/>

</Not>

NotType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

SearchExpression Represents the base class for expressions within a restriction.

One of the following elements must be substituted for the SearchExpression


element:

- Exists

- Excludes

- IsEqualTo

- IsNotEqualTo

- IsGreaterThan

- IsGreaterThanOrEqualTo

- IsLessThan
- IsLessThanOrEqualTo

- Contains

- Not

- And

- Or

Parent elements

Element Description

Restriction Represents the restriction or query that is used to filter items or folders in
FindItem/FindFolder and search folder operations.

Not
Represents a search expression that negates the Boolean value of the search
expression that it contains.

And
Represents a search expression that allows you to perform a Boolean AND operation
between two or more search expressions. The result of the AND operation is true if
all the search expressions contained within the And element are true.

Or
Represents a search expression that performs a logical OR operation on the search
expression that it contains. Or will return true if any of its children return true. Or
must have two or more children.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Notes (Contact)
Article • 03/29/2023 • 2 minutes to read

The Notes element contains supplementary contact information.

XML

<Notes/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element name Description

Contact
Represents a contact item in the Exchange store.

Text value
The text value is a string that represents supplementary contact information.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

This element was introduced in Exchange Server 2010 Service Pack 2 (SP2).
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)


NotesFolderPermissionLevel
Article • 03/29/2023 • 2 minutes to read

The NotesFolderPermissionLevel element contains the permissions for the default


Notes folder. This element was introduced in Microsoft Exchange Server 2007 Service
Pack 1 (SP1).

XML

<NotesFolderPermissionLevel>

None or Editor or Reviewer or Author or Custom

</NotesFolderPermissionLevel>

DelegateFolderPermissionLevelType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

DelegatePermissions Contains the delegate permission level settings for a user. This element
was introduced in Exchange 2007 SP1.

Text value
The following table lists the text values that represent the permission levels.

Permission level text values


Permission level Description

None The delegate user has no access permissions to the Notes folder.

Reviewer The delegate user can read items in the Notes folder.

Author The delegate user can read and create items in the Notes folder.

Editor The delegate user can read, create, and modify items in the Notes folder.

Custom The delegate user has custom access permissions to the Notes folder.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
AddDelegate operation

UpdateDelegate operation

EWS XML elements in Exchange

Adding Delegates
Notification
Article • 03/29/2023 • 2 minutes to read

The Notification element contains information about the subscription and the events
that have occurred since the last notification.

XML

<Notification>

<SubscriptionId/>

<PreviousWatermark/>
<MoreEvents/>

<CopiedEvent/>

</Notification>

XML

<Notification>

<SubscriptionId/>

<PreviousWatermark/>
<MoreEvents/>

<CreatedEvent/>

</Notification>

XML

<Notification>

<SubscriptionId/>

<PreviousWatermark/>
<MoreEvents/>

<DeletedEvent/>

</Notification>

XML

<Notification>

<SubscriptionId/>

<PreviousWatermark/>
<MoreEvents/>

<ModifiedEvent/>

</Notification>

XML

<Notification>

<SubscriptionId/>

<PreviousWatermark/>
<MoreEvents/>

<MovedEvent/>

</Notification>

XML

<Notification>

<SubscriptionId/>

<PreviousWatermark/>
<MoreEvents/>

<NewMailEvent/>

</Notification>

XML

<Notification>

<SubscriptionId/>

<PreviousWatermark/>
<MoreEvents/>

<StatusEvent/>

</Notification>

XML

<Notification>

<SubscriptionId/>

<PreviousWatermark/>
<MoreEvents/>

<FreeBusyChangedEvent/>

</Notification>

NotificationType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Element Description

SubscriptionId Represents the identifier for a subscription.


(GetEvents)

PreviousWatermark
Represents the watermark of the latest event that was successfully
communicated to the client for the subscription.

MoreEvents
Indicates whether there are more events in the queue to be delivered to
the client.

CopiedEvent
Represents an event in which an item or folder is copied.

CreatedEvent
Represents an event in which an item or folder is created.

DeletedEvent
Represents an event in which an item or folder is deleted.

ModifiedEvent
Represents an event in which an item or folder is modified.

MovedEvent
Represents an event in which an item or folder is moved from one
parent folder to another parent folder.

NewMailEvent
Represents an event that is triggered by a new mail item in a mailbox.

StatusEvent
Represents a notification that no new activity has occurred in the
mailbox.

FreeBusyChangedEvent Represents an event in which an item's free/busy time has changed.

Parent elements

Element Description

GetEventsResponseMessage
Contains the status and result of a single GetEvents request.

SendNotificationResponseMessage Contains the status and result of a single SendNotification


request.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
Subscribe operation
GetEvents operation
GetStreamingEvents operation
Unsubscribe operation
Notifications
Article • 03/29/2023 • 2 minutes to read

The Notifications element contains an array of information about the subscription and
the events that have occurred since the last notification.

XML

<Notifications>

<Notification/>

</Notifications>

NonEmptyArrayOfNotificationsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Notification Contains information about the subscription and the events that have occurred
since the last notification.

Parent elements

Element Description

GetStreamingEventsResponseMessage Contains the status and result of a single


GetStreamingEvents operation request.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages and


https://schemas.microsoft.com/exchange/services/2006/types

Schema Messages schema; Types schema


Name

Validation Messages.xsd; Types.xsd


File

Can be False
Empty

See also
GetFolder operation

DeleteFolder operation

MoveFolder operation

CopyFolder operation

Subscribe operation
NotSentToMe
Article • 03/29/2023 • 2 minutes to read

The NotSentToMe element indicates whether the owner of the mailbox must not be in
the ToRecipients property of the incoming messages in order for the condition or
exception to apply.

XML

<NotSentToMe>true | false</NotSentToMe>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conditions Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions Represents the exceptions that represent all the available rule exception conditions
for an Inbox rule.

Text value
A text value of true indicates that the owner of the mailbox must not be in the
ToRecipients property of the incoming messages in order for the condition or exception
to apply. A value of false indicates that the owner of the mailbox must be in the
ToRecipients property of the incoming message in order for the condition or exception
to apply.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
Number
Article • 03/29/2023 • 2 minutes to read

The Number element specifies a phone number.

XML

<Number></Number>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Value (PersonaPhoneNumberType) | PhoneNumber

Text value
The text value of the Number element is a phone number represented in string format.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
NumberedRecurrence
Article • 03/29/2023 • 2 minutes to read

The NumberedRecurrence element describes the start date and the number of
occurrences of a recurring item.

XML

<NumberedRecurrence>

<StartDate/>

<NumberOfOccurrences/>

</NumberedRecurrence>

NumberedRecurrenceRangeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

StartDate (Recurrence)
Represents the start date of a recurring task or calendar item.

NumberOfOccurrences
Contains the number of occurrences of a recurring item.

Parent elements

Element Description

Recurrence (RecurrenceType)
Contains the recurrence pattern for calendar items and meeting
requests.

Recurrence Contains recurrence information for recurring tasks.


(TaskRecurrenceType)

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
NumberOfMembers
Article • 03/29/2023 • 2 minutes to read

The NumberOfMembers element represents the number of users, resources, and rooms in a distribution list.

GetUserAvailabilityResponse

SuggestionsResponse

SuggestionDayResultArray

SuggestionDayResult

SuggestionArray

Suggestion

AttendeeConflictDataArray

GroupAttendeeConflictData

NumberOfMembers

XML

<NumberOfMembers>...</NumberOfMembers>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

GroupAttendeeConflictData Contains aggregate conflict information about the number of users available, the number of users who have conflicts, and the number o
distribution list for a suggested meeting time.
The following is the XPath expression to this element:
/GetUserAvailabilityResponse/SuggestionsResponse/SuggestionDayResultArray/SuggestionDayResult[i]/SuggestionArray/Suggestion[i]/A

Remarks
The maximum value of the NumberOfMembers element is 100.

The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server
2007 that has the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema


Name Value

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


NumberOfMembersAvailable
Article • 03/29/2023 • 2 minutes to read

The NumberOfMembersAvailable element represents the number of distribution list members who are available for a suggested meeting
time. This element represents members for whom the status is Free.

GetUserAvailabilityResponse

SuggestionsResponse

SuggestionDayResultArray

SuggestionDayResult

SuggestionArray

Suggestion

AttendeeConflictDataArray

GroupAttendeeConflictData

NumberOfMembersAvailable

XML

<NumberOfMembersAvailable>...</NumberOfMembersAvailable>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

GroupAttendeeConflictData Contains aggregate conflict information about the number of users who are available, the number of users who have conflicts, and the n
in a distribution list for a suggested meeting time.
The following is the XPath expression to this element:
/GetUserAvailabilityResponse/SuggestionsResponse/SuggestionDayResultArray/SuggestionDayResult[i]/SuggestionArray/Suggestion[i]/A

Remarks
The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server
2007 that has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema


Element Example

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


NumberOfMembersWithConflict
Article • 03/29/2023 • 2 minutes to read

The NumberOfMembersWithConflict element represents the number of distribution list members who have a conflict with a suggested
meeting time. This element represents members who have a status of Busy, OOF, or Tentative.

GetUserAvailabilityResponse

SuggestionsResponse

SuggestionDayResultArray

SuggestionDayResult

SuggestionArray

Suggestion

AttendeeConflictDataArray

GroupAttendeeConflictData

NumberOfMembersWithConflict

XML

<NumberOfMembersWithConflict>...</NumberOfMembersWithConflict>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

GroupAttendeeConflictData Contains aggregate conflict information about the number of users who are available, the number of users who have conflicts, and the n
in a distribution list for a suggested meeting time.
The following is the XPath expression to this element:
/GetUserAvailabilityResponse/SuggestionsResponse/SuggestionDayResultArray/SuggestionDayResult[i]/SuggestionArray/Suggestion[i]/A

Remarks
The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server
2007 that has the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema


Name Value

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


NumberOfMembersWithNoData
Article • 03/29/2023 • 2 minutes to read

The NumberOfMembersWithNoData element represents the number of distribution list members who do not have published free/busy
data to compare to a suggested meeting time. This element represents members of a distribution list that is too large or members who
have No Data status.

GetUserAvailabilityResponse

SuggestionsResponse

SuggestionDayResultArray

SuggestionDayResult

SuggestionArray

Suggestion

AttendeeConflictDataArray

GroupAttendeeConflictData

NumberOfMembersWithNoData

XML

<NumberOfMembersWithNoData>...</NumberOfMembersWithNoData>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

GroupAttendeeConflictData Contains aggregate conflict information about the number of users who are available, the number of users who have conflicts, and the n
information in a distribution list for a suggested meeting time.
The following is the XPath expression to this element:
/GetUserAvailabilityResponse/SuggestionsResponse/SuggestionDayResultArray/SuggestionDayResult[i]/SuggestionArray/Suggestion[i]/A

Remarks
A contact in a group who does not have a mailbox is an example of a distribution list member who does not have calendar data. A contact
may also have No Data status for the following reasons:

Permissions are insufficient.

The distribution list is too large to expand.

The Active Directory directory service is unavailable.

The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server
2007 that has the Client Access server role installed.
Element information
Item value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse
Getting User Availability
NumberOfOccurrences
Article • 03/29/2023 • 2 minutes to read

The NumberOfOccurrences element contains the number of occurrences of a recurring


item.

XML

<NumberOfOccurrences/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

NumberedRecurrence Describes the start date and the number of occurrences of a recurring
item.

Text value
The text value is an integer that represents the number of occurrences of a recurring
item. The value must be an integer in the range of 1 to 999.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Occurrence
Article • 03/29/2023 • 2 minutes to read

The Occurrence element represents a single modified occurrence of a recurring calendar


item.

XML

<Occurrence>

<ItemId/>

<Start/>

<End/>

<OriginalStart/>

</Occurrence>

OccurrenceInfoType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ItemId
Contains the unique identifier and change key of a modified occurrence of a
recurring calendar item.

Start
Represents the start time of a modified occurrence of a recurring calendar item.

End Represents the end time of a modified occurrence of a recurring calendar item.

OriginalStart Represents the original start time of a modified occurrence of a recurring calendar
item.

Parent elements

Element Description
Element Description

ModifiedOccurrences Contains a collection of recurring calendar item occurrences that have


been modified so that they are different than the recurrence master item.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Occurrence (Time Zone Transition)
Article • 03/29/2023 • 2 minutes to read

The Occurrence element represents the occurrence of the day of the week in the month
that the time zone transition occurs.

XML

<Occurrence/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

RecurringDayTransition Represents a time zone transition that occurs on the same day each
year.

Text value
The text value is an integer that represents the occurrence of the day of the week in the
month that the time zone transition occurs. The following table lists the possible values.

Value Description

1 The first occurrence of the specified day of the week from the beginning of the month.
Value Description

2 The second occurrence of the specified day of the week from the beginning of the month.

3 The third occurrence of the specified day of the week from the beginning of the month.

4 The fourth occurrence of the specified day of the week from the beginning of the month.

-1 The first occurrence of the specified day of the week from the end of the month.

-2 The second occurrence of the specified day of the week from the end of the month.

-3 The third occurrence of the specified day of the week from the end of the month.

-4 The fourth occurrence of the specified day of the week from the end of the month.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server that has the Client Access server
role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
OccurrenceDate
Article • 03/29/2023 • 2 minutes to read

The OccurrenceDate element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
OccurrenceItemId
Article • 03/29/2023 • 2 minutes to read

The OccurrenceItemId element identifies a single occurrence of a recurring item.

XML

<OccurrenceItemId RecurringMasterId="" ChangeKey="" InstanceIndex=""/>

OccurrenceItemIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

RecurringMasterId Identifies the recurring master of a recurring item. This attribute is required.

ChangeKey
Identifies a specific version of the recurring master or an item occurrence. If
either the recurring master or any of its occurrences change, the ChangeKey
changes. The ChangeKey is the same for the recurring master and all
occurrences.

InstanceIndex
Identifies the index of the item occurrence. This attribute is required. This
value represents an integer.

Child elements
None.

Parent elements

Element Description

GlobalItemIds Contains the collection of item identifiers for all conversation items in a mailbox.
Element Description

ItemIds
Contains the unique identities of items, occurrence items, and recurring master
items that are used to delete, send, get, move, or copy items in the Exchange
store.

The following are the XPath expressions to this element:

/DeleteItem/ItemIds

/SendItem/ItemIds

/GetItem/ItemIds

NOTE: MoveItem operation and CopyItem operation only work with single
calendar items and recurring master items. Item occurrences are invalid with
these operations.

ItemChange
Contains an item identifier and the updates to apply to the item.

The following is the XPath expression to this element:


/UpdateItem/ItemChanges/ItemChange[i]

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Example
The following example identifies the fourth occurrence of a recurring item that has the
identity 34vswe4.

XML

<OccurrenceItemId RecurringMasterId="34vswe4" InstanceIndex="4" />

Element information
Name Value
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
RecurringMasterItemId
FindConversation operation
EWS XML elements in Exchange
OfficeLocation
Article • 03/29/2023 • 2 minutes to read

The OfficeLocation element represents the office location of a contact.

XML

<OfficeLocation/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Text value
A text value is required if this element is used.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)

Updating Contacts

Deleting Contacts
OfficeLocations
Article • 03/29/2023 • 2 minutes to read

The OfficeLocations element specifies an array of office locations and the identifiers of
their source attributions for the associated persona.

XML

<OfficeLocations>

<StringAttributedValue/>

<OfficeLocations>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
StringAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Offset
Article • 03/29/2023 • 2 minutes to read

The Offset element describes the offset from the BaseOffset. Together with the
BaseOffset element, the Offset element identifies whether the time is standard or
daylight saving time.

XML

<Offset/>

duration

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Daylight
Represents the date and time when the time changes from daylight saving time to
standard time.

Standard Represents the date and time when the time changes from daylight saving time to
standard time.

Text value
The text value represents the offset from Coordinated Universal Time (UTC).
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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
OldFolderId
Article • 03/29/2023 • 2 minutes to read

The OldFolderId element contains the original identifier of a folder that was moved or
copied.

XML

<OldFolderId Id="" ChangeKey=""/>

FolderIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id
Contains a string that identifies a folder in the Exchange store. This attribute is
required.

ChangeKey Contains a string that identifies a version of a folder that is identified by the Id
attribute. This attribute is optional. Use this attribute to make sure that the correct
version of a folder is used.

Child elements
None.

Parent elements

Element Description

CopiedEvent Represents an event in which an item or folder is copied.

MovedEvent Represents an event in which an item or folder is moved from one parent folder to
another parent folder.
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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
Subscribe operation

GetEvents operation

Unsubscribe operation

EWS XML elements in Exchange


OldItemId
Article • 03/29/2023 • 2 minutes to read

The OldItemId element contains the unique identifier of the item that was copied or
moved.

XML

<OldItemId Id="" ChangeKey=""/>

ItemIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id
Contains a string that identifies an item in the Exchange store. This attribute is
required.

ChangeKey Contains a string that identifies a version of an item that is identified by the Id
attribute. This attribute is optional. Use this attribute to make sure that the correct
version of an item is used.

Child elements
None.

Parent elements

Element Description

CopiedEvent Represents an event in which an item or folder is copied.

MovedEvent Represents an event in which an item or folder is moved from one parent folder to
another parent folder.
Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
Subscribe operation

GetEvents operation

Unsubscribe operation

EWS XML elements in Exchange


OldParentFolderId
Article • 03/29/2023 • 2 minutes to read

The OldParentFolderId element contains the identifier of the parent folder of an item or
folder that was copied or moved.

XML

<OldParentFolderId Id="" ChangeKey=""/>

FolderIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id
Contains a string that identifies a folder in the Exchange store. This attribute is
required.

ChangeKey Contains a string that identifies a version of a folder that is identified by the Id
attribute. This attribute is optional. Use this attribute to make sure that the correct
version of a folder is used.

Child elements
None.

Parent elements

Element Description

CopiedEvent Represents an event in which an item or folder is copied.

MovedEvent Represents an event in which an item or folder is moved from one parent folder to
another parent folder.
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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
Subscribe operation

GetEvents operation

Unsubscribe operation

EWS XML elements in Exchange


OnlineMeetingSettings
Article • 03/29/2023 • 2 minutes to read

The OnlineMeetingSettings element specifies the settings for online meetings.

XML

<OnlineMeetingSettings>

<LobbyBypass/>

<AccessLevel/>

<Presenters/>

</OnlineMeetingSettings>

OnlineMeetingSettingsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
LobbyBypass | AccessLevel | Presenters

Parent elements
CalendarItem

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
OofSettings
Article • 03/29/2023 • 2 minutes to read

The OofSettings element contains the Out of Office (OOF) settings.

GetUserOofSettingsResponse

OofSettings

XML

<OofSettings>

<OofState>...</OofState>

<ExternalAudience>...</ExternalAudience>

<Duration>...</Duration>

<InternalReply>...</InternalReply>

<ExternalReply>...</ExternalReply>

</OofSettings>

UserOofSettings

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

OofState
Contains the user's OOF state.

ExternalAudience Contains a value that determines to whom external OOF messages are sent.

Duration Contains the duration for which the OOF status is enabled if the OofState
(UserOofSettings) element is set to Scheduled. If the OofState element is set to Enabled or
Disabled, the value of this element is ignored.

InternalReply
Contains the OOF response sent to other users in the user's domain or
trusted domain.
Element Description

ExternalReply
Contains the OOF response sent to addresses outside the recipient's domain
or trusted domains.

Parent elements

Element Description

GetUserOofSettingsResponse
Contains the response results and the OOF settings for a user.
The following is the XPath expression to this element:
/GetUserOofSettingsResponse

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetUserOofSettings operation

SetUserOofSettings operation
OofState
Article • 03/29/2023 • 2 minutes to read

The OofState element is used to get or set the user's Out of Office (OOF) state.

XML

<OofState>Disabled or Enabled or Scheduled</OofState>

OofState

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

UserOofSettings
Specifies the OOF settings.
The following is the XPath expression to this element:
/SetUserOofSettingsRequest/UserOofSettings

OofSettings
Contains the OOF settings.
The following is the XPath expression to this element:
/GetUserOofSettingsResponse/OofSettings

Text value
A text value is required for the OofState element. The following list contains the possible
values for this element:
Disabled

Enabled

Scheduled

A value of Scheduled indicates that the OOF status is set to Enabled during a time
period identified by the Duration (UserOofSettings) element.

Remarks
This element is required in both the SetUsersOofSettingRequest message and the
GetUserOofSettingResponse message.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Example
The following example of a SetUserOofSettings request enables the OofState.

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<SetUserOofSettingsRequest
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<Mailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Name>David Alexander</Name>

<Address>[email protected]</Address>

<RoutingType>SMTP</RoutingType>

</Mailbox>

<UserOofSettings
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<OofState>Enabled</OofState>

<ExternalAudience>All</ExternalAudience>

<Duration>

<StartTime>2005-10-05T00:00:00</StartTime>

<EndTime>2005-10-25T00:00:00</EndTime>

</Duration>

<InternalReply>

<Message>I am out of office. This is my internal reply.</Message>

</InternalReply>

<ExternalReply>

<Message>I am out of office. This is my external reply.</Message>

</ExternalReply>

</UserOofSettings>

</SetUserOofSettingsRequest>

</soap:Body>

</soap:Envelope>

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserOofSettings operation

SetUserOofSettings operation
OpenAsAdminOrSystemService
Article • 03/29/2023 • 2 minutes to read

The OpenAsAdminOrSystemService element is for internal use only. This element is not
used by clients.

XML

<OpenAsAdminOrSystemService LogonType="">

<ConnectingSID/>

</OpenAsAdminOrSystemService>

OpenAsAdminOrSystemServiceType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

LogonType Not intended for client use.

Child elements

Element Description

ConnectingSID Not intended for client use.

Parent elements
None.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Operations
Article • 03/29/2023 • 2 minutes to read

The Operations element contains an array of rule operations that can be performed on
an Inbox.

UpdateInboxRules

XML

<Operations>

<CreateRuleOperation/>

<SetRuleOperation/>

<DeleteRuleOperation/>

</Operations>

ArrayOfRuleOperationsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

CreateRuleOperation
Represents an operation to create a new Inbox rule.

SetRuleOperation
Represents an operation to update an Inbox rule.

DeleteRuleOperation
Represents an operation to delete an Inbox rule.

Parent elements

Element Description

UpdateInboxRules
Defines a request to update the Inbox rules in a mailbox in the server store.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
UpdateInboxRules operation

EWS XML elements in Exchange


OperationIndex
Article • 03/29/2023 • 2 minutes to read

The OperationIndex element specifies the index of the operation in the request that
caused the rule operation error.

XML

<OperationIndex/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

RuleOperationError
Represents a rule operation error.

Text value
None

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
OptedInto
Article • 03/29/2023 • 2 minutes to read

The OptedInto element specifies a Boolean value that indicates whether the user opted
in to the retention policy.

XML

<OptedInto>true | false</OptedInto>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
RetentionPolicyTag

Text value
A text value of true for the OptedInto element indicates that the user opted in to the
retention policy. A value of false indicates that the user did not opt into the retention
policy.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
OptionalAttendees
Article • 03/29/2023 • 2 minutes to read

The OptionalAttendees element represents attendees who are not required to attend a
meeting.

XML

<OptionalAttendees>

<Attendee/>

</OptionalAttendees>

NonEmptyArrayOfAttendeesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Attendee
Represents attendees and resources for a meeting.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Or
Article • 03/29/2023 • 2 minutes to read

The Or element represents a search expression that performs a logical OR on the search
expression that it contains. Or will return true if any of its children return true. Or must
have two or more children.

XML

<Or>

<SearchExpression/>

<SearchExpression/>

</Or>

OrType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description
Element Description

SearchExpression Represents the base class for expressions within a restriction.

One of the following elements must be substituted for the SearchExpression


element:

- Exists

- Excludes

- IsEqualTo

- IsNotEqualTo

- IsGreaterThan

- IsGreaterThanOrEqualTo

- IsLessThan
- IsLessThanOrEqualTo

- Contains

- Not

- And

- Or

Parent elements

Element Description

Restriction Represents the restriction or query that is used to filter items or folders in
FindItem/FindFolder and search folder operations.

Not
Represents a search expression that negates the Boolean value of the search
expression that it contains.

And
Represents a search expression that allows you to perform a Boolean AND operation
between two or more search expressions. The result of the AND operation is true if
all the search expressions contained within the And element are true.

Or
Represents a search expression that performs a logical OR operation on the search
expression that it contains. Or will return true if any of its children return true. Or
must have two or more children.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
OrganizationMainPhones
Article • 03/29/2023 • 2 minutes to read

The OrganizationMainPhones element specifies an array of organizational main phone


numbers and the identifiers of their source attributions for the associated persona.

XML

<OrganizationMainPhones>

<PhoneNumberAttributedValue/>

</OrganizationMainPhones>

ArrayOfPhoneNumberAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
PhoneNumberAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Organizer
Article • 03/29/2023 • 2 minutes to read

The Organizer element represents the organizer of a meeting.

XML

<Organizer>

<Mailbox/>

</Organizer>

SingleRecipientType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Mailbox
Identifies a mail-enabled Active Directory directory service object.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
OrganizerLocation
Article • 03/29/2023 • 2 minutes to read

The OrganizerLocation element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
OriginalDisplayName
Article • 03/29/2023 • 2 minutes to read

The OriginalDisplayName element contains the original display name associated with
an email address.

XML

<OriginalDisplayName></OriginalDisplayName>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SendingAs | Mailbox | EmailAddress (EmailAddressType) | RoomList | ActingAs | Sender
(EmailAddressType) | PurportedSender | Recipient | FederatedDeliveryMailbox |
RecipientFilter | Address (EmailAddressType) | Id (EmailAddressType) | Value
(EmailAddressType)

Text value
The text value of the OriginalDisplayName element is the original display name
associated with an email address.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
OriginalPhoneString
Article • 03/29/2023 • 2 minutes to read

The OriginalPhoneString element specifies the original phone number for a contact or
persona.

XML

<OriginalPhoneString></OriginalPhoneString>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Phone | Phone (PhoneEntityType)

Text value
The text value of the OriginalPhoneString element is the original phone number for a
contact or persona.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
OriginalRecipients
Article • 03/29/2023 • 2 minutes to read

The OriginalRecipients element represents a list of e-mail addresses of the first message
recipients.

XML

<OriginalRecipients>

<Address/>

</OriginalRecipients>

ArrayOfEmailAddressesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Address (EmailAddressType)
Contains a fully resolved e-mail address.

Parent elements

Element Description

MessageTrackingReport Contains a single message that is returned in a


GetMessageTrackingReport operation.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetMessageTrackingReport operation

EWS XML elements in Exchange


OriginalStart
Article • 03/29/2023 • 2 minutes to read

The OriginalStart element represents the original start time of a calendar item.

XML

<OriginalStart/>

DateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents a calendar item in the Exchange store.

FirstOccurrence
Represents the first occurrence of a recurring calendar item.

LastOccurrence
Represents the last occurrence of a recurring calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Occurrence Represents a single modified occurrence of a recurring calendar item.

Text value
A text value that represents a date and time is required if this element is used.
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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
OtherAddresses
Article • 03/29/2023 • 2 minutes to read

The OtherAddresses element specifies an array of address values and the identifiers of
their source attributions for the associated persona.

XML

<OtherAddresses>

<PostalAddressAttributedValue/>

</OtherAddresses>

ArrayOfPostalAddressAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
PostalAddressAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
OtherFaxes
Article • 03/29/2023 • 2 minutes to read

The OtherFaxes element specifies an array of fax phone number values and the
identifiers of their source attributions for the associated persona.

XML

<OtherFaxes>

<PhoneNumberAttributedValue/>

</OtherFaxes>

ArrayOfPhoneNumberAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
PhoneNumberAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
OtherPhones2
Article • 03/29/2023 • 2 minutes to read

The OtherPhones2 element specifies an array of phone values and the identifiers of
their source attributions for the associated persona.

XML

<OtherPhones2>

<PhoneNumberAttributedValue/>

</OtherPhones2>

ArrayOfPhoneNumberAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
PhoneNumberAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
OtherTelephones
Article • 03/29/2023 • 2 minutes to read

The OtherTelephones element specifies an array of telephone values and the identifiers
of their source attributions for the associated persona.

XML

<OtherTelephones>

<PhoneNumberAttributedValue/>

</OtherTelephones>

ArrayOfPhoneNumberAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
PhoneNumberAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
OutlookRuleBlobExists
Article • 03/29/2023 • 2 minutes to read

The OutlookRuleBlobExists element indicates whether a Microsoft Outlook rule blob


exists in the user's mailbox.

GetInboxRulesResponse

OutlookRuleBlobExists

XML

<OutlookRuleBlobExists>true | false</OutlookRuleBlobExists>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

GetInboxRulesResponse
Represents a response to a GetInboxRules operation request.

Text value
A text value of true indicates that an Outlook rule blob exists. A text value of false
indicates that an Outlook rule blob does not exist.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
OutOfOffice
Article • 03/29/2023 • 2 minutes to read

The OutOfOffice element represents the response message and a duration time for
sending the response message.

XML

<OutOfOffice>

<ReplyBody/>

<Duration/>

</OutOfOffice>

XML

<OutOfOffice>

<ReplyBody/>

</OutOfOffice>

OutOfOfficeMailTip

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ReplyBody
Contains an Out of Office (OOF) message and the language used for the
message.

Duration Contains the duration that the OOF status is enabled if the OofState
(UserOofSettings)
element is set to Scheduled.

Parent elements
Element Description

MailTips
Represents values for various types of mail tips.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
OwaLink
Article • 03/29/2023 • 2 minutes to read

The OwaLink element specifies the link to preview an item in Microsoft Outlook Web
App.

XML

<OwaLink></OwaLink>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SearchPreviewItem

Text value
The text value of the OwaLink element is the URL to view the item in Outlook Web App.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Owner
Article • 03/29/2023 • 2 minutes to read

The Owner element represents the owner of a task.

XML

<Owner/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Task
Represents a task in the Exchange store.

Remarks
This is a read-only property.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Creating Tasks
Deleting Tasks
Owners
Article • 03/29/2023 • 2 minutes to read

The Owners element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
PageDirection
Article • 03/29/2023 • 2 minutes to read

The PageDirection element contains the direction for pagination in the search result.
The value is Previous or Next.

XML

<PageDirection> Previous | Next </PageDirection>

SearchPageDirectionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SearchMailboxes | GetNonIndexableItemDetails

Text value
The text value of the PageDirection element is the direction for pagination the search
results.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
PageItemCount
Article • 03/29/2023 • 2 minutes to read

The PageItemCount element specifies the number of pages returned in a search result
pagination.

XML

<PageItemCount></PageItemCount>

integer

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SearchMailboxesResult

Text value
The text value of the PageItemCount element is the number of pages returned in a
search result pagination.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PageItemReference
Article • 03/29/2023 • 2 minutes to read

The PageItemReference element specifies the reference for a page item.

XML

<PageItemReference></PageItemReference>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
GetNonIndexableItemDetails

Text value
The text value of the PageItemReference element is the reference for a page item.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
PageItemSize
Article • 03/29/2023 • 2 minutes to read

The PageItemSize element specifies the number of items to return in a search result
pagination.

XML

<PageItemSize></PageItemSize>

long

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SearchMailboxesResult

Text value
The text value of the PageItemSize element is the number of items returned in a search
result pagination.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Pagers
Article • 03/29/2023 • 2 minutes to read

The Pagers element specifies an array of pager phone numbers and the identifiers of
their source attributions for the associated persona.

XML

<Pagers>

<PhoneNumberAttributedValue/>

</Pagers>

ArrayOfPhoneNumberAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
PhoneNumberAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PageSize
Article • 03/29/2023 • 2 minutes to read

The PageSize element contains the number of items to be returned in a single page for
a search result.

XML

<PageSize></PageSize>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SearchMailboxes | GetNonIndexableItemDetails

Text value
The text value of the PageSize element is the number of items returned in a single page
of a search result set.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
ParentFolderId
Article • 03/29/2023 • 2 minutes to read

The ParentFolderId element represents the identifier of the parent folder that contains
the item or folder.

XML

<ParentFolderId Id="" ChangeKey=""/>

FolderIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id
Contains a string that identifies a folder in the Exchange store. This attribute is
required.

ChangeKey Contains a string that identifies a version of a folder that is identified by the Id
attribute. This attribute is optional. Use this attribute to make sure that the correct
version of a folder is used.

Child elements
None.

Parent elements

Element Description

CalendarFolder
Represents a calendar folder in a mailbox.

CalendarItem
Represents a calendar item in a mailbox.

Contact
Represents a contact item in a mailbox.

ContactsFolder
Represents a contacts folder in a mailbox.
Element Description

CopiedEvent
Represents an event in which an item or folder is copied.

CreatedEvent
Represents an event in which an item or folder is created.

DeletedEvent
Represents an event in which an item or folder is deleted.

DistributionList
Represents a private distribution list in a mailbox.

Folder
Represents a folder in a mailbox.

Item
Represents a generic Exchange item.

Item Represents a single item to upload into a mailbox.


(UploadItemType)

MeetingCancellation Represents a meeting cancellation in a mailbox.

MeetingMessage
Represents a meeting message in a mailbox.

MeetingRequest
Represents a meeting request in a mailbox.

MeetingResponse
Represents a meeting response in a mailbox.

Message
Represents an e-mail message in a mailbox.

ModifiedEvent
Represents an event in which an item or folder is modified.

MovedEvent
Represents an event in which an item or folder is moved from one parent
folder to another parent folder.

NewMailEvent
Represents an event that is triggered by a new mail item in a mailbox.

AcceptItem
Represents an Accept reply to a meeting request.

TentativelyAcceptItem Represents a Tentative reply to a meeting request.

DeclineItem
Represents a Decline reply to a meeting request.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task item in a mailbox.

ReplyToItem
Contains a reply to the creator of an item in the Exchange store.

ReplyAllToItem
Contains a reply to all identified recipients of an item in the Exchange
store.

ForwardItem
Contains an Exchange store item to forward to recipients.

CancelCalendarItem
Represents the response object that is used to cancel a meeting.
Element Description

TasksFolder
Represents a task folder in a mailbox.

SearchFolder
Represents a search folder in a mailbox.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ParentFolderId (TargetFolderIdType)
Article • 03/29/2023 • 2 minutes to read

The ParentFolderId element identifies the folder in which a new folder is created or the
folder to search for the FindConversation operation.

XML

<ParentFolderId>

<DistinguishedFolderId/>

</ParentFolderId>

XML

<ParentFolderId>

<FolderId/>

</ParentFolderId>

TargetFolderIdType

Attributes and elements


The ParentFolderId element contains two child elements. The child elements are
mutually exclusive in the schema.

Attributes
None.

Child elements

Element Description

FolderId
Contains the required identifier and the optional change key of a folder
in which a new folder is created or the folder that is searched for the
FindConversation operation. Using this element excludes the use of the
DistinguishedFolderId element.

DistinguishedFolderId Identifies default Microsoft Exchange Server 2007 folders. Using this
element excludes the use of the FolderId element.
Parent elements

Element Description

CreateFolder
Defines a request to create a folder in the Exchange database.
The following is the XPath expression to this element: /CreateFolder

FindConversation
Defines a request to find conversations in a mailbox.

Text value
None.

Remarks
The two child elements are used to define the folder that will contain the new folder.
You must select either the FolderId or the DistinguishedFolderId element to identify the
parent folder of the new folder. You cannot use both elements at the same time. This
element is required to create folders.

The ParentFolderId element describes the location of existing items and folders.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File Messages.xsd

Can be Empty False

See also
CreateFolder operation
FindConversation operation
Creating Folders (Exchange Web Services)
ParentFolderIds
Article • 03/29/2023 • 2 minutes to read

The ParentFolderIds element identifies folders for the FindItem and FindFolder
operations to search.

XML

<ParentFolderIds>

<DistinguishedFolderId/>

<ParentFolderIds>

XML

<ParentFolderIds>

<FolderId/>

<ParentFolderIds>

NonEmptyArrayOfBaseFolderIdsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier and change key of a folder. The ParentFolderIds
element must use either this element or the DistinguishedFolderId
element.

DistinguishedFolderId Identifies Microsoft Exchange Server 2007 folders that can be referenced
by name. The ParentFolderIds element must use either this element or
the FolderId element.

Parent elements
Element Description

FindFolder
Defines a request to identify folders in a mailbox.

FindItem
Defines a request to find items in a mailbox.

ResolveNames
Defines a request to resolve ambiguous names.

Remarks
The ParentFolderIds element must use either the FolderId or the DistinguishedFolderId
element. An unlimited number of folders can be defined for the search.

Example
XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://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
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False


See also
FindFolder operation
FindItem operation
ResolveNames operation
ParentGroupId
Article • 03/29/2023 • 2 minutes to read

The ParentGroupId element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
ParentId
Article • 03/29/2023 • 2 minutes to read

The ParentId element specifies the identifier of the parent item in a search preview.

XML

<ParentId Id="" ChangeKey=""/>

ItemIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id The text value of the Id attribute is the identifier of the parent item.

ChangeKey The text value of the ChangeKey attribute is the change key of the parent item.

Child elements
None.

Parent elements
SearchPreviewItem

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty true


ParentInternetMessageId
Article • 03/29/2023 • 2 minutes to read

The ParentInternetMessageId element specifies the Internet message identifier of the


parent message in a conversation.

XML

<ParentInternetMessageId></ParentInternetMessageId>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
ConversationNode

Text value
The text value of the ParentInternetMessageId element is the Internet message
identifier of the parent message in the conversation.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
ParentItemId
Article • 03/29/2023 • 2 minutes to read

The ParentItemId element identifies the parent item that links to an associated
attachment.

CreateAttachment

ParentItemId

XML

<ParentItemId Id="" ChangeKey="" />

ItemIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id
Identifies a single item in the Exchange store to associate with an attachment. This
value is a string. This attribute is required.

ChangeKey Identifies an unspecified version of an item that is identified by the Id attribute in


the Exchange store. This is used to make sure that a current item is used when it is
updated with an attachment. This value is a string. This attribute is optional.

Child elements
None.

Parent elements

Element Description
Element Description

CreateAttachment
Defines a request to create an attachment to an item in a mailbox.
The following is the XPath expression to this element:
/CreateAttachment

Remarks
This element is required in the CreateAttachment operation. This element is basically the
same as the ItemId element.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
CreateAttachment operation
PasswordExpirationDate
Article • 03/29/2023 • 2 minutes to read

The PasswordExpirationDate element provides the password expiration date for a


mailbox account.

XML

<PasswordExpirationDate

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element name Description

GetPasswordExpirationDate Defines a request to get the password expiration date for an


operation
email account.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
This element was introduced in Exchange Server 2010 Service Pack 2 (SP2).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
GetPasswordExpirationDate operation

EWS XML elements in Exchange


Path
Article • 03/29/2023 • 2 minutes to read

The Path element is the base schema type for all property identifiers. This type is
abstract and will never occur directly within instance documents.

XML

<Path/>

BasePathToElementType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
The following elements are used to substitute for the Path element:

FieldURI

IndexedFieldURI

ExceptionFieldURI

ExtendedFieldURI
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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
PendingMailTips
Article • 03/29/2023 • 2 minutes to read

The PendingMailTips element indicates that the mail tips in this element could not be
evaluated before the server's processing timeout expired.

XML

<PendingMailTips>All | OutOfOfficeMessage | MailboxFullStatus |


CustomMailTip | ExternalMemberCount | TotalMemberCount | MaxMessageSize |
DeliveryRestriction | ModerateStatus | InvalidRecipient</PendingMailTips>

MailTipTypes

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MailTips
Represents values for various types of mail tips.

Text value
The following table lists the possible values for the PendingMailTips element.

Value Description

All Represents all available mail tips.


Value Description

OutOfOfficeMessage Represents the Out of Office (OOF) message.

MailboxFullStatus Represents the status for a mailbox being full.

CustomMailTip Represents a custom mail tip.

ExternalMemberCount Represents the count of external members.

TotalMemberCount Represents the count of all members.

MaxMessageSize Represents the maximum message size a recipient can accept.

DeliveryRestriction Indicates whether delivery restrictions will prevent the sender's message
from reaching the recipient.

ModerationStatus Indicates whether the sender's message will be reviewed by a moderator.

InvalidRecipient Indicates whether the recipient is invalid.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
People
Article • 03/29/2023 • 2 minutes to read

The People element specifies an array of persona data returned as the result of a
FindPeople request.

XML

<People>

<Persona/>

</People>

ArrayOfPeopleType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Persona

Parent elements
FindPeopleResponse

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
PeopleUrl
(FederatedDirectoryGroupType)
Article • 03/29/2023 • 2 minutes to read

The PeopleUrl (FederatedDirectoryGroupType) element is intended for internal use


only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
PercentComplete
Article • 03/29/2023 • 2 minutes to read

The PercentComplete element describes the completion status of a task.

XML

<PercentComplete/>

double

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Task
Represents a task in the Exchange store.

Text value
A text value that represents an integer between 0 and 100 is required.

Remarks
Setting PercentComplete to 100 has the same effect as setting the CompleteDate
element or setting the Status element to Completed. In a request that sets at least two
of these properties, the last processed property will determine the value that is set for
these elements. For example, if PercentComplete is 100, CompleteDate is January 1,
2007, and Status is NotStarted, and the properties are streamed in this order, the effect
will be to set the Status of the task to NotStarted, the CompleteDate to null, and the
PercentComplete to 0.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Creating Tasks

Deleting Tasks
PerformReminderAction
Article • 03/29/2023 • 2 minutes to read

The PerformReminderAction element specifies a request to perform a reminder action.

XML

<PerformReminderAction>

<ReminderItemActions></ReminderItemActions>
</PerformReminderAction>

PerformReminderActionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ReminderItemActions

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
PerformReminderActionResponse
Article • 03/29/2023 • 2 minutes to read

The PerformReminderActionResponse element specifies the response to a


PerformReminderAction request.

XML

<PerformReminderActionResponse>

<UpdatedItemIds></UpdatedItemIds>

</PerformReminderActionResponse>

PerformReminderActionResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
UpdatedItemIds

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Period
Article • 03/29/2023 • 2 minutes to read

The Period element defines the name, time offset, and unique identifier for a specific
stage of the time zone.

XML

<Period Bias="" Name="" Id=""/>

PeriodType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Bias An xs:duration value that represents the time offset from Coordinated Universal Time
(UTC) for the period.

Name A string value that represents the descriptive name of the period.

Id A string value that represents the identifier for the period.

Child elements
None.

Parent elements

Element Description

Periods
Represents an array of periods that define the time offset at different stages of the
time zone.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Periods
Article • 03/29/2023 • 2 minutes to read

The Periods element represents an array of periods that define the time offset at
different stages of the time zone.

XML

<Periods>

<Period/>

</Periods>

NonEmptyArrayOfPeriodsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Period
Defines the name, time offset, and unique identifier for a specific stage of the time
zone.

Parent elements

Element Description

StartTimeZone
Defines the time zone for the start time of a CalendarItem or
MeetingRequest.

EndTimeZone
Defines the time zone for the end time of a CalendarItem or
MeetingRequest.

TimeZoneDefinition Defines a time zone.


Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server that has the Client Access server
role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
PermanentDelete
Article • 03/29/2023 • 2 minutes to read

The PermanentDelete element indicates whether messages are to be permanently


deleted and not saved to the Deleted Items folder.

XML

<PermanentDelete>true | false</PermanentDelete>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Actions
Represents the set of actions that are available to be taken on a message when the
conditions are fulfilled.

Text value
A text value of true indicates that the message must be marked to be permanently
deleted. A value of false indicates that the message must not be marked to be
permanently deleted.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
Permission
Article • 03/29/2023 • 2 minutes to read

The Permission element defines the access that a user has to a folder.

XML

<Permission>

<CanCreateItems/>

<CanCreateSubfolders/>

<IsFolderOwner/>

<IsFolderVisible/>

<IsFolderContact/>

<EditItems/>

<DeleteItems/>

<PermissionLevel/>

<ReadItems/>

<UserId/>

</Permission>

PermissionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

CanCreateItems
Indicates whether a user has permission to create items in a folder. This
element was introduced in Exchange 2007 SP1.

CanCreateSubFolders Indicates whether a user has permission to create subfolders in a folder.


This element was introduced in Exchange 2007 SP1.

DeleteItems
Indicates whether a user has permission to delete items in a folder. This
element was introduced in Exchange 2007 SP1.

EditItems
Indicates whether a user has permission to edit items in a folder. This
element was introduced in Exchange 2007 SP1.
Element Description

IsFolderContact
Indicates whether a user is a contact for a folder. This element was
introduced in Exchange 2007 SP1.

IsFolderOwner
Indicates whether a user is the owner of a folder. This element was
introduced in Exchange 2007 SP1.

IsFolderVisible
Indicates whether a user can view a folder. This element was introduced in
Exchange 2007 SP1.

PermissionLevel
Represents the combination of permissions that a user has on a folder.
This element was introduced in Exchange 2007 SP1.

ReadItems Indicates whether a user has permission to read items within a folder. This
(PermissionType)
element was introduced in Exchange 2007 SP1.

UserId
Identifies a delegate user or a user who has folder access permissions.
This element was introduced in Exchange 2007 SP1.

Parent elements

Element Description

Permissions Contains all the configured permissions for a folder. This element was introduced in
Exchange 2007 SP1.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

This element was introduced in Exchange Server 2007 Service Pack 1 (SP1).

Version differences
For applications that target Exchange Online, Exchange Online as part of Office 365, or
an on-premises version of Exchange starting with Exchange 2013, folder permissions are
not returned when the BaseShape element has a value of AllProperties in the GetFolder
operation request. To retrieve folder permissions, add the PermissionSet
(PermissionSetType) element to the AdditionalProperties element in the GetFolder
request.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


PermissionLevel
Article • 03/29/2023 • 2 minutes to read

The PermissionLevel element represents the permission level that a user has on a folder.
This element was introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

XML

<PermissionLevel>None or Owner or PublishingEditor or Editor or


PublishingAuthor or Author or NoneditingAuthor or Reviewer or Contributor or
Custom</PermissionLevel>

PermissionLevelType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Permission Defines the access that a user has to a folder. This element was introduced in
Exchange 2007 SP1.

Text value
The following table lists the possible values for the PermissionLevel element.

PermissionLevel element text values

Value Description
Value Description

None Indicates that the user has no permissions on the folder.

Owner Indicates that the user can create, read, edit, and delete all items in the
folder, and create subfolders. The user is both folder owner and folder
contact.

PublishingEditor Indicates that the user can create, read, edit, and delete all items in the
folder, and create subfolders.

Editor Indicates that the user can create, read, edit, and delete all items in the
folder.

PublishingAuthor Indicates that the user can create and read all items in the folder, edit and
delete only items that the user creates, and create subfolders.

Author Indicates that the user can create and read all items in the folder, and edit
and delete only items that the user creates.

NoneditingAuthor Indicates that the user can create and read all items in the folder, and delete
only items that the user creates.

Reviewer Indicates that the user can read all items in the folder.

Contributor Indicates that the user can create items in the folder. The contents of the
folder do not appear.

Custom Indicates that the user has custom access permissions on the folder.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


Permissions
Article • 03/29/2023 • 2 minutes to read

The Permissions element contains the collection of permissions for a folder.

XML

<Permissions>

<Permission/>

</Permissions>

PermissionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Permission Defines the access that a delegate has to a folder. This element was introduced in
Exchange 2007 SP1.

Parent elements

Element Description

PermissionSet Contains all the permissions that are configured for a folder. This element
(PermissionSetType)
was introduced in Exchange 2007 SP1.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
This element was introduced in Exchange Server 2007 Service Pack 1 (SP1).

Version differences
For applications that target Exchange Online, Exchange Online as part of Office 365, or
an on-premises version of Exchange starting with Exchange 2013, folder permissions are
not returned when the BaseShape element has a value of AllProperties in the GetFolder
operation request. To retrieve folder permissions, add the PermissionSet
(PermissionSetType) element to the AdditionalProperties element in the GetFolder
request.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


PermissionSet (PermissionSetType)
Article • 03/29/2023 • 2 minutes to read

The PermissionSet element contains all the permissions that are configured for a folder.

XML

<PermissionSet>

<Permissions/>

<UnknownEntries/>

</PermissionSet>

PermissionSetType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Permissions
Contains the collection of permissions for a folder. This element was
introduced in Exchange 2007 SP1.

UnknownEntries Contains an array of unknown entries that cannot be resolved against the
Active Directory directory service. This element was introduced in Exchange
2007 SP1.

Parent elements

Element Description

Folder
Defines a folder to create, get, find, synchronize, or update.

SearchFolder
Represents a search folder that is contained in a mailbox.

ContactsFolder
Represents a contacts folder that is contained in a mailbox.
Element Description

TasksFolder
Represents a tasks folder that is contained in a mailbox.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

This element was introduced in Exchange Server 2007 Service Pack 1 (SP1).

Version differences
For applications that target Exchange Online, Exchange Online as part of Office 365, or
an on-premises version of Exchange starting with Exchange 2013, folder permissions are
not returned when the BaseShape element has a value of AllProperties in the GetFolder
operation request. To retrieve folder permissions, add the PermissionSet
(PermissionSetType) element to the AdditionalProperties element in the GetFolder
request.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


PermissionSet
(CalendarPermissionSetType)
Article • 03/29/2023 • 2 minutes to read

The PermissionSet element contains all the permissions that are configured for a
calendar folder.

XML

<PermissionSet>

<CalendarPermissions/>

<UnknownEntries/>

</PermissionSet>

CalendarPermissonSetType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

CalendarPermissions Contains an array of calendar permissions for a folder. This element was
introduced in Exchange 2007 SP1.

UnknownEntries
Contains an array of unknown entries that cannot be resolved against the
Active Directory directory service. This element was introduced in
Exchange 2007 SP1.

Parent elements

Element Description

CalendarFolder
Represents a folder that primarily contains calendar items.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

This element was introduced in Exchange Server 2007 Service Pack 1 (SP1).

Version differences
For applications that target Exchange Online, Exchange Online as part of Office 365, or
an on-premises version of Exchange starting with Exchange 2013, folder permissions are
not returned when the BaseShape element has a value of AllProperties in the GetFolder
operation request. To retrieve folder permissions, add the PermissionSet
(PermissionSetType) element to the AdditionalProperties element in the GetFolder
request.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


Persona
Article • 03/29/2023 • 2 minutes to read

The Persona element specifies a set of persona data returned by a GetPersona request.

XML

<Persona>

<PersonaId/>

<PersonaType/>

<PersonaObjectStatus/>

<CreationTime/>

<Bodies/>

<DisplayNameFirstLastSortKey/>

<DisplayNameLastFirstSortKey/>

<CompanyNameSortKey/>

<HomeCitySortKey/>

<WorkCitySortKey/>

<DisplayNameFirstLastHeader/>

<DisplayNameLastFirstHeader/>

<FileAsHeader/>

<DisplayName/>

<DisplayNameFirstLast/>

<DisplayNameLastFirst/>

<FileAs/>

<FileAsId/>

<DisplayNamePrefix/>
<GivenName/>

<MiddleName/>

<Surname/>

<Generation/>

<Nickname/>

<YomiCompanyName/>

<YomiFirstName/>

<YomiLastName/>

<Title/>

<Department/>

<CompanyName/>

<Location/>

<EmailAddress/>

<EmailAddresses/>

<PhoneNumber/>

<ImAddress/>

<HomeCity/>

<WorkCity/>

<RelevanceScore/>

<FolderIds/>

<Attributions/>

<DisplayNames/>

<FileAses/>

<FileAsIds/>

<DisplayNamePrefixes/>

<GivenNames/>

<MiddleNames/>

<Surnames/>

<Generations/>

<Nicknames/>

<Initials/>

<YomiCompanyNames/>

<YomiFirstNames/>

<YomiLastNames/>

<BusinessPhoneNumbers/>

<BusinessPhoneNumbers2/>

<HomePhones/>

<HomePhones2/>

<MobilePhones/>

<MobilePhones2/>

<AssistantPhoneNumbers/>

<CallbackPhones/>

<CarPhones/>

<HomeFaxes/>

<OrganizationMainPhones/>

<OtherFaxes/>

<OtherTelephones/>

<OtherPhones2/>

<Pagers/>

<RadioPhones/>

<TelexNumbers/>

<TTYTDDPhoneNumbers/>

<WorkFaxes/>

<Emails1/>

<Emails2/>

<Emails3/>

<BusinessHomePages/>
<PersonalHomePages/>
<OfficeLocations/>

<ImAddresses/>

<ImAddresses2/>

<ImAddresses3/>

<BusinessAddresses/>
<HomeAddresses/>

<OtherAddresses/>

<Titles/>

<Departments/>

<CompanyNames/>

<Managers/>

<AssistantNames/>

<Professions/>

<SpouseNames/>

<Children/>

<Schools/>

<Hobbies/>

<WeddingAnniversaries/>

<Birthdays/>

<Locations/>

<ExtendedProperties/>

</Persona>

PersonaType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
PersonaId | PersonaType | PersonaObjectStatus | CreationTime | Bodies |
DisplayNameFirstLastSortKey | DisplayNameLastFirstSortKey | CompanyNameSortKey |
HomeCitySortKey | WorkCitySortKey | DisplayNameFirstLastHeader |
DisplayNameLastFirstHeader | FileAsHeader | DisplayName (string) |
DisplayNameFirstLast | DisplayNameLastFirst | FileAs | FileAsId | DisplayNamePrefix |
GivenName | MiddleName | Surname | Generation | Nickname | YomiCompanyName |
YomiFirstName | YomiLastName | Title | Department | CompanyName | Location |
EmailAddress (EmailAddressType) | EmailAddresses (ArrayOfEmailAddressesType) |
PhoneNumber | ImAddress (String) | HomeCity | WorkCity | RelevanceScore | FolderIds
(ArrayOfFolderIdType) | Attributions (ArrayOfPersonaAttributionsType) | DisplayNames |
FileAses | FileAsIds | DisplayNamePrefixes | GivenNames | MiddleNames | Surnames |
Generations | Nicknames | Initials (ArrayOfStringAttributedValuesType) |
YomiCompanyNames | YomiFirstNames | YomiLastNames | BusinessPhoneNumbers |
BusinessPhoneNumbers2 | HomePhones | HomePhones2 | MobilePhones |
MobilePhones2 | AssistantPhoneNumbers | CallbackPhones | CarPhones | HomeFaxes |
OrganizationMainPhones | OtherFaxes | OtherTelephones | OtherPhones2 | Pagers |
RadioPhones | TelexNumbers | TTYTDDPhoneNumbers | WorkFaxes | Emails1 | Emails2 |
Emails3 | BusinessHomePages | PersonalHomePages | OfficeLocations | ImAddresses
(ArrayOfStringAttributedValuesType) | ImAddresses2 | ImAddresses3 | BusinessAddresses
| HomeAddresses | OtherAddresses | Titles | Departments | CompanyNames | Managers |
AssistantNames | Professions | SpouseNames | Children
(ArrayOfStringArrayAttributedValuesType) | Schools | Hobbies | WeddingAnniversaries |
Birthdays | Locations | ExtendedProperties
(ArrayOfExtendedPropertyAttributedValueType)
Parent elements
AddNewImContactToGroupResponse | AddNewTelUriContactToGroupResponse |
GetPersonaResponseMessage | People | Personas

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


PersonaId
Article • 03/29/2023 • 2 minutes to read

The PersonaId element specifies the persona identifier for the associated persona.

XML

<PersonaId Id="" ChangeKey=""/>

ItemIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id The text value of the Id attribute is the identifier of the persona.

ChangeKey The text value of the ChangeKey attribute is the change key of the persona.

Child elements
None.

Parent elements
GetPersona | Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
PersonalHomePages
Article • 03/29/2023 • 2 minutes to read

The PersonalHomePages element specifies an array of home pages and the identifiers
of their source attributions for the associated persona.

XML

<PersonalHomePages>

<StringAttributedValue/>

</PersonalHomePages>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
StringAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PersonaObjectStatus
Article • 03/29/2023 • 2 minutes to read

The PersonaObjectStatus element specifies whether the information in the associated


persona is complete or partial.

XML

<PersonaObjectStatus></PersonaObjectStatus>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Persona

Text value
The text value of the PersonaObjectStatus element indicates whether the persona is
complete or partial.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Personas
Article • 03/29/2023 • 2 minutes to read

The Personas element specifies an array of personas returned from the GetImItems and
GetImItemList operations.

XML

<Personas>

<Persona/>

</Personas>

ArrayOfPeopleType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Persona

Parent elements
ImItemList

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PersonaShape
Article • 03/29/2023 • 2 minutes to read

The PersonaShape element specifies the set of persona properties to be returned from a
FindPeople request.

XML

<PersonaShape>

<BaseShape/>

<AdditionalProperties/>

</PersonaShape>

PersonaResponseShapeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
BaseShape | AdditionalProperties

Parent elements
FindPeople

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


PersonaType
Article • 03/29/2023 • 2 minutes to read

The PersonaType element specifies the type of the persona, for example, a person or a
distribution list.

XML

<PersonaType></PersonaType>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Persona

Text value
The text value of the PersonaType element is the type of persona.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PersonName
Article • 03/29/2023 • 2 minutes to read

The PersonName element specifies the name of an individual found by means of entity
extraction.

XML

<PersonName></PersonName>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Contact (ContactType)

Text value
The text value of the PersonName element is the name of a person found as a result of
entity extraction.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Phone
Article • 03/29/2023 • 2 minutes to read

The Phone element specifies a single phone number that results from a contact entity
extraction.

XML

<Phone>

<OriginalPhoneString/>

<PhoneString/>

<Type/>

</Phone>

PhoneType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
OriginalPhoneString | PhoneString | Type (string)

Parent elements
PhoneNumbers (ArrayOfPhonesType)

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Phone (PhoneEntityType)
Article • 03/29/2023 • 2 minutes to read

The Phone element specifies a single phone number that results from a phone number
entity extraction.

XML

<Phone>

<Position/>

<OriginalPhoneString/>

<PhoneString/>

<Type/>

</Phone>

PhoneEntityType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Position | OriginalPhoneString | PhoneString | Type (string)

Parent elements
PhoneNumbers (ArrayOfPhoneEntitiesType)

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PhoneCallId
Article • 03/29/2023 • 2 minutes to read

The PhoneCallId element specifies the identifier of a phone call. This element is
required.

XML

<PhoneCallId Id="" />

PhoneCallIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id Identifies the phone call to disconnect. This attribute is required.

Child elements
None.

Parent elements

Element Description

DisconnectPhoneCall
Represents a request to disconnect a call.

GetPhoneCallInformation
Represents a request to get telephone call
information.

PlayOnPhoneResponse (Exchange Web Defines a response to a PlayOnPhone request.


Services)

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
PhoneCallInformation
Article • 03/29/2023 • 2 minutes to read

The PhoneCallInformation element specifies the state information for a phone call.

XML

<PhoneCallInformation>

<PhoneCallState/>

<ConnectionFailureCause/>

<SIPResponseText/>

<SIPResponseCode/>

</PhoneCallInformation>

PhoneCallInformationType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

PhoneCallState
Specifies the state for a phone call. This element is required.

ConnectionFailureCause
Specifies the cause of a connection failure. This element is required.

SIPResponseText
Specifies the SIP response text. This element is optional.

SIPResponseCode
Specifies the SIP response code. This element is optional.

Parent elements

Element Description

GetPhoneCallInformationResponse Defines a response to a GetPhoneCallInformation operation


request.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
PhoneCallState
Article • 03/29/2023 • 2 minutes to read

The PhoneCallState element specifies the current state for a phone call.

XML

<PhoneCallState>Idle or Connecting or Alerted or Connected or Disconnected


or Incoming or Transferring or Forwarding</PhoneCallState>

PhoneCallStateType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

PhoneCallInformation
Specifies the state information for a phone call.

Text value
The following table lists the possible values for the PhoneCallState element.

PhoneCallState element values

Value Description

Idle Initial call state.

Connecting The system is dialing this call.


Value Description

Alerted The call is in alerting state (phone is ringing).

Connected The call is in the connected state.

Disconnected The call is disconnected.

Incoming The call is inbound.

Transferring The call is being transferred to another destination.

Forwarding The call is being forwarded to another destination.

Remarks
The schema that describes this element is located in the /ews/ directory of the computer
that is running Microsoft Exchange Server 2010 that has the Client Access server role
installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
PhoneNumber
Article • 03/29/2023 • 2 minutes to read

The PhoneNumber element specifies the default phone number of the associated
persona.

XML

<PhoneNumber>

<Number/>

<Type/>

</PhoneNumber>

PersonaPhoneNumberType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Number | Type (string)

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PhoneNumberAttributedValue
Article • 03/29/2023 • 2 minutes to read

The PhoneNumberAttributedValue element specifies an instance of an array of phone


numbers and their associated attributions.

XML

<PhoneNumberAttributedValue>

<Value/>

<Attributions/>

</PhoneNumberAttributedValue>

PhoneNumberAttributedValueType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Value (PersonaPhoneNumberType) | Attributions (ArrayOfValueAttributionsType)

Parent elements
BusinessPhoneNumbers | BusinessPhoneNumbers2 | HomePhones | HomePhones2 |
MobilePhones | MobilePhones2 | AssistantPhoneNumbers | CallbackPhones | CarPhones
| HomeFaxes | OrganizationMainPhones | OtherFaxes | OtherTelephones | OtherPhones2
| Pagers | RadioPhones | TelexNumbers | TTYTDDPhoneNumbers | WorkFaxes

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PhoneNumbers
Article • 03/29/2023 • 2 minutes to read

The PhoneNumbers element represents a collection of telephone numbers for a


contact.

XML

<PhoneNumbers>

<Entry/>

</PhoneNumbers>

PhoneNumberDictionaryType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Entry (PhoneNumber)
Represents a telephone number for a contact.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)

Updating Contacts

Deleting Contacts
PhoneNumbers
(ArrayOfPhoneEntitiesType)
Article • 03/29/2023 • 2 minutes to read

The PhoneNumbers element specifies an array of extracted phone numbers.

XML

<PhoneNumbers>

<Phone/>

</PhoneNumbers>

ArrayOfPhoneEntitiesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Phone (PhoneEntityType)

Parent elements
EntityExtractionResult

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PhoneNumbers (ArrayOfPhonesType)
Article • 03/29/2023 • 2 minutes to read

The PhoneNumbers element specifies an array of phone numbers.

XML

<PhoneNumbers>

<Phone/>

</PhoneNumbers>

ArrayOfPhonesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Phone

Parent elements
Contact (ContactType)

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PhoneString
Article • 03/29/2023 • 2 minutes to read

The PhoneString element specifies the phone number for an extracted contact.

XML

<PhoneString></PhoneString>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Phone | Phone (PhoneEntityType)

Text value
The text value of the PhoneSting element is the phone number of an extracted contact.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PhoneticFirstName
Article • 03/29/2023 • 2 minutes to read

The PhoneticFirstName element contains the first name of a contact, spelled


phonetically.

XML

<PhoneticFirstName/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element name Description

Contact
Represents a contact item in the Exchange store.

Text value
The text value is a string that represents the first name of a contact, spelled phonetically.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
This element was introduced in Exchange Server 2010 Service Pack 2 (SP2).

Element information
Code Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)


PhoneticFullName
Article • 03/29/2023 • 2 minutes to read

The PhoneticFullName element contains the full name of a contact, including the first
and last name, spelled phonetically.

XML

<PhoneticFullName/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element name Description

Contact
Represents a contact item in the Exchange store.

Text value
The text value is a string that represents the full name of a contact, including the first
and last name, spelled phonetically.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
This element was introduced in Exchange Server 2010 Service Pack 2 (SP2).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)


PhoneticLastName
Article • 03/29/2023 • 2 minutes to read

The PhoneticLastName element contains the last name of a contact, spelled


phonetically.

XML

<PhoneticLastName/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element name Description

Contact
Represents a contact in the Exchange store.

Text value
The text value is a string that represents the last name of a contact, spelled phonetically.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
This element was introduced in Exchange Server 2010 Service Pack 2 (SP2).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)


Photo
Article • 03/29/2023 • 2 minutes to read

The Photo element contains a value that encodes the photo of a contact.

XML

<Photo/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element name Description

Contact
Represents an Exchange contact item.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

This element was introduced in Exchange Server 2010 Service Pack 2 (SP2).
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Creating Contacts (Exchange Web Services)
Photo (MasterMailboxType)
Article • 03/29/2023 • 2 minutes to read

The Photo (MasterMailboxType) element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
PhotoUrl
Article • 03/29/2023 • 2 minutes to read

The PhotoUrl element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
PhotoUrl
(FederatedDirectoryGroupType)
Article • 03/29/2023 • 2 minutes to read

The PhotoUrl (FederatedDirectoryGroupType) element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
PhysicalAddresses
Article • 03/29/2023 • 2 minutes to read

The PhysicalAddresses element contains a collection of physical addresses that are


associated with a contact.

XML

<PhysicalAddresses>

<Entry/>

</PhysicalAddresses>

PhysicalAddressDictionaryType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Entry (PhysicalAddress)
Describes a single physical address for a contact item.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)

Updating Contacts

Deleting Contacts
PictureData
Article • 03/29/2023 • 2 minutes to read

The PictureData element contains the stream of picture data.

XML

<PictureData></PictureData>

base64Binary

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
GetUserPhotoResponse

Text value
The text value of the PictureData element is the base64-encoded stream of picture data.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
PlayOnPhone (Exchange Web Services)
Article • 03/29/2023 • 2 minutes to read

The PlayOnPhone element represents a request to read an item on a phone.

XML

<PlayOnPhone> <ItemId/> <DialString/></PlayOnPhone>

PlayOnPhoneType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ItemId
Represents the identifier of an item to play on a phone. This element is
required.

DialString (Exchange Represents the dial string of the phone number that is called to play an
Web Services)
item by phone. This element is required.

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 2010 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
PlayOnPhoneDialString (Exchange Web
Services)
Article • 03/29/2023 • 2 minutes to read

The PlayOnPhoneDialString element identifies the Play-on-Phone dial string.

XML

<PlayOnPhoneDialString/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

UnifiedMessagingConfiguration Contains service configuration information for the Unified


Messaging service.

Text value
The text value for this element is the Play-on-Phone dial string.

Remarks
This element is required.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
PlayOnPhoneEnabled
Article • 03/29/2023 • 2 minutes to read

The PlayOnPhoneEnabled element indicates whether the Play-on-Phone feature is


enabled.

XML

<PlayOnPhoneEnabled>true | false</PlayOnPhoneEnabled>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

UnifiedMessagingConfiguration Contains configuration information for the Unified Messaging


service.

Text value
The PlayOnPhoneEnabled element has a value of true if play-on-phone is enabled for
the account; otherwise, the value is false.

Remarks
This element is required.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
PlayOnPhoneResponse (Exchange Web
Services)
Article • 03/29/2023 • 2 minutes to read

The PlayOnPhoneResponse element specifies the response to a request to play a voice


mail over the telephone.

XML

<PlayOnPhoneResponse ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<PhoneCallId/>

</PlayOnPhoneResponse>

PlayOnPhoneResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements.


- Attributes or elements that are out of range
- An unknown tag.
- An attribute or element that is not valid in the context.
- An unauthorized access attempt by any client.
- A server-side failure in response to a valid client-side call.

Information about the error can be found in the ResponseCode and MessageText
element topics.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and reserved for future use. This element contains a value
of 0.

MessageXml
Provides additional error response information.

PhoneCallId
Specifies the telephone call identifier.

Parent elements
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
PolicyNudgeRulesConfiguration
Article • 03/29/2023 • 2 minutes to read

The PolicyNudgeRulesConfiguration element contains the data loss prevention


configuration data.

XML

<PolicyNudgeRulesConfiguration></PolicyNudgeRulesConfiguration>

PolicyNudgeRulesServiceConfiguration

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
ServiceConfigurationResponseMessageType

Remarks
The PolicyNudgeRulesConfiguration element contents are not defined the Exchange
Web Services schema.

This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
PolicyTag
Article • 03/29/2023 • 2 minutes to read

The PolicyTag element specifies the retention identifier on an item or folder.

XML

<PolicyTag IsExplicit="true | false"></PolicyTag>

RetentionTagType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

IsExplicit Indicates whether a policy tag was explicitly set on an item or folder.
A text value of true for the IsExplicit attribute indicates that the policy tag was
explicitly set on the item or folder. A text value of false indicates that the policy tag
was implicitly set on the item or folder based on the parent folder policy tag.

Child elements
None.

Parent elements
SearchPreviewItem | Item | Contact | Message | DistributionList | CalendarItem | PostItem
| Task

Text value
The text value of the PolicyTag element is the policy tag identifier. The policy tag
identifier is a GUID.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PolicyTipsEnabled
Article • 03/29/2023 • 2 minutes to read

The PolicyTipsEnabled element indicates whether policy tips are enabled.

XML

<PolicyTipsEnabled> true | false </PolicyTipsEnabled>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
MailTipsConfiguration (MailTipsServiceConfiguration)

Text value
A text value of true for the PolicyTipsEnabled element indicates that policy tips are
enabled for a mailbox. A value of false indicates that policy tips are not enabled for a
mailbox.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PortalText
(EncryptionConfigurationResponseType)
Article • 03/29/2023 • 2 minutes to read

The PortalText (EncryptionConfigurationResponseType) element is intended for


internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
PortalText
(SetEncryptionConfigurationType)
Article • 03/29/2023 • 2 minutes to read

The PortalText (SetEncryptionConfigurationType) element is intended for internal use


only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Position
Article • 03/29/2023 • 2 minutes to read

The Position element specifies the position of an entity extracted from a message.

XML

<Position> LatestReply | Other | Subject | Signature </Position>

EmailPositionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
UrlEntity | AddressEntity | EmailAddressEntity | MeetingSuggestion | Contact
(ContactType) | Phone (PhoneEntityType) | TaskSuggestion

Text value
The text value of the Position element is the location where an extracted entity
originated in the source message. The text values for the Position element are:

LatestReply - the extracted entity originates from the latest reply to the message.

Other - the extracted entity originates from an undefined part of the message.

Subject - the extracted entity originates from the message subject.

Signature - the extracted entity originates from the message signature.


Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PostalAddress
(PersonaPostalAddressType)
Article • 03/29/2023 • 2 minutes to read

The PostalAddress element specifies the postal address for a persona.

XML

<PostalAddress>

<Street/>

<City/>

<State/>

<Country/>

<PostalCode/>

<PostOfficeBox/>

<Type/>

<Latitude/>

<Longitude/>

<Accuracy/>

<Altitude/>

<AltitudeAccuracy/>

<FormattedAddress/>

<LocationUri/>

<LocationSource/>

</PostalAddress>

PersonaPostalAddressType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Street | City | State | Country | PostalCode | PostOfficeBox | Type (string) | Latitude |
Longitude | Accuracy | Altitude | AltitudeAccuracy | FormattedAddress | LocationUri |
LocationSource
Parent elements
EnhancedLocation

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PostalAddressAttributedValue
Article • 03/29/2023 • 2 minutes to read

The PostalAddressAttributedValue element specifies an instance of an array of postal


addresses and their associated attributions.

XML

<PostalAddressAttributedValue>

<Value/>

<Attributions/>

</PostalAddressAttributedValue>

PostalAddressAttributedValueType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Value (PersonaPostalAddressType) | Attributions (ArrayOfValueAttributionsType)

Parent elements
BusinessAddresses | HomeAddresses | OtherAddresses

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PostalAddressIndex
Article • 03/29/2023 • 2 minutes to read

The PostalAddressIndex element represents the display types for physical addresses.

XML

<PostalAddressIndex/>

PhysicalAddressIndexType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Text value
A text value is required. The following are the possible text values for this element:

None

Business

Home

Other
Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
PostalAddressIndex

EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)

Updating Contacts

Deleting Contacts
PostalCode
Article • 03/29/2023 • 2 minutes to read

The PostalCode element represents the postal code for a contact item.

XML

<PostalCode/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Entry (PhysicalAddress)
Describes a single physical address for a contact item.

Text value
The text value is a string value that represents the postal code of a contact.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
PostedTime
Article • 03/29/2023 • 2 minutes to read

The PostedTime element represents the time at which a PostItem was posted. This
element is read-only. This element was introduced in Microsoft Exchange Server 2007
Service Pack 1 (SP1).

XML

<PostedTime/>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

PostItem Represents a PostItem in the Exchange store. This element was introduced in Exchange
2007 SP1.

Text value
The text value is a dateTime that represents when a PostItem was posted. This property
is read-only.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
PostItem
Article • 03/29/2023 • 4 minutes to read

The PostItem element represents a post item in the Exchange store.

XML

<PostItem>

<MimeContent/>

<ItemId/>

<ParentFolderId/>

<ItemClass/>

<Subject/>

<Sensitivity/>

<Body/>

<Attachments/>

<DateTimeReceived/>

<Size/>

<Categories/>

<Importance/>

<InReplyTo/>

<IsSubmitted/>

<IsDraft/>

<IsFromMe/>

<IsResend/>

<IsUnmodified/>

<InternetMessageHeaders/>

<DateTimeSent/>

<DateTimeCreated/>

<ResponseObjects/>

<ReminderDueBy/>

<ReminderIsSet/>

<ReminderMinutesBeforeStart/>

<DisplayCc/>

<DisplayTo/>

<HasAttachments/>

<ExtendedProperty/>

<Culture/>

<EffectiveRights/>

<LastModifiedName/>

<LastModifiedTime/>

<IsAssociated/>

<WebClientReadFormQueryString/>

<WebClientEditFormQueryString/>

<ConversationId/>

<UniqueBody/>

<ConversationIndex/>
<ConversationTopic/>
<From/>

<InternetMessageId/>
<IsRead/>

<PostedTime/>

<References/>

<Sender/>

</PostItem>

PostItemType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

MimeContent
Contains the native Multipurpose Internet Mail Extensions
(MIME) stream of an object that is represented in base64Binary
format.

ItemId
Contains the unique identifier and change key of an item in the
Exchange store. This property is read-only.

ParentFolderId Represents the identifier of the parent folder that contains the
item or folder. This property is read-only.

ItemClass
Represents the message class of an item.

Subject
Represents the subject for Exchange store items and response
objects. The subject is limited to 255 characters.

Sensitivity
Indicates the sensitivity level of an item.

Body
Represents the actual body content of a message.

Attachments
Contains the items or files that are attached to an item in the
Exchange store.

DateTimeReceived
Represents the date and time that an item in a mailbox was
received.

Size
Represents the size in bytes of an item. This property is read-
only.
Element Description

Categories
Represents a collection of strings that identify the categories to
which an item in the mailbox belongs.

Importance
Describes the importance of an item.

InReplyTo
Represents the identifier of the item to which this item is a
reply.

IsSubmitted
Indicates whether an item has been submitted to the Outbox
default folder.

IsDraft
Represents whether an item has not yet been sent.

IsFromMe
Indicates whether a user sent an item to him or herself.

IsResend
Indicates whether the item had previously been sent.

IsUnmodified
Indicates whether the item has been modified.

InternetMessageHeaders
Represents the collection of all Internet message headers that
are contained in an item in a mailbox.

DateTimeSent
Represents the date and time that an item in a mailbox was
sent.

DateTimeCreated
Represents the date and time that a given item in the mailbox
was created.

ResponseObjects
Contains a collection of all the response objects that are
associated with an item in the Exchange store.

ReminderDueBy
Represents the date and time when the event occurs. This is
used by the ReminderMinutesBeforeStart element to
determine when the reminder is displayed.

ReminderIsSet
Indicates whether a reminder has been set for an item in the
Exchange store.

ReminderMinutesBeforeStart
Represents the number of minutes before an event when a
reminder is displayed.

DisplayCc
Represents the display string that is used for the contents of
the Cc box. This is the concatenated string of all Cc recipient
display names.

DisplayTo
Represents the display string that is used for the contents of
the To box. This is the concatenated string of all To recipient
display names.
Element Description

HasAttachments
Represents a property that is set to true if an item has at least
one attachment. This property is read-only.

ExtendedProperty
Identifies extended properties on folders and items.

Culture
Represents the culture for a given item in a mailbox.

EffectiveRights
Contains the client's rights based on the permission settings
for the item or folder. This element is read-only.

LastModifiedName
Contains the display name of the last user to modify an item.

LastModifiedTime
Indicates when an item was last modified.

IsAssociated
Indicates whether the item is associated with a folder.

WebClientReadFormQueryString Represents a URL to concatenate to the Microsoft Office


Outlook Web App endpoint to read an item in Outlook Web
App.

WebClientEditFormQueryString
Represents a URL to concatenate to the Outlook Web App
endpoint to edit an item in Outlook Web App.

ConversationId
Contains the identifier of an item or conversation.

UniqueBody
Represents an HTML fragment or plain text which represents
the unique body of this conversation.

ConversationIndex
Contains a binary ID that represents the thread to which this
message belongs.

ConversationTopic
Represents the conversation identifier.

From
Represents the address from which the post item was sent. The
From element can only be set at creation time.

InternetMessageId
Represents the Internet message identifier of an item.

IsRead
Indicates whether a message has been read.

PostedTime
Represents the time that a PostItem was posted.

References
Represents the Usenet header that is used to associate replies
with the original messages.

Sender
Identifies the sender of an item.

Parent elements
Element Description

SetItemField
Represents an update to a single property of an item in an UpdateItem
operation.

AppendToItemField Identifies data to append to a single property of an item or folder during


an UpdateItem operation.

ItemAttachment
Represents an Exchange item that is attached to another Exchange item.

Create (ItemSync)
Identifies a single item to create in the local client store.

Update (ItemSync)
Identifies a single item to update in the local client store.

ReadFlagChange
Returned in SyncFolderItems responses when an item has been read. This
property is read-only. This element was introduced in Exchange 2007 SP1.

Items
Contains an array of items.

ConflictingMeetings Identifies all items that conflict with a meeting time.

AdjacentMeetings
Describes all calendar items that are adjacent to a meeting time.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
PostOfficeBox
Article • 03/29/2023 • 2 minutes to read

The PostOfficeBox element specifies the "post office box" portion of a postal address.

XML

<PostOfficeBox></PostOfficeBox>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
PostalAddress (PersonaPostalAddressType) | Value (PersonaPostalAddressType)

Text value
The text value of the PostOfficeBox element is a post office box identifier.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PostReplyItem
Article • 03/29/2023 • 4 minutes to read

The PostReplyItem element contains a reply to a post item. This element was introduced
in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

XML

<PostReplyItem>

<MimeContent/>

<ItemId/>

<ParentFolderId/>

<ItemClass/>

<Subject/>

<Sensitivity/>

<Body/>

<Attachments/>

<DateTimeReceived/>

<Size/>

<Categories/>

<Importance/>

<InReplyTo/>

<IsSubmitted/>

<IsDraft/>

<IsFromMe/>

<IsResend/>

<IsUnmodified/>

<InternetMessageHeaders/>

<DateTimeSent/>

<DateTimeCreated/>

<ResponseObjects/>

<ReminderDueBy/>

<ReminderIsSet/>

<ReminderMinutesBeforeStart/>

<DisplayCc/>

<DisplayTo/>

<HasAttachments/>

<ExtendedProperty/>

<Culture/>

<Sender/>

<ToRecipients/>

<CcRecipients/>

<BccRecipients/>

<IsReadReceiptRequested/>

<IsDeliveryReceiptRequested/>

<ConversationIndex/>
<ConversationTopic/>
<From/>

<InternetMessageId/>
<IsRead/>

<IsResponseRequested/>

<References/>

<ReplyTo/>

<EffectiveRights/>

<ReceivedBy/>

<ReceivedRepresenting/>

<NewBodyContent/>

</PostReplyItem>

PostReplyItemType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

MimeContent
Contains the native Multipurpose Internet Mail Extensions (MIME)
stream of an object that is represented in base64Binary format.

ItemId
Contains the unique identifier and change key of an item in the
Exchange store. This property is read-only.

ParentFolderId Represents the identifier of the parent folder that contains the
item or folder. This property is read-only.

ItemClass
Represents the message class of an item.

Subject
Represents the subject for Exchange store items and response
objects. The subject is limited to 255 characters.

Sensitivity
Indicates the sensitivity level of an item.

Body
Represents the actual body content of a message.

Attachments
Contains the items or files that are attached to an item in the
Exchange store.

DateTimeReceived
Represents the date and time that an item in a mailbox was
received.

Size
Represents the size in bytes of an item. This property is read-only.
Element Description

Categories
Represents a collection of strings that identify categories to which
an item in the mailbox belongs.

Importance
Describes the importance of an item.

InReplyTo
Represents the identifier of the item to which this item is a reply.

IsSubmitted
Indicates whether an item has been submitted to the Outbox
default folder.

IsDraft
Represents whether an item has not yet been sent.

IsFromMe
Indicates whether a user sent an item to him or herself.

IsResend
Indicates whether the item had previously been sent.

IsUnmodified
Indicates whether the item has been modified.

InternetMessageHeaders
Represents the collection of all Internet message headers that are
contained in an item in a mailbox.

DateTimeSent
Represents the date and time that an item in a mailbox was sent.

DateTimeCreated
Represents the date and time that a given item in the mailbox was
created.

ResponseObjects
Contains a collection of all the response objects that are
associated with an item in the Exchange store.

ReminderDueBy
Represents the date and time when the event occurs. This is used
by the ReminderMinutesBeforeStart element to determine when
the reminder is displayed.

ReminderIsSet
Indicates whether a reminder has been set for an item in the
Exchange store.

ReminderMinutesBeforeStart Represents the number of minutes before an event when a


reminder is displayed.

DisplayCc
Represents the display string that is used for the contents of the
Cc line. This is the concatenated string of all Cc recipient display
names.

DisplayTo
Represents the display string that is used for the contents of the
To box. This is the concatenated string of all To recipient display
names.

HasAttachments
Represents a property that is set to true if an item has an
attachment. This property is read-only.
Element Description

ExtendedProperty
Identifies extended properties on folders and items.

Culture
Represents the culture for a given item in a mailbox.

Sender
Identifies the sender of an item.

ToRecipients
Contains a set of recipients of a message.

CcRecipients
Represents a collection of recipients that will receive a copy of the
message.

BccRecipients
Represents a collection of recipients to receive a blind carbon copy
(Bcc) of an e-mail.

IsReadReceiptRequested
Indicates whether the sender of an item requests a read receipt.

IsDeliveryReceiptRequested
Indicates whether the sender of an item requests a delivery
receipt.

ConversationIndex
Contains a binary ID that represents the thread to which this
message belongs.

ConversationTopic
Represents the conversation identifier.

From
Represents the address from which the message was sent.

InternetMessageId
Represents the Internet message identifier of an item.

IsRead
Indicates whether a message has been read.

IsResponseRequested
Indicates whether a response to an e-mail message is requested.

References
Represents the Usenet header that is used to associate replies with
their original messages.

ReplyTo
Identifies a set of addresses to which replies should be sent.

EffectiveRights
Contains the client's rights based on the permission settings for
the item or folder. This element is read-only. This element was
introduced in Exchange 2007 SP1.

ReceivedBy
Identifies the delegate in a delegate access scenario. This element
was introduced in Exchange 2007 SP1.

ReceivedRepresenting
Identifies the principal in a delegate access scenario. This element
was introduced in Exchange 2007 SP1.

NewBodyContent
Represents the new body content of a post item.
Parent elements

Element Description

AdjacentMeetings
Describes all items that are adjacent to a meeting time.

ConflictingMeetings Describes all items that conflict with a meeting time.

ResponseObjects
Contains a collection of all the response objects that are
associated with an item in the Exchange store.

Items Contains an array of items to create in the folder that is


(NonEmptyArrayOfAllItemsType) identified by the ParentFolderId (TargetFolderIdType) element.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
PredictedAction
Article • 03/29/2023 • 2 minutes to read

The PredictedAction element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
PredictedActionReason
Article • 03/29/2023 • 2 minutes to read

The PredictedActionReason element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
PredictedActionReasons
Article • 03/29/2023 • 2 minutes to read

The PredictedActionReasons element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Presenters
Article • 03/29/2023 • 2 minutes to read

The Presenters element specifies the presenters for an online meeting.

XML

<Presenters> Disabled | Internal | Everyone </Presenters>

PresentersType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
OnlineMeetingSettings

Text value
The text value of Presenters element is the type of users that can be a presenter for an
online meeting. The text values for the Presenters element are described in the
following table.

Presenters element text values

Value Description

Disabled Presenters are disabled.

Internal Only internal participants can be presenters.


Value Description

Everyone Any participant can be a presenter.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Preview
Article • 03/29/2023 • 2 minutes to read

The Preview element specifies the first 256 characters of an item for display.

XML

<Preview></Preview>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Conversation (ConversationType) | SearchPreviewItem | Item | Contact | Message |
DistributionList | CalendarItem | PostItem | Task

Text value
The text value of the Preview element is the first 256 characters of the item.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PreviewItemResponseShape
Article • 03/29/2023 • 2 minutes to read

The PreviewItemResponseShape element contains the requested property set to be


returned in a discovery search.

XML

<PreviewItemResponseShape>

<BaseShape/>

<AdditionalProperties/>

</PreviewItemResponseShape>

PreviewItemResponseShapeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
BaseShape (PreviewItemBaseShapeType) | AdditionalProperties

Parent elements
SearchMailboxes

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
PreviousHopServer
Article • 03/29/2023 • 2 minutes to read

The PreviousHopServer element represents the previous server name that accepted the
message.

XML

<PreviousHopServer/>

NonEmptyStringType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MessageTrackingSearchResult Contains a single message result for a


FindMessageTrackingReportResponse element.

Text value
A text value that represents a string is required if this element is used.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
PreviousWatermark
Article • 03/29/2023 • 2 minutes to read

The PreviousWatermark element represents the watermark of the latest event that was
successfully communicated to the client for the subscription.

XML

<PreviousWatermark/>

WatermarkType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Notification Contains information about the subscription and the events that have occurred
since the last notification.

Text value
A text value is required. The text value represents the latest watermark. The text value
cannot be an empty string.

Remarks
The PreviousWatermark property is useful to the client in determining the last
successful notification. For example, if a subscription has three events with watermarks
1, 2, and 3, and the next notification is sent with a PreviousWatermark value of 3, the
client can compare this value to the Watermark value of the last notification received.
This enables the client to ensure the continuity of events.

For push clients, the PreviousWatermark is compared to the local, client-side last known
watermark. If the values are different, the client has missed an event notification and
should reestablish a subscription by using the latest local watermark. For example, if a
push client receives three events for a subscription with watermarks 1, 2, and 3, and the
next notification comes with a PreviousWatermark value of 5, the client has missed at
least one notification and should create a new subscription, passing a 3 as the
watermark.

In the case of a pull client, the value of PreviousWatermark will be the same as the
Watermark included by the client in the GetEvents call.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
Subscribe operation

GetEvents operation

Unsubscribe operation
PrimarySmtpAddress
Article • 03/29/2023 • 2 minutes to read

The PrimarySmtpAddress element represents the primary Simple Mail Transfer Protocol
(SMTP) address of an account to be used for server-to-server authorization or delegate
access.

XML

<PrimarySmtpAddress/>

PrimarySmtpAddressType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ConnectingSID
Represents an account to impersonate when you are using the
ExchangeImpersonation SOAP header.
The following is the XPath expression to this element:
/ExchangeImpersonation/ConnectingSID

SerializedSecurityContext Used in the SOAP header for token serialization in server- to-server
authentication.

UserId
Identifies a delegate user or a user who has folder access permissions.

Text value
A text value that represents an SMTP address is required.

Remarks
Exchange Web Services requires that mailboxes be identified by the primary SMTP
address of the mailbox. Proxy or alternative addresses are not accepted.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Server-to-server authorization in EWS

Working with Delegate Access


PrimarySmtpAddress (string)
Article • 03/29/2023 • 2 minutes to read

The PrimarySmtpAddress element specifies the primary Simple Mail Transfer Protocol
(SMTP) address of the mailbox.

XML

<PrimarySmtpAddress></PrimarySmtpAddress>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
UserId (string) | Mailbox (PreviewItemMailboxType) | SearchableMailbox

Text value
The text value of the PrimarySmtpAddress element is the primary SMTP address of the
mailbox.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
PrincipalName
Article • 03/29/2023 • 2 minutes to read

The PrincipalName element represents the user principal name (UPN) of the account to
be used for Exchange impersonation.

XML

<PrincipalName/>

PrincipalNameType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ConnectingSID Represents an account to impersonate when you are using the


ExchangeImpersonation SOAP header.
The following is the XPath expression to this element:
/ExchangeImpersonation/ConnectingSID

Text value
The text value represents the UPN of a user. This value exists on the user object in the
Active Directory directory service. This contains the user logon name and a domain
name that identifies the domain in which the user account is located, in the following
format: [email protected] .
Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Server-to-server authorization in EWS


PrintAllowed
Article • 03/29/2023 • 2 minutes to read

The PrintAllowed element specifies whether printing is enabled.

XML

<PrintAllowed> true | false </PrintAllowed>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
RightsManagementLicenseData

Text value
A text value of true for the PrintAllowed element indicates that printing the contents is
allowed for a rights managed item. A value of false indicates that printing is not allowed.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Priority
Article • 03/29/2023 • 2 minutes to read

The Priority element indicates the order in which a rule is to be run.

XML

<Priority/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Rule (RuleType)
Represents a rule in the user's mailbox.

Text value
The text value for the Priority element is an integer that indicates the execution order in
which a rule should be run.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ProcessRightAway
Article • 03/29/2023 • 2 minutes to read

The ProcessRightAway element indicates whether the response is sent as soon as the
action starts processing on the server or whether the response is sent after the action
has completed. This element must be present for the response to be sent asynchronous
to the requested action.

ApplyConversationAction

ConversationActions

ConversationAction

ProcessRightAway

XML

<ProcessRightAway/>

xs:boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ConversationAction
Contains a single action to be applied to a single conversation.
Text value
A text value of true indicates that the response is sent as soon as the action starts
processing on the server. A text value of false indicates that the response is sent after
the action has completed.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
ApplyConversationAction operation

EWS XML elements in Exchange


Profession
Article • 03/29/2023 • 2 minutes to read

The Profession element represents the profession of a contact.

XML

<Profession/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Text value
A text value that represents a profession is required.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)

Updating Contacts

Deleting Contacts
Professions
Article • 03/29/2023 • 2 minutes to read

The Professions element specifies an array of Profession values and the identifiers of
their source attributions for the associated persona.

XML

<Professions>

<StringAttributedValue/>

</Professions>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
StringAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
ProgrammaticAccessAllowed
Article • 03/29/2023 • 2 minutes to read

The ProgrammaticAccessAllowed element specifies whether programmatic access is


enabled for rights managed data.

XML

<ProgrammaticAccessAllowed> true | false </ProgrammaticAccessAllowed>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
RightsManagementLicenseData

Text value
A text value of true for the ProgrammaticAccessAllowed element indicates that the
data is programmatically accessible. A value of false indicates that the data is not
programmatically accessible.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


Properties (ArrayOfStringsType)
Article • 03/29/2023 • 2 minutes to read

The Properties element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Properties
(ArrayOfTrackingPropertiesType)
Article • 03/29/2023 • 2 minutes to read

The Properties element contains a list of one or more tracking properties.

FindMessageTrackingReport

Properties (ArrayOfTrackingPropertiesType)

XML

<Properties>

<TrackingPropertyType/>

</Properties>

ArrayOfTrackingPropertiesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

TrackingPropertyType Represents a name and value pair of strings that is used to create
properties for message tracking reports.

Parent elements

Element Description

FindMessageTrackingReport
Specifies criteria for the types of messages to find.

FindMessageTrackingReportResponse Contains the status and result of a single


FindMessageTrackingReport operation request.
Element Description

GetMessageTrackingReport
Contains the request for the GetMessageTrackingReport
operation to retrieve the full message tracking report for
the specified ID.

GetMessageTrackingReportResponse
Contains the result of a single GetMessageTrackingReport
operation request.

RecipientTrackingEvent
Contains information for a single event for a recipient.

MessageTrackingReport
Contains a single message that is returned in a
GetMessageTrackingReport operation.

MessageTrackingSearchResult
Contains a single message result for a
FindMessageTrackingReportResponse element.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindMessageTrackingReport operation
GetMessageTrackingReport operation
EWS XML elements in Exchange
ProposedEnd
Article • 03/29/2023 • 2 minutes to read

The ProposedEnd element specifies the proposed end time of a meeting.

XML

<ProposedEnd></ProposedEnd>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
MeetingResponse

Text value
The text value of the ProposedEnd element is the proposed end time sent by an
attendee to the meeting organizer.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


ProposedEnd (AttendeeType)
Article • 03/29/2023 • 2 minutes to read

The ProposedEnd (AttendeeType) element specifies an attendee's proposed end time


for a meeting.

XML

<ProposedEnd/>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Attendee

Text value
The text value of the ProposedEnd (AttendeeType) element is the proposed end date
and time for a meeting.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
Attendee

EWS XML elements in Exchange


ProposedEnd
(MeetingRegistrationResponseObjectTy
pe)
Article • 03/29/2023 • 2 minutes to read

The ProposedEnd (MeetingRegistrationResponseObjectType) element specifies an


attendee's proposed new end time for a meeting.

XML

<ProposedEnd />

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
AcceptItem | TentativelyAcceptItem | DeclineItem

Text value
The text value of the ProposedEnd (MeetingRegistrationResponseObjectType) element
is the proposed end date and time of the meeting.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
AcceptItem

DeclineItem

TentativelyAcceptItem

EWS XML elements in Exchange


ProposedStart
Article • 03/29/2023 • 2 minutes to read

The ProposedStart element specifies the proposed start time of a meeting.

XML

<ProposedStart></ProposedStart>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
MeetingResponse

Text value
The text value of the ProposedStart element is the proposed start time sent by an
attendee to the meeting organizer.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


ProposedStart (AttendeeType)
Article • 03/29/2023 • 2 minutes to read

The ProposedStart (AttendeeType) element specifies an attendee's proposed start time


for a meeting.

XML

<ProposedStart/>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Attendee

Text value
The text value of the ProposedStart (AttendeeType) element is a proposed start date
and time for a meeting.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
Attendee

EWS XML elements in Exchange


ProposedStart
(MeetingRegistrationResponseObjectTy
pe)
Article • 03/29/2023 • 2 minutes to read

The ProposedStart (MeetingRegistrationResponseObjectType) element specifies an


attendee's proposed new start time for a meeting.

XML

<ProposedStart />

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
AcceptItem | TentativelyAcceptItem | DeclineItem

Text value
The text value of the ProposedStart (MeetingRegistrationResponseObjectType)
element is the proposed start date and time of the meeting.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
AcceptItem

DeclineItem

TentativelyAcceptItem

EWS XML elements in Exchange


ProposeNewTime
Article • 03/29/2023 • 2 minutes to read

The ProposeNewTime element specifies a response object that indicates that the
meeting attendee can propose a new meeting time.

XML

<ProposeNewTime ObjectName=""></ProposeNewTime>

ProposeNewTimeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ObjectName The name of the response object.

Child elements
None.

Parent elements
ResponseObjects

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
ResponseObjects

EWS XML elements in Exchange


ProtectionRulesConfiguration
Article • 03/29/2023 • 2 minutes to read

The ProtectionRulesConfiguration element contains service configuration information


for the protection rules service.

XML

<ProtectionRulesConfiguration RefreshInterval="">

<Rules/>

<InternalDomains/>

</ProtectionRulesConfiguration>

ProtectionRulesServiceConfiguration

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

RefreshInterval Specifies how often, in whole hours, the client should request protection rules
from the server. This attribute is required and its value must be an integer that
is equal to or greater than 1.

Child elements

Element Description

Rules An array of protection rules. This element is required.

InternalDomains Identifies the list of internal SMTP domains of the organization. This
(SmtpDomainList)
element is required.

Parent elements

Element Description

ServiceConfigurationResponseMessageType
Contains service configuration settings.
Text value
None.

Remarks
The protection rules service configuration is comprised of a list of rules, internal
domains, and a refresh interval.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ProxyPartnerToken
Article • 03/29/2023 • 2 minutes to read

The ProxyPartnerToken element is used by HTTP proxy of the computer that is running
Microsoft Exchange Server 2010 that has the Client Access server role installed. This
element is not used by Exchange Web Services (EWS) operations.

XML

<ProxyPartnerToken/>

ProxySecurityContextType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

This element was introduced in Exchange Server 2010 Service Pack 2 (SP2).

Element information
Name Value
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ProxySecurityContext
Article • 03/29/2023 • 2 minutes to read

The ProxySecurityContext element is used by HTTP proxy of the computer that is


running Microsoft Exchange Server 2007 that has the Client Access server role installed
and is not used by Exchange Web Services operations. This element was introduced in
Exchange Server 2007 Service Pack 1 (SP1).

XML

<ProxySecurityContext/>

ProxySecurityContextType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ProxySuggesterSid
Article • 03/29/2023 • 2 minutes to read

The ProxySuggesterSid element is used by HTTP proxy of the computer that is running
Microsoft Exchange Server 2007 that has the Client Access server role installed and is
not used by Exchange Web Services operations. This element was introduced in
Exchange Server 2007 Service Pack 1 (SP1).

XML

<ProxySuggesterSid/>

ProxySecurityContextType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
PullSubscriptionRequest
Article • 03/29/2023 • 2 minutes to read

The PullSubscriptionRequest element represents a subscription to a pull-based event


notification subscription.

Subscribe

PullSubscriptionRequest

XML

<PullSubscriptionRequest SubscribeToAllFolders="">

<FolderIds/>

<EventTypes/>

<Watermark/>

<Timeout/>

</PullSubscriptionRequest>

PullSubscriptionRequestType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

SubscribeToAllFolders Indicates whether to subscribe to all available folders. This attribute is


optional.

Child elements

Element Description

FolderIds
Contains an array of folder identifiers that are used to identify folders to monitor for
event notifications.

EventTypes Contains a collection of event notifications that are used to create a subscription.
Element Description

Watermark Represents an event bookmark in the mailbox events table. This is used to create a
subscription that starts at an event that is represented by the watermark. If the
watermark from a Subscribe request is not found, an error response will be returned
to the client. This error may occur if the watermark is older than 30 days or if the
watermark was never present in the mailbox.

Timeout
Represents the duration, in minutes, that the subscription can remain idle without a
GetEvents request from the client.

Parent elements

Element Description

Subscribe
Contains the properties that are used to create subscriptions.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
PushSubscriptionRequest
Subscribe operation

GetEvents operation

Unsubscribe operation

EWS XML elements in Exchange


PurportedSender
Article • 03/29/2023 • 2 minutes to read

The PurportedSender element contains contact information for the alleged sender of an
e-mail message.

XML

<PurportedSender>

<Name/>

<EmailAddress/>

<RoutingType/>

<MailboxType/>

<ItemId/>

</PurportedSender>

EmailAddressType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Name Represents the name of the mailbox user. This element is optional.
(EmailAddressType)

EmailAddress Defines the Simple Mail Transfer Protocol (SMTP) address of a mailbox
(NonEmptyStringType) user. This element is optional.

RoutingType Represents the routing protocol for the recipient. The default value is
(EmailAddress)
SMTP. This element is optional.

MailboxType
Represents the type of mailbox that is represented by the e-mail
address.. This element is optional.

ItemId
Defines the item identifier of a contact or private distribution list for
recipients from a user's contacts folder. This element is optional.
Parent elements

Element Description

FindMessageTrackingReport
Specifies criteria for the types of messages to find.

MessageTrackingReport
Contains a single message that is returned in a
GetMessageTrackingReport operation.

MessageTrackingSearchResult Contains a single message result for a


FindMessageTrackingReportResponse element.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetMessageTrackingReport operation

EWS XML elements in Exchange


PushSubscriptionRequest
Article • 03/29/2023 • 2 minutes to read

The PushSubscriptionRequest element represents a subscription to a push-based event


notification subscription.

Subscribe

PushSubscriptionRequest

XML

<PushSubscriptionRequest SubscribeToAllFolders="">

<FolderIds/>

<EventTypes/>

<Watermark/>

<StatusFrequency/>

<URL/>

</PushSubscriptionRequest>

PushSubscriptionRequestType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

SubscribeToAllFolders Indicates whether to subscribe to all available folders. This attribute is


optional.

Child elements

Element Description

FolderIds
Contains an array of folder identifiers that are used to identify folders to
monitor for event notifications.

EventTypes
Contains a collection of event notifications that are used to create a
subscription.
Element Description

Watermark
Represents an event bookmark in the mailbox events table. This is used to
create a subscription starting at an event represented by the watermark. If the
watermark from a Subscribe request is not found, an error response will be
returned to the client. This may occur if the watermark is older than 30 days or
if the watermark was never present in the mailbox.

StatusFrequency Represents the frequency, specified in minutes, at which notification messages


will be sent to the client when no events have occurred.

Url Represents the location of the client Web service for push notifications.

Parent elements

Element Description

Subscribe
Contains the properties used to create subscriptions.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
Subscribe operation

GetEvents operation

Unsubscribe operation
Query
Article • 03/29/2023 • 2 minutes to read

The Query element contains the search query for the hold.

XML

<Query></Query>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SetHoldOnMailboxes | MailboxHoldResult | MailboxQuery

Text value
The text value of the Query element is the search query string for a discovery search.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
QueryString (QueryStringType)
Article • 03/29/2023 • 4 minutes to read

The QueryString element contains a mailbox query string based on Advanced Query
Syntax (AQS).

XML

<QueryString/>

QueryStringType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResetCache Indicates that the cache should be reset.

ReturnDeletedItems Indicates that deleted items should be returned.

ReturnHighlightTerms Indicates that highlighted terms should be returned.

Child elements
None.

Parent elements

Element Description

FindItem
Defines a request to find items in a mailbox.
The following is the XPath expression to this element: /FindItem.

Text value
The QueryString element text value represents a mailbox query that is made by using a
subset of Advanced Query Syntax (AQS) . See the remarks section for information
about the supported syntax options for query strings.

Remarks
In Exchange Server 2010, this element is an XML schema string type. In versions of
Exchange starting with Exchange Server 2013, including Exchange Online, the type for
this element is QueryStringType. This change does not break any existing clients
because it adds three new optional attributes.

The QueryString element excludes the use of EWS restrictions. AQS in EWS supports
three types of restrictions: word phase restriction, date range restriction, and message
type restriction. The following tables list the supported search properties for each
restriction type.

Word phase restriction

Property Example Function

from From:Dean Search items sent from Dean.


From:"Dean Search items sent from Dean Halstead. The sender must
Halstead" be exactly "Dean Halstead".

to To:Dean Search items sent to Dean.

cc Cc:Dean Search for items with Dean on the Cc line.

bcc Bcc:Dean Search for items with Dean on the Bcc line.

Participants Participants:Dean Search for items with Dean in the To, Cc, or Bcc fields.

Subject Subject:product Search for items with product in the subject.


Subject:(product Search for items with product and development in the
development) subject.
Subject:"product
development"

Body Body:progress Search for items with progress in the body.


Content Content:progress

Attachment Attachment:report Search for items with report in the attachment file name
or file body.

(property is not Product Search for items that contain both product and
specified) Development development in all word phase properties.
Word phase restriction match is always case insensitive. Word phase restriction supports
two match types: prefix match or exact match. Prefix match is the default match
behavior. If you want exact match, use double quotes. For example, subject:"product"
matches 'product' but not 'production' in the subject. Multiple words in double quotes
restrict both word phases and their order. For example "win product" matches only 'win
product', not 'win95 product' or 'product of win'. You can use an asterisk (*) to define a
prefix match with order restricted. For example, "win product"* matches 'win95 product',
'windows production line' but not 'windows new product' or 'product of win'. You can
search all messages sent from or to a domain. For example, from:"@hotmail.com"
returns all messages sent from hotmail.com.

The following table describes date range restrictions.

Date range restriction

Property Example Function

Sent Sent:last week Search items sent last week.


Sent:01/01/2001 Search items sent on January 1st, 2001.
Sent:01/01/2001..01/15/2001 Search items sent between January 1st, 2001 and
January 15th, 2001.

Received Received:today Search items received today.


Received:01/01/2001 Search items received on January 1st, 2001.

The two dots (..) is a range operator. It can be used to define a range with a start and an
end date. To specify a date, you can use relative dates. The following relative dates are
supported:

Relative dates: Today, tomorrow, yesterday

Multiword relative dates: This week, next month, last week, past month, or coming
year

Days: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday

January, February, March, April, May, June, July, August, September, October,
November, December

The following table describes message type restrictions.

Message type restriction

Property Example Function

Kind Kind:tasks Search all task items.


AQS in EWS uses the Kind property to specify the message type. The Kind property can
be used with the following item types:

email

meetings

tasks

notes

docs

journals

contacts

im

The following table describes grouping logical connectors.

Grouping logical connectors

Connector Example Function

AND Subject:product AND Search items with both product and


subject:development development in the subject.
Subject:(product AND
development)
Subject:(product development)

OR Body:project OR body:proposal Search items with either product or development


Body:(project OR proposal) in the body.

NOT NOT body:proposal Search messages without proposal in the body.


Body:(NOT proposal)

AND is always the default connector. For example, subject:project AND body:proposal is
the same as subject:project body:proposal. Logical connectors are case sensitive. For
example, body:(project Or proposal) searches messages with 'project', 'or', and
'proposal' in the body instead of 'project' or 'proposal'. The plus symbol (+) is equivalent
to AND. The hyphen symbol (-) is equivalent to NOT. For example, body:(project -
proposal) searches messages with 'project' but without 'proposal' in the body.

The query string can also contain nonindexed properties for search. If the query string
contains nonindexed properties, the search might perform an Exchange search on the
indexed properties and a store search on the nonindexed properties.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Example
The following example shows a request to search for messages in the Inbox with
Autodiscover in the subject.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<t:RequestServerVersion Version="Exchange2010" />

</soap:Header>

<soap:Body>

<m:FindItem Traversal="Shallow">

<m:ItemShape>

<t:BaseShape>IdOnly</t:BaseShape>

<t:AdditionalProperties>

<t:FieldURI FieldURI="item:Subject" />

</t:AdditionalProperties>

</m:ItemShape>

<m:IndexedPageItemView MaxEntriesReturned="1" Offset="0"


BasePoint="Beginning" />

<m:ParentFolderIds>

<t:DistinguishedFolderId Id="inbox" />

</m:ParentFolderIds>

<m:QueryString>subject:Autodiscover</m:QueryString>

</m:FindItem>

</soap:Body>

</soap:Envelope>

The following example shows a successful response to the request.

XML

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Header>

<h:ServerVersionInfo MajorVersion="14"

MinorVersion="0"

MajorBuildNumber="639"

MinorBuildNumber="20"

Version="Exchange2010"

xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns="https://schemas.microsoft.com/exchange/services/2006/types"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema" />

</s:Header>

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<m:FindItemResponse
xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"

xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">

<m:ResponseMessages>

<m:FindItemResponseMessage ResponseClass="Success">

<m:ResponseCode>NoError</m:ResponseCode>

<m:RootFolder IndexedPagingOffset="1"

TotalItemsInView="5"

IncludesLastItemInRange="false">

<t:Items>

<t:Message>

<t:ItemId Id="AAMkADEzOTExYjJkLTYx" ChangeKey="CQAAABY" />

<t:Subject>How to use Autodiscover</t:Subject>

</t:Message>

</t:Items>

</m:RootFolder>

</m:FindItemResponseMessage>

</m:ResponseMessages>

</m:FindItemResponse>

</s:Body>

</s:Envelope>

Element information
Code Name

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
FindItem operation
FindConversation operation

EWS XML elements in Exchange


QueryString (String)
Article • 03/29/2023 • 2 minutes to read

The QueryString element specifies a set of values to be returned that match the query
string in a FindPeople operation request. A search with no QueryString specified returns
all items from the specified folder.

XML

<QueryString/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

FindPeople Contains the arguments for a FindPeople operation search.

Text value
The QueryString text value represents a mailbox query made by using a subset of
Advanced Query Syntax (AQS) . For information about the syntax for this element, see
QueryString (QueryStringType).

Remarks
This element was introduced in Exchange Server 2013.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
FindPeople operation

EWS XML elements in Exchange


RadioPhones
Article • 03/29/2023 • 2 minutes to read

The RadioPhones element specifies an array of radio phone numbers and the identifiers
of their source attributions for the associated persona.

XML

<RadioPhones>

<PhoneNumberAttributedValue/>

</RadioPhones>

ArrayOfPhoneNumberAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
PhoneNumberAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Range
Article • 03/29/2023 • 2 minutes to read

The Range element specifies a range of calendar item occurrences for a repeating
calendar item.

XML

<Range Start="" End="" Count="" CompareOriginalStartTime=""/>

OccurrencesRangeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Start
The text value of the Start attribute is the start date of the recurring
item range. This is a dateTime value.

End
The text value of the End attribute is the end date of the recurring
item range. This is a dateTime value.

Count
The text value of the Count attribute is the number of occurrences
of the recurring item. This is an integer value.

CompareOriginalStartTime The text value of true for the CompareOriginalStartTime attribute


indicates that the client should compare the original start time with
the new start time. A value of false indicates that the client does not
need to compare the original start time with the new start time.

Child elements
None.

Parent elements
Ranges
Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Ranges
Article • 03/29/2023 • 2 minutes to read

The Ranges element specifies an array of recurrence ranges.

XML

<Ranges>

<Range/>

</Ranges>

ArrayOfOccurrenceRangesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Range

Parent elements
RecurringMasterItemIdRanges

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


RawMasterTableXml
Article • 03/29/2023 • 2 minutes to read

The RawMasterTableXml element is not used.

XML

<RawMastTableXml></RawMastTableXml>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
GetClientExtensionResponse

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages
Name Value

Schema name Messages schema

Validation file Messages.xsd

Can be empty
Read
Article • 03/29/2023 • 2 minutes to read

The Read element indicates whether a client can read a folder or item. This element was
introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

XML

<Read>true or false</Read>

boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

EffectiveRights Contains the rights of the client based on the permission settings for the item or
folder. This element was introduced in Exchange 2007 SP1.

Text value
A text value of true indicates that a client can read an item of folder.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


ReadFlag
Article • 03/29/2023 • 2 minutes to read

The ReadFlag element indicates the read state to set on items in a folder.

XML

<ReadFlag>true | false</ReadFlag>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
MarkAllItemsAsRead

Text value
A text value of true for the ReadFlag element indicates that the items in the folder will
be marked as read. A value of false indicates that the items in the folder will be marked
as unread.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
ReadFlagChange
Article • 03/29/2023 • 2 minutes to read

The ReadFlagChange element is returned in SyncFolderItems operation responses when


an item has been read. This property is read-only.

XML

<ReadFlagChange>

<ItemId/>

<IsRead/>

</ReadFlagChange>

SyncFolderItemsReadFlagType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ItemId
Identifies the item for which the read-flag has been changed.

IsRead
Indicates whether the read-flag has been set to true.

Parent elements

Element Description

Changes Contains a sequence array of change types that represent the types of differences
(Items)
between the items on the client and the items on the Exchange server.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ReadItems (CalendarPermissionType)
Article • 03/29/2023 • 2 minutes to read

The ReadItems element indicates whether a user has permission to read items within a
Calendar folder. This element was introduced in Microsoft Exchange Server 2007 Service
Pack 1 (SP1).

XML

<ReadItems>None or TimeOnly or TimeAndSubjectAndLocation or


FullDetails</ReadItems>

CalendarPermissionReadAccessType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarPermission Defines the access that a user has to a Calendar folder. This element was
introduced in Exchange 2007 SP1.

Text value
The following table lists the possible values for the ReadItems element.

ReadItems element text values

Value Description
Value Description

None Indicates that the user does not have permission to view items in
the calendar.

TimeOnly Indicates that the user has permission to view only free/busy time
in the calendar.

TimeAndSubjectAndLocation Indicates that the user has permission to view free/busy time in
the calendar and the subject and location of appointments.

FullDetails Indicates that the user has permission to view all items in the
calendar, including free/busy time and subject, location, and
details of appointments.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


ReadItems (PermissionType)
Article • 03/29/2023 • 2 minutes to read

The ReadItems element indicates whether a user has permission to read items within a
folder. This element was introduced in Microsoft Exchange Server 2007 Service Pack 1
(SP1).

XML

<ReadItems>None or FullDetails</ReadItems>

PermissionReadAccessType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Permission Defines the access that a user has to a folder. This element was introduced in
Exchange 2007 SP1.

Text value
The following table lists the possible values for the ReadItems element.

ReadItems element text values

Value Description
Value Description

None Indicates that the user does not have permission to read items in the folder.

FullDetails Indicates that the user has permission to read all items in the folder.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Setting Folder-Level Permissions


ReceiveCopiesOfMeetingMessages
Article • 03/29/2023 • 2 minutes to read

The ReceiveCopiesOfMeetingMessages element indicates whether a delegate receives


copies of meeting-related messages that are addressed to the principal. This element
was introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

XML

<ReceiveCopiesOfMeetingMessages>true or
false</ReceiveCopiesOfMeetingMessages>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

DelegateUser Identifies a single delegate to add or update in a mailbox. This element was
introduced in Exchange 2007 SP1.

Text value
A text value of true indicates that a delegate receives a copy of meeting messages. A
text value of false indicates that a delegate does not receive a copy of meeting
messages.
Remarks
When ReceiveCopiesOfMeetingMessages is set to false, the delegate can still send
message on behalf of the principal, but will not receive any meeting-related messages.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
AddDelegate operation

UpdateDelegate operation

EWS XML elements in Exchange

Adding Delegates
ReceivedBy
Article • 03/29/2023 • 2 minutes to read

The ReceivedBy element identifies the delegate in a delegate access scenario.

XML

<ReceivedBy>

<Mailbox/>

</ReceivedBy>

SingleRecipientType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Mailbox
Identifies a mail-enabled Active Directory directory service object.

Parent elements

Element Description

Message
Represents an Exchange e-mail message.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

AcceptItem
Represents an Accept reply to a meeting request.
Element Description

TentativelyAcceptItem Represents a Tentative reply to a meeting request.

DeclineItem
Represents a Decline reply to a meeting request.

ReplyToItem
Contains a reply to the creator of an item in the Exchange store.

ReplyAllToItem
Contains a reply to all identified recipients of an item in the Exchange
store.

ForwardItem
Contains an Exchange store item to forward to recipients.

CancelCalendarItem
Represents the response object that is used to cancel a meeting.

Remarks
The ReceivedRepresenting element is used together with the From and ReceivedBy
elements in delegate access scenarios. The following table lists the entities that these
elements represent in a delegate access scenario.

Elements in a delegate access scenario

Element Entity that the element represent

From
ThirdParty

ReceivedBy
Delegate

ReceivedRepresenting
Principal

In a delegate access scenario, if a ThirdParty sends a meeting request to a Principal who


has a Delegate, the Delegate will see a new meeting request. These elements enable
delegates to distinguish between messages that are sent directly to them and messages
that are sent to them because of a delegate forwarding rule.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema


Element Example

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ReceivedRepresenting
Article • 03/29/2023 • 2 minutes to read

The ReceivedRepresenting element identifies the principal in a delegate access scenario.

XML

<ReceivedRepresenting>

<Mailbox/>

</ReceivedRepresenting>

SingleRecipientType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Mailbox
Identifies a mail-enabled Active Directory directory service object.

Parent elements

Element Description

Message
Represents an Exchange e-mail message.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

AcceptItem
Represents an Accept reply to a meeting request.
Element Description

TentativelyAcceptItem Represents a Tentative reply to a meeting request.

DeclineItem
Represents a Decline reply to a meeting request.

ReplyToItem
Contains a reply to the creator of an item in the Exchange store.

ReplyAllToItem
Contains a reply to all identified recipients of an item in the Exchange
store.

ForwardItem
Contains an Exchange store item to forward to recipients.

CancelCalendarItem
Represents the response object that is used to cancel a meeting.

Remarks
The ReceivedRepresenting element is used together with the From and ReceivedBy
elements in delegate access scenarios. The following table lists the entities that these
elements represent in a delegate access scenario.

Elements in a delegate access scenario

Element Entity that the element represent

From
ThirdParty

ReceivedBy
Delegate

ReceivedRepresenting
Principal

In a delegate access scenario, if a ThirdParty sends a meeting request to a Principal who


has a Delegate, the Delegate will see a new meeting request. These elements enable
delegates to distinguish between messages that are sent directly to them and messages
that are sent to them because of a delegate forwarding rule.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema


Element Example

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ReceivedTime
Article • 03/29/2023 • 2 minutes to read

The ReceivedTime element specifies the time at which an item was received.

XML

<ReceivedTime></ReceivedTime>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SearchPreviewItem

Text value
The text value of the ReceivedTime element is the date and time that an item was
received.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Recipient
Article • 03/29/2023 • 2 minutes to read

The Recipient element represents the recipient for whom the event occurred.

XML

<Recipient>

<Name/>

<EmailAddress/>

<RoutingType/>

<MailboxType/>

<ItemId/>

</Recipient>

EmailAddressType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Name Represents the name of the mailbox user. This element is optional.
(EmailAddressType)

EmailAddress Defines the primary Simple Mail Transfer Protocol (SMTP) address of a
(NonEmptyStringType) mailbox user. This element is optional.

RoutingType Defines the routing that is used for the mailbox. The default value is
(EmailAddress)
SMTP. This element is optional.

MailboxType
Represents the type of mailbox that is represented by the e-mail address.
This element is optional.

ItemId
Defines the item identifier of a contact or private distribution list for
recipients from a user's Contacts folder. This element is optional.
Parent elements

Element Description

RecipientTrackingEvent
Contains information for a single event for a recipient.

FindMessageTrackingReport
Specifies criteria for the types of messages to find.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
RecipientAddress
Article • 03/29/2023 • 2 minutes to read

The RecipientAddress element represents the mailbox of the recipient.

XML

<RecipientAddress>

<Name/>

<EmailAddress/>

<RoutingType/>

<MailboxType/>

<ItemId/>

</RecipientAddress>

EmailAddressType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Name Represents the name of the mailbox user. This element is optional.
(EmailAddressType)

EmailAddress Defines the Simple Mail Transfer Protocol (SMTP) address of a mailbox
(NonEmptyStringType) user. This element is optional.

RoutingType Represents the routing protocol for the recipient. The default is SMTP.
(EmailAddress)
This element is optional.

MailboxType
Represents the type of mailbox that is represented by the e-mail address.

ItemId
Defines the item identifier of a contact or private distribution list for
recipients from a user's contacts folder. This element is optional.
Parent elements

Element Description

MailTips
Represents values for various types of mail tips.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
RecipientFilter
Article • 03/29/2023 • 2 minutes to read

The RecipientFilter element represents a recipient address to use with the specified
message tracking report.

XML

<RecipientFilter>

<Name/>

<EmailAddress/>

<RoutingType/>

<MailboxType/>

<ItemId/>

</RecipientFilter>

EmailAddressType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Name Represents the name of the mailbox user. This element is optional.
(EmailAddressType)

EmailAddress Defines the primary Simple Mail Transfer Protocol (SMTP) address of a
(NonEmptyStringType) mailbox user. This element is optional.

RoutingType Represents the routing protocol for this recipient. The default value is
(EmailAddress)
SMTP. This element is optional.

MailboxType
Represents the type of mailbox that is represented by the e-mail address.
This element is optional.

ItemId
Defines the item identifier of a contact or private distribution list for
recipients from a user's Contacts folder. This element is optional.
Parent elements

Element Description

GetMessageTrackingReport Contains the request for the GetMessageTrackingReport operation


to retrieve the full message tracking report for the specified ID.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetMessageTrackingReport operation

EWS XML elements in Exchange


RecipientIs
Article • 03/29/2023 • 2 minutes to read

The RecipientIs element specifies that any recipient of the e-mail message matches any
of the specified recipients in the child Value (ProtectionRuleValueType) elements.

XML

<RecipientIs> <Value/></RecipientIs>

ProtectionRuleRecipientIsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Value (ProtectionRuleValueType)
Identifies a recipient.

Parent elements

Element Description

Condition
Identifies the condition that must be satisfied for the action part of the
rule to be executed.

And Indicates that all child elements must match to evaluate to true.
(ProtectionRuleAndType)

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Recipients (ArrayOfRecipientsType)
Article • 03/29/2023 • 2 minutes to read

The Recipients element represents a collection of recipients that receive a copy of the
message.

XML

<Recipients>

<Mailbox/>

</Recipients>

ArrayOfRecipientsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Mailbox
Identifies a mail-enabled Active Directory object.

Parent elements

Element Description

GetMailTips
Contains the recipients and types of mail tips to retrieve.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Recipients (ArrayOfSmtpAddressType)
Article • 03/29/2023 • 2 minutes to read

The Recipients element specifies an array of recipients of a message.

XML

<Recipients> <SmtpAddress/></Recipients>

ArrayOfSmtpAddressType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

SmtpAddress Represents the Simple Mail Transfer Protocol (SMTP) recipient address of a
calendar or contact sharing request.

Parent elements

Element Description

GetSharingMetadata Defines a request to get an opaque authentication token that identifies the
sharing invitation.

Remarks
The schema that describes this element is located in the IIS Virtual directory that hosts
Exchange Web Services of the computer that is running Microsoft Exchange Server that
has the Client Access server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetSharingMetadata operation

EWS XML elements in Exchange


RecipientTrackingEvent
Article • 03/29/2023 • 2 minutes to read

The RecipientTrackingEvent element contains information for a single event for a


recipient.

XML

<RecipientTrackingEvent>

<Date/>

<Recipient/>

<DeliveryStatus/>

<EventDescription/>

<EventData/>

<Server/>

<InternalId/>

<BccRecipient/>

<HiddenRecipient/>

<UniquePathId/>

<RootAddress/>

<Properties/>

</RecipientTrackingEvent>

RecipientTrackingEventType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Date (MessageTracking)
This element is required.

Recipient
This element is required.

DeliveryStatus
This element is required.

EventDescription
This element is required.
Element Description

EventData
This element is optional.

Server (MessageTracking)
This element is required.

InternalId
This element is required.

BccRecipient
This element is optional.

HiddenRecipient
This element is optional.

UniquePathId
This element is optional.

RootAddress
This element is optional.

Properties (ArrayOfTrackingPropertiesType)
This element is optional.

Parent elements

Element Description

RecipientTrackingEvents
Contains a list of one or more tracking events for a recipient.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


See also
GetMessageTrackingReport operation

EWS XML elements in Exchange


RecipientTrackingEvents
Article • 03/29/2023 • 2 minutes to read

The RecipientTrackingEvents element represents a collection of one or more events for


a message.

XML

<RecipientTrackingEvents>

<RecipientTrackingEvent/>

</RecipientTrackingEvents>

ArrayOfRecipientTrackingEventType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

RecipientTrackingEvent
Contains details for a specific event in the tracking report.

Parent elements

Element Description

MessageTrackingReport Contains a single message that is returned in a


GetMessageTrackingReport operation.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetMessageTrackingReport operation

EWS XML elements in Exchange


RecognitionId
Article • 03/29/2023 • 2 minutes to read

The RecognitionId element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
RecognitionResult
Article • 03/29/2023 • 2 minutes to read

The RecognitionResult element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Recurrence (RecurrenceType)
Article • 03/29/2023 • 2 minutes to read

The Recurrence element contains the recurrence pattern for calendar items and meeting
requests.

XML

<Recurrence>

<RelativeYearlyRecurrence/>

<NoEndRecurrence/>

</Recurrence>

XML

<Recurrence>

<AbsoluteMonthlyRecurrence/>

<NoEndRecurrence/>

</Recurrence>

XML

<Recurrence>

<RelativeMonthlyRecurrence/>

<NumberedRecurrence/>

</Recurrence>

XML

<Recurrence>

<RelativeYearlyRecurrence/>

<EndDateRecurrence/>

</Recurrence>

XML

<Recurrence>

<RelativeYearlyRecurrence/>

<NumberedRecurrence/>

</Recurrence>

XML
<Recurrence>

<WeeklyRecurrence/>

<EndDateRecurrence/>

</Recurrence>

XML

<Recurrence>

<DailyRecurrence/>

<NoEndRecurrence/>

</Recurrence>

XML

<Recurrence>

<AbsoluteYearlyRecurrence/>

<NoEndRecurrence/>

</Recurrence>

XML

<Recurrence>

<DailyRecurrence/>

<EndDateRecurrence/>

</Recurrence>

XML

<Recurrence>

<AbsoluteYearlyRecurrence/>

<NumberedRecurrence/>

</Recurrence>

XML

<Recurrence>

<DailyRecurrence/>

<NumberedRecurrence/>

</Recurrence>

XML

<Recurrence>

<AbsoluteMonthlyRecurrence/>

<EndDateRecurrence/>

</Recurrence>

XML

<Recurrence>

<AbsoluteMonthlyRecurrence/>

<NumberedRecurrence/>

</Recurrence>

XML

<Recurrence>

<RelativeMonthlyRecurrence/>

<NoEndRecurrence/>

</Recurrence>

XML

<Recurrence>

<WeeklyRecurrence/>

<NoEndRecurrence/>

</Recurrence>

XML

<Recurrence>

<WeeklyRecurrence/>

<NumberedRecurrence/>

</Recurrence>

XML

<Recurrence>

<AbsoluteYearlyRecurrence/>

<EndDateRecurrence/>

</Recurrence>

XML

<Recurrence>

<RelativeMonthlyRecurrence/>

<EndDateRecurrence/>

</Recurrence>

RecurrenceType
Attributes and elements
The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

RelativeYearlyRecurrence
Describes a relative yearly recurrence pattern.

AbsoluteYearlyRecurrence
Represents a yearly recurrence pattern.

RelativeMonthlyRecurrence
Describes a relative monthly recurrence pattern for a recurring
calendar item.

AbsoluteMonthlyRecurrence Represents a monthly recurrence pattern.

WeeklyRecurrence
Describes the frequency, in weeks, and the days that a calendar
item or task recurs.

DailyRecurrence
Describes the frequency, in days, in which a calendar item or task
recurs.

NoEndRecurrence
Describes a recurrence pattern that does not have a defined end
date.
The use of this element excludes the use of the EndDateRecurrence
and NumberedRecurrence elements.

EndDateRecurrence
Describes the start date and the end date of an item recurrence
pattern.
The use of this element excludes the use of the NoEndRecurrence
and NumberedRecurrence elements.

NumberedRecurrence
Describes the start date and the number of occurrences of a
recurring item.
The use of this element excludes the use of the NoEndRecurrence
and EndDateRecurrence elements.

Parent elements

Element Description
Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store

Remarks
This element is valid if CalendarItemType has the RecurringMaster value.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Recurrence (TaskRecurrenceType)
Article • 03/29/2023 • 2 minutes to read

The Recurrence element contains recurrence information for recurring tasks.

XML

<Recurrence>

<RelativeYearlyRecurrence/>

<NoEndRecurrence/>

</Recurrence>

XML

<Recurrence>

<WeeklyRecurrence/>

<NoEndRecurrence/>

</Recurrence>

XML

<Recurrence>

<RelativeMonthlyRecurrence/>

<NumberedRecurrence/>

</Recurrence>

XML

<Recurrence>

<AbsoluteMonthlyRecurrence/>

<EndDateRecurrence/>

</Recurrence>

XML

<Recurrence>

<MonthlyRegeneration/>

<NumberedRecurrence/>

</Recurrence>

XML

<Recurrence>

<DailyRegeneration/>

<EndDateRecurrence/>

</Recurrence>

XML

<Recurrence>

<DailyRegeneration/>

<NumberedRecurrence/>

</Recurrence>

XML

<Recurrence>

<DailyRegeneration/>

<NoEndRecurrence/>

</Recurrence>

XML

<Recurrence>

<MonthlyRegeneration/>

<NoEndRecurrence/>

</Recurrence>

XML

<Recurrence>

<YearlyRegeneration/>

<NoEndRecurrence/>

</Recurrence>

XML

<Recurrence>

<YearlyRegeneration/>

<EndDateRecurrence/>

</Recurrence>

XML

<Recurrence>

<AbsoluteMonthlyRecurrence/>

<NumberedRecurrence/>

</Recurrence>

XML

<Recurrence>

<WeeklyRegeneration/>

<NumberedRecurrence/>

</Recurrence>

XML

<Recurrence>

<RelativeMonthlyRecurrence/>

<EndDateRecurrence/>

</Recurrence>

XML

<Recurrence>

<RelativeYearlyRecurrence/>

<NumberedRecurrence/>

</Recurrence>

XML

<Recurrence>

<WeeklyRegeneration/>

<NoEndRecurrence/>

</Recurrence>

XML

<Recurrence>

<AbsoluteYearlyRecurrence/>

<NumberedRecurrence/>

</Recurrence>

XML

<Recurrence>

<RelativeMonthlyRecurrence/>

<NoEndRecurrence/>

</Recurrence>

XML

<Recurrence>

<YearlyRegeneration/>

<NumberedRecurrence/>

</Recurrence>

XML

<Recurrence>

<WeeklyRecurrence/>

<EndDateRecurrence/>

</Recurrence>

XML

<Recurrence>

<RelativeYearlyRecurrence/>

<EndDateRecurrence/>

</Recurrence>

XML

<Recurrence>

<MonthlyRegeneration/>

<EndDateRecurrence/>

</Recurrence>

XML

<Recurrence>

<AbsoluteYearlyRecurrence/>

<NoEndRecurrence/>

</Recurrence>

XML

<Recurrence>

<AbsoluteMonthlyRecurrence/>

<NoEndRecurrence/>

</Recurrence>

XML

<Recurrence>

<DailyRecurrence/>

<EndDateRecurrence/>

</Recurrence>

XML

<Recurrence>

<WeeklyRegeneration/>

<EndDateRecurrence/>

</Recurrence>

XML

<Recurrence>

<AbsoluteYearlyRecurrence/>

<EndDateRecurrence/>

</Recurrence>

XML

<Recurrence>

<DailyRecurrence/>

<NoEndRecurrence/>

</Recurrence>

XML

<Recurrence>

<DailyRecurrence/>

<NumberedRecurrence/>

</Recurrence>

XML

<Recurrence>

<WeeklyRecurrence/>

<NumberedRecurrence/>

</Recurrence>

TaskRecurrenceType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.
Child elements

Element Description

RelativeYearlyRecurrence
Describes a relative yearly recurrence pattern for a recurring task.

AbsoluteYearlyRecurrence
Represents a yearly recurrence pattern for a recurring task.

RelativeMonthlyRecurrence
Describes a relative monthly recurrence pattern for a recurring
task.

AbsoluteMonthlyRecurrence Represents a monthly recurrence pattern for a recurring task.

WeeklyRecurrence
Describes the frequency, in weeks, and the days on which a task
recurs.

DailyRecurrence
Describes the frequency, in days, in which a task recurs.

DailyRegeneration
Describes how many days after the completion of the current task
the next occurrence will be due.

WeeklyRegeneration
Describes how many weeks after the completion of the current
task the next occurrence will be due.

MonthlyRegeneration
Describes how many months after the completion of the current
task the next occurrence will be due.

YearlyRegeneration
Describes how many years after the completion of the current task
the next occurrence will be due.

NoEndRecurrence
Describes a recurrence pattern that does not have a defined end
date.
The use of this element excludes the use of the EndDateRecurrence
and NumberedRecurrence elements.

EndDateRecurrence
Describes the start date and the end date of an item recurrence
pattern.
The use of this element excludes the use of the NoEndRecurrence
and NumberedRecurrence elements.
EndDateRecurrence cannot be used together with a regeneration
pattern.

NumberedRecurrence
Describes the start date and the number of occurrences of a
recurring item.
The use of this element excludes the use of the NoEndRecurrence
and EndDateRecurrence elements.

Parent elements
Element Description

Task
Represents a task in the Exchange store.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
RecurrenceId
Article • 03/29/2023 • 2 minutes to read

The RecurrenceId element is used to identify a specific instance of a recurring calendar


item.

XML

<RecurrenceId/>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingMessage
Represents a meeting message.

MeetingRequest
Represents a meeting request.

MeetingResponse
Represents a meeting response.

MeetingCancellation Represents a meeting cancellation.

Text value
The text value represents a date/time value that identifies a calendar occurrence.
Remarks
This property is used with the UID property to identify a specific instance of a recurring
calendar item.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
RecurringDateTransition
Article • 03/29/2023 • 2 minutes to read

The RecurringDateTransition element represents a time zone transition that occurs on a


specific date each year.

XML

<RecurringDateTransition>

<To/>

<TimeOffset/>

<Month/>

<Day/>

</RecurringDateTransition>

RecurringDateTransitionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

To
Specifies the Period or TransitionsGroup that is the target of the time
zone transition.

TimeOffset
Represents the duration offset from Coordinated Universal Time (UTC) for
the time zone transition.

Month (Time Zone Represents the month in which the time zone transition occurs.
Transition)

Day
Represents the day of the month on which the time zone transition
occurs.

Parent elements
Element Description

Transitions
Represents a collection of time zone transitions.

TransitionsGroup
Represents a collection of time zone transitions.

Remarks
An example of a time zone transition that could be represented by the
RecurringDateTransition element is a transition that occurs on March 15 each year.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server that has the Client Access server
role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
RecurringDayTransition
Article • 03/29/2023 • 2 minutes to read

The RecurringDayTransition element represents a time zone transition that occurs on


the same day each year.

XML

<RecurringDayTransition>

<To/>

<TimeOffset/>

<Month/>

<DayOfWeek/>

<Occurrence/>

</RecurringDayTransition>

RecurringDayTransitionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

To
Specifies the Period or TransitionsGroup that is the target of the time
zone transition.

TimeOffset
Represents the duration offset from Coordinated Universal Time (UTC)
for the time zone transition.

Month (Time Zone Represents the month in which the time zone transition occurs.
Transition)

DayOfWeek (TimeZone) Represents the day of the week on which the time zone transition
occurs.

Occurrence (Time Zone Represents the occurrence of the day of the week in the month that
Transition)
the time zone transition occurs.
Parent elements

Element Description

Transitions
Represents a collection of time zone transitions.

TransitionsGroup
Represents a collection of time zone transitions.

Remarks
An example of a time zone transition that could be represented by the
RecurringDayTransition element is a transition that occurs on the second Tuesday of
February each year.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server that has the Client Access server
role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
RecurringMasterItemId
Article • 03/29/2023 • 2 minutes to read

The RecurringMasterItemId element identifies a recurrence master item by identifying


the identifiers of one of its related occurrence items.

XML

<RecurringMasterItemId OccurrenceId="" ChangeKey="" />

RecurringMasterItemIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

OccurrenceId Identifies a single occurrence of a recurring master item. This attribute is required.

ChangeKey
Identifies a specific version of a single occurrence of a recurring master item.
Additionally, the recurring master item is also identified because it and the single
occurrence will contain the same change key. This attribute is optional.

Child elements
None.

Parent elements

Element Description

GlobalItemIds Contains the collection of item identifiers for all conversation items in a mailbox.

ItemChange
Contains an item identifier and the updates to apply to the item.

The following is the XPath expression to this element:

/UpdateItem/ItemChanges/ItemChange[i]

Element Description

ItemIds
Contains the unique identities of items, occurrence items, and recurring master
items that are used to delete, send, get, move, or copy items in the Exchange
store.

The following are the XPath expressions to this element:

/DeleteItem/ItemIds

/SendItem/ItemIds

/GetItem/ItemIds

/MoveItem/ItemIds

/CopyItem//ItemIds

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Example
The following example identifies the recurring master item by identifying one of its
occurrences with the identifier 56lkjh6.

XML

<RecurringMasterItemId OccurrenceId="56lkjh6" />

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd


Element Example

Can be Empty False

See also
OccurrenceItemId
FindConversation operation
RecurringMasterItemId (ItemIdType)
Article • 03/29/2023 • 2 minutes to read

The RecurringMasterItemId (ItemIdType) element identifies a recurrence master item


by identifying the identifiers of one of its related occurrence items.

XML

<RecurringMasterItemId Id="" ChangeKey=""/>

ItemIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id Identifies a single occurrence of a recurring master item. This attribute is required.

ChangeKey Identifies a specific version of a single occurrence of a recurring master item.


Additionally, the recurring master item is also identified because it and the single
occurrence will contain the same change key. This attribute is optional.

Child elements
None.

Parent elements
Reminder

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
Reminder

EWS XML elements in Exchange


RecurringMasterItemIdRanges
Article • 03/29/2023 • 2 minutes to read

The RecurringMasterItemIdRanges element specifies an array of occurrence ranges.

XML

<RecurringMasterItemIdRanges Id="" ChangeKey="">

<Ranges/>

</RecurringMasterItemIdRanges>

RecurringMasterItemIdRangesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id
The text value of the Id attribute is a recurring master item's unique identifier. This
is a string value.

ChangeKey The text value of the ChangeKey attribute is the recurring master item's change key.
This is a string value.

Child elements
Ranges

Parent elements
ItemIds | GlobalItemIds | DraftItemIds | ContactIds | GroupIds

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
ReferenceAttachment
Article • 03/29/2023 • 2 minutes to read

The ReferenceAttachment element specifies XXX.

XML

<RecurringMasterItemIdRanges Id="" ChangeKey="">

<Ranges/>

</RecurringMasterItemIdRanges>

ReferenceAttachmen

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id
The text value of the Id attribute is a recurring master item's unique identifier. This
is a string value.

ChangeKey The text value of the ChangeKey attribute is the recurring master item's change key.
This is a string value.

Child elements
Ranges

Parent elements
ItemIds | GlobalItemIds | DraftItemIds| ContactIds | GroupIds

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
ReferenceAttachmentType complexType
(EWS)
Article • 03/29/2023 • 2 minutes to read

Type information
Element Description

Namespace
https://schemas.microsoft.com/exchange/services/2006/types

Schema file
types.xsd

Extension base
t:AttachmentType

Definition
XML

<xs:complexType name="ReferenceAttachmentType">

<xs:complexContent>
<xs:extension base="t:AttachmentType">

<xs:sequence>

<xs:element name="AttachLongPathName" type="xs:string"


maxOccurs="1" minOccurs="0"></xs:element>

</xs:sequence>

</xs:extension>

</xs:complexContent>

</xs:complexType>

Elements and attributes


If the schema defines specific requirements, such as sequence, minOccurs, maxOccurs,
and choice, see the definition section.

Child elements

Element Type Description

AttachLongPathName
xs:string
Attributes
None.
RedirectToRecipients
Article • 03/29/2023 • 2 minutes to read

The RedirectToRecipients element indicates the e-mail addresses to which messages are
to be redirected.

XML

<RedirectToRecipients>

<Address/>

</RedirectToRecipients>

ArrayOfEmailAddressesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Address (EmailAddressType)
Represents a fully resolved e-mail address.

Parent elements

Element Description

Actions
Represents the set of actions that are available to be taken on a message when the
conditions are fulfilled.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
ReferenceId
Article • 03/29/2023 • 2 minutes to read

The ReferenceId element specifies the reference identifier for the mailbox.

XML

<ReferenceId></ReferenceId>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SearchableMailbox

Text value
The text value of the ReferenceId element is the reference identifier of a mailbox.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
ReferenceItemId
Article • 03/29/2023 • 2 minutes to read

The ReferenceItemId element identifies the item to which the response object refers.

XML

<ReferenceItemId Id="" ChangeKey="" />

ItemIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id
Identifies a specific item in the Exchange store.

ChangeKey
Identifies a specific version of an item.

Child elements
None.

Parent elements

Element Description

AcceptItem
Represents an Accept reply to a meeting request.

AcceptSharingInvitation Represents an Accept reply to a sharing invitation.

CancelCalendarItem
Represents the response object that is used to cancel a meeting.

DeclineItem
Represents a Decline reply to a meeting request.

ForwardItem
Contains an Exchange store item to forward to recipients.

RemoveItem
Removes an item from the Exchange store.
Element Description

ReplyAllToItem
Contains a reply to all identified recipients of an item in the Exchange
store.

ReplyToItem
Contains a reply to the creator of an item in the Exchange store.

SuppressReadReceipt
Used to respond to read receipt requests.

TentativelyAcceptItem
Represents a Tentative reply to a meeting request.

Remarks
The schema that describes this element is located in the IIS Virtual directory that hosts
Exchange Web Services of the computer that is running Microsoft Exchange Server that
has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
References
Article • 03/29/2023 • 2 minutes to read

The References element represents the Usenet header that is used to associate replies
with the original messages.

XML

<References/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

RemoveItem
Removes an item from the Exchange store.

Message
Represents an Exchange e-mail message.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

AcceptItem
Represents an Accept reply to a meeting request.

TentativelyAcceptItem Represents a Tentative reply to a meeting request.


Element Description

DeclineItem
Represents a Decline reply to a meeting request.

ReplyToItem
Contains a reply to the creator of an item in the Exchange store.

ReplyAllToItem
Contains a reply to all identified recipients of an item in the Exchange
store.

ForwardItem
Contains an Exchange store item to forward to recipients.

CancelCalendarItem
Represents the response object that is used to cancel a meeting.

PostItem
Represents a post item in the Exchange store. This element was
introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

Text value
The text value represents a Usenet header.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Refiner
Article • 03/29/2023 • 2 minutes to read

The Refiner element specifies a search refiner.

XML

<Refiner>

<Name/>

<Value/>

<Count/>

<Token/>

</Refiner>

SearchRefinerItemType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Name (string) | Value | Count | Token (String)

Parent elements
Refiners

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Refiners
Article • 03/29/2023 • 2 minutes to read

The Refiners element specifies a list of one or more Refiner elements.

XML

<Refiners>

<Refiner/>

</Refiners>

ArrayOfSearchRefinerItemsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Refiner

Parent elements
SearchMailboxesResult

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
RefreshSharingFolder
Article • 03/29/2023 • 2 minutes to read

The RefreshSharingFolder element defines a request to refresh the specified local


folder. It is the base element for the RefreshSharingFolder operation.

XML

<RefreshSharingFolder> <SharingFolderId/></RefreshSharingFolder>

RefreshSharingFolderType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

SharingFolderId
Represents the identifier of the local folder in a sharing relationship.

Parent elements
None.

Remarks
The schema that describes this element is located in the IIS Virtual directory that hosts
Exchange Web Services of the computer that is running Microsoft Exchange Server that
has the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
RefreshSharingFolderResponse
Article • 03/29/2023 • 2 minutes to read

The RefreshSharingFolderResponse element defines a response to a


RefreshSharingFolder operation request.

XML

<RefreshSharingFolderResponse ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</RefreshSharingFolderResponse>

RefreshSharingFolderResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error
-

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- The Active Directory directory service is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and reserved for future use. This element contains a value
of 0.

MessageXml
Provides additional error response information.

Parent elements
None.
Remarks
The schema that describes this element is located in the IIS Virtual directory that hosts
Exchange Web Services of the computer that is running Microsoft Exchange Server that
has the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
RefreshSharingFolder operation
EWS XML elements in Exchange
RefreshSharingFolderResponseMessage
Article • 03/29/2023 • 2 minutes to read

The RefreshSharingFolderResponseMessage element contains the status and result of a


single RefreshSharingFolder operation request.

XML

<RefreshSharingFolderResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</RefreshSharingFolderResponseMessage>

RefreshSharingFolderResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- The Active Directory directory service is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and reserved for future use. This element contains a value
of 0.

MessageXml
Provides additional error response information.

Parent elements

Element Description
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
The schema that describes this element is located in the IIS Virtual directory that hosts
Exchange Web Services of the computer that is running Microsoft Exchange Server that
has the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
RefreshSharingFolder operation
EWS XML elements in Exchange
RelativeFolderPath
Article • 03/29/2023 • 2 minutes to read

The RelativeFolderPath element contains an array of folders that indicate the relative
folder path of the folder path to be created.

XML

<RelativeFolderPath>

<Folder/>

<CalendarFolder/>

<ContactsFolder/>

<SearchFolder/>

<TasksFolder/>

</RelativeFolderPath>

NonEmptyArrayOfFoldersType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Folder | CalendarFolder | ContactsFolder | SearchFolder | TasksFolder

Parent elements
CreateFolderPath

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
RelativeMonthlyRecurrence
Article • 03/29/2023 • 2 minutes to read

The RelativeMonthlyRecurrence element describes a relative monthly recurrence


pattern.

XML

<RelativeMonthlyRecurrence>

<Interval/>

<DaysOfWeek/>

<DayOfWeekIndex/>

</RelativeMonthlyRecurrence>

RelativeMonthlyRecurrencePatternType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Interval
Defines the interval between two consecutive monthly recurring pattern
items. The range for this value is 1 to 99.

DaysOfWeek Describes which days of the week are in the relative monthly recurrence
(DayOfWeekType)
pattern.

DayOfWeekIndex
Describes which week is used in a relative monthly recurrence pattern.

Parent elements

Element Description

Recurrence (RecurrenceType)
Contains the recurrence pattern for calendar items and meeting
requests.
Element Description

Recurrence Contains recurrence information for recurring tasks.


(TaskRecurrenceType)

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
RelativeYearlyRecurrence
Article • 03/29/2023 • 2 minutes to read

The RelativeYearlyRecurrence element describes a relative yearly recurrence pattern.

XML

<RelativeYearlyRecurrence>

<DaysOfWeek/>

<DayOfWeekIndex/>

<Month/>

</RelativeYearlyRecurrence>

RelativeYearlyRecurrencePatternType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

DaysOfWeek Describes the days of the week that are used in item recurrence
(DayOfWeekType)
patterns.

DayOfWeekIndex
Describes which week in a month is used in a relative yearly
recurrence pattern.

Month (Item Recurrence)


Describes the month when a yearly recurring item occurs.

Parent elements

Element Description

Recurrence Contains recurrence information for recurring tasks.


(TaskRecurrenceType)

Element Description

Recurrence Contains the recurrence pattern for calendar items and meeting
(RecurrenceType)
requests.

Standard
Represents the date and time when the time changes from daylight
saving time to standard time.

Daylight
Represents the date and time when the time changes from standard
time to daylight saving time.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
RelevanceScore
Article • 03/29/2023 • 2 minutes to read

The RelevanceScore element specifies an integer that represents how relevant the
associated persona is to the client.

XML

<RelevanceScore></RelevanceScore>

integer

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Persona

Text value
The text value of the RelevanceScore element is the determination of how relevant a
persona is to the client. This element is read-only.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Reminder
Article • 03/29/2023 • 2 minutes to read

The Reminder element specifies a reminder for a task or a calendar item.

XML

<Reminder>

<Subject></Subject>

<Location></Location>

<ReminderTime></ReminderTime>

<StartDate></StartDate>

<EndDate></EndDate>

<ItemId></ItemId>

<RecurringMasterItemId></RecurringMasterItemId>

<ReminderGroup></ReminderGroup>

<UID></UID>

</Reminder>

ReminderType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Subject | Location | ReminderTime | StartDate | EndDate (ReminderType) | ItemId |
RecurringMasterItemId (ItemIdType) | ReminderGroup | UID

Parent elements
Reminders

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
Reminders

EWS XML elements in Exchange


ReminderDueBy
Article • 03/29/2023 • 2 minutes to read

The ReminderDueBy element represents the date and time when the event occurs. This
is used by the ReminderMinutesBeforeStart element to determine when the reminder is
displayed.

XML

<ReminderDueBy/>

DateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.
Element Description

MeetingResponse
Represents a meeting response in the Exchange store.

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

Text value
The text value represents the date and time when a reminder is due.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ReminderGroup
Article • 03/29/2023 • 2 minutes to read

The ReminderGroup element specifies whether the reminder is for a calendar item or a
task.

XML

<ReminderGroup> Calendar | Task </ReminderGroup>

ReminderGroupType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Reminder

Text value
The text value of the ReminderGroup element is the group type of the reminder. The
text value of Calendar specifies that the reminder is for a calendar item. The text value
of Task specifies that the reminder is for a task item.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
Reminder

EWS XML elements in Exchange


ReminderIsSet
Article • 03/29/2023 • 2 minutes to read

The ReminderIsSet element indicates whether a reminder has been set for an item in
the Exchange store.

XML

<ReminderIsSet/>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

Text value
A text value of true indicates that a reminder has been set.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


ReminderItemAction
Article • 03/29/2023 • 2 minutes to read

The ReminderItemAction element specifies the action for a reminder item.

XML

<ReminderItemAction>

<ActionType></ActionType>

<ItemId></ItemId>

<NewReminderTime></NewReminderTime>

</ReminderItemAction>

ReminderItemActionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ActionType (ReminderActionType) | ItemId | NewReminderTime

Parent elements
ReminderItemActions

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
ReminderItemActions

EWS XML elements in Exchange


ReminderItemActions
Article • 03/29/2023 • 2 minutes to read

The ReminderItemActions element specifies the actions for reminder items.

XML

<ReminderItemActions>

<ReminderItemAction></ReminderItemAction>

</ReminderItemActions>

NonEmptyArrayOfReminderItemActionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ReminderItemAction

Parent elements
PerformReminderAction

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
PerformReminderAction

EWS XML elements in Exchange


ReminderMessageData
Article • 03/29/2023 • 2 minutes to read

The ReminderMessageData element specifies the data in a reminder message.

XML

<ReminderMessageData>

<ReminderText></ReminderText>

<Location></Location>

<StartTime></StartTime>

<EndTime></EndTime>

<AssociatedCalendarItemId></AssociatedCalendarItemId>
</ReminderMessageData>

ReminderMessageDataType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ReminderText | Location | StartTime (ReminderMessageDataType) | EndTime
(ReminderMessageDataType) | AssociatedCalendarItemId

Parent elements
Message

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Versions of Exchange starting with build number 15.00.0913.09 can include the
AssociatedCalendarItemId element as a child element of the ReminderMessageData
element.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
Message

EWS XML elements in Exchange


ReminderMinutesBeforeStart
Article • 03/29/2023 • 2 minutes to read

The ReminderMinutesBeforeStart element represents the number of minutes before an


event occurs when a reminder is displayed.

XML

<ReminderMinutesBeforeStart/>

ReminderMinutesBeforeStartType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

Text value
The text value represents, in minutes, the time before an event occurs when a reminder
is displayed.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ReminderNextTime
Article • 03/29/2023 • 2 minutes to read

The ReminderNextTime element specifies the date and time for the next reminder.

XML

<ReminderNextTime></ReminderNextTime>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SearchPreviewItem | Item | Contact | Message | DistributionList | CalendarItem | PostItem
| Task

Text value
The text value for the ReminderNextTime element is the date and time of the next
scheduled reminder.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Reminders
Article • 03/29/2023 • 2 minutes to read

The Reminders element specifies the reminders returned in the response to a


GetReminders request.

XML

<Reminders>

<Reminder></Reminder>

</Reminders>

ArrayOfRemindersType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Reminder

Parent elements
GetRemindersResponse

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetRemindersResponse

EWS XML elements in Exchange


ReminderText
Article • 03/29/2023 • 2 minutes to read

The ReminderText element specifies the text of a reminder message.

XML

<ReminderText/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
ReminderMessageData

Text value
The text value of the ReminderText element is the text of a reminder message.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
ReminderMessageData

EWS XML elements in Exchange


ReminderTime
Article • 03/29/2023 • 2 minutes to read

The ReminderTime element specifies the time for the reminder to occur.

XML

<ReminderTime/>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Reminder

Text value
The text value of the ReminderTime element is the time for the reminder to occur.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
Reminder

EWS XML elements in Exchange


ReminderType
Article • 03/29/2023 • 2 minutes to read

The ReminderType element specifies the type of reminders to return.

XML

<ReminderType> All | Current | Old </ReminderType>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
GetReminders

Text value
The text value of the ReminderType element is the type of reminders to return, either
All, Current, or Old. All is the recommended value for this element. For more
information about the relationship between the ReminderType element and the
BeginTime and EndTime elements, see GetReminders operation.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetReminders

EWS XML elements in Exchange


RemoveContactFromImList
Article • 03/29/2023 • 2 minutes to read

The RemoveContactFromImList element represents a request to remove an instant


messaging contact from all instant messaging groups.

XML

<RemoveContactFromImList>

<ContactId/>

</RemoveContactFromImList>

RemoveContactFromImListType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ContactId

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
RemoveContactFromImListResponse
Article • 03/29/2023 • 2 minutes to read

The RemoveContactFromImListResponse element represents a response to a


RemoveContactFromImList request.

XML

<RemoveContactFromImListResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</RemoveContactFromImListResponse>

RemoveContactFromImListResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


RemoveDelegate
Article • 03/29/2023 • 2 minutes to read

The RemoveDelegate element defines a request to remove delegates from a mailbox.


This element was introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

XML

<RemoveDelegate>

<Mailbox/>

<UserIds/>

</RemoveDelegate>

RemoveDelegateType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Mailbox Identifies the principal's mailbox.

UserIds
Contains an array of delegate users to remove from a principal's mailbox. This element
was introduced in Exchange 2007 SP1.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
RemoveDelegate operation

EWS XML elements in Exchange


RemoveDelegateResponse
Article • 03/29/2023 • 2 minutes to read

The RemoveDelegateResponse element contains the status and result of a


RemoveDelegate operation request.

XML

<RemoveDelegateResponse>

<ResponseMessages/>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</RemoveDelegateResponse>

RemoveDelegateResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessages Contains the response messages for an Exchange


(ArrayOfDelegateUserResponseMessageType) Web Services delegate management request.

MessageText
Provides a text description of the status of the
response.

ResponseCode
Provides an error code that identifies the specific
error that the request encountered.

DescriptiveLinkKey
Currently unused and is reserved for future use. It
contains a value of 0.

MessageXml
Provides additional error response information.
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 2010 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
RemoveDelegate operation

EWS XML elements in Exchange


RemoveDistributionGroupFromImList
Article • 03/29/2023 • 2 minutes to read

The RemoveDistributionGroupFromImList element represents a request to remove a


specific instant messaging distribution list group.

XML

<RemoveDistributionGroupFromImList>

<GroupId/>

</RemoveDistributionGroupFromImList>

RemoveDistributionGroupFromImListType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
GroupId

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


RemoveDistributionGroupFromImListRe
sponse
Article • 03/29/2023 • 2 minutes to read

The RemoveDistributionGroupFromImListResponse element represents a response to a


RemoveDistributionGroupFromImList request.

XML

<RemoveDistributionGroupFromImListResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</RemoveDistributionGroupFromImListResponse>

RemoveDistributionGroupFromImListResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


RemoveImContactFromGroup
Article • 03/29/2023 • 2 minutes to read

The RemoveImContactFromGroup element defines a request to remove an instant


messaging contact from an instant messaging group.

XML

<RemoveImContactFromGroup>

<ContactId/>

<GroupId/>

</RemoveImContactFromGroup>

RemoveImContactFromGroupType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ContactId | GroupId

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
RemoveImContactFromGroupResponse
Article • 03/29/2023 • 2 minutes to read

The RemoveImContactFromGroupResponse element defines a response to a


RemoveImContactFromGroup request.

XML

<RemoveImContactFromGroupResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</RemoveImContactFromGroupResponse>

RemoveImContactFromGroupResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


RemoveImGroup
Article • 03/29/2023 • 2 minutes to read

The RemoveImGroup element represents a request to remove an instant messaging


group.

XML

<RemoveImGroup>

<GroupId/>

</RemoveImGroup>

RemoveImGroupType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
GroupId

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
RemoveImGroupResponse
Article • 03/29/2023 • 2 minutes to read

The RemoveImGroupResponse element represents a response to a RemoveImGroup


request.

XML

<RemoveImGroupResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</RemoveImGroupResponse>

RemoveImGroupResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


RemoveItem
Article • 03/29/2023 • 2 minutes to read

The RemoveItem element represents a response object that is used to remove a


meeting item when a MeetingCancellation message is received.

XML

<RemoveItem ObjectName="">

<ReferenceItemId/>

</RemoveItem>

RemoveItemType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ObjectName
Represents the name of the RemoveItem reply object class as an English string.

Child elements

Element Description

ReferenceItemId
Identifies the item to which the RemoveItem response object refers.

Parent elements

Element Description

Items Contains an array of items to create in the folder that is


(NonEmptyArrayOfAllItemsType) identified by the ParentFolderId (TargetFolderIdType) element.

ResponseObjects
Contains a collection of all the response objects that are
associated with an item in the Exchange store.
Remarks
RemoveItem is valid only for a MeetingCancellation. Otherwise, an error is thrown.

7 Note

The ItemClass for a meeting cancellation is IPM.Schedule.Meeting.Canceled.

To remove a MeetingRequest and the associated CalendarItem, use the DeclineItem


response object instead of RemoveItem.

RemoveItem is not supported for delegate access.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
RemoveOutlookRuleBlob
Article • 03/29/2023 • 2 minutes to read

The RemoveOutlookRuleBlob element indicates whether to remove the Microsoft


Outlook rule blob.

UpdateInboxRules

RemoveOutlookRuleBlob

XML

<RemoveOutlookRuleBlob>true | false</RemoveOutlookRuleBlob>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

UpdateInboxRules
Defines a request to update the Inbox rules in a mailbox in the server store.

Text value
A text value of true indicates that the Outlook rule blob should be removed. A text value
of false indicates that the Outlook rule blob should not be removed.
Remarks
Set this element to true to allow for an Inbox rule update.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
UpdateInboxRules operation

EWS XML elements in Exchange


ReplyAllAllowed
Article • 03/29/2023 • 2 minutes to read

The ReplyAllAllowed element specifies whether a reply all is allowed for rights managed
data.

XML

<ReplyAllAllowed> true | false </ReplyAllAllowed>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
RightsManagementLicenseData

Text value
A text value of true for the ReplyAllAllowed element indicates that a reply all is allowed
for the rights managed data. A value of false indicates that a reply all is not allowed.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
ReplyAllowed
Article • 03/29/2023 • 2 minutes to read

The ReplyAllowed element specifies whether a reply is allowed for rights managed data.

XML

<ReplyAllowed> true | false </ReplyAllowed>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
RightsManagementLicenseData

Text value
A text value of true for the ReplyAllowed element indicates that replies are allowed for
the rights managed data. A value of false indicates that replies are not allowed.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
ReplyAllToItem
Article • 03/29/2023 • 2 minutes to read

The ReplyToAllItem element contains a reply to the sender and all identified recipients of an item in the
Exchange store.

XML

<ReplyAllToItem>

<Subject/>

<Body/>

<ToRecipients/>

<CcRecipients/>

<BccRecipients/>

<IsReadReceiptRequested/>

<IsDeliveryReceiptRequested/>

<From/>

<ReferenceItemId/>

<NewBodyContent/>

<ReceivedBy/>

<ReceivedRepresenting/>

</ReplyAllToItem>

ReplyAllToItemType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Subject
Represents the subject property of Exchange store items.

Body
Represents the actual body content of a message.

ToRecipients
Contains a set of recipients of an item. These are the primary recipients of an item.

CcRecipients
Represents a collection of recipients that will receive a copy of the message.

BccRecipients
Represents a collection of recipients to receive a blind carbon copy (Bcc) of an e-mail message.

IsReadReceiptRequested
Indicates whether the sender of an item requests a read receipt.

IsDeliveryReceiptRequested Indicates whether the sender of an item requests a delivery receipt.

From
Represents the address from which the message was sent.

ReferenceItemId
Identifies the item to which the response object refers.

NewBodyContent
Represents the new body content of a message.
Element Description

ReceivedBy
Identifies the delegate in a delegate access scenario. This element was introduced in Microsoft
Exchange Server 2007 Service Pack 1 (SP1).

ReceivedRepresenting
Identifies the principal in a delegate access scenario. This element was introduced in Exchange
2007 SP1.

Parent elements

Element Description

AdjacentMeetings
Describes all items that are adjacent to a meeting time.

The following are some of the XPath expressions to this element:

/CalendarItem/AdjacentMeetings

/MeetingRequest/AdjacentMeetings

/SetItemField/CalendarItem/AdjacentMeetings

/AppendToItemField/CalendarItem/AdjacentMeetings

/AcceptItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/DeclineItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/TentativelyAcceptItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/SetItemField/CalendarItem/AdjacentMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/AppendToItemField/CalendarItem/AdjacentMeetings

/CreateAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/GetAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

ConflictingMeetings Describes all items that conflict with a meeting time.

The following are some of the XPath expressions to this element:

/CalendarItem/ConflictingMeetings

/MeetingRequest/ConflictingMeetings

/SetItemField/CalendarItem/ConflictingMeetings

/AppendToItemField/CalendarItem/ConflictingMeetings

/AcceptItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/DeclineItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/TentativelyAcceptItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/SetItemField/CalendarItem/ConflictingMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/AppendToItemField/CalendarItem/ConflictingMeetings
/CreateAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/GetAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

ResponseObjects
Contains a collection of all the response objects that are associated with an item in the Exchange
store.

Items Contains an array of items to create in the folder identified by the ParentFolderId
(NonEmptyArrayOfAllItemsType) (TargetFolderIdType) element.

Remarks
The From element should be set to the e-mail address of the principal if an item is a reply by a delegate. If the
delegate does not set the From property, the item will appear to have been sent directly from the delegate's
mailbox.

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.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ReplyBody
Article • 03/29/2023 • 2 minutes to read

The ReplyBody element contains an Out of Office (OOF) message and the language
used for the message.

XML

<ReplyBody xml:lang="">

<Message/>

</ReplyBody>

ReplyBody

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

xml:lang Specifies the language used in the ReplyBody contents. This attribute is optional. The
possible values of this attribute are defined by IETF RFC 3066.

Child elements

Element Description

Message (Availability)
Contains the out of office (OOF) response.

Parent elements

Element Description

OutOfOffice Defines the OOF response message and a duration time for sending the response
message for a mailbox.

Text value
None.

Remarks
This element is required.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ReplyTo
Article • 03/29/2023 • 2 minutes to read

The ReplyTo element identifies an array of addresses to which replies should be sent.

XML

<ReplyTo>

<Mailbox/>

</ReplyTo>

ArrayOfRecipientsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Mailbox Identifies a mail-enabled Active Directory directory service object to which a reply is
sent.

Parent elements

Element Description

RemoveItem
Removes an item from the Exchange store.

Message
Represents an Exchange e-mail message.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.


Element Description

AcceptItem
Represents an Accept reply to a meeting request.

TentativelyAcceptItem Represents a Tentative reply to a meeting request.

DeclineItem
Represents a Decline reply to a meeting request.

ReplyToItem
Contains a reply to the creator of an item in the Exchange store.

ReplyAllToItem
Contains a reply to all identified recipients of an item in the Exchange
store.

ForwardItem
Contains an Exchange store item to forward to recipients.

CancelCalendarItem
Represents the response object that is used to cancel a meeting.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ReplyToItem
Article • 03/29/2023 • 2 minutes to read

The ReplyToItem element contains a reply to the sender of an item in the Exchange store.

XML

<ReplyToItem>

<Subject/>

<Body/>

<ToRecipients/>

<CcRecipients/>

<BccRecipients/>

<IsReadReceiptRequested/>

<IsDeliveryReceiptRequested/>

<From/>

<ReferenceItemId/>

<NewBodyContent/>

<ReceivedBy/>

<ReceivedRepresenting/>

</ReplyToItem>

ReplyToItemType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Subject
Represents the subject property of Exchange store items.

Body
Represents the actual body content of a message.

ToRecipients
Contains an array of recipients of an item. These are the primary recipients of an item.

CcRecipients
Represents a collection of recipients that will receive a copy of the message.

BccRecipients
Represents a collection of recipients to receive a blind carbon copy (Bcc) of an e-mail message.

IsReadReceiptRequested
Indicates whether the sender of an item requests a read receipt.

IsDeliveryReceiptRequested Indicates whether the sender of an item requests a delivery receipt.

From
Represents the address from which the message was sent.

ReferenceItemId
Identifies the item to which the response object refers.

NewBodyContent
Represents the new body content of a message.

ReceivedBy
Identifies the delegate in a delegate access scenario. This element was introduced in Microsoft
Exchange Server 2007 Service Pack 1 (SP1).
Element Description

ReceivedRepresenting
Identifies the principal in a delegate access scenario. This element was introduced in Exchange
2007 SP1.

Parent elements

Element Description

AdjacentMeetings
Describes all items that are adjacent to a meeting time.

The following are some of the XPath expressions to this element:

/CalendarItem/AdjacentMeetings

/MeetingRequest/AdjacentMeetings

/SetItemField/CalendarItem/AdjacentMeetings

/AppendToItemField/CalendarItem/AdjacentMeetings

/AcceptItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/DeclineItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/TentativelyAcceptItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/SetItemField/CalendarItem/AdjacentMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/AppendToItemField/CalendarItem/AdjacentMeetings

/CreateAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/GetAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

ConflictingMeetings Describes all items that conflict with a meeting time.

The following are some of the XPath expressions to this element:

/CalendarItem/ConflictingMeetings

/MeetingRequest/ConflictingMeetings

/SetItemField/CalendarItem/ConflictingMeetings

/AppendToItemField/CalendarItem/ConflictingMeetings

/AcceptItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/DeclineItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/TentativelyAcceptItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/SetItemField/CalendarItem/ConflictingMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/AppendToItemField/CalendarItem/ConflictingMeetings
/CreateAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/GetAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

ResponseObjects
Contains a collection of all the response objects that are associated with an item in the Exchange
store.

Items Contains an array of items to create in the folder that is identified by the ParentFolderId
(NonEmptyArrayOfAllItemsType) (TargetFolderIdType) element.

Remarks
The From element should be set to the e-mail address of the principal if an item is a reply by a delegate. If the
delegate does not set the From property, the item will appear to have been sent directly from the delegate's
mailbox.

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.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ReportTemplate
Article • 03/29/2023 • 2 minutes to read

The ReportTemplate element represents the type of report to get.

XML

<ReportTemplate>Summary or RecipientPath</ReportTemplate>

MessageTrackingReportTemplateType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

GetMessageTrackingReport Contains the request for the GetMessageTrackingReport operation


to retrieve the full message tracking report for the specified ID.

Text value
The following table lists the possible values for the ReportTemplate element.

ReportTemplate element values

Value Description

Summary Specifies that the report will display all the recipients of the message and the
delivery status of the message to each recipient.
Value Description

RecipientPath Specifies that for a single recipient, the report will display a full history of the
events that occurred.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
RequestedConfiguration
Article • 03/29/2023 • 2 minutes to read

The RequestedConfiguration element contains the requested service configurations.

XML

<RequestedConfiguration>

<ConfigurationName/>
</RequestedConfiguration>

ArrayOfServiceConfigurationType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ConfigurationName
Specifies the requested service configurations by name.

Parent elements

Element Description

GetServiceConfiguration
Defines a GetServiceConfiguration request.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
RequestedExtensionIds
Article • 03/29/2023 • 2 minutes to read

The RequestedExtensionIds element contains an array of extension identifiers.

XML

<RequestedExtensionIds>

<String/>

</RequestedExtensionIds>

ArrayOfStringsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
String

Parent elements
GetClientExtension

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
RequestedView
Article • 03/29/2023 • 2 minutes to read

The RequestedView element defines the type of calendar information that a client
requests.

GetUserAvailabilityRequest

FreeBusyViewOptions

RequestedView

XML

<RequestedView>None or MergedOnly or FreeBusy or FreeBusyMerged or Detailed


or DetailedMerged</RequestedView>

FreeBusyViewType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

FreeBusyViewOptions
Specifies the type of free/busy information returned in the response.
The following is the XPath to this element:
/GetUserAvailabilityRequest/FreeBusyViewOptions

Text value
A text value is required. The following table lists the possible values for this element.

Value Description

None This value is not valid for requests. This value is valid for responses.

MergedOnly Represents an aggregated free/busy stream. In cross-forest scenarios in which


the target user in one forest does not have an Availability service configured,
the Availability service of the requestor retrieves the target user's free/busy
information from the free/busy public folder. Because public folders only store
free/busy information in merged form, MergedOnly is the only available
information.

FreeBusy Represents the legacy status information: free, busy, tentative, and OOF. This
also includes the start/end times of the appointments. This view is richer than
the legacy free/busy view because individual meeting start and end times are
provided instead of an aggregated free/busy stream.

FreeBusyMerged Represents all the properties in FreeBusy with a stream of merged free/busy
information.

Detailed Represents the legacy status information: free, busy, tentative, and OOF; the
start/end times of the appointments; and various properties of the
appointment such as subject, location, and importance. This requested view
will return the maximum amount of information for which the requesting user
is privileged. If merged free/busy information only is available, as with
requesting information for users in a Microsoft Exchange Server 2003 forest,
MergedOnly will be returned. Otherwise, FreeBusy or Detailed will be
returned.

DetailedMerged Represents all the properties in Detailed with a stream of merged free/busy
information. If merged free/busy information only is available, MergedOnly
will be returned. Otherwise, FreeBusyMerged or DetailedMerged will be
returned.

Remarks
The value set by this element is returned with the FreeBusyViewType element in the
response.

The following table shows what is returned for the different view types and the
corresponding MAPI property. Each view type builds upon the former view type.

Free/Busy View Type Properties MAPI Calendar Property

MergedOnly
MergedFreeBusyStream

FreeBusy
Classical status PropTag (0x80860003)
Free/Busy View Type Properties MAPI Calendar Property

FreeBusy
Working hours

FreeBusy
Start time PR_START_DATE

FreeBusy
End time PR_END_DATE

FreeBusyMerged
Classical status PropTag (0x80860003)

FreeBusyMerged
Working hours

FreeBusyMerged
Start time PR_START_DATE

FreeBusyMerged
End time PR_END_DATE

FreeBusyMerged
MergedFreeBusyStream

Detailed
Classical status PropTag (0x80860003)

Detailed
Working hours

Detailed
Start time PR_START_DATE

Detailed
End time PR_END_DATE

Detailed
Subject PR_SUBJECT

Detailed
Location PR_LOCATION

Detailed
Entry-Id(unless private)

Detailed
Private Flag

Detailed
IsMeeting

Detailed
IsRecurring

Detailed
IsException

Detailed
IsReminderSet

DetailedMerged
Classical status PropTag (0x80860003)

DetailedMerged
Working hours

DetailedMerged
Start time PR_START_DATE

DetailedMerged
End time PR_END_DATE

DetailedMerged
Subject PR_SUBJECT

DetailedMerged
Location PR_LOCATION
Free/Busy View Type Properties MAPI Calendar Property

DetailedMerged
Entry-Id(unless private)

DetailedMerged
Private Flag

DetailedMerged
MergedFreeBusyStream

DetailedMerged
IsMeeting

DetailedMerged
IsRecurring

DetailedMerged
IsException

DetailedMerged
IsReminderSet

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

Getting User Availability


RequestServerVersion
Article • 03/29/2023 • 2 minutes to read

The RequestServerVersion element contains the versioning information that identifies


the schema version to target for a request.

XML

<RequestServerVersion Version=""/>

ExchangeVersionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Version Describes the version to target for the request. This attribute is required when the
target server version is a version of Exchange starting with Exchange Server 2010.

Version attribute values

Value Description

Exchange2007 Target the schema files for the initial release version of Exchange 2007.

Exchange2007_SP1 Target the schema files for Exchange 2007 Service Pack 1 (SP1), Exchange
2007 Service Pack 2 (SP2), and Exchange 2007 Service Pack 3 (SP3).

Exchange2010 Target the schema files for Exchange 2010.

Exchange2010_SP1 Target the schema files for Exchange 2010 Service Pack 1 (SP1).

Exchange2010_SP2 Target the schema files for Exchange 2010 Service Pack 2 (SP2) and
Exchange 2010 Service Pack 3 (SP3).

Exchange2013 Target the schema files for Exchange 2013.

Exchange2013_SP1 Target the schema files for Exchange 2013 Service Pack 1 (SP1).
Child elements
None.

Parent elements
The RequestServerVersion element is located in the SOAP header.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Versioning Requests
RequestType
Article • 03/29/2023 • 2 minutes to read

The RequestType element identifies whether a proxy request is a cross-site or a cross-


forest request.

XML

<RequestType>CrossSite or CrossForest</RequestType>

AvailabilityProxyRequestType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
This element does not have a parent in the schema. This element is used in the SOAP
header. For more information about how this element is used, see the WSDL file.

Text value
A text value is required for this element. The following are the possible values:

CrossSite

CrossForest

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
RequiredAttendees
Article • 03/29/2023 • 2 minutes to read

The RequiredAttendees element represents attendees that are required to attend a


meeting.

XML

<RequiredAttendees>

<Attendee/>

</RequiredAttendees>

NonEmptyArrayOfAttendeesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Attendee
Represents attendees and resources for a meeting.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Resolution
Article • 03/29/2023 • 2 minutes to read

The Resolution element contains a single resolved entity.

ResolveNamesResponse

ResponseMessages

ResolveNamesResponseMessage

ResolutionSet

Resolution

XML

<Resolution>

<Mailbox/>

<Contact/>

</Resolution>

ResolutionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Mailbox
Identifies a mail-enabled Active Directory directory service object.

Contact
Represents an Exchange contact item.

Parent elements
Element Description

ResolutionSet
Contains an array of resolutions for an ambiguous name.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
ResolveNames

ResolveNamesResponse

ResolveNames operation
ResolutionSet
Article • 03/29/2023 • 2 minutes to read

The ResolutionSet element contains an array of resolutions for an ambiguous name.

ResolveNamesResponse

ResponseMessages

ResolveNamesResponseMessage

ResolutionSet

XML

<ResolutionSet IndexedPagingOffset="" NumeratorOffset=""


AbsoluteDenominator="" IncludesLastItemInRange="" TotalItemsInView="">

<Resolution/>

</ResolutionSet>

ArrayOfResolutionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

IndexedPagingOffset
Represents the next index that should be used for the next request
when you are using an indexed page view.

NumeratorOffset
Represents the new numerator value to use for the next request
when you are using fraction page views.

AbsoluteDenominator
Represents the next denominator to use for the next request when
you are using fraction page views.

IncludesLastItemInRange This attribute will be true if the current results contain the last item in
the query, so that additional paging is not needed.

TotalItemsInView
Represents the total number of items in the view.
Child elements

Element Description

Resolution
Contains a single resolved entity.

Parent elements

Element Description

ResolveNamesResponseMessage
Contains the status and result of a ResolveNames request.

Remarks
A ResolutionSet element can contain a maximum of 100 resolved entities.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
ResolveNames

ResolveNamesResponse

ResolveNames operation

EWS XML elements in Exchange


ResolveNames
Article • 03/29/2023 • 2 minutes to read

The ResolveNames element defines a request to resolve ambiguous names.

XML

<ResolveNames ReturnFullContactData="" SearchScope="" ContactDataShape="">

<ParentFolderIds/>

<UnresolvedEntry/>

</ResolveNames>

ResolveNamesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ReturnFullContactData Describes whether the full contact details for public contacts for a
resolved name are returned in the response. This attribute is required
for public contacts. This value does not affect private contacts and
private distribution lists, for which ItemId is always returned.

SearchScope
Identifies the order and scope for a ResolveNames search.

ContactDataShape Identifies the property set returned for contacts. This attribute was
introduced in Exchange Server 2010 Service Pack 2 (SP2).

ReturnFullContactData attribute values

Value Description

True Full contact details for public contacts are returned.

False Full contact details for public contacts are not returned.

SearchScope attribute values


Value Description

ActiveDirectory Only the Active Directory directory service is searched.

ActiveDirectoryContacts Active Directory is searched first, and then the contact folders that are
specified in the ParentFolderIds property are searched.

Contacts Only the contact folders that are identified by the ParentFolderIds
property are searched.

ContactsActiveDirectory Contact folders that are identified by the ParentFolderIds property are
searched first and then Active Directory is searched.

ContactDataShape attribute values

Value Description

IdOnly The contact item identifier property is returned.

Default The Default set of contact item properties is returned. For more information, see
Response shapes in EWS .

AllProperties The AllProperties set of contact item properties are returned. For more
information, see Response shapes in EWS .

Child elements

Element Description

ParentFolderIds
Contains an array of contact folder identifiers that would be searched if the
SearchScope attribute is set to ActiveDirectoryContacts, Contacts, or
ContactsActiveDirectory. The ParentFolderIds array can only contain a single
contact folder identifier. If the ParentFolderIds element is not present, the
default Contacts folder is searched.
The folder identifier can be used for delegate access.
Active Directory searches are performed by using access control lists (ACLs).
Some users might not have the rights to see some Active Directory objects.
This element is optional.

UnresolvedEntry Contains the name of a contact or distribution list to resolve.

Parent elements
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
ResolveNames operation

ResolveNamesType

ResolveNamesSearchScopeType

EWS XML elements in Exchange

Using Name Resolution


ResolveNamesResponse
Article • 03/29/2023 • 2 minutes to read

The ResolveNamesResponse element defines a response to a ResolveNames request.

XML

<ResolveNamesResponse>

<ResponseMessages/>

</ResolveNamesResponse>

ResolveNamesResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name messages schema

Validation file messages.xsd

Can be empty False

See also
ResolveNames

ResolveNamesResponseMessage

ResolveNames operation
ResolveNamesResponseMessage
Article • 03/29/2023 • 2 minutes to read

The ResolveNamesResponseMessage element contains the status and result of a


ResolveNames operation request.

ResolveNamesResponse
ResponseMessages
ResolveNamesResponseMessage

XML

<ResolveNamesResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<ResolutionSet/>

</ResolveNamesResponseMessage>

ResolveNamesResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of a ResolveNames operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass Attribute

Value Description
Value Description

Success
Describes a request that is fulfilled. This occurs when the requested name is
unambiguous and the response contains a single recipient.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are example of sources of warnings:

- The Exchange store goes offline during the batch.


- Active Directory Domain Services (AD DS) goes offline.
- Mailboxes are moved.
- The mailbox database (MDB) goes offline.
- A password is expired.
- A quota is exceeded.
- The requested name is ambiguous and the response contains multiple recipients.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- The requested name could not be resolved.


- Attributes or elements are invalid.
- Attributes or elements are out of range.
- A tag is unknown.
- An attribute or element is not valid in the context.
- An unauthorized access attempt by any client occurred.
- A server-side failure occurred in response to a valid client-side call.

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides error information about the request.

DescriptiveLinkKey
Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

ResolutionSet
Contains an array of resolutions for an ambiguous name.
Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
ResolveNames
ResolveNamesResponse
ResolveNames operation
Resources
Article • 03/29/2023 • 2 minutes to read

The Resources element represents a scheduled resource for a meeting.

XML

<Resources>

<Attendee/>

</Resources>

NonEmptyArrayOfAttendeesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Attendee
Represents attendees and resources for a meeting.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
ResponseCode
Article • 03/29/2023 • 62 minutes to read

The ResponseCode element provides status information about the request.

ResponseMessage
ResponseCode

XML

<ResponseCode/>

ResponseCodeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ResponseMessage Provides descriptive information about the response status. The


following are the possible XPath expressions to this element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/ResponseMessage
/GetUserAvailabilityResponse/SuggestionsResponse/ResponseMessage

/SetUserOofSettingsResponse/ResponseMessage

/GetUserOofSettingsResponse/ResponseMessage

DeleteItemResponseMessageContains the status and result of a single DeleteItem


operation request.

SendItemResponseMessageContains the status and result of a single SendItem


operation request.
Element Description

DeleteFolderResponseMessageContains the status and result of a single DeleteFolder


operation request.

DeleteAttachmentResponseMessageContains the status and result of a single


DeleteAttachment operation request.

UnsubscribeResponseMessageContains the status and result of a single Unsubscribe


operation request.

CreateFolderResponseMessageContains the status and result of a single CreateFolder


operation request.

GetFolderResponseMessageContains the status and result of a single GetFolder


operation request.

UpdateFolderResponseMessageContains the status and result of a single UpdateFolder


operation request.

MoveFolderResponseMessageContains the status and result of a single MoveFolder


operation request.

CopyFolderResponseMessageContains the status and result of a single CopyFolder


operationrequest.

CreateManagedFolderResponseMessageContains the status and result of a single


CreateManagedFolder operation request.

FindFolderResponseMessageContains the status and result of a single FindFolder


operation request.

CreateItemResponseMessageContains the status and result of a single CreateItem


operation request.

GetItemResponseMessageContains the status and result of a single GetItem operation


request.

UpdateItemResponseMessageContains the status and result of a single UpdateItem


operation request.

MoveItemResponseMessageContains the status and result of a single MoveItem


operation request.

CopyItemResponseMessageContains the status and result of a single CopyItem


operation request.

CreateAttachmentResponseMessageContains the status and result of a single


CreateAttachment operation request.

GetAttachmentResponseMessageContains the status and result of a single


GetAttachment operation request.
Element Description

FindItemResponseMessageContains the status and result of a single FindItem operation


request.

ResolveNamesResponseMessageContains the status and result of a ResolveNames


operation request.

ExpandDLResponseMessageContains the status and result of a single ExpandDL


operation request.

SubscribeResponseMessageContains the status and result of a single Subscribe


operation request.

GetEventsResponseMessageContains the status and result of a single GetEvents


operation request.

SendNotificationResponseMessageContains the status and result of a single


SendNotification operation request.

SyncFolderHierarchyResponseMessageContains the status and result of a


SyncFolderHierarchy operation request.

SyncFolderItemsResponseMessageContains the status and result of a SyncFolderItems


operation request.

ConvertIdResponseMessageContains the status and result of a ConvertId operation


request.

AddDelegateResponseContains the status and result of an AddDelegate operation


request.

GetDelegateResponseContains the status and result of a GetDelegate operation request.

RemoveDelegateResponseContains the status and result of a RemoveDelegate operation


request.

UpdateDelegateResponseContains the status and result of an UpdateDelegate operation


request.

GetServerTimeZonesResponseMessageContains the status and result of a


GetServerTimeZones operation request.

GetSharingFolderResponseMessageContains the status and result of a GetSharingFolder


operation request.

GetSharingFolderResponseDefines a response to a GetSharingFolder operation request.

GetSharingMetadataResponseMessageContains the status and result of a


GetSharingMetadata operation request.
Element Description

GetSharingMetadataResponseDefines a response to a GetSharingMetadata operation


request.

RefreshSharingFolderResponseMessageContains the status and result of a


RefreshSharingFolder operation request.

RefreshSharingFolderResponseDefines a response to a RefreshSharingFolder operation


request.

FindConversationResponseContains the status and results of a FindConversation


operation response.

ApplyConversationActionResponseMessageContains the status and results of an


ApplyConversationAction operation request.

EmptyFolderResponseMessageContains the status and result of a single EmptyFolder


operation request.

UpdateInboxRulesResponseContains a status and result of an UpdateInboxRules


operation request.

UploadItemsResponseMessageContains a status and result of an UploadItems operation


request.

GetInboxRulesResponseContains a response to a GetInboxRules operation **** request.

GetServiceConfigurationResponseContains a response to a GetServiceConfiguration


operation request.

ServiceConfigurationResponseMessageTypeContains service configuration settings.

Text value
A text value is required if this element is used. The following table describes the values
that are returned with this element.

Value Description

NoError No error occurred for the request.

ErrorAccessDenied This error occurs when the calling account


does not have the rights to perform the
requested action.

ErrorAccessModeSpecified This error is for internal use only. This error is


not returned.
Value Description

ErrorAccountDisabled This error occurs when the account in


question has been disabled.

ErrorAddDelegatesFailed This error occurs when a list with added


delegates cannot be saved.

ErrorAddressSpaceNotFound This error occurs when the address space


record, or Domain Name System (DNS)
domain name, for cross-forest availability
could not be found in the Active Directory
database.

ErrorADOperation This error occurs when the operation failed


because of communication problems with
Active Directory Domain Services (AD DS).

ErrorADSessionFilter This error is returned when a ResolveNames


operation request specifies a name that is not
valid.

ErrorADUnavailable This error occurs when AD DS is unavailable.


Try your request again later.

ErrorAffectedTaskOccurrencesRequired This error indicates that the


AffectedTaskOccurrences attribute was not
specified. When the DeleteItem element is
used to delete at least one item that is a task,
and regardless of whether that task is
recurring or not, the
AffectedTaskOccurrences attribute has to be
specified so that DeleteItem can determine
whether to delete the current occurrence or
the entire series.

ErrorArchiveFolderPathCreation Indicates an error in archive folder path


creation.

ErrorArchiveMailboxNotEnabled Indicates that the archive mailbox was not


enabled.

ErrorArchiveMailboxServiceDiscoveryFailed Indicates that archive mailbox service


discovery failed.

ErrorAttachmentNestLevelLimitExceeded Specifies that an attempt was made to create


an item with more than 10 nested
attachments. This value was introduced in
Exchange Server 2010 Service Pack 2 (SP2).
Value Description

ErrorAttachmentSizeLimitExceeded The CreateAttachment element returns this


error if an attempt is made to create an
attachment with size exceeding
Int32.MaxValue, in bytes. The GetAttachment
element returns this error if an attempt to
retrieve an existing attachment with size
exceeding Int32.MaxValue, in bytes.

ErrorAutoDiscoverFailed This error indicates that Exchange Web


Services tried to determine the location of a
cross-forest computer that is running
Exchange 2010 that has the Client Access
server role installed by using the Autodiscover
service, but the call to the Autodiscover
service failed.

ErrorAvailabilityConfigNotFound This error indicates that the availability


configuration information for the local forest
is missing from AD DS.

ErrorBatchProcessingStopped This error indicates that an exception


occurred while processing an item and that
exception is likely to occur for the items that
follow. Requests may include multiple items;
for example, a GetItem operation request
might include multiple identifiers. In general,
items are processed one at a time. If an
exception occurs while processing an item
and that exception is likely to occur for the
items that follow, items that follow will not be
processed. The following are examples of
errors that will stop processing for items that
follow:

- ErrorAccessDenied

- ErrorAccountDisabled

- ErrorADUnavailable

- ErrorADOperation

- ErrorConnectionFailed

- ErrorMailboxStoreUnavailable

- ErrorMailboxMoveInProgress

- ErrorPasswordChangeRequired

- ErrorPasswordExpired

- ErrorQuotaExceeded

- ErrorInsufficientResources

ErrorCalendarCannotMoveOrCopyOccurrence This error occurs when an attempt is made to


move or copy an occurrence of a recurring
calendar item.
Value Description

ErrorCalendarCannotUpdateDeletedItem This error occurs when an attempt is made to


update a calendar item that is located in the
Deleted Items folder and when meeting
updates or cancellations are to be sent
according to the value of the
SendMeetingInvitationsOrCancellations
attribute. The following are the possible
values for this attribute:

- SendToAllAndSaveCopy

- SendToChangedAndSaveCopy

- SendOnlyToAll

- SendOnlyToChanged

However, such an update is allowed only


when the value of this attribute is set to
SendToNone.

ErrorCalendarCannotUseIdForOccurrenceId This error occurs when the UpdateItem,


GetItem, DeleteItem, MoveItem, CopyItem, or
SendItem operation is called and the ID that
was specified is not an occurrence ID of any
recurring calendar item.

ErrorCalendarCannotUseIdForRecurringMasterId This error occurs when the UpdateItem,


GetItem, DeleteItem, MoveItem, CopyItem,
or SendItem operation is called and the ID
that was specified is not an ID of any
recurring master item.

ErrorCalendarDurationIsTooLong This error occurs during a CreateItem or


UpdateItem operation when a calendar item
duration is longer than the maximum allowed,
which is currently 5 years.

ErrorCalendarEndDateIsEarlierThanStartDate This error occurs when a calendar End time is


set to the same time or after the Start time.

ErrorCalendarFolderIsInvalidForCalendarView This error occurs when the specified folder for


a FindItem operation with a CalendarView
element is not of calendar folder type.

ErrorCalendarInvalidAttributeValue This response code is not used.

ErrorCalendarInvalidDayForTimeChangePattern This error occurs during a CreateItem or


UpdateItem operation when invalid values of
Day, WeekendDay, and Weekday are used to
define the time change pattern.
Value Description

ErrorCalendarInvalidDayForWeeklyRecurrence This error occurs during a CreateItem or


UpdateItem operation when invalid values of
Day, WeekDay, and WeekendDay are used to
specify the weekly recurrence.

ErrorCalendarInvalidPropertyState This error occurs when the state of a calendar


item recurrence binary large object (BLOB) in
the Exchange store is invalid.

ErrorCalendarInvalidPropertyValue This response code is not used.

ErrorCalendarInvalidRecurrence This error occurs when the specified


recurrence cannot be created.

ErrorCalendarInvalidTimeZone This error occurs when an invalid time zone is


encountered.

ErrorCalendarIsCancelledForAccept This error Indicates that a calendar item has


been canceled.

ErrorCalendarIsCancelledForDecline This error indicates that a calendar item has


been canceled.

ErrorCalendarIsCancelledForRemove This error indicates that a calendar item has


been canceled.

ErrorCalendarIsCancelledForTentative This error indicates that a calendar item has


been canceled.

ErrorCalendarIsDelegatedForAccept This error indicates that the AcceptItem


element is invalid for a calendar item or
meeting request in a delegated scenario.

ErrorCalendarIsDelegatedForDecline This error indicates that the DeclineItem


element is invalid for a calendar item or
meeting request in a delegated scenario.

ErrorCalendarIsDelegatedForRemove This error indicates that the RemoveItem


element is invalid for a meeting cancellation
in a delegated scenario.

ErrorCalendarIsDelegatedForTentative This error indicates that the


TentativelyAcceptItem element is invalid for a
calendar item or meeting request in a
delegated scenario.
Value Description

ErrorCalendarIsNotOrganizer This error indicates that the operation


(currently CancelItem) on the calendar item is
not valid for an attendee. Only the meeting
organizer can cancel the meeting.

ErrorCalendarIsOrganizerForAccept This error indicates that AcceptItem is invalid


for the organizer's calendar item.

ErrorCalendarIsOrganizerForDecline This error indicates that DeclineItem is invalid


for the organizer's calendar item.

ErrorCalendarIsOrganizerForRemove This error indicates that RemoveItem is invalid


for the organizer's calendar item. To remove a
meeting from the calendar, the organizer
must use CancelCalendarItem.

ErrorCalendarIsOrganizerForTentative This error indicates that TentativelyAcceptItem


is invalid for the organizer's calendar item.

ErrorCalendarMeetingRequestIsOutOfDate This error indicates that a meeting request is


out-of-date and cannot be updated.

ErrorCalendarOccurrenceIndexIsOutOfRecurrenceRange This error indicates that the occurrence index


does not point to an occurrence within the
current recurrence. For example, if your
recurrence pattern defines a set of three
meeting occurrences and you try to access
the fifth occurrence, this response code will
result.

ErrorCalendarOccurrenceIsDeletedFromRecurrence This error indicates that any operation on a


deleted occurrence (addressed via recurring
master ID and occurrence index) is invalid.

ErrorCalendarOutOfRange This error is reported on CreateItem and


UpdateItem operations for calendar items or
task recurrence properties when the property
value is out of range. For example, specifying
the fifteenth week of the month will result in
this response code.

ErrorCalendarViewRangeTooBig This error occurs when Start to End range for


the CalendarView element is more than the
maximum allowed, currently 2 years.

ErrorCallerIsInvalidADAccount This error indicates that the requesting


account is not a valid account in the directory
database.
Value Description

ErrorCannotArchiveCalendarContactTaskFolderException Indicates that an attempt was made to archive


a calendar contact task folder.

ErrorCannotArchiveItemsInPublicFolders Indicates that an attempt was made to archive


items in public folders.

ErrorCannotArchiveItemsInArchiveMailbox Indicates that attempt was made to archive


items in the archive mailbox.

ErrorCannotCreateCalendarItemInNonCalendarFolder This error occurs when a calendar item is


being created and the SavedItemFolderId
attribute refers to a non-calendar folder.

ErrorCannotCreateContactInNonContactFolder This error occurs when a contact is being


created and the SavedItemFolderId attribute
refers to a non-contact folder.

ErrorCannotCreatePostItemInNonMailFolder This error indicates that a post item cannot be


created in a folder other than a mail folder,
such as Calendar, Contact, Tasks, Notes, and
so on.

ErrorCannotCreateTaskInNonTaskFolder This error occurs when a task is being created


and the SavedItemFolderId attribute refers to
a non-task folder.

ErrorCannotDeleteObject This error occurs when the item or folder to


delete cannot be deleted.

ErrorCannotDeleteTaskOccurrence The DeleteItem operation returns this error


when it fails to delete the current occurrence
of a recurring task. This can only happen if the
AffectedTaskOccurrences attribute has been
set to SpecifiedOccurrenceOnly.

ErrorCannotDisableMandatoryExtension Indicates that an attempt was made to disable


a mandatorty extension.

ErrorCannotEmptyFolder This error must be returned when the server


cannot empty a folder.

ErrorCannotGetSourceFolderPath Indicates that the source folder path could


not be retrieved.

ErrorCannotGetExternalEcpUrl Specifies that the server could not retrieve the


external URL for Outlook Web App Options.
Value Description

ErrorCannotOpenFileAttachment The GetAttachment operation returns this


error if it cannot retrieve the body of a file
attachment.

ErrorCannotSetCalendarPermissionOnNonCalendarFolder This error indicates that the caller tried to set


calendar permissions on a non-calendar
folder.

ErrorCannotSetNonCalendarPermissionOnCalendarFolder This error indicates that the caller tried to set


non-calendar permissions on a calendar
folder.

ErrorCannotSetPermissionUnknownEntries This error indicates that you cannot set


unknown permissions in a permissions set.

ErrorCannotSpecifySearchFolderAsSourceFolder Indicates that an attempt was made to specify


the search folder as the source folder.

ErrorCannotUseFolderIdForItemId This error occurs when a request that requires


an item identifier is given a folder identifier.

ErrorCannotUseItemIdForFolderId This error occurs when a request that requires


a folder identifier is given an item identifier.

ErrorChangeKeyRequired This response code has been replaced by


ErrorChangeKeyRequiredForWriteOperations

ErrorChangeKeyRequiredForWriteOperations This error is returned when the change key for


an item is missing or stale. For SendItem,
UpdateItem, and UpdateFolder operations,
the caller must pass in a correct and current
change key for the item. Note that this is the
case with UpdateItem even when conflict
resolution is set to always overwrite.

ErrorClientDisconnected Specifies that the client was disconnected.

ErrorClientIntentInvalidStateDefinition This error is intended for internal use only.

ErrorClientIntentNotFound This error is intended for internal use only.

ErrorConnectionFailed This error occurs when Exchange Web


Services cannot connect to the mailbox.

ErrorContainsFilterWrongType This error indicates that the property that was


inspected for a Contains filter is not a string
type.
Value Description

ErrorContentConversionFailed The GetItem operation returns this error


when Exchange Web Services is unable to
retrieve the MIME content for the item
requested. The CreateItem operation returns
this error when Exchange Web Services is
unable to create the item from the supplied
MIME content. Usually this is an indication
that the item property is corrupted or
truncated.

ErrorContentIndexingNotEnabled This error occurs when a search request is


made using the QueryString option and
content indexing is not enabled for the target
mailbox.

ErrorCorruptData This error occurs when the data is corrupted


and cannot be processed.

ErrorCreateItemAccessDenied This error occurs when the caller does not


have permission to create the item.

ErrorCreateManagedFolderPartialCompletion This error occurs when one or more of the


managed folders that were specified in the
CreateManagedFolder operation request
failed to be created. Search for each folder to
determine which folders were created and
which folders do not exist.

ErrorCreateSubfolderAccessDenied This error occurs when the calling account


does not have the permissions required to
create the subfolder.

ErrorCrossMailboxMoveCopy This error occurs when an attempt is made to


move an item or folder from one mailbox to
another. If the source mailbox and destination
mailbox are different, you will get this error.

ErrorCrossSiteRequest This error indicates that the request is not


allowed because the Client Access server that
should service the request is in a different
site.
Value Description

ErrorDataSizeLimitExceeded This error can occur in the following


scenarios:

- An attempt is made to access or write a


property on an item and the property value is
too large.

- The base64 encoded MIME content length


within the request XML exceeds the limit.

- The size of the body of an existing item


body exceeds the limit.

- The consumer tries to set an HTML or text


body whose length (or combined length in
the case of append) exceeds the limit.

ErrorDataSourceOperation This error occurs when the underlying data


provider fails to complete the operation.

ErrorDelegateAlreadyExists This error occurs in an AddDelegate


operation when the specified user already
exists in the list of delegates.

ErrorDelegateCannotAddOwner This error occurs in an AddDelegate


operation when the specified user to be
added is the owner of the mailbox.

ErrorDelegateMissingConfiguration This error occurs in a GetDelegate operation


when either there is no delegate information
on the local FreeBusy message or no Active
Directory public delegate (no "public
delegate" or no "Send On Behalf" entry in AD
DS).

ErrorDelegateNoUser This error occurs when a specified user cannot


be mapped to a user in AD DS.

ErrorDelegateValidationFailed This error occurs in the AddDelegate


operation when an added delegate user is not
valid.

ErrorDeleteDistinguishedFolder This error occurs when an attempt is made to


delete a distinguished folder.

ErrorDeleteItemsFailed This response code is not used.

ErrorDeleteUnifiedMessagingPromptFailed This error is intended for internal use only.

ErrorDistinguishedUserNotSupported This error indicates that a distinguished user


ID is not valid for the operation.
DistinguishedUserType should not be
present in the request.
Value Description

ErrorDistributionListMemberNotExist This error indicates that a request distribution


list member does not exist in the distribution
list.

ErrorDuplicateInputFolderNames This error occurs when duplicate folder names


are specified within the FolderNames element
of the CreateManagedFolder operation
request.

ErrorDuplicateSOAPHeader This error indicates that there are duplicate


SOAP headers.

ErrorDuplicateUserIdsSpecified This error indicates that a duplicate user ID


has been found in a permission set, either
Default or Anonymous are set more than
once, or there are duplicate SIDs or recipients.

ErrorEmailAddressMismatch This error occurs when a request attempts to


create/update the search parameters of a
search folder. For example, this can occur
when a search folder is created in the mailbox
but the search folder is directed to look in
another mailbox.

ErrorEventNotFound This error occurs when the event that is


associated with a watermark is deleted before
the event is returned. When this error is
returned, the subscription is also deleted.

ErrorExceededConnectionCount This error -iIndicates that there are more


concurrent requests against the server than
are allowed by a user's policy.

ErrorExceededSubscriptionCount This error indicates that a user's throttling


policy maximum subscription count has been
exceeded.

ErrorExceededFindCountLimit This error indicates that a search operation


call has exceeded the total number of items
that can be returned.

ErrorExpiredSubscription This error occurs if the GetEvents operation is


called as a subscription is being deleted
because it has expired.

ErrorExtensionNotFound Indicates that the extension was not found.

ErrorFolderCorrupt This error occurs when the folder is corrupted


and cannot be saved.
Value Description

ErrorFolderExists This error occurs when an attempt is made to


create a folder that has the same name as
another folder in the same parent. Duplicate
folder names are not allowed.

ErrorFolderNotFound This error indicates that the folder ID that was


specified does not correspond to a valid
folder, or that the delegate does not have
permission to access the folder.

ErrorFolderPropertRequestFailed This error indicates that the requested


property could not be retrieved. This does not
indicate that the property does not exist, but
that the property was corrupted in some way
so that the retrieval failed.

ErrorFolderSave This error indicates that the folder could not


be created or updated because of an invalid
state.

ErrorFolderSaveFailed This error indicates that the folder could not


be created or updated because of an invalid
state.

ErrorFolderSavePropertyError This error indicates that the folder could not


be created or updated because of invalid
property values. The response code lists
which properties caused the problem.

ErrorFreeBusyDLLimitReached This error indicates that the maximum group


member count has been reached for
obtaining free/busy information for a
distribution list.

ErrorFreeBusyGenerationFailed This error is returned when free/busy


information cannot be retrieved because of
an intervening failure.

ErrorGetServerSecurityDescriptorFailed This response code is not used.

ErrorImContactLimitReached This error is returned when new instant


messaging (IM) contacts cannot be added
because the maximum number of contacts
has been reached. This error was introduced
in Exchange Server 2013.
Value Description

ErrorImGroupDisplayNameAlreadyExists This error is returned when an attempt is


made to add a group display name when an
existing group already has the same display
name. This error was introduced in Exchange
2013.

ErrorImGroupLimitReached This error is returned when new IM groups


cannot be added because the maximum
number of groups has been reached. This
error was introduced in Exchange 2013.

ErrorImpersonateUserDenied The error is returned in the server-to-server


authorization case for Exchange
Impersonation when the caller does not have
the proper rights to impersonate the specific
user in question. This error maps to the ms-
Exch-EPI-May-Impersonate extended Active
Directory right.

ErrorImpersonationDenied This error is returned in the server-to-server


authorization for Exchange Impersonation
when the caller does not have the proper
rights to impersonate through the Client
Access server that they are making the
request against. This maps to the ms-Exch-
EPI-Impersonation extended Active Directory
right.

ErrorImpersonationFailed This error indicates that there was an


unexpected error when an attempt was made
to perform server-to-server authentication.
This response code typically indicates either
that the service account that is running the
Exchange Web Services application pool is
configured incorrectly, that Exchange Web
Services cannot talk to the directory, or that a
trust between forests is not correctly
configured.

ErrorIncorrectSchemaVersion This error indicates that the request was valid


for the current Exchange Server version but
was invalid for the request server version that
was specified.

ErrorIncorrectUpdatePropertyCount This error indicates that each change


description in the UpdateItem or
UpdateFolder elements must list only one
property to update.
Value Description

ErrorIndividualMailboxLimitReached This error occurs when the request contains


too many attendees to resolve. By default, the
maximum number of attendees to resolve is
100.

ErrorInsufficientResources This error occurs when the mailbox server is


overloaded. Try your request again later.

ErrorInternalServerError This error indicates that Exchange Web


Services encountered an error that it could
not recover from, and a more specific
response code that is associated with the
error that occurred does not exist.

ErrorInternalServerTransientError This error indicates that an internal server


error occurred and that you should try your
request again later.

ErrorInvalidAccessLevel This error indicates that the level of access


that the caller has on the free/busy data is
invalid.

ErrorInvalidArgument This error indicates an error caused by all


invalid arguments passed to the
GetMessageTrackingReport operation. This
error is returned in the following scenarios:

- The user specified in the sending-as


parameter does not exist in the directory.

- The user specified in the sending-as


parameter is not unique in the directory.

- The sending-as address is empty.

- The sending-as address is not a valid e-mail


address.

ErrorInvalidAttachmentId This error is returned by the GetAttachment


operation or the DeleteAttachment operation
when an attachment that corresponds to the
specified ID is not found.
Value Description

ErrorInvalidAttachmentSubfilter This error occurs when you try to bind to an


existing search folder by using a complex
attachment table restriction. Exchange Web
Services only supports simple contains filters
against the attachment table. If you try to
bind to an existing search folder that has a
more complex attachment table restriction (a
subfilter), Exchange Web Services cannot
render the XML for that filter and returns this
response code.

Note that you can still call the GetFolder


operation on the folder, but do not request
the SearchParameters element.

ErrorInvalidAttachmentSubfilterTextFilter This error occurs when you try to bind to an


existing search folder by using a complex
attachment table restriction. Exchange Web
Services only supports simple contains filters
against the attachment table.

If you try to bind to an existing search folder


that has a more complex attachment table
restriction, Exchange Web Services cannot
render the XML for that filter. In this case, the
attachment subfilter contains a text filter, but
it is not looking at the attachment display
name.

Note that you can still call the GetFolder


operation on the folder, but do not request
the SearchParameters element.

ErrorInvalidAuthorizationContext This error indicates that the authorization


procedure for the requestor failed.

ErrorInvalidChangeKey This error occurs when a consumer passes in


a folder or item identifier with a change key
that cannot be parsed. For example, this
could be invalid base64 content or an empty
string.

ErrorInvalidClientSecurityContext This error indicates that there was an internal


error when an attempt was made to resolve
the identity of the caller.
Value Description

ErrorInvalidCompleteDate This error is returned when an attempt is


made to set the CompleteDate element value
of a task to a time in the future. When it is
converted to the local time of the Client
Access server, the CompleteDate of a task
cannot be set to a value that is later than the
local time on the Client Access server.

ErrorInvalidContactEmailAddress This error indicates that an invalid e-mail


address was provided for a contact.

ErrorInvalidContactEmailIndex This error indicates that an invalid e-mail


index value was provided for an e-mail entry.

ErrorInvalidCrossForestCredentials This error occurs when the credentials that


are used to proxy a request to a different
directory service forest fail authentication.

ErrorInvalidDelegatePermission This error indicates that the specified folder


permissions are invalid.

ErrorInvalidDelegateUserId This error indicates that the specified


delegate user ID is invalid.

ErrorInvalidExchangeImpersonationHeaderData This error occurs during Exchange


Impersonation when a caller does not specify
a UPN, an e-mail address, or a user SID. This
will also occur if the caller specifies one or
more of those and the values are empty.

ErrorInvalidExcludesRestriction This error occurs when the bitmask that was


passed into an Excludes element restriction is
unable to be parsed.

ErrorInvalidExpressionTypeForSubFilter This response code is not used.

ErrorInvalidExtendedProperty This error occurs when the following events


take place:

- The caller tries to use an extended property


that is not supported by Exchange Web
Services.

- The caller passes in an invalid combination


of attribute values for an extended property.
This also occurs if no attributes are passed.
Only certain combinations are allowed.
Value Description

ErrorInvalidExtendedPropertyValue This error occurs when the value section of an


extended property does not match the type
of the property.

For example, setting an extended property


that has PropertyType="String" to an array of
integers will result in this error. Any string
representation that is not coercible into the
type that is specified for the extended
property will give this error.

ErrorInvalidExternalSharingInitiator This error indicates that the sharing invitation


sender did not create the sharing invitation
metadata.

ErrorInvalidExternalSharingSubscriber This error indicates that a sharing message is


not intended for the caller.

ErrorInvalidFederatedOrganizationId This error indicates that the requestor's


organization federation objects are not
correctly configured.

ErrorInvalidFolderId This error occurs when the folder ID is


corrupt.

ErrorInvalidFolderTypeForOperation This error indicates that the specified folder


type is invalid for the current operation. For
example, you cannot create a Search folder in
a public folder.

ErrorInvalidFractionalPagingParameters This error occurs in fractional paging when


the user has specified one of the following:

- A numerator that is greater than the


denominator

- A numerator that is less than zero

- A denominator that is less than or equal to


zero.

ErrorInvalidGetSharingFolderRequest This error indicates that the DataType and


ShareFolderId elements are both present in a
request.

ErrorInvalidFreeBusyViewType This error occurs when the GetUserAvailability


operation is called with a FreeBusyViewType
of None.

ErrorInvalidId This error indicates that the ID and/or change


key is malformed.
Value Description

ErrorInvalidIdEmpty This error occurs when the caller specifies an


Id attribute that is empty.

ErrorInvalidLikeRequest This error occurs when the item can't be liked.


Versions of Exchange starting with build
number 15.00.0913.09 include this value.

ErrorInvalidIdMalformed This error occurs when the caller specifies an


Id attribute that is malformed.

ErrorInvalidIdMalformedEwsLegacyIdFormat This error indicates that a folder or item ID


that is using the Exchange 2007 format was
specified for a request with a version of
Exchange 2007 SP1 or later. You cannot use
Exchange 2007 IDs in Exchange 2007 SP1 or
later requests. You have to use the ConvertId
operation to convert them first.

ErrorInvalidIdMonikerTooLong This error occurs when the caller specifies an


Id attribute that is too long.

ErrorInvalidIdNotAnItemAttachmentId This error is returned whenever an ID that is


not an item attachment ID is passed to a Web
service method that expects an attachment
ID.

ErrorInvalidIdReturnedByResolveNames This error occurs when a contact in your


mailbox is corrupt.

ErrorInvalidIdStoreObjectIdTooLong This error occurs when the caller specifies an


Id attribute that is too long.

ErrorInvalidIdTooManyAttachmentLevels This error is returned when the attachment


hierarchy on an item exceeds the maximum of
255 levels deep.

ErrorInvalidIdXml This response code is not used.

ErrorInvalidImContactId This error is returned when the specified IM


contact identifier does not represent a valid
identifier. This error was introduced in
Exchange 2013.

ErrorInvalidImDistributionGroupSmtpAddress This error is returned when the specified IM


distribution group SMTP address identifier
does not represent a valid identifier. This error
was introduced in Exchange 2013.
Value Description

ErrorInvalidImGroupId This error is returned when the specified IM


group identifier does not represent a valid
identifier. This error was introduced in
Exchange 2013.

ErrorInvalidIndexedPagingParameters This error occurs if the offset for indexed


paging is negative.

ErrorInvalidInternetHeaderChildNodes This response code is not used.

ErrorInvalidItemForOperationArchiveItem Indicates that the item was invalid for an


ArchiveItem operation.

ErrorInvalidItemForOperationAcceptItem This error occurs when an attempt is made to


use an AcceptItem response object for an
item type other than a meeting request or a
calendar item, or when an attempt is made to
accept a calendar item occurrence that is in
the Deleted Items folder.

ErrorInvalidItemForOperationCancelItem This error occurs when an attempt is made to


use a CancelItem response object on an item
type other than a calendar item.

ErrorInvalidItemForOperationCreateItemAttachment This error is returned when an attempt is


made to create an item attachment of an
unsupported type. Supported item types for
item attachments include the following
objects:

- Item

- Message

- CalendarItem

- Task

- Contact

For example, if you try to create a


MeetingMessage attachment, you'll
encounter this response code.
Value Description

ErrorInvalidItemForOperationCreateItem This error is returned from a CreateItem


operation if the request contains an
unsupported item type.

Supported items include the following


objects:

- Item

- Message

- CalendarItem

- Task

- Contact

Certain types are created as a side effect of


doing something else. Meeting messages, for
example, are created when you send a
calendar item to attendees; they are not
explicitly created.

ErrorInvalidItemForOperationDeclineItem This error occurs when an attempt is made to


use a DeclineItem response object for an item
type other than a meeting request or a
calendar item, or when an attempt is made to
decline a calendar item occurrence that is in
the Deleted Items folder.

ErrorInvalidItemForOperationExpandDL This error indicates that the ExpandDL


operation is valid only for private distribution
lists.

ErrorInvalidItemForOperationRemoveItem This error is returned from a RemoveItem


response object if the request specifies an
item that is not a meeting cancellation item.

ErrorInvalidItemForOperationSendItem This error is returned from a SendItem


operation if the request specifies an item that
is not a message item.

ErrorInvalidItemForOperationTentative This error occurs when an attempt is made to


use TentativelyAcceptItem for an item type
other than a meeting request or a calendar
item, or when an attempt is made to
tentatively accept a calendar item occurrence
that is in the Deleted Items folder.

ErrorInvalidLogonType This error is for internal use only. This error is


not returned.
Value Description

ErrorInvalidMailbox This error indicates that the CreateItem


operation or the UpdateItem operation failed
while creating or updating a personal
distribution list.

ErrorInvalidManagedFolderProperty This error occurs when the structure of the


managed folder is corrupted and cannot be
rendered.

ErrorInvalidManagedFolderQuota This error occurs when the quota that is set


on the managed folder is less than zero,
which indicates a corrupted managed folder.

ErrorInvalidManagedFolderSize This error occurs when the size that is set on


the managed folder is less than zero, which
indicates a corrupted managed folder.

ErrorInvalidMergedFreeBusyInterval This error occurs when the supplied merged


free/busy internal value is invalid. The default
minimum value is 5 minutes. The default
maximum value is 1440 minutes.

ErrorInvalidNameForNameResolution This error occurs when the name is invalid for


the ResolveNames operation. For example, a
zero length string, a single space, a comma,
and a dash are all invalid names.

ErrorInvalidNetworkServiceContext This error indicates an error in the Network


Service account on the Client Access server.

ErrorInvalidOofParameter This response code is not used.

ErrorInvalidOperation This is a general error that is used when the


requested operation is invalid.

For example, you cannot do the following:

- Perform a "Deep" traversal by using the


FindFolder operation on a public folder.

- Move or copy the public folder root.

- Delete an associated item by using any


mode except "Hard" delete.

- Move or copy an associated item.

ErrorInvalidOrganizationRelationshipForFreeBusy This error indicates that a caller requested


free/busy information for a user in another
organization but the organizational
relationship does not have free/busy enabled.
Value Description

ErrorInvalidPagingMaxRows This error occurs when a consumer passes in


a zero or a negative value for the maximum
rows to be returned.

ErrorInvalidParentFolder This error occurs when a consumer passes in


an invalid parent folder for an operation. For
example, this error is returned if you try to
create a folder within a search folder.

ErrorInvalidPercentCompleteValue This error is returned when an attempt is


made to set a task completion percentage to
an invalid value. The value must be between 0
and 100 (inclusive).

ErrorInvalidPermissionSettings This error indicates that the permission level


is inconsistent with the permission settings.

ErrorInvalidPhoneCallId This error indicates that the caller identifier is


not valid.

ErrorInvalidPhoneNumber This error indicates that the telephone


number is not correct or does not fit the dial
plan rules.

ErrorInvalidPropertyAppend This error occurs when the property that you


are trying to append to does not support
appending. The following are the only
properties that support appending:

- Recipient collections (ToRecipients,


CcRecipients, BccRecipients)

- Attendee collections (RequiredAttendees,


OptionalAttendees, Resources)

- Body

- ReplyTo

In addition, this error occurs when a message


body is appended if the format specified in
the request does not match the format of the
item in the store.

ErrorInvalidPropertyDelete This error occurs if the delete operation is


specified in an UpdateItem operation or
UpdateFolder operation call for a property
that does not support the delete operation.
For example, you cannot delete the ItemId
element of the Item object.
Value Description

ErrorInvalidPropertyForExists This error occurs if the consumer passes in


one of the flag properties in an Exists filter.
For example, this error occurs if the IsRead or
IsFromMe flags are specified in the Exists
element. The request should use the
IsEqualTo element instead for these as they
are flags and therefore part of a single
property.

ErrorInvalidPropertyForOperation This error occurs when the property that you


are trying to manipulate does not support the
operation that is being performed on it.

ErrorInvalidPropertyRequest This error occurs if a property that is specified


in the request is not available for the item
type. For example, this error is returned if a
property that is only available on calendar
items is requested in a GetItem operation call
for a message or is updated in an UpdateItem
operation call for a message. This occurs in
the following operations:

- GetItem operation

- GetFolder operation

- UpdateItem operation

- UpdateFolder operation

ErrorInvalidPropertySet This error indicates that the property that you


are trying to manipulate does not support the
operation that is being performed on it. For
example, this error is returned if the property
that you are trying to set is read-only.

ErrorInvalidPropertyUpdateSentMessage This error occurs during an UpdateItem


operation when a client tries to update
certain properties of a message that has
already been sent.

For example, the following properties cannot


be updated on a sent message:

- IsReadReceiptRequested

- IsDeliveryReceiptRequested

ErrorInvalidProxySecurityContext This response code is not used.


Value Description

ErrorInvalidPullSubscriptionId This error occurs if you call the GetEvents


operation or the Unsubscribe operation by
using a push subscription ID. To unsubscribe
from a push subscription, you must respond
to a push request with an unsubscribe
response, or disconnect your Web service and
wait for the push notifications to time out.

ErrorInvalidPushSubscriptionUrl This error is returned by the Subscribe


operation when it creates a "push"
subscription and indicates that the URL that is
included in the request is invalid. The
following conditions must be met for
Exchange Web Services to accept the URL:

- String length > 0 and < 2083.

- Protocol is http or https.

- The URL can be parsed by the URI Microsoft


.NET Framework class.

ErrorInvalidRecipients This error indicates that the recipient


collection on your message or the attendee
collection on your calendar item is invalid. For
example, this error will be returned when an
attempt is made to send an item that has no
recipients.

ErrorInvalidRecipientSubfilter This error indicates that the search folder has


a recipient table filter that Exchange Web
Services cannot represent. To get around this
error, retrieve the folder without requesting
the search parameters.

ErrorInvalidRecipientSubfilterComparison This error indicates that the search folder has


a recipient table filter that Exchange Web
Services cannot represent. To get around this
error, retrieve the folder without requesting
the search parameters.

ErrorInvalidRecipientSubfilterOrder This error indicates that the search folder has


a recipient table filter that Exchange Web
Services cannot represent. To get around this
error, retrieve the folder without requesting
the search parameters.
Value Description

ErrorInvalidRecipientSubfilterTextFilter This error indicates that the search folder has


a recipient table filter that Exchange Web
Services cannot represent. To get around this
error, retrieve the folder without requesting
the search parameters.

ErrorInvalidReferenceItem This error is returned from the CreateItem


operation for Forward and Reply response
objects in the following scenarios:

- The referenced item identifier is not a


Message, a CalendarItem, or a descendant of
a Message or CalendarItem.

- The reference item identifier is for a


CalendarItem and the organizer is trying to
Reply or ReplyAll to himself.

- The message is a draft and Reply or ReplyAll


is selected.

- The reference item, for


SuppressReadReceipt, is not a Message or a
descendant of a Message.

ErrorInvalidRequest This error occurs when the SOAP request has


a SOAP action header, but nothing in the
SOAP body. Note that the SOAP Action
header is not required as Exchange Web
Services can determine the method to call
from the local name of the root element in
the SOAP body.

ErrorInvalidRestriction This response code is not used.

ErrorInvalidRetentionTagTypeMismatch This error is returned when the specified


retention tag has an incorrect action
associated with it. This error was introduced
in Exchange 2013.

ErrorInvalidRetentionTagInvisible This error is returned when an attempt is


made to set a nonexistent or invisible tag on
a PolicyTag property. This error was
introduced in Exchange 2013.

ErrorInvalidRetentionTagInheritance This error is returned when an attempt is


made to set an implicit tag on the PolicyTag
property. This error was introduced in
Exchange 2013.

ErrorInvalidRetentionTagIdGuid Indicates that the retention tag GUID was


invalid.
Value Description

ErrorInvalidRoutingType This error occurs if the routing type that is


passed for a RoutingType (EmailAddressType)
element is invalid. Typically, the routing type
is set to Simple Mail Transfer Protocol (SMTP).

ErrorInvalidScheduledOofDuration This error occurs if the specified duration end


time is not greater than the start time, or if
the end time does not occur in the future.

ErrorInvalidSchemaVersionForMailboxVersion This error indicates that a proxy request that


was sent to another server is not able to
service the request due to a versioning
mismatch.

ErrorInvalidSecurityDescriptor This error indicates that the Exchange security


descriptor on the Calendar folder in the store
is corrupted.

ErrorInvalidSendItemSaveSettings This error occurs during an attempt to send


an item where the SavedItemFolderId is
specified in the request but the
SaveItemToFolder property is set to false.

ErrorInvalidSerializedAccessToken This error indicates that the token that was


passed in the header is malformed, does not
refer to a valid account in the directory, or is
missing the primary group ConnectingSID.

ErrorInvalidSharingData This error indicates that the sharing metadata


is not valid. This can be caused by invalid
XML.

ErrorInvalidSharingMessage This error indicates that the sharing message


is not valid. This can be caused by a missing
property.

ErrorInvalidSid This error occurs when an invalid SID is


passed in a request.

ErrorInvalidSIPUri This error indicates that the SIP name, dial


plan, or the phone number are invalid SIP
URIs.

ErrorInvalidServerVersion This error indicates that an invalid request


server version was specified in the request.

ErrorInvalidSmtpAddress This error occurs when the SMTP address


cannot be parsed.
Value Description

ErrorInvalidSubfilterType This response code is not used.

ErrorInvalidSubfilterTypeNotAttendeeType This response code is not used.

ErrorInvalidSubfilterTypeNotRecipientType This response code is not used.

ErrorInvalidSubscription This error indicates that the subscription is no


longer valid. This could be because the Client
Access server is restarting or because the
subscription is expired.

ErrorInvalidSubscriptionRequest This error indicates that the subscribe request


included multiple public folder IDs. A
subscription can include multiple folders from
the same mailbox or one public folder ID.

ErrorInvalidSyncStateData This error is returned by SyncFolderItems or


SyncFolderHierarchy if the SyncState data that
is passed is invalid. To fix this error, you must
resynchronize without the sync state. Make
sure that if you are persisting sync state
BLOBs, you are not accidentally truncating the
BLOB.

ErrorInvalidTimeInterval This error indicates that the specified time


interval is invalid. The start time must be
greater than or equal to the end time.

ErrorInvalidUserInfo This error indicates that an internally


inconsistent UserId was specified for a
permissions operation. For example, if a
distinguished user ID is specified (Default or
Anonymous), this error is returned if you also
try to specify a SID, or primary SMTP address
or display name for this user.

ErrorInvalidUserOofSettings This error indicates that the user Out of Office


(OOF) settings are invalid because of a
missing internal or external reply.

ErrorInvalidUserPrincipalName This error occurs during Exchange


Impersonation. The caller passed in an invalid
UPN in the SOAP header that was not
accessible in the directory.

ErrorInvalidUserSid This error occurs when an invalid SID is


passed in a request.

ErrorInvalidUserSidMissingUPN This response code is not used.


Value Description

ErrorInvalidValueForProperty This error indicates that the comparison value


in the restriction is invalid for the property
you are comparing against. For example, the
comparison value of DateTimeCreated > true
would return this response code. This
response code is also returned if you specify
an enumeration property in the comparison,
but the value that you are comparing against
is not a valid value for that enumeration.

ErrorInvalidWatermark This error is caused by an invalid watermark.

ErrorIPGatewayNotFound This error indicates that a valid VoIP gateway


is not available.

ErrorIrresolvableConflict This error indicates that conflict resolution


was unable to resolve changes for the
properties. The items in the store may have
been changed and have to be updated.
Retrieve the updated change key and try
again.

ErrorItemCorrupt This error indicates that the state of the


object is corrupted and cannot be retrieved.
When you are retrieving an item, only certain
elements will be in this state, such as Body
and MimeContent. Omit these elements and
retry the operation.

ErrorItemNotFound This error occurs when the item was not


found or you do not have permission to
access the item.

ErrorItemPropertyRequestFailed This error occurs if a property request on an


item fails. The property may exist, but it could
not be retrieved.

ErrorItemSave This error occurs when attempts to save the


item or folder fail.

ErrorItemSavePropertyError This error occurs when attempts to save the


item or folder fail because of invalid property
values. The response code includes the path
of the invalid properties.

ErrorLegacyMailboxFreeBusyViewTypeNotMerged This response code is not used.

ErrorLocalServerObjectNotFound This response code is not used.


Value Description

ErrorLogonAsNetworkServiceFailed This error indicates that the Availability


service was unable to log on as the network
service to proxy requests to the appropriate
sites or forests. This response typically
indicates a configuration error.

ErrorMailboxConfiguration This error indicates that the mailbox


information in AD DS is configured
incorrectly.

ErrorMailboxDataArrayEmpty This error indicates that the MailboxDataArray


element in the request is empty. You must
supply at least one mailbox identifier.

ErrorMailboxDataArrayTooBig This error occurs when more than 100 entries


are supplied in a MailboxDataArray element..

ErrorMailboxFailover This error indicates that an attempt to access


a mailbox failed because the mailbox is in a
failover process.

ErrorMailboxHoldNotFound Indicates that the mailbox hold was not


found.

ErrorMailboxLogonFailed This error occurs when the connection to the


mailbox to get the calendar view information
failed.

ErrorMailboxMoveInProgress This error indicates that the mailbox is being


moved to a different mailbox store or server.
This error can also indicate that the mailbox is
on another server or mailbox database.

ErrorMailboxStoreUnavailable This error indicates that one of the following


error conditions occurred:

- The mailbox store is corrupt.

- The mailbox store is being stopped.

- The mailbox store is offline.

- A network error occurred when an attempt


was made to access the mailbox store.

- The mailbox store is overloaded and cannot


accept any more connections.

- The mailbox store has been paused.

ErrorMailRecipientNotFound This error occurs if the MailboxData element


information cannot be mapped to a valid
mailbox account.

ErrorMailTipsDisabled This error indicates that mail tips are disabled.


Value Description

ErrorManagedFolderAlreadyExists This error occurs if the managed folder that


you are trying to create already exists in a
mailbox.

ErrorManagedFolderNotFound This error occurs when the folder name that


was specified in the request does not map to
a managed folder definition in AD DS. You
can only create instances of managed folders
for folders that are defined in AD DS. Check
the name and try again.

ErrorManagedFoldersRootFailure This error indicates that the managed folders


root was deleted from the mailbox or that a
folder exists in the same parent folder that
has the name of the managed folder root.
This will also occur if the attempt to create
the root managed folder fails.

ErrorMeetingSuggestionGenerationFailed This error indicates that the suggestions


engine encountered a problem when it was
trying to generate the suggestions.

ErrorMessageDispositionRequired This error occurs if the MessageDisposition


attribute is not set. This attribute is required
for the following:

- The CreateItem operation and the


UpdateItem operation when the item being
created or updated is a Message.

- CancelCalendarItem, AcceptItem,
DeclineItem, or TentativelyAcceptItem
response objects.

ErrorMessageSizeExceeded This error indicates that the message that you


are trying to send exceeds the allowed limits.

ErrorMessageTrackingNoSuchDomain This error indicates that the given domain


cannot be found.

ErrorMessageTrackingPermanentError This error indicates that the message tracking


service cannot track the message.

ErrorMessageTrackingTransientError This error indicates that the message tracking


service is either down or busy. This error code
indicates a transient error. Clients can retry to
connect to the server when this error is
received.
Value Description

ErrorMimeContentConversionFailed This error occurs when the MIME content is


not a valid iCal for a CreateItem operation.
For a GetItem operation, this response
indicates that the MIME content could not be
generated.

ErrorMimeContentInvalid This error occurs when the MIME content is


invalid.

ErrorMimeContentInvalidBase64String This error occurs when the MIME content in


the request is not a valid base 64 string.

ErrorMissingArgument This error indicates that a required argument


was missing from the request. The response
message text indicates which argument to
check.

ErrorMissingEmailAddress This error indicates that you specified a


distinguished folder ID in the request, but the
account that made the request does not have
a mailbox on the system. In that case, you
must supply a Mailbox sub-element under
DistinguishedFolderId.

ErrorMissingEmailAddressForManagedFolder This error indicates that you specified a


distinguished folder ID in the request, but the
account that made the request does not have
a mailbox on the system. In that case, you
must supply a Mailbox sub-element under
DistinguishedFolderId. This response is
returned from the CreateManagedFolder
operation.

ErrorMissingInformationEmailAddress This error occurs if the EmailAddress


(NonEmptyStringType) element is missing.

ErrorMissingInformationReferenceItemId This error occurs if the ReferenceItemId is


missing.

ErrorMissingInformationSharingFolderId This error code is never returned.

ErrorMissingItemForCreateItemAttachment This error is returned when an attempt is


made to not include the item element in the
ItemAttachment element of a
CreateAttachment operation request.
Value Description

ErrorMissingManagedFolderId This error occurs when the policy IDs


property, property tag 0x6732, for the folder
is missing. You should consider this a
corrupted folder.

ErrorMissingRecipients This error indicates that you tried to send an


item without including recipients. Note that if
you call the CreateItem operation with a
message disposition that causes the message
to be sent, you will get the following response
code: ErrorInvalidRecipients.

ErrorMissingUserIdInformation This error indicates that a UserId has not been


fully specified in a permissions set.

ErrorMoreThanOneAccessModeSpecified This error indicates that you have specified


more than one ExchangeImpersonation
element value within a request.

ErrorMoveCopyFailed This error indicates that the move or copy


operation failed. Moving occurs in the
CreateItem operation when you accept a
meeting request that is in the Deleted Items
folder. In addition, if you decline a meeting
request, cancel a calendar item, or remove a
meeting from your calendar, it is moved to
the Deleted Items folder.

ErrorMoveDistinguishedFolder This error occurs if you try to move a


distinguished folder.

ErrorMultiLegacyMailboxAccess This error occurs when a request attempts to


access multiple mailbox servers. This error
was introduced in Exchange 2013.

ErrorNameResolutionMultipleResults This error occurs if the ResolveNames


operation returns more than one result or the
ambiguous name that you specified matches
more than one object in the directory. The
response code includes the matched names
in the response data.

ErrorNameResolutionNoMailbox This error indicates that the caller does not


have a mailbox on the system. The
ResolveNames operation or ExpandDL
operation is invalid for connecting a user
without a mailbox.
Value Description

ErrorNameResolutionNoResults This error indicates that the ResolveNames


operation returns no results.

ErrorNoApplicableProxyCASServersAvailable This error code MUST be returned when the


Web service cannot find a server to handle
the request.

ErrorNoCalendar This error occurs if there is no Calendar folder


for the mailbox.

ErrorNoDestinationCASDueToKerberosRequirements This error indicates that the request referred


to a mailbox in another Active Directory site,
but no Client Access servers in the destination
site were configured for Windows
Authentication, and therefore the request
could not be proxied.

ErrorNoDestinationCASDueToSSLRequirements This error indicates that the request referred


to a mailbox in another Active Directory site,
but no Client Access servers in the destination
site were configured for SSL connections, and
therefore the request could not be proxied.

ErrorNoDestinationCASDueToVersionMismatch This error indicates that the request referred


to a mailbox in another Active Directory site,
but no Client Access servers in the destination
site were of an acceptable product version to
receive the request, and therefore the request
could not be proxied.

ErrorNoFolderClassOverride This error occurs if you set the FolderClass


element when you are creating an item other
than a generic folder. For typed folders such
as CalendarFolder and TasksFolder, the folder
class is implied. Setting the folder class to a
different folder type by using the
UpdateFolder operation results in the
ErrorObjectTypeChanged response. Instead,
use a generic folder type but set the folder
class to the value that you require. Exchange
Web Services will create the correct strongly
typed folder.

ErrorNoFreeBusyAccess This error indicates that the caller does not


have free/busy viewing rights on the Calendar
folder in question.
Value Description

ErrorNonExistentMailbox This error occurs in the following scenarios:

- The e-mail address is empty in


CreateManagedFolder.

- The e-mail address does not refer to a valid


account in a request that takes an e-mail
address in the body or in the SOAP header,
such as in an Exchange Impersonation call.

ErrorNonPrimarySmtpAddress This error occurs when a caller passes in a


non-primary SMTP address. The response
includes the correct SMTP address to use.

ErrorNoPropertyTagForCustomProperties This error indicates that MAPI properties in


the custom range, 0x8000 and greater, cannot
be referenced by property tags. You must use
the EWS Managed API
PropertySetId property or the EWS
ExtendedFieldURI element with the
PropertySetId attribute.

ErrorNoPublicFolderReplicaAvailable This response code is not used.

ErrorNoPublicFolderServerAvailable This error code MUST be returned if no public


folder server is available or if the caller does
not have a home public server.

ErrorNoRespondingCASInDestinationSite This error indicates that the request referred


to a mailbox in another Active Directory site,
but none of the Client Access servers in that
site responded, and therefore the request
could not be proxied.

ErrorNotAllowedExternalSharingByPolicy This error indicates that the caller tried to


grant permissions in its calendar or contacts
folder to a user in another organization, and
the attempt failed.

ErrorNotDelegate This error indicates that the user is not a


delegate for the mailbox. It is returned by the
GetDelegate operation, the RemoveDelegate
operation, and the UpdateDelegate operation
when the specified delegate user is not found
in the list of delegates.

ErrorNotEnoughMemory This error indicates that the operation could


not be completed because of insufficient
memory.
Value Description

ErrorNotSupportedSharingMessage This error indicates that the sharing message


is not supported.

ErrorObjectTypeChanged This error occurs if the object type changed.

ErrorOccurrenceCrossingBoundary This error occurs when the Start or End time


of an occurrence is updated so that the
occurrence is scheduled to happen earlier or
later than the corresponding previous or next
occurrence.

ErrorOccurrenceTimeSpanTooBig This error indicates that the time allotment for


a given occurrence overlaps with another
occurrence of the same recurring item. This
response also occurs when the length in
minutes of a given occurrence is larger than
Int32.MaxValue.

ErrorOperationNotAllowedWithPublicFolderRoot This error indicates that the current operation


is not valid for the public folder root.

ErrorOrganizationNotFederated This error indicates that the requester's


organization is not federated so the requester
cannot create sharing messages to send to an
external user or cannot accept sharing
messages received from an external user.

ErrorParentFolderIdRequired This response code is not used.

ErrorParentFolderNotFound This error occurs in the CreateFolder


operation when the parent folder is not
found.

ErrorPasswordChangeRequired This error indicates that you must change


your password before you can access this
mailbox. This occurs when a new account has
been created and the administrator indicated
that the user must change the password at
first logon. You cannot update the password
by using Exchange Web Services. You must
use a tool such as Microsoft Office Outlook
Web App to change your password.

ErrorPasswordExpired This error indicates that the password has


expired. You cannot change the password by
using Exchange Web Services. You must use a
tool such as Outlook Web App to change
your password.
Value Description

ErrorPermissionNotAllowedByPolicy This error indicates that the requester tried to


grant permissions in its calendar or contacts
folder to an external user but the sharing
policy assigned to the requester indicates that
the requested permission level is higher than
what the sharing policy allows.

ErrorPhoneNumberNotDialable This error indicates that the telephone


number was not in the correct form.

ErrorPropertyUpdate This error indicates that the update failed


because of invalid property values. The
response message includes the invalid
property paths.

ErrorPromptPublishingOperationFailed This error is intended for internal use only.


This error was introduced in Exchange 2013.

ErrorPropertyValidationFailure This response code is not used.

ErrorProxiedSubscriptionCallFailure This error indicates that the request referred


to a subscription that exists on another Client
Access server, but an attempt to proxy the
request to that Client Access server failed.

ErrorProxyCallFailed This response code is not used.

ErrorProxyGroupSidLimitExceeded This error indicates that the request referred


to a mailbox in another Active Directory site,
and the original caller is a member of more
than 3,000 groups.

ErrorProxyRequestNotAllowed This error indicates that the request that


Exchange Web Services sent to another Client
Access server when trying to fulfill a
GetUserAvailabilityRequest request was
invalid. This response code typically indicates
that a configuration or rights error has
occurred, or that someone tried
unsuccessfully to mimic an availability proxy
request.

ErrorProxyRequestProcessingFailed This error indicates that Exchange Web


Services tried to proxy an availability request
to another Client Access server for fulfillment,
but the request failed. This response can be
caused by network connectivity issues or
request timeout issues.
Value Description

ErrorProxyServiceDiscoveryFailed This error code must be returned if the Web


service cannot determine whether the request
is to run on the target server or will be
proxied to another server.

ErrorProxyTokenExpired This response code is not used.

ErrorPublicFolderMailboxDiscoveryFailed This error occurs when the public folder


mailbox URL cannot be found. This error is
intended for internal use only. This error was
introduced in Exchange 2013.

ErrorPublicFolderOperationFailed This error occurs when an attempt is made to


access a public folder and the attempt is
unsuccessful. This error was introduced in
Exchange 2013Exchange Server 2013.

ErrorPublicFolderRequestProcessingFailed This error occurs when the recipient that was


passed to the GetUserAvailability operation is
located on a computer that is running a
version of Exchange Server that is earlier than
Exchange 2007, and the request to retrieve
free/busy information for the recipient from
the public folder server failed.

ErrorPublicFolderServerNotFound This error occurs when the recipient that was


passed to the GetUserAvailability operation is
located on a computer that is running a
version of Exchange Server that is earlier than
Exchange 2007, and the request to retrieve
free/busy information for the recipient from
the public folder server failed because the
organizational unit did not have an associated
public folder server.

ErrorPublicFolderSyncException This error occurs when a synchronization


operation succeeds against the primary public
folder mailbox but does not succeed against
the secondary public folder mailbox. This
error was introduced in Exchange 2013.

ErrorQueryFilterTooLong This error indicates that the search folder


restriction may be valid, but it is not
supported by EWS. Exchange Web Services
limits restrictions to contain a maximum of
255 filter expressions. If you try to bind to an
existing search folder that exceeds 255, this
response code is returned.
Value Description

ErrorQuotaExceeded This error occurs when the mailbox quota is


exceeded.

ErrorReadEventsFailed This error is returned by the GetEvents


operation or push notifications when a failure
occurs while retrieving event information.
When this error is returned, the subscription
is deleted. Re-create the event
synchronization based on a last known
watermark.

ErrorReadReceiptNotPending This error is returned by the CreateItem


operation if an attempt was made to suppress
a read receipt when the message sender did
not request a read receipt on the message or
if the message is in the Junk E-mail folder.

ErrorRecurrenceEndDateTooBig This error occurs when the end date for the
recurrence is after 9/1/4500.

ErrorRecurrenceHasNoOccurrence This error occurs when the specified


recurrence does not have any occurrence
instances in the specified range.

ErrorRemoveDelegatesFailed This error indicates that the delegate list


failed to be saved after delegates were
removed.

ErrorRequestAborted This response code is not used.

ErrorRequestStreamTooBig This error occurs when the request stream is


larger than 400 KB.

ErrorRequiredPropertyMissing This error is returned when a required


property is missing in a CreateAttachment
operation request. The missing property URI
is included in the response.

ErrorResolveNamesInvalidFolderType This error indicates that the caller has


specified a folder that is not a contacts folder
to the ResolveNames operation.

ErrorResolveNamesOnlyOneContactsFolderAllowed This error indicates that the caller has


specified more than one contacts folder to
the ResolveNames operation.

ErrorResponseSchemaValidation This response code is not used.


Value Description

ErrorRestrictionTooLong This error occurs if the restriction contains


more than 255 nodes.

ErrorRestrictionTooComplex This error occurs when the restriction cannot


be evaluated by Exchange Web Services.

ErrorResultSetTooBig This error indicates that the number of


calendar entries for a given recipient exceeds
the allowed limit of 1000. Reduce the window
and try again.

ErrorSavedItemFolderNotFound This error occurs when the SavedItemFolderId


is not found.

ErrorSchemaValidation This error occurs when the request cannot be


validated against the schema.

ErrorSearchFolderNotInitialized This error indicates that the search folder was


created, but the search criteria were never set
on the folder. This only occurs when you
access corrupted search folders that were
created by using another API or client. To fix
this error, use the UpdateFolder operation to
set the SearchParameters element to include
the restriction that should be on the folder.

ErrorSendAsDenied This error occurs when both of the following


conditions occur:

- A user has been granted CanActAsOwner


permissions but is not granted delegate rights
on the principal's mailbox.

- The same user tries to create and send an e-


mail message in the principal's mailbox by
using the SendAndSaveCopy option.

The result is an ErrorSendAsDenied error and


the creation of the e-mail message in the
principal's Drafts folder.

ErrorSendMeetingCancellationsRequired This error is returned by the DeleteItem


operation if the SendMeetingCancellations
attribute is missing from the request and the
item to delete is a calendar item.

ErrorSendMeetingInvitationsOrCancellationsRequired This error is returned by the UpdateItem


operation if the
SendMeetingInvitationsOrCancellations
attribute is missing from the request and the
item to update is a calendar item.
Value Description

ErrorSendMeetingInvitationsRequired This error is returned by the CreateItem


operation if the SendMeetingInvitations
attribute is missing from the request and the
item to create is a calendar item.

ErrorSentMeetingRequestUpdate This error indicates that after the organizer


sends a meeting request, the request cannot
be updated. To modify the meeting, modify
the calendar item, not the meeting request.

ErrorSentTaskRequestUpdate This error indicates that after the task initiator


sends a task request, that request cannot be
updated.

ErrorServerBusy This error occurs when the server is busy.

ErrorServiceDiscoveryFailed This error indicates that Exchange Web


Services tried to proxy a user availability
request to the appropriate forest for the
recipient, but it could not determine where to
send the request because of a service
discovery failure.

ErrorSharingNoExternalEwsAvailable This error indicates that the external URL


property has not been set in the Active
Directory database.

ErrorSharingSynchronizationFailed This error indicates that an attempt at


synchronizing a sharing folder failed. This
error code is returned when the following
occurs:

- The subscription for a sharing folder is not


found.

- The sharing folder is not found.

- The corresponding directory user is not


found.

- The user no longer exists.

- The appointment is invalid.

- The contact item is invalid.

- There is a communication failure with the


remote server.

ErrorStaleObject This error occurs in an UpdateItem operation


or a SendItem operation when the change
key is not up-to-date or was not supplied.
Call the GetItem operation to retrieve an
updated change key and then try the
operation again.
Value Description

ErrorSubmissionQuotaExceeded This error Indicates that a user cannot


immediately send more requests because the
submission quota has been reached.

ErrorSubscriptionAccessDenied This error occurs when you try to access a


subscription by using an account that did not
create that subscription. Each subscription
can only be accessed by the creator of the
subscription.

ErrorSubscriptionDelegateAccessNotSupported This error indicates that you cannot create a


subscription if you are not the owner or do
not have owner access to the mailbox.

ErrorSubscriptionNotFound This error occurs if the subscription that


corresponds to the specified SubscriptionId
(GetEvents) is not found. The subscription
may have expired, the Exchange Web Services
process may have been restarted, or an
invalid subscription was passed in. If the
subscription was valid, re-create the
subscription with the latest watermark. This is
returned by the Unsubscribe operation or the
GetEvents operation responses.

ErrorSubscriptionUnsubsribed This error code must be returned when a


request is made for a subscription that has
been unsubscribed.

ErrorSyncFolderNotFound This error is returned by the SyncFolderItems


operation if the parent folder that is specified
cannot be found.

ErrorTeamMailboxNotFound This error indicates that a team mailbox was


not found. This error was introduced in
Exchange 2013.

ErrorTeamMailboxNotLinkedToSharePoint This error indicates that a team mailbox was


found but that it is not linked to a SharePoint
Server. This error was introduced in Exchange
2013.

ErrorTeamMailboxUrlValidationFailed This error indicates that a team mailbox was


found but that the link to the SharePoint
Server is not valid. This error was introduced
in Exchange 2013.

ErrorTeamMailboxNotAuthorizedOwner This error code is not used. This error was


introduced in Exchange 2013.
Value Description

ErrorTeamMailboxActiveToPendingDelete This error code is not used. This error was


introduced in Exchange 2013.

ErrorTeamMailboxFailedSendingNotifications This error indicates that an attempt to send a


notification to the team mailbox owners was
unsuccessful. This error was introduced in
Exchange 2013.

ErrorTeamMailboxErrorUnknown This error indicates a general error that can


occur when trying to access a team mailbox.
Try submitting the request at a later time. This
error was introduced in Exchange 2013.

ErrorTimeIntervalTooBig This error indicates that the time window that


was specified is larger than the allowed limit.
By default, the allowed limit is 42.

ErrorTimeoutExpired This error occurs when there is not enough


time to complete the processing of the
request.

ErrorTimeZone This error indicates that there is a time zone


error.

ErrorToFolderNotFound This error indicates that the destination folder


does not exist.

ErrorTokenSerializationDenied This error occurs if the caller tries to do a


Token serialization request but does not have
the ms-Exch-EPI-TokenSerialization right on
the Client Access server.

ErrorTooManyObjectsOpened This error occurs when the internal limit on


open objects has been exceeded.

ErrorUnifiedMessagingDialPlanNotFound This error indicates that a user's dial plan is


not available.

ErrorUnifiedMessagingReportDataNotFound This error is intended for internal use only.


This error was introduced in Exchange 2013.

ErrorUnifiedMessagingPromptNotFound This error is intended for internal use only.


This error was introduced in Exchange 2013.

ErrorUnifiedMessagingRequestFailed This error indicates that the user could not be


found.

ErrorUnifiedMessagingServerNotFound This error indicates that a valid server for the


dial plan can be found to handle the request.
Value Description

ErrorUnableToGetUserOofSettings This response code is not used.

ErrorUnableToRemoveImContactFromGroup This error occurs when an unsuccessful


attempt is made to remove an IM contact
from a group. This error was introduced in
Exchange 2013.

ErrorUnsupportedCulture This error occurs when you try to set the


Culture property to a value that is not
parsable by the
System.Globalization.CultureInfo class.

ErrorUnsupportedMapiPropertyType This error occurs when a caller tries to use


extended properties of types object, object
array, error, or null.

ErrorUnsupportedMimeConversion This error occurs when you are trying to


retrieve or set MIME content for an item other
than a PostItem, Message, or CalendarItem
object.

ErrorUnsupportedPathForQuery This error occurs when the caller passes a


property that is invalid for a query. This can
occur when calculated properties are used.

ErrorUnsupportedPathForSortGroup This error occurs when the caller passes a


property that is invalid for a sort or group by
property. This can occur when calculated
properties are used.

ErrorUnsupportedPropertyDefinition This response code is not used.

ErrorUnsupportedQueryFilter This error indicates that the search folder


restriction may be valid, but it is not
supported by EWS.

ErrorUnsupportedRecurrence This error indicates that the specified


recurrence is not supported for tasks.

ErrorUnsupportedSubFilter This response code is not used.

ErrorUnsupportedTypeForConversion This error indicates that Exchange Web


Services found a property type in the store
but it cannot generate XML for the property
type.

ErrorUpdateDelegatesFailed This error indicates that the delegate list


failed to be saved after delegates were
updated.
Value Description

ErrorUpdatePropertyMismatch This error occurs when the single property


path that is listed in a change description
does not match the single property that is
being set within the actual Item or Folder
object.

ErrorUserNotUnifiedMessagingEnabled This error indicates that the requester is not


enabled.

ErrorUserNotAllowedByPolicy This error indicates that the requester tried to


grant permissions in its calendar or contacts
folder to an external user but the sharing
policy assigned to the requester indicates that
the domain of the external user is not listed in
the policy.

ErrorUserWithoutFederatedProxyAddress Indicates that the requester's organization has


a set of federated domains but the
requester's organization does not have any
SMTP proxy addresses with one of the
federated domains.

ErrorValueOutOfRange This error indicates that a calendar view start


date or end date was set to 1/1/0001 12:00:00
AM or 12/31/9999 11:59:59 PM.

ErrorVirusDetected This error indicates that the Exchange store


detected a virus in the message.

ErrorVirusMessageDeleted This error indicates that the Exchange store


detected a virus in the message and deleted
it.

ErrorVoiceMailNotImplemented This response code is not used.

ErrorWebRequestInInvalidState This response code is not used.

ErrorWin32InteropError This error indicates that there was an internal


failure during communication with
unmanaged code.

ErrorWorkingHoursSaveFailed This response code is not used.

ErrorWorkingHoursXmlMalformed This response code is not used.

ErrorWrongServerVersion This error indicates that a request can only be


made to a server that is the same version as
the mailbox server.
Value Description

ErrorWrongServerVersionDelegate This error indicates that a request was made


by a delegate that has a different server
version than the principal's mailbox server.

ErrorMissingInformationSharingFolderId This error code is never returned.

ErrorDuplicateSOAPHeader Specifies that there are duplicate SOAP


headers.

ErrorSharingSynchronizationFailed Specifies that an attempt at synchronizing a


sharing folder failed. This error code MUST be
returned when:

- The subscription for a sharing folder is not


found.

- The sharing folder was not found.

- The corresponding directory user was not


found.

- The user no longer exists.

- The appointment is invalid.

- The contact item is invalid.

- There was a communication failure with the


remote server.

ErrorSharingNoExternalEwsAvailable Specifies that the external URL property has


not been set in the Active Directory database.
This error code MUST be returned if the
external URL property has not been set in the
Active Directory database.

ErrorFreeBusyDLLimitReached Specifies that the maximum group member


count has been reached for obtaining
free/busy information for a distribution list.
This error MUST be returned when the
maximum group member count has been
reached for obtaining free/busy information
for a distribution list.

ErrorInvalidGetSharingFolderRequest Specifies that the DataType and ShareFolderId


element are both present in a request. This
error code MUST be returned if the DataType
and ShareFolderId element are both present
in a request.
Value Description

ErrorNotAllowedExternalSharingByPolicy Specifies that the caller attempted to grant


permissions in its calendar or contacts folder
to a user in another organization and the
attempt failed. This error code MUST be
returned when the sharing policy is disabled
for the caller or when the sharing policy
assigned to the caller disallows sharing for
the requested level or the requested folder
type.

ErrorUserNotAllowedByPolicy Specifies that the requestor attempted to


grant permissions in its calendar or contacts
folder to an external user but the sharing
policy assigned to the requestor specifies that
the domain of the external user is not listed in
the policy.

ErrorPermissionNotAllowedByPolicy Specifies that the requestor attempted to


grant permissions in its calendar or contacts
folder to an external user but the sharing
policy assigned to the requestor specifies that
the requested permission level is higher is
than what the sharing policy allows.

ErrorOrganizationNotFederated Specifies that the requestor's organization is


not federated so the requestor cannot create
sharing messages to send to an external user
or cannot accept sharing messages received
from an external user. This error code MUST
be returned if the requestor's organization is
not federated.

ErrorMailboxFailover Specifies that an attempt to access a mailbox


failed because the mailbox is in a failover
process.

ErrorInvalidExternalSharingInitiator Specifies that the sharing invitation sender


did not create the sharing invitation
metadata. This error code MUST be returned
if the sharing invitation sender did not create
the sharing invitation metadata.

ErrorMessageTrackingPermanentError Specifies that the message tracking service


cannot track the message.
Value Description

ErrorMessageTrackingTransientError Specifies that either the message tracking


service is down or busy. This error code
specifies a transient error. Clients can retry to
connect to the server when this error is
received.

ErrorMessageTrackingNoSuchDomain Specifies that the given domain cannot be


found.

ErrorUserWithoutFederatedProxyAddress Specifies that the requestor's organization has


a set of federated domains but the
requestor's organization does not have any
SMTP proxy addresses with one of the
federated domains.

ErrorInvalidOrganizationRelationshipForFreeBusy Specifies that a caller requested free/busy


information for a user in another organization
but the organizational relationship does not
have free/busy enabled.

ErrorInvalidFederatedOrganizationId Specifies that the requestor's organization


federation objects are not properly
configured.

ErrorInvalidExternalSharingSubscriber Specifies that a sharing message is not


intended for the caller.

ErrorInvalidSharingData Specifies that the sharing metadata is not


valid. This can be caused by invalid XML.

ErrorInvalidSharingMessage Specifies that the sharing message is not


valid. This can be caused by a missing
property.

ErrorNotSupportedSharingMessage Specifies that the sharing message is not


supported.

ErrorApplyConversationActionFailed This error MUST be returned if an action


cannot be applied to one or more items in
the conversation.

ErrorInboxRulesValidationError This error MUST be returned if any rule does


not validate.

ErrorOutlookRuleBlobExists This error MUST be returned when an attempt


to manage Inbox rules occurs after another
client has accessed the Inbox rules.
Value Description

ErrorRulesOverQuota This error MUST be returned when a user's


rule quota has been exceeded.

ErrorNewEventStreamConnectionOpened This error MUST be returned to the first


subscription connection if a second
subscription connection is opened.

ErrorMissedNotificationEvents This error MUST be returned when event


notifications are missed.

ErrorDuplicateLegacyDistinguishedName This error is returned when there are


duplicate legacy distinguished names in
Active Directory Domain Services (AD DS).
This error was introduced in Exchange 2013.

ErrorInvalidClientAccessTokenRequest This error indicates that a request to get a


client access token was not valid. This error
was introduced in Exchange 2013.

ErrorNoSpeechDetected This error is intended for internal use only.


This error was introduced in Exchange 2013.

ErrorUMServerUnavailable This error is intended for internal use only.


This error was introduced in Exchange 2013.

ErrorRecipientNotFound This error is intended for internal use only.


This error was introduced in Exchange 2013.

ErrorRecognizerNotInstalled This error is intended for internal use only.


This error was introduced in Exchange 2013.

ErrorSpeechGrammarError This error is intended for internal use only.


This error was introduced in Exchange 2013.

ErrorInvalidManagementRoleHeader This error is returned if the ManagementRole


header in the SOAP header is incorrect. This
error was introduced in Exchange 2013.

ErrorLocationServicesDisabled This error is intended for internal use only.


This error was introduced in Exchange 2013.

ErrorLocationServicesRequestTimedOut This error is intended for internal use only.


This error was introduced in Exchange 2013.

ErrorLocationServicesRequestFailed This error is intended for internal use only.


This error was introduced in Exchange 2013.

ErrorLocationServicesInvalidRequest This error is intended for internal use only.


This error was introduced in Exchange 2013.
Value Description

ErrorWeatherServiceDisabled This error is intended for internal use only.

ErrorMailboxScopeNotAllowedWithoutQueryString This error is returned when a scoped search


attempt is performed without using a
QueryString (String) element for a content
indexing search. This is applicable to the
SearchMailboxes and FindConversation
operations. This error was introduced in
Exchange 2013.

ErrorArchiveMailboxSearchFailed This error is returned when an archive


mailbox search is unsuccessful. This error was
introduced in Exchange 2013.

ErrorArchiveMailboxServiceDiscoveryFailed This error is returned when the URL of an


archive mailbox is not discoverable. This error
was introduced in Exchange 2013.

ErrorGetRemoteArchiveFolderFailed This error occurs when the operation to get


the remote archive mailbox folder failed.

ErrorFindRemoteArchiveFolderFailed This error occurs when the operation to find


the remote archive mailbox folder failed.

ErrorGetRemoteArchiveItemFailed This error occurs when the operation to get


the remote archive mailbox item failed.

ErrorExportRemoteArchiveItemsFailed This error occurs when the operation to


export remote archive mailbox items failed.

ErrorInvalidPhotoSize This error is returned if an invalid photo size is


requested from the server. This error was
introduced in Exchange 2013.

ErrorSearchQueryHasTooManyKeywords This error is returned when an unexpected


photo size is requested in a GetUserPhoto
operation request. This error was introduced
in Exchange 2013.

ErrorSearchTooManyMailboxes This error is returned when a


SearchMailboxes operation request contains
too many mailboxes to search. This error was
introduced in Exchange 2013.

ErrorInvalidRetentionTagNone This error indicates that no retention tags


were found for this user. This error was
introduced in Exchange 2013.
Value Description

ErrorDiscoverySearchesDisabled This error is returned when discovery searches


are disabled on a tenant or server. This error
was introduced in Exchange 2013.

ErrorCalendarSeekToConditionNotSupported This error occurs when attempting to invoke


the FindItem operation with a
SeekToConditionPageItemView for fetching
calendar items, which is not supported.

ErrorCalendarIsGroupMailboxForAccept This error is intended for internal use only.

ErrorCalendarIsGroupMailboxForDecline This error is intended for internal use only.

ErrorCalendarIsGroupMailboxForTentative This error is intended for internal use only.

ErrorCalendarIsGroupMailboxForSuppressReadReceipt This error is intended for internal use only.

ErrorOrganizationAccessBlocked The tenant is marked for removal.

ErrorInvalidLicense The user doesn't have a valid license.

ErrorMessagePerFolderCountReceiveQuotaExceeded The message per folder receive quota has


been exceeded.

Remarks
This element is not required and is not included in all responses.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ResponseCode
(InvalidRecipientResponseCodeType)
Article • 03/29/2023 • 2 minutes to read

The ResponseCode element provides information about why the recipient is invalid.

XML

<ResponseCode>OtherError or RecipientOrganizationNotFederated or
CannotObtainTokenFromSTS or SystemPolicyBlocksSharingWithThisRecipient or
RecipientOrganizationFederatedWithUnknownTokenIssuer</ResponseCode>

InvalidRecipientResponseCodeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

InvalidRecipient Contains the SMTP address of the invalid recipient and information about why
the recipient is invalid.

Text value
The following table lists the possible values for the ResponseCode element.

Code Description
Code Description

OtherError Indicates that the error is not


specified by another error response
code.

RecipientOrganizationNotFederated Indicates that a sharing relationship


is not available with the organization
specified in the recipient's SMTP e-
mail address.

CannotObtainTokenFromSTS Indicates that there was a problem


obtaining a security token from the
token server.

SystemPolicyBlocksSharingWithThisRecipient Indicates that the system


administrator has set a system policy
that blocks sharing with the specified
recipient.

RecipientOrganizationFederatedWithUnknownTokenIssuer Indicates that the secure token


service that is used by the specified
recipient is unknown.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetSharingMetadata operation

EWS XML elements in Exchange


ResponseMessage
Article • 03/29/2023 • 2 minutes to read

The ResponseMessage element provides descriptive information about the response


status for a single entity within a request.

XML

<ResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</ResponseMessage>

ResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Represents the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success Describes a request that is fulfilled.


Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are some possible causes for warnings:

- The Exchange store is offline during the batch.


- The Active Directory directory service is offline.
- Mailboxes are moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota is exceeded.

Error Describes a request that cannot be fulfilled.

The following are some possible causes for errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

Parent elements

Element Description
Element Description

FreeBusyResponse
Contains the free/busy information for a single mailbox user.

The following is the XPath 2.0 expression to this element:

/GetUserAvailabilityResponse/FreeBusyResponseArray[i]/FreeBusyResponse

SuggestionsResponse
Contains response information and suggestion data for requested meeting
suggestions.

The following is the XPath 2.0 expression to this element:

/GetUserAvailabilityResponse/SuggestionsResponse

GetUserOofSettingsResponse Contains the response results and the OOF settings for a user.

The following is the XPath 2.0 expression to this element:

/GetUserOofSettingsResponse

SetUserOofSettingsResponse Contains the result of an attempted SetUserOofSettingsRequest message.

The following is the XPath 2.0 expression to this element:

/SetUserOofSettingsResponse

Remarks
The ResponseMessageType type is common to all Exchange Web Services responses.
The ResponseMessageType type is extended by the following complex types:

ApplyConversationActionResponseMessageType

AttachmentInfoResponseMessageType

DeleteAttachmentResponseMessageType

DeleteItemResponseMessageType

ExpandDLResponseMessageType

FindFolderResponseMessageType

FindItemResponseMessageType

FolderInfoResponseMessageType
GetEventsResponseMessageType

ItemInfoResponseMessageType

ResolveNamesResponseMessageType

SubscribeResponseMessageType

SendNotificationResponseMessageType

SyncFolderHierarchyResponseMessageType

SyncFolderItemsResponseMessageType

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.

Version differences
The ApplyConversationActionResponseMessage and DeleteItemResponseMessageType
types were introduced in Exchange build 15.00.0986.00.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetUserAvailability operation
SetUserOofSettings operation
GetUserOofSettings operation
Getting User Availability
ResponseMessages
Article • 03/29/2023 • 5 minutes to read

The ResponseMessages element contains the response messages for an Exchange Web
Services request.

XML

<ResponseMessages>

<CreateItemResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<DeleteItemResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<GetItemResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<UpdateItemResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<SendItemResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<DeleteFolderResponseMessage/>

</ResponseMessages>

XML
<ResponseMessages>

<EmptyFolderResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<CreateFolderResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<GetFolderResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<FindFolderResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<UpdateFolderResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<MoveFolderResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<CopyFolderResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<CreateAttachmentResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<DeleteAttachmentResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<GetAttachmentResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<UploadItemsResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<ExportItemsResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<FindItemResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<MoveItemResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<CopyItemResponseMessage/>

</ResponseMessages>

XML
<ResponseMessages>

<ResolveNamesResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<ExpandDLResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<GetServerTimeZonesResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<GetEventsResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<GetStreamingEventsResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<SubscribeResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<UnsubscribeResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<SendNotificationResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<SyncFolderHierarchyResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<SyncFolderItemsResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<CreateManagedFolderResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<ConvertIdResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<GetSharingMetadataResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<RefreshSharingFolderResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<GetSharingFolderResponseMessage/>

</ResponseMessages>

XML
<ResponseMessages>

<CreateUserConfigurationResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<DeleteUserConfigurationResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<GetUserConfigurationResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<UpdateUserConfigurationResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<GetRoomListsResponse/>

</ResponseMessages>

XML

<ResponseMessages>

<GetRoomsResponse/>

</ResponseMessages>

XML

<ResponseMessages>

<GetRemindersResponse/>

</ResponseMessages

XML

<ResponseMessages>

<PerformReminderActionResponse/>

</ResponseMessages>

XML

<ResponseMessages>

<ApplyConversationActionResponseMessage/>

</ResponseMessages>

XML

<ResponseMessages>

<GetPasswordExpirationDateResponse />

</ResponseMessages>

ArrayOfResponseMessagesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

CopyFolderResponseMessage
Contains the status and result of a single
CopyFolder request.

CopyItemResponseMessage
Contains the status and result of a single CopyItem
request.

CreateAttachmentResponseMessage
Contains the status and result of a single
CreateAttachment request.

CreateFolderResponseMessage
Contains the status and result of a single
CreateFolder request.

CreateItemResponseMessage
Contains the status and result of a single
CreateItem request.

CreateManagedFolderResponseMessage
Contains the status and result of a single
CreateManagedFolder request.
Element Description

DeleteAttachmentResponseMessage
Contains the status and result of a single
DeleteAttachment request.

DeleteFolderResponseMessage
Contains the status and result of a single
DeleteFolder request.

DeleteItemResponseMessage
Contains the status and result of a single
DeleteItem request.

EmptyFolderResponseMessage
Contains the status and result of a single
EmptyFolder request.

ExpandDLResponseMessage
Contains the status and result of a single ExpandDL
request.

FindFolderResponseMessage
Contains the status and result of a single
FindFolder request.

FindItemResponseMessage
Contains the status and result of a single FindItem
request.

GetAttachmentResponseMessage
Contains the status and result of a single
GetAttachment request.

UploadItemsResponseMessage
Contains the status and results of a single
UploadItems request.

ExportItemsResponseMessage
Contains the status and results of a single
ExportItems request.

GetEventsResponseMessage
Contains the status and result of a single GetEvents
request.

GetStreamingEventsResponseMessage
Contains the status and result of a single
GetStreamingEvents request.

GetFolderResponseMessage
Contains the status and result of a single GetFolder
request.

GetItemResponseMessage
Contains the status and result of a single GetItem
request.

MoveFolderResponseMessage
Contains the status and result of a single
MoveFolder request.

MoveItemResponseMessage
Contains the status and result of a single MoveItem
request.

ResolveNamesResponseMessage
Contains the status and result of a ResolveNames
request.
Element Description

SendItemResponseMessage
Contains the status and result of a single SendItem
request.

SendNotificationResponseMessage
Contains the status and result of a single
SendNotification request.

SubscribeResponseMessage
Contains the status and result of a single Subscribe
request.

SyncFolderHierarchyResponseMessage
Contains the status and result of a
SyncFolderHierarchy request.

SyncFolderItemsResponseMessage
Contains the status and result of a SyncFolderItems
request.

UnsubscribeResponseMessage
Contains the status and result of a single
Unsubscribe request.

UpdateFolderResponseMessage
Contains the status and result of a single
UpdateFolder request.

UpdateItemResponseMessage
Contains the status and result of a single
UpdateItem request.

ConvertIdResponseMessage
Contains the status and result of a ConvertId
request.

GetSharingMetadataResponseMessage
Contains the status and results of a
GetSharingMetadata request.

RefreshSharingFolderResponseMessage
Contains the status and results of a
RefreshSharingFolder request.

GetSharingFolderResponseMessage
Contains the status and results of a
GetSharingFolder request.

CreateUserConfigurationResponseMessage
Contains the status and results of a
CreateUserConfiguration request.

DeleteUserConfigurationResponseMessage
Contains the status and results of a
DeleteUserConfiguration request.

GetUserConfigurationResponseMessage
Contains the status and results of a
GetUserConfiguration request.

UpdateUserConfigurationResponseMessage Contains the status and results of an


UpdateUserConfiguration request.

GetRoomListsResponse
Contains the status and results of a GetRoomLists
request.
Element Description

GetRoomsResponse
Contains the status and results of a GetRooms
request.

GetRemindersResponse
Contains the status and results of a GetReminders
request.

PerformReminderActionResponse
Contains the status and results of a
PerformReminderAction request.

GetServerTimeZonesResponseMessage
Contains the status and result of a single
GetServerTimeZones request.

ApplyConversationActionResponseMessage Contains the status and results of an


ApplyConversationAction operation request.

Parent elements

Element Description

CopyFolderResponse
Defines a response to a CopyFolder request.

CopyItemResponse
Defines a response to a CopyItem request.

CreateAttachmentResponse
Defines a response to a CreateAttachment request.

CreateFolderResponse
Defines a response to a CreateFolder request.

CreateItemResponse
Defines a response to a CreateItem request.

CreateManagedFolderResponse
Defines a response to a CreateManagedFolder request.

DeleteAttachmentResponse
Defines a response to a DeleteAttachment request.

DeleteFolderResponse
Defines a response to a DeleteFolder request.

DeleteItemResponse
Defines a response to a DeleteItem request.

EmptyFolderResponse
Defines a response to an EmptyFolder request.

ExpandDLResponse
Defines a response to an ExpandDL request.

ExportItemsResponse Represents response to a single ExportItems request.

FindFolderResponse
Defines a response to a FindFolder request.

FindItemResponse
Defines a response to a FindItem request.

GetAttachmentResponse
Defines a response to a GetAttachment request.
Element Description

GetEventsResponse
Defines a response to a GetEvents request.

GetStreamingEventsResponse
Defines a response to a GetStreamingEvents request.

GetFolderResponse
Defines a response to a GetFolder request.

GetItemResponse
Defines a response to a GetItem request.

MoveFolderResponse
Defines a response to a MoveFolder request.

MoveItemResponse
Defines a response to a MoveItem request.

ResolveNamesResponse
Defines a response to a ResolveNames request.

SendItemResponse
Defines a response to a SendItem request.

SendNotificationResult
Defines a response to a SendNotification request.

SubscribeResponse
Defines a response to a Subscribe request.

SyncFolderHierarchyResponse
Defines a response to a SyncFolderHierarchy request.

SyncFolderItemsResponse
Defines a response to a SyncFolderItems request.

UnsubscribeResponse
Defines a response to an Unsubscribe request.

UpdateFolderResponse
Defines a response to an UpdateFolder request.

UpdateItemResponse
Defines a response to an UpdateItem request.

ConvertIdResponse
Contains a response to a ConvertId request.

GetServerTimeZonesResponse
Defines a response to a GetServerTimeZones request.

CreateUserConfigurationResponse
Defines a response to a CreateUserConfiuration request.

DeleteUserConfigurationResponse
Defines a response to a DeleteUserConfiguration request.

GetUserConfigurationResponse
Defines a response to a GetUserConfiguration request.

UpdateUserConfigurationResponse
Defines a response to an UpdateUserConfiguration
request.

ApplyConversationActionResponse
Defines a response to an ApplyConversationAction
operation request.

GetPasswordExpirationDateResponse Defines a response to a GetPasswordExpirationDate


operation operation request.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
ExportItems operation
UploadItems operation
EWS XML elements in Exchange
ResponseMessages
(ArrayOfDelegateUserResponseMessage
Type)
Article • 03/29/2023 • 2 minutes to read

The ResponseMessages element contains the response messages for an Exchange Web
Services delegate management request.

<ResponseMessages>

<DelegateUserResponseMessageType/>

</ResponseMessages>

ArrayOfDelegateUserResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

DelegateUserResponseMessageType Contains response messages for delegate management


operations.

Parent elements

Element Description

AddDelegateResponse
Contains the status and result of an AddDelegate operation request.

GetDelegateResponse
Contains the status and result of a GetDelegate operation request.
Element Description

UpdateDelegateResponse
Contains the status and result of an UpdateDelegate operation
request.

RemoveDelegateResponse Contains the status and result of a RemoveDelegate operation


request.

Remarks
This element is used in the AddDelegate operation, the GetDelegate operation, the
UpdateDelegate operation, and the RemoveDelegate operation. The delegate
management operation responses are structured differently than other responses. The
delegate management response messages are strongly typed.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running Exchange Server with the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
AddDelegate operation

GetDelegate operation

UpdateDelegate operation

RemoveDelegate operation

EWS XML elements in Exchange


ResponseMessages
(ArrayOfMailTipsResponseMessageType
)
Article • 03/29/2023 • 2 minutes to read

The ResponseMessages element represents a list of mail tips response messages.

XML

<ResponseMessages>

<MailTipsResponseMessageType/>

</ResponseMessages>

ArrayOfMailTipsResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

MailTipsResponseMessageType
Represents mail tips settings.

Parent elements

Element Description

GetMailTipsResponse
Represents the response message for the GetMailTips operation.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetMailTips operation

EWS XML elements in Exchange


ResponseMessages
(ArrayOfServiceConfigurationResponse
MessageType)
Article • 03/29/2023 • 2 minutes to read

The ResponseMessages element contains an array of service configuration response


messages.

XML

<ResponseMessages>

<ServiceConfigurationResponseMessageType/>

</ResponseMessages>

ArrayOfServiceConfigurationResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ServiceConfigurationResponseMessageType Contains service configuration settings. This


element is required.

Parent elements

Element Description

GetServiceConfigurationResponse
Defines a response to a GetServiceConfiguration request.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ResponseObjects
Article • 03/29/2023 • 2 minutes to read

The ResponseObjects element contains a collection of all the response objects that are
associated with an item in the Exchange store.

XML

<ResponseObjects>

<AcceptItem/>

<TentativelyAcceptItem/>

<DeclineItem/>

<ProposeNewTime>

<ReplyToItem/>

<ForwardItem/>

<ReplyAllToItem/>

<CancelCalendarItem/>

<RemoveItem/>

<PostReplyItem/>

<SuppressReadReceipt/>

<AcceptSharingInvitation/>

</ResponseObjects>

NonEmptyArrayOfResponseObjectsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

AcceptItem
Represents an Accept reply to a meeting request.

TentativelyAcceptItem
Represents a Tentative reply to a meeting request.

DeclineItem
Represents a Decline reply to a meeting request.
Element Description

ProposeNewTime
Indicates that the meeting attendee can propose a new meeting time.
This element was introduced in Microsoft Exchange Server 2013 Service
Pack 1 (SP1).

ReplyToItem
Contains a reply to the creator of an item in the Exchange store.

ForwardItem
Contains an Exchange store item to forward to recipients.

ReplyAllToItem
Contains a reply to all identified recipients of an item in the Exchange
store.

CancelCalendarItem
Represents the response object used to cancel a meeting.

RemoveItem
Removes an item from the Exchange store.

PostReplyItem
Contains a reply to a post item. This element was introduced in
Microsoft Exchange Server 2007 Service Pack 1 (SP1).

SuppressReadReceipt
Used to suppress read receipt requests.

AcceptSharingInvitation Used to accept an invitation that allows access to another user's


calendar or contacts data.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ResponseType
Article • 03/29/2023 • 2 minutes to read

The ResponseType element represents the type of recipient response that is received for
a meeting.

XML

<ResponseType/>

ResponseTypeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Attendee
Represents attendees and resources for a meeting.

MeetingCancellation Represents a meeting cancellation in the Exchange store

MeetingMessage
Represents a meeting message in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Text value
A text value is required. The following are the possible text values for this element:
Unknown

Organizer

Tentative

Accept

Decline

NoResponseReceived

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
RestrictedGroupIdentifier
Article • 03/29/2023 • 2 minutes to read

The RestrictGroupIdentifier element represents the group security identifier (SID) and
attributes for a restricted group within a user token.

XML

<RestrictedGroupIdentifier Attributes="">

<SecurityIdentifier/>

</RestrictedGroupIdentifier>

SidAndAttributesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Attributes Contains group attributes.

Child elements

Element Description

SecurityIdentifier Represents the security descriptor definition language (SDDL) form of a


security identifier.

Parent elements

Element Description

RestrictedGroupSids Represents a collection of restricted groups within a user token. Token


serialization is not supported.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
RestrictedGroupSids
Article • 03/29/2023 • 2 minutes to read

The RestrictedGroupSids element represents a collection of restricted groups from a


user's token.

XML

<RestrictedGroupSids>

<RestrictedGroupIdentifier/>

</RestrictedGroupSids>

NonEmptyArrayOfRestrictedGroupIdentifiersType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

RestrictedGroupIdentifier Represents the group security identifier (SID) and attributes for a
restricted group.

Parent elements

Element Description

SerializedSecurityContext Used in the SOAP header for token serialization in server- to-server
authentication. Token serialization is not supported.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Restriction
Article • 03/29/2023 • 2 minutes to read

The Restriction element represents the restriction or query that is used to filter items or
folders in FindItem/FindFolder and search folder operations.

XML

<Restriction>

<SearchExpression/>

</Restriction>

RestrictionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

And
Represents a search expression that enables you to perform a Boolean
AND operation between two or more search expressions.

Contains
Represents a search expression that determines whether a given
property contains the supplied constant string value.

Excludes
Performs a bitwise mask of the properties.

Exists
Represents a search expression that returns true if the supplied
property exists on an item.

IsEqualTo
Represents a search expression that compares a property with either a
constant value or another property and evaluates to true if they are
equal.

IsGreaterThan
Represents a search expression that compares a property with either a
constant value or another property and returns true if the first property
is greater than the value or property.
Element Description

IsGreaterThanOrEqualTo Represents a search expression that compares a property with either a


constant value or another property and returns true if the first property
is greater than or equal to the value or property.

IsLessThan
Represents a search expression that compares a property with either a
constant value or another property and returns true if the first property
is less than the value or property.

IsLessThanOrEqualTo
Represents a search expression that compares a property with either a
constant value or another property and returns true if the first property
is less than or equal to the value or property.

IsNotEqualTo
Represents a search expression that compares a property with either a
constant value or another property and returns true if the values are
not the same.

Not
Represents a search expression that negates the Boolean value of the
search expression it contains.

Or
Represents a search expression that performs a logical OR operation
on the search expression it contains. The Or element will return true if
any of its children return true.

SearchExpression
Represents the substituted element within a restriction. This element is
not used in an XML instance document.

Parent elements

Element Description

FindFolder
Defines a request to identify folders in a mailbox.

FindItem
Defines a request to find items in a mailbox.

SearchParameters
Represents the parameters that define a search folder.

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ResultType
Article • 03/29/2023 • 2 minutes to read

The ResultType element contains the type of search to perform. The type of search can
be statistics only or preview only.

XML

<ResultType>StatisticsOnly | PreviewOnly</ResultType>

SearchResultType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SearchMailboxesResult | SearchMailboxes

Text value
The text value of the ResultType element is the type of result that is returned for a
discovery search. A text value of StatisticsOnly will return the search statistics. A text
value of PreviewOnly will return item preview information.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


RetentionAction
Article • 03/29/2023 • 2 minutes to read

The RetentionAction element specifies the action performed on items with the retention
tag.

XML

<RetentionAction> None | MoveToDeletedItems | MoveToFolder |


DeleteAndAllowRecovery | PermanentlyDelete | MarkAsPastRetentionLimit |
MoveToArchive <RetentionAction>

RetentionActionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
RetentionPolicyTag

Text value
The text value of the RetentionAction element is the action performed on items. The
following list contains the text values for the RetentionAction element.

None - No action is performed on the item.

MoveToDeletedItems - The item is moved to the default Deleted Items folder.


MoveToFolder - The item is moved to a specified folder.

DeleteAndAllowRecovery - The item is deleted and put into the Dumpster.

PermanentlyDelete - The item is permanently deleted from the mailbox.

MarkAsPastRetentionLimit - The item is marked as having exceeded the retention


time limit.

MoveToArchive - The item is moved to the archive mailbox.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
RetentionDate
Article • 03/29/2023 • 2 minutes to read

The RetentionDate element specifies the last date that an item must be retained.

XML

<RetentionDate></RetentionDate>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SearchPreviewItem | Item | Contact | Message | DistributionList | CalendarItem | PostItem
| Task

Text value
The text value of the RetentionDate element represents the date when an item should
no longer be retained.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
RetentionId
Article • 03/29/2023 • 2 minutes to read

The RetentionId element specifies the retention tag identifier.

XML

<RetentionId></RetentionId>

GuidType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
RetentionPolicyTag

Text value
The text value of the RetentionId element is the retention tag identifier in GUID form.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


RetentionPeriod
Article • 03/29/2023 • 2 minutes to read

The RetentionPeriod element specifies the number of days that the retention policy is in
effect.

XML

<RetentionPeriod></RetentionPeriod>

integer

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
RetentionPolicyTag

Text value
The text value of the RetentionPeriod element is the number of days that the retention
policy is in effect for an item.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
RetentionPolicyTag
Article • 03/29/2023 • 2 minutes to read

The RetentionPolicyTag element specifies the retention policy for a mailbox item.

XML

<RetentionPolicyTag>

<DisplayName/>

<RetentionId/>

<RetentionPeriod/>

<Type/>

<RetentionAction/>

<Description/>

<IsVisible/>

<OptedInto/>

<IsArchive/>

</RetentionPolicyTag>

RetentionPolicyTagType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
DisplayName (string) | RetentionId | RetentionPeriod | Type (ElcFolderType) |
RetentionAction | Description | IsVisible | OptedInto | IsArchive

Parent elements
RetentionPolicyTags

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
RetentionPolicyTagId
Article • 03/29/2023 • 2 minutes to read

The RetentionPolicyTagId element specifies the identifier of the retention policy tag.

XML

<RetentionPolicyTagId></RetentionPolicyTagId>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
ConversationAction

Text value
The text value of the RetentionPolicyTagId element is the policy tag identifier applied to
items in a conversation.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
RetentionPolicyTags
Article • 03/29/2023 • 2 minutes to read

The RetentionPolicyTags element contains a list of retention tags returned in the


response of the GetUserRetentionPolicyTags WSDL operation.

XML

<RetentionPolicyTags>

<RetentionPolicyTag/>

</RetentionPolicyTags>

ArrayOfRetentionPolicyTagsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
RetentionPolicyTag

Parent elements
GetUserRetentionPolicyTagsResponse

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty false


RetentionPolicyType
Article • 03/29/2023 • 2 minutes to read

The RetentionPolicyType element specifies the retention policy type applied to items in
a conversation.

XML

<RetentionPolicyType> Delete | Archive </RetentionPolicyType>

RetentionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
ConversationAction

Text value
The text value of the RetentionPolicyType element is the retention type applied to items
in a conversation. The text value of Delete indicates that the items in the conversation
are deleted when the retention hold expires. The text value of Archive indicates that the
items in the conversation are moved to the archive mailbox when the retention hold
expires.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
ReturnNewItemIds
Article • 03/29/2023 • 2 minutes to read

The ReturnNewItemIds element indicates whether the item identifiers of new items are
returned in the response.

XML

<ReturnNewItemIds/>

xs:boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CopyItem
Defines a request to copy an item in a mailbox in the Exchange store.

MoveItem
Defines a request to move an item in the Exchange store.

Text value
A text value of true for the ReturnNewItemIds element indicates that the new item
identifiers are returned in the response. A value of false indicates that the new item
identifiers are not returned in the response.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File Messages.xsd

Can be Empty False


ReturnQueueEvents
Article • 03/29/2023 • 2 minutes to read

The ReturnQueueEvents element indicates that the person who is running the task is in
a privileged role.

XML

<ReturnQueueEvents>true | false</ReturnQueueEvents>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

GetMessageTrackingReport Contains the request for the GetMessageTrackingReport operation


to retrieve the full message tracking report for the specified ID.

Text value
A text value that represents a Boolean value is required. A value of true indicates that
the person who is running the task is in a privileged role; a value of false indicates that
the person who is running the task is not in a privileged role.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetMessageTrackingReport operation

EWS XML elements in Exchange


RightsManagedMessageDecryptionStat
us
Article • 03/29/2023 • 2 minutes to read

The RightsManagedMessageDecryptionStatus element specifies the rights


management decryption status of an item.

XML

<RightsManagedMessageDecryptionStatus>
</RightsManagedMessageDecryptionStatus>

integer

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
RightsManagementLicenseData

Text value
The text value of the RightsManagedMessageDecryptionStatus element is the
decryption status of a rights protected item.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
RightsManagementLicenseData
Article • 03/29/2023 • 2 minutes to read

The RightsManagementLicenseData element specifies information about the rights


management license for an item.

XML

<RightsManagementLicenseData>

<RightsManagedMessageDecryptionStatus/>

<RmsTemplateId/>

<TemplateName/>

<TemplateDescription/>

<EditAllowed/>

<ReplyAllowed/>

<ReplyAllAllowed/>

<ForwardAllowed/>

<ModifyRecipientsAllowed/>

<ExtractAllowed/>

<PrintAllowed/>

<ExportAllowed/>

<ProgrammaticAccessAllowed/>

<IsOwner/>

<ContentOwner/>

<ContentExpiryDate/>
</RightsManagementLicenseData>

RightsManagementLicenseDataType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
RightsManagedMessageDecryptionStatus | RMSTemplateId | TemplateName |
TemplateDescription | EditAllowed | ReplyAllowed | ReplyAllAllowed | ForwardAllowed |
ModifyRecipientsAllowed | ExtractAllowed | PrintAllowed | ExportAllowed |
ProgrammaticAccessAllowed | IsOwner | ContentOwner | ContentExpiryDate
Parent elements
Item | Message | MeetingMessage | MeetingRequest | MeetingResponse |
MeetingCancellation | Task | PostItem | CalendarItem | Contact | DistributionList

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
RMSTemplateId
Article • 03/29/2023 • 2 minutes to read

The RMSTemplateId element specifies the identifier of the Rights Management


template.

XML

<RMSTemplateId></RMSTemplateId>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
RightsManagementLicenseData

Text value
The text value of the RMSTemplateId element is the identifier of the Rights
Management template.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Role
Article • 03/29/2023 • 2 minutes to read

The Role element specifies a string that represents a management role.

XML

<Role></Role>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
UserRoles | ApplicationRoles

Text value
The text value of the Role element is the name of the role.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Room
Article • 03/29/2023 • 2 minutes to read

The Room element represents a meeting room.

Rooms

Room

XML

<Room>

<Id/>

</Room>

RoomType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Id An identifier that contains an email address and display name that


(EmailAddressType) represents the meeting room.

Parent elements

Element Description

Rooms
Defines a list of meeting rooms associated with a common feature, such as being
located in the same building.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetRooms operation

EWS XML elements in Exchange


RoomList
Article • 03/29/2023 • 2 minutes to read

The RoomList element represents an e-mail address that identifies a list of meeting
rooms.

GetRooms

RoomList

XML

<RoomList>

<Name/>

<EmailAddress/>

<RoutingType/>

<MailboxType/>

<ItemId/>

</RoomList>

EmailAddressType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Name Defines the display name of the room list. This element is optional.
(EmailAddressType)

EmailAddress Defines the Simple Mail Transfer Protocol (SMTP) address of a room list.
(NonEmptyStringType) This element is optional.

RoutingType Defines the routing that is used for the mailbox. The default is SMTP.
(EmailAddress)
This element is optional.

MailboxType
Defines the mailbox type of a mailbox user. This element is optional.
Element Description

ItemId
Defines the item identifier of a contact or private distribution list for
recipients from a user's Contacts folder. This element is optional.

Parent elements

Element Description

GetRooms
The root element in a request to get a list of rooms within a particular room list.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetRooms operation

EWS XML elements in Exchange


RoomLists
Article • 03/29/2023 • 2 minutes to read

The RoomLists element is a list of one or more addresses that represent a list of
meeting rooms.

GetRoomListsResponse

RoomLists

XML

<RoomLists> <Address/></RoomLists>

ArrayOfEmailAddressesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Address Defines the e-mail address and display name that represents the room list.
(EmailAddressType)
This element is optional.

Parent elements

Element Description

GetRoomListsResponse
Contains the status and result of a GetRoomLists operation request.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Exchange Server with the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetRoomLists operation

EWS XML elements in Exchange


Rooms
Article • 03/29/2023 • 2 minutes to read

The Rooms element is a list of one or more elements that represent meeting rooms.

GetRoomsResponse

Rooms

XML

<Rooms> <Room/></Rooms>

ArrayOfRoomsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Room
Defines an e-mail address and display name that represents a meeting room.

Parent elements

Element Description

GetRoomsResponse

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server that has the Client Access server
role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetRooms operation

EWS XML elements in Exchange


RootAddress
Article • 03/29/2023 • 2 minutes to read

The RootAddress element represents the first address that starts the event for a
RecipientTrackingEvent event.

XML

<RootAddress/>

NonEmptyStringType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

RecipientTrackingEvent
Contains information for a single event for a recipient.

Text value
The text value is the address that starts the tracking event.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetMessageTrackingReport operation

EWS XML elements in Exchange


RootFolder (FindItemResponseMessage)
Article • 03/29/2023 • 2 minutes to read

The RootFolder element contains the results of a search of a single root folder during a
FindItem operation.

XML

<RootFolder IndexedPagingOffset="" NumeratorOffset="" AbsoluteDenominator=""


IncludesLastItemInRange="" TotalItemsInView="">

<Items/>

<Groups/>

</RootFolder>

FindItemParentType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

IndexedPagingOffset
Represents the next index that should be used for the next request
when using an indexed paging view.

NumeratorOffset
Represents the new numerator value to use for the next request
when using fraction page views.

AbsoluteDenominator
Represents the next denominator to use for the next request when
doing fractional paging.

IncludesLastItemInRange Indicates whether the current results contain the last item in the
query, such that further paging is not needed.

TotalItemsInView
Represents the total number of items that pass the restriction. In a
grouped FindItem operation, the TotalItemsInView attribute returns
the total number of items in the view plus the total number of
groups.

Child elements
Element Description

Items
Contains an array of items found that have the search criteria identified in the FindItem
operation request.

Groups
Contains a collection of groups found that have the search and aggregation criteria
identified in the FindItem operation request.

Parent elements

Element Description

FindItemResponseMessage
Contains the status and result of a FindItem operation request.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Exchange Server with the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
FindItem operation

IndexedPagingOffset

NumeratorOffset

AbsoluteDenominator

IncludesLastItemInRange

TotalItemsInView
Finding Items
RootFolder
(FindFolderResponseMessage)
Article • 03/29/2023 • 2 minutes to read

The RootFolder element contains the results of a search of a single root folder during a
FindFolder operation.

XML

<RootFolder IndexedPagingOffset="" NumeratorOffset="" AbsoluteDenominator=""


IncludesLastItemInRange="" TotalItemsInView="">

<Folders/>

</RootFolder>

FindFolderParentType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

IndexedPagingOffset Represents the next index that should be used for the next request
when using an indexed paging view.

NumeratorOffset Represents the new numerator value to use for the next request when
using fractional page views.

AbsoluteDenominator Represents the next denominator to use for the next request when
doing fractional paging.

IncludesLastItemInRange Indicates whether the current results contain the last folder in the
query, such that further paging is not needed.

TotalItemsInView Represents the total number of folders that pass the restriction.

Child elements

Element Description
Element Description

Folders
Contains an array of folders found by using the FindFolder operation.

Parent elements

Element Description

FindFolderResponseMessage
Contains the status and result of a FindFolder operation request.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
FindFolder operation

Finding Folders
RootItemId
Article • 03/29/2023 • 2 minutes to read

The RootItemId element identifies the root item of a deleted attachment.

DeleteAttachmentResponse

ResponseMessages

DeleteAttachmentResponseMessage

RootItemId

XML

<RootItemId RootItemId="" RootItemChangeKey="" />

RootItemIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

RootItemId
Identifies the root item of a deleted attachment.

RootItemChangeKey
Identifies the new change key of the root item of a deleted attachment.

Child elements
None.

Parent elements

Element Description

DeleteAttachmentResponseMessage Contains the status and result of a DeleteAttachment


request.
Remarks
The RootItemId element is only used in DeleteAttachment responses. This identifies the
root item identifier, and more importantly, the new change key to the parent item.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
DeleteAttachment

DeleteAttachment operation

EWS XML elements in Exchange


RoutingType (EmailAddressType)
Article • 03/29/2023 • 2 minutes to read

The RoutingType element defines the address type for the mailbox.

XML

<RoutingType/>

NonEmptyStringType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ActingAs
Identifies who the caller is sending as.

Mailbox
Identifies a fully resolved e-mail address.

RoomList
Identifies a list of meeting rooms.

Text value
The text value represents a routing type. SMTP is the typical text value for this element.

Remarks
This element is optional in the Mailbox element. Another RoutingType (EmailAddress)
element is used for Availability operations.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
RoutingType (EmailAddress)
Article • 03/29/2023 • 2 minutes to read

The RoutingType element represents the routing protocol for the recipient.

XML

<RoutingType/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Email Specifies the e-mail address of the MailboxData object. This element is used
(EmailAddressType) in the GetUserAvailability operation.

The following is the XPath to this element:

/GetUserAvailabilityRequest/MailboxDataArray/MailboxData[i]/Email

Mailbox Represents the mailbox user for a SetUserOofSettings or


(Availability)
GetUserOofSettings request.

The following are the XPath expressions to this element:

/GetUserOofSettingsRequest/Mailbox

/SetUserOofSettingsRequest/Mailbox

Text value
A text value is optional. The following are the possible values:

SMTP
EX

If no value is provided, the default value of SMTP is used.

Remarks
This element can occur at most one time in the Email (EmailAddressType) element. This
element is not required. This element exists for the inclusion of future protocols.
Another RoutingType element is used for accessing items in a user's mailbox.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
GetUserAvailabilityRequest
Getting User Availability
Rule
Article • 03/29/2023 • 2 minutes to read

The Rule element contains a single protection rule.

XML

<Rule Name="" UserOverridable=="" Priority="">

<Condition/>

<Action/>

</Rule>

ProtectionRuleType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Name
Identifies the name of the rule. A required attribute of type string with a
minimum length of 1.

UserOverridable Specifies whether the rule is mandatory. If the rule is mandatory, this attribute
value must be false. A required attribute of type Boolean.

Priority
Specifies the rule priority. A required attribute of type int with a minimum
value of 1.

Child elements

Element Description

Condition
Identifies the condition that must be satisfied for the action part of
the rule to be executed.

Action Identifies what action must be executed if the condition part of the
(ProtectionRuleActionType) rule matches.

Parent elements
Element Description

Rules Contains an array of protection rules.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Rule (RuleType)
Article • 03/29/2023 • 2 minutes to read

The Rule element contains a single rule and represents a rule in a user's mailbox.

XML

<Rule>

<RuleId>

<DisplayName>

<Priority>

<IsEnabled>

<IsNotSupported>

<IsInError>

<Conditions>

<Exceptions>

<Actions>

</Rule>

RuleType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

RuleId
Specifies the rule identifier.

DisplayName Contains the display name of a rule.


(string)

Priority
Indicates the order in which a rule is to be run.

IsEnabled
Indicates whether the rule is enabled.

IsNotSupported Indicates whether the rule cannot be modified with the managed code APIs.

IsInError
Indicates whether the rule is in an error condition.
Element Description

Conditions
Identifies the conditions that, when fulfilled, will trigger the rule actions for a
rule.

Exceptions
Identifies the exceptions that represent all the available rule exception
conditions for the inbox rule.

Actions
Represents the actions to be taken on a message when the conditions are
fulfilled.

Parent elements

Element Description

CreateRuleOperation
Represents an operation to create a new rule.

InboxRules
Represents an array of rules in the user's mailbox.

SetRuleOperation
Represents an operation to update an existing rule.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
UpdateInboxRules

SetRuleOperation

CreateRuleOperation

EWS XML elements in Exchange


RuleId
Article • 03/29/2023 • 2 minutes to read

The RuleId element specifies a rule identifier.

XML

<RuleId/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Rule (RuleType)
Represents a rule in the user's mailbox.

DeleteRuleOperation
Represents the operation to delete an existing Inbox rule.

Text value
The text value is a string value that represents the rule.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
RuleOperationError
Article • 03/29/2023 • 2 minutes to read

The RuleOperationError element represents a rule operation error.

XML

<RuleOperationError>

<OperationIndex/>

<ValidationErrors/>

</RuleOperationError>

RuleOperationErrorType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

OperationIndex Indicates the index of the operation in the request that caused the rule
operation error.

ValidationErrors Represents an array of rule validation errors on each rule field that has an error.

Parent elements

Element Description

RuleOperationErrors Represents an array of rule validation errors on each rule field that has an
error.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
RuleOperationErrors
Article • 03/29/2023 • 2 minutes to read

The RuleOperationErrors element represents an array of rule validation errors on each


rule field that has an error.

UpdateInboxRulesResponse

RuleOperationErrors

XML

<RuleOperationErrors>

<RuleOperationError>

</RuleOperationErrors>

ArrayOfRuleOperationErrorsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

RuleOperationError
Represents a rule operation error.

Parent elements

Element Description

UpdateInboxRulesResponse
Defines a response to an UpdateInboxRules request.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty True

See also
UpdateInboxRules

EWS XML elements in Exchange


Rules
Article • 03/29/2023 • 2 minutes to read

The Rules element contains an array of protection rules.

XML

<Rules> <Rule/></Rules>

ArrayOfProtectionRulesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Rule
Contains a single protection rule. This element can occur zero or more times. This
element occurs zero times when no protection rules are defined by the organization. It
occurs one or more times if at least one rule is defined by the organization.

Parent elements

Element Description

ProtectionRulesConfiguration
Contains service configuration for the protection rules service.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
SavedItemFolderId
Article • 03/29/2023 • 2 minutes to read

The SavedItemFolderId element identifies the target folder for operations that update,
send, and create items in a mailbox.

XML

<SavedItemFolderId>

<FolderId/>

</SavedItemFolderId>

XML

<SavedItemFolderId>

<DistinguishedFolderId/>

</SavedItemFolderId>

TargetFolderIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier and change key of a target folder for operations
that update, send, and create items in the Exchange store.

DistinguishedFolderId Identifies a target folder by a named identifier for operations that update,
send, and create items in the Exchange store.

Parent elements

Element Description
Element Description

CreateItem
Defines a request to create an item in the Exchange store.
The following is the XPath expression to this element:
/CreateItem

UpdateItem
Defines a request to update an item in the Exchange store.
The following is the XPath expression to this element:
/UpdateItem

SendItem
Defines a request to send an item in the Exchange store.
The following is the XPath expression to this element:
/SendItem

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False


SchemaVersionSupported
Article • 03/29/2023 • 2 minutes to read

The SchemaVersionSupported element contains the version of the manifest schema


supported by the client.

XML

<SchemaVersionSupported />

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
GetAppManifests

Text value
The text value of the SchemaVersionSupported element contains the version of the
manifest schema supported by the client. This value indicates which app manifests
should be returned to the client in the response.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Not applicable

Can be Empty False

See also
GetAppManifests

EWS XML elements in Exchange


Schools
Article • 03/29/2023 • 2 minutes to read

The Schools element specifies an array of school names and the identifiers of their
source attributions for the associated persona.

XML

<Schools>

<StringAttributedValue/>

</Schools>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
StringAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Scope (ClientAccessTokenRequestType)
Article • 03/29/2023 • 2 minutes to read

The Scope (ClientAccessTokenRequestType) element specifies a token scope.

XML

<Scope/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
TokenRequest

Text value
The text value of the Scope (ClientAccessTokenRequestType) element is a token scope.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
TokenRequest

EWS XML elements in Exchange


Scope (HighlightTermType)
Article • 03/29/2023 • 2 minutes to read

The Scope element specifies the string to be highlighted.

XML

<Scope></Scope>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Term

Text value
The text value of the Scope element is the scope of a highlighted term.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Scope (NonEmptyStringType)
Article • 03/29/2023 • 2 minutes to read

The Scope element specifies the scope of the message tracking report.

XML

<Scope>Organization | Forest | Site</Scope>

NonEmptyStringType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
FindMessageTrackingReport | GetMessageTrackingReport

Text value
The following table lists the possible values for the Scope element.

Value Description

Organization The message tracking scopes spans across an organization.

Forest The message tracking scopes spans across a forest.

Site The message tracking scopes spans across a site.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
SearchableMailbox
Article • 03/29/2023 • 2 minutes to read

The SearchableMailbox element specifies a mailbox returned from a


GetSearchableMailboxes request.

XML

<SearchableMailbox>

<Guid/>

<PrimarySmtpAddress/>

<IsExternalMailbox/>
<ExternalEmailAddress/>

<DisplayName/>

<IsMembershipGroup/>
<ReferenceId/>

</SearchableMailbox>

SearchableMailboxType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Guid | PrimarySmtpAddress (string) | IsExternalMailbox | ExternalEmailAddress |
DisplayName (string) | IsMembershipGroup | ReferenceId

Parent elements
SearchableMailboxes

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
SearchableMailboxes
Article • 03/29/2023 • 2 minutes to read

The SearchableMailboxes element contains an array of the mailboxes returned from a


GetSearchableMailboxes request.

XML

<SearchableMailboxes>

<SearchableMailbox/>
</SearchableMailboxes>

ArrayOfSearchableMailboxesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
SearchableMailbox

Parent elements
GetSearchableMailboxesResponse

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
SearchArchiveOnly
Article • 03/29/2023 • 2 minutes to read

The SearchArchiveOnly element indicates whether only the archive mailbox is searched
for non-indexable items.

XML

<SearchArchiveOnly>true | false</SearchArchiveOnly>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
GetNonIndexableItemStatistics │ GetNonIndexableItemDetails

Text value
A text value of true for the SearchArchiveOnly element indicates that non-indexable
item search is only performed on the archive mailbox. A text value of false indicates that
the search is performed against the primary mailbox and archive mailbox.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
SearchDumpster
Article • 03/29/2023 • 2 minutes to read

The SearchDumpster element specifies whether to search in the Exchange Dumpster.

XML

<SearchDumpster> true | false </SearchDumpster>

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
FindMailboxStatisticsByKeywords

Text value
A text value of true for the SearchDumpster element indicates that the mailbox statistics
search includes the Exchange Dumpster. A value of false indicates that the Exchange
Dumpster is not searched.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
SearchExpression
Article • 03/29/2023 • 2 minutes to read

The SearchExpression element is an abstract element that represents the substituted


element within a restriction. All search expressions derive from this base type. This
element is not used in an XML instance document.

XML

<SearchExpression/>

SearchExpressionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Restriction Represents the restriction or query that is used to filter items or folders in
FindItem/FindFolder and search folder operations.

Not
Represents a search expression that negates the Boolean value of the search
expression that it contains.

And
Represents a search expression that allows you to perform a Boolean AND operation
between two or more search expressions. The result of the AND operation is true if
all the search expressions contained within the And element are true.

Or
Represents a search expression that performs a logical OR operation on the search
expression that it contains. Or will return true if any of its children return true. Or
must have two or more children.
Remarks
Any filter element that is part of the SearchExpression substitution group can appear in
place of the SearchExpression element.

7 Note

This element will never occur directly within an instance document.

The following elements are members of the SearchExpression substitution group:

Exists

Excludes

IsEqualTo

IsNotEqualTo

IsGreaterThan

IsGreaterThanOrEqualTo

IsLessThan

IsLessThanOrEqualTo

Contains

Not

And

Or

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.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types
Element Example

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
SearchFilter
Article • 03/29/2023 • 2 minutes to read

The SearchFilter element contains the query string to filter the mailboxes to be returned
from a GetSearchableMailboxes request.

XML

<SearchFilter></SearchFilter>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
GetSearchableMailboxes

Text value
The text value of the SearchFilter element is a query string to filter mailboxes for
discovery search.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
SearchFolder
Article • 03/29/2023 • 2 minutes to read

The SearchFolder element represents a search folder that is contained in a mailbox.

XML

<SearchFolder>

<FolderId/>

<ParentFolderId/>

<FolderClass/>

<DisplayName/>

<TotalCount/>

<ChildFolderCount/>

<ExtendedProperty/>

<ManagedFolderInformation/>

<UnreadCount/>

<SearchParameters/>

<PermissionSet/>

<EffectiveRights/>

</SearchFolder>

SearchFolderType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier and change key of a folder.

ParentFolderId Represents the identifier of the parent folder that contains the
folder.

FolderClass
Represents the folder class for a given folder.

DisplayName (string)
Contains the display name of a folder.
Element Description

TotalCount
Represents the total count of items within a given folder.

ChildFolderCount
Represents the number of child folders contained within a folder.
This property is read-only.

ExtendedProperty
Identifies extended properties on folders.

ManagedFolderInformation Contains information about a managed folder.

UnreadCount
Represents the count of unread items within a given folder.

SearchParameters
Contains the parameters that define a search folder.

PermissionSet Contains all the configured permissions for a folder. This element
(PermissionSetType)
was introduced in Microsoft Exchange Server 2007 Service Pack 1
(SP1).

EffectiveRights
Contains the client's rights based on the permission settings for the
item or folder. This element is read-only. This element was
introduced in Exchange 2007 SP1.

Parent elements

Element Description

AppendToFolderField Specifies data to append to a folder property during an UpdateFolder


operation.

Create (FolderSync)
Identifies a single folder to create in the local client store.

SetFolderField
Represents an update to a single property on a folder in an UpdateFolder
operation.

Update (FolderSync)
Identifies a single folder to update in the local client store.

Folders
Contains an array of folders used in folder operations.

Remarks
SearchFolder is used for both regular search folders and MicrosoftOfficeOutlook and
Outlook Web Access visible search folders. For a search folder to be visible to Outlook
and Outlook Web Access, the folder must be created under the SearchFolders
distinguished folder.
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
SearchId
Article • 03/29/2023 • 2 minutes to read

The SearchId element specifies the identifier of a discovery search.

XML

<SearchId></SearchId>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
GetDiscoverySearchConfiguration | DiscoverySearchConfiguration

Text value
The text value of the SearchId element is the discovery search identifier.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
SearchItemKind
Article • 03/29/2023 • 2 minutes to read

The SearchItemKind element indicates the type of items that are searched for a
FindMailboxStatisticsByKeyword operation.

XML

<SearchItemKind>Email | Meetings | Tasks | Notes | Docs | Journals |


Contacts | Im | Voicemail | Faxes | Posts | Rssfeeds</SearchItemKind>

SearchItemKindType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
MessageTypes

Text value
The text value of the SearchItemKind element is the type of item that is searched for
keywords. The following list contains the text values that can be used in the
SearchItemKind element.

Email - Indicates that email messages are searched for keywords.


Meetings - Indicates that meetings are searched for keywords.
Tasks - Indicates that tasks are searched for keywords.
Notes - Indicates that notes are searched for keywords.
Docs - Indicates that documents are searched for keywords.
Journals - Indicates that journals are searched for keywords.
Contacts - Indicates that contacts are searched for keywords.
Im - Indicates that instant messages are searched for keywords.
Voicemail - Indicates that voice mails are searched for keywords.
Faxes - Indicates that faxes are searched for keywords.
Posts - Indicates that posts are searched for keywords.
Rssfeeds - Indicates that RSS feeds are searched for keywords.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
SearchMailboxes
Article • 03/29/2023 • 2 minutes to read

The SearchMailboxes element indicates the beginning of the SearchMailboxes request.

XML

<SearchMailboxes>

<SearchQueries/>

<ResultType/>

<PreviewItemResponseShape/>

<SortBy/>

<Language/>

<Deduplication/>

<PageSize/>

<PageItemReference/>
<PageDirection/>

</SearchMailboxes>

SearchMailboxesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
SearchQueries | ResultType | PreviewItemResponseShape | SortBy | Language |
Deduplication | PageSize | PageItemReference | PageDirection

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


SearchMailboxesResponse
Article • 03/29/2023 • 2 minutes to read

The SearchMailboxesResponse element contains the response to a SearchMailboxes


WSDL operation request.

XML

<SearchMailboxesResponse>

<ResponseMessages/>

</SearchMailboxesResponse>

SearchMailboxesResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ResponseMessages

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


SearchMailboxesResponseMessage
Article • 03/29/2023 • 2 minutes to read

The SearchMailboxesResponseMessage element specifies the response message for a


SearchMailboxes request.

XML

<SearchMailboxesResponseMessage>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<SearchMailboxesResult/>

</SearchMailboxesResponseMessage>

SearchMailboxesResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml |
SearchMailboxesResult

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
SearchMailboxesResult
Article • 03/29/2023 • 2 minutes to read

The SearchMailboxesResult element contains the result of the SearchMailboxes


request.

XML

<SearchMailboxesResult>

<SearchQueries/>

<ResultType/>

<ItemCount/>

<Size/>

<PageItemCount/>

<PageItemSize/>

<KeywordStats/>

<Items/>

<FailedMailboxes/>

<Refiners/>

<MailboxStats/>

</SearchMailboxesResult>

SearchMailboxesResultType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
SearchQueries | ResultType | ItemCount | Size (long) | PageItemCount | PageItemSize |
KeywordStats | Items (ArrayOfSearchPreviewItemsType) | FailedMailboxes | Refiners |
MailboxStats

Parent elements
SearchMailboxesResponseMessage
Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


SearchParameters
Article • 03/29/2023 • 2 minutes to read

The SearchParameters element represents the parameters that define a search folder.

XML

<SearchParameters Traversal="">

<Restriction/>

<BaseFolderIds/>

</SearchParameters>

SearchParametersType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Traversal Describes how a search folder traverses the folder hierarchy. The options are for either
a Deep or a Shallow search.

Child elements

Element Description

Restriction
Represents the restriction or query that is used to filter items or folders in
FindItem/FindFolder and search folder operations.

BaseFolderIds Represents the collection of folders that will be mined to determine the contents
of a search folder.

Parent elements

Element Description

SearchFolder
Represents a search folder that is contained in a mailbox.
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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
SearchPreviewItem
Article • 03/29/2023 • 2 minutes to read

The SearchPreviewItem element specifies the item preview for a discovery search.

XML

<SearchPreviewItem>

<Id/>

<Mailbox/>

<ParentId/>

<ItemClass/>

<UniqueHash/>

<SortValue/>

<OwaLink/>

<Sender/>

<ToRecipients/>

<CcRecipients/>

<BccRecipients/>

<CreatedTime/>

<ReceivedTime/>

<SentTime/>

<Subject/>

<Size/>

<Preview/>

<Importance/>

<Read/>

<HasAttachment/>

<ExtendedProperties/>

</SearchPreviewItem>

SearchPreviewItemType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ID (ItemIdType) | Mailbox (PreviewItemMailboxType) | ParentId | ItemClass | UniqueHash
| SortValue | OwaLink | Sender (string) | ToRecipients (ArrayOfSmtpAddressType) |
CcRecipients | BccRecipients | CreatedTime | ReceivedTime | SentTime | Subject | Size
(long) | Preview | Importance | Read | HasAttachment | ExtendedProperties
(NonEmptyArrayOfExtendedPropertyType)

Parent elements
Items (ArrayOfSearchPreviewItemsType)

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
SearchQueries
Article • 03/29/2023 • 2 minutes to read

The SearchQueries element contains a list of mailboxes and associated queries for
discovery search.

XML

<SearchQueries>

<MailboxQuery/>

</SearchQueries>

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MailboxQuery

Parent elements
SearchMailboxes | SearchMailboxesResult

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
SearchQuery
Article • 03/29/2023 • 2 minutes to read

The SearchQuery element specifies the discovery search query.

XML

<SearchQuery></SearchQuery>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
DiscoverySearchConfiguration

Text value
The text value of the SearchQuery element is a search query string.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
SearchScope
Article • 03/29/2023 • 2 minutes to read

The SearchScope element specifies the scope of a search.

XML

<SearchScope> PrimaryOnly | ArchiveOnly | All </SearchScope>

MailboxSearchLocationType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
MailboxSearchScope

Text value
The text value of the SearchScope element indicates the mailbox type that is searched
for a discovery search. A text value of PrimaryOnly indicates that the primary mailbox is
searched. A text value of ArchiveOnly indicates that the archive mailbox is searched. A
text value of All indicates that both the primary and archive mailboxes are searched.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
SecurityIdentifier
Article • 03/29/2023 • 2 minutes to read

The SecurityIdentifier element represents the security descriptor definition language


(SDDL) form of a security identifier ( SID).

XML

<SecurityIdentifier/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

GroupIdentifier
Represents a single security identifier and attribute for an Active
Directory object group of which the account is a member.
The following is the XPath expression to this element:
/SerializedSecurityContext/GroupSids/GroupIdentifier[i]

RestrictedGroupIdentifier Represents the group security identifier and attributes for a restricted
group within a user token.

Remarks
This element is used in the Simple Object Access Protocol (SOAP) header.
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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
SeekToConditionPageItemView
Article • 03/29/2023 • 2 minutes to read

The SeekToConditionPageItemView element identifies the condition that is used to


identify the end of a search, the starting index of a search, the maximum entries to
return, and the search directions for a FindItem or FindConversation search.

XML

<SeekToConditionPageItemView BasePoint="" MaxEntriesReturned="">

<Condition/>

</SeekToConditionPageItemView>

SeekToConditionPageViewType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

BasePoint The text value of the BasePoint attribute is the base point from where the
search will start. A text value of Beginning indicates that the search will
start at the beginning of the result set. A text value of End indicates that
the search will start at the end of the result set.

MaxEntriesReturned The text value of the MaxEntriesReturned attribute is the maximum


number of items that can be returned in a result set.

Child elements
Condition (RestrictionType)

Parent elements
FindConversation | FindItem

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


Sender
Article • 03/29/2023 • 2 minutes to read

The Sender element identifies the sender of an item.

XML

<Sender>

<Mailbox/>

</Sender>

SingleRecipientType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Mailbox
Identifies a mail enabled Active Directory object that identifies the sender.

Parent elements

Element Description

RemoveItem
Removes an item from the Exchange store.

Message
Represents an Exchange e-mail message.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.


Element Description

AcceptItem
Represents an accept reply to a meeting request.

TentativelyAcceptItem Represents a tentatively accepted reply to a meeting request.

DeclineItem
Represents a decline reply to a meeting request.

ReplyToItem
Contains a reply to the creator of an item in the Exchange store.

ReplyAllToItem
Contains a reply to all identified recipients of an item in the Exchange
store.

ForwardItem
Contains an Exchange store item to forward to recipients.

CancelCalendarItem
Represents the response object used to cancel a meeting.

PostItem
Represents a post item in the Exchange store. This element was
introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Sender (EmailAddressType)
Article • 03/29/2023 • 2 minutes to read

The Sender element represents the e-mail address for the sender of the message.

XML

<Sender>

<Name/>

<EmailAddress/>

<RoutingType/>

<MailboxType/>

<ItemId/>

</Sender>

EmailAddressType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Name Represents the name of the mailbox user. This element is optional.
(EmailAddressType)

EmailAddress Defines the primary Simple Mail Transfer Protocol (SMTP) address of a
(NonEmptyStringType) mailbox user. This element is optional.

RoutingType Represents the routing protocol for the recipient. The default value is
(EmailAddress)
SMTP. This element is optional.

MailboxType
Represents the type of mailbox that is represented by the e-mail address.
This element is optional.

ItemId
Defines the item identifier of a contact or private distribution list for
recipients from a user's Contacts folder. This element is optional.
Parent elements

Element Description

FindMessageTrackingReport
Specifies criteria for the types of messages to find.

MessageTrackingSearchResult Contains a single message result for a


FindMessageTrackingReportResponse element.

MessageTrackingReport
Contains a single message that is returned in a
GetMessageTrackingReport operation.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetMessageTrackingReport operation

EWS XML elements in Exchange


Sender (string)
Article • 03/29/2023 • 2 minutes to read

The Sender element specifies the e-mail address of the person who sent an item.

XML

<Sender></Sender>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SearchPreviewItem

Text value
The text value of the Sender element is the sender of an e-mail that is found by
performing a discovery search.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
SenderDepartments
Article • 03/29/2023 • 2 minutes to read

The SenderDepartments element specifies that the department of the sender matches
any of the specified departments in the child Value (ProtectionRuleValueType) elements.

XML

<SenderDepartments>

<Value/>

</SenderDepartments>

ProtectionRuleSenderDepartmentsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Value (ProtectionRuleValueType)
Identifies a single sender department.

Parent elements

Element Description

Condition
Identifies the condition that must be satisfied for the action part of the
rule to be executed.

And Specifies that all child elements must match to evaluate to true.
(ProtectionRuleAndType) Specifies that there must be more than one protection rule child
condition.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Senders
Article • 03/29/2023 • 2 minutes to read

The Senders element specifies an array of Simple Mail Transfer Protocol (SMTP)
addresses.

XML

<Senders>

<SmtpAddress/>

</Senders>

ArrayOfSmtpAddressType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
SmtpAddress

Parent elements
FindMailboxStatisticsByKeywords

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
SenderSmtpAddress
Article • 03/29/2023 • 2 minutes to read

The SenderSmtpAddress element represents the SMTP e-mail address corresponding to


the mailbox that contains the folder that will be shared.

XML

<SenderSmtpAddress/>

NonEmptyStringType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

GetSharingMetadata Defines a request to get an opaque authentication token that identifies the
sharing invitation.

Text value
A text value that represents an SMTP address is required.

Remarks
The schema that describes this element is located in the IIS Virtual directory that hosts
Exchange Web Services of the computer that is running Microsoft Exchange Server that
has the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetSharingMetadata operation

EWS XML elements in Exchange


SendingAs
Article • 03/29/2023 • 2 minutes to read

The SendingAs element represents an e-mail address that a user is trying to send as.

XML

<SendingAs>

<Name/>

<EmailAddress/>

<RoutingType/>

<MailboxType/>

<ItemId/>

</SendingAs>

EmailAddressType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Name Represents the name of the mailbox user. This element is optional.
(EmailAddressType)

EmailAddress Defines the primary Simple Mail Transfer Protocol (SMTP) address of a
(NonEmptyStringType) mailbox user. This element is optional.

RoutingType Defines the address type for the mailbox. The default is SMTP. This
(EmailAddress)
element is optional.

MailboxType
Represents the type of mailbox that is represented by an e-mail user.
This element is optional.

ItemId
Defines the item identifier of a contact or private distribution list for
recipients from a user's Contacts folder. This element is optional.
Parent elements

Element Description

GetMailTips
Contains the recipients and types of mail tips to retrieve.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
SendItem
Article • 03/29/2023 • 2 minutes to read

The SendItem element is the root element in a request to send an item in the Exchange
store.

XML

<SendItem SaveItemToFolder="">

<ItemIds/>

<SavedItemFolderId/>
</SendItem>

SendItemType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

SaveItemToFolder Identifies whether a copy of the sent item is saved. The save action depends
on the value of SaveItemToFolder and whether a SavedItemFolderId element
is present in the request. This element is required.

SaveItemToFolder Attribute

Value Description

true
If the SavedItemFolderId element is not present, the item is saved in the Sent Items folder.
If the SavedItemFolderId element is present, the item is saved in the folder that is
specified by the SavedItemFolderId element.

false
If the SavedItemFolderId element is not present, the item is not saved. If the
SavedItemFolderId element is present, an error response will be returned with a
ResponseCode element that contains the ErrorInvalidSendItemSaveSettings value.

Child elements
Element Description

ItemIds
Contains the unique identities of items, occurrence items, and recurring
master items that are used to delete, send, get, move, or copy items in the
Exchange store.

SavedItemFolderId Identifies the target folder for operations that update, send, and create items
in the Exchange store.

Parent elements
None.

Remarks
If an item in the Sent Items folder is sent, the sent item is deleted and a copy of it is put
in the Sent Items folder.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
SendItem operation
SendItemResponse
Article • 03/29/2023 • 2 minutes to read

The SendItemResponse element defines a response to a SendItem request.

XML

<SendItemResponse>

<ResponseMessages/>

</SendItemResponse>

SendItemResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Item Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
SendItem operation

SendItem
EWS XML elements in Exchange
SendItemResponseMessage
Article • 03/29/2023 • 2 minutes to read

The SendItemResponseMessage element contains the status and result of a single


SendItem operation request.

XML

<SendItemResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</SendItemResponseMessage>

ResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of a SendItem operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes are moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota is exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements out of range
- Unknown tag
- Attribute or element not valid in the context
- Unauthorized access attempt by any client
- Server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.
Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Exchange Server with the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
SendItem operation
EWS XML elements in Exchange
SendNotification
Article • 03/29/2023 • 2 minutes to read

The SendNotification element contains the push notifications that are sent by the
computer that is running Microsoft Exchange Server 2007 to the client application.

XML

<SendNotification>

<ResponseMessages/>

</SendNotification>

SendNotificationResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the push notifications that are sent by the Client Access server.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Event notifications in EWS

Push Notification Sample Application


SendNotificationResponseMessage
Article • 03/29/2023 • 2 minutes to read

The SendNotificationResponseMessage element contains the status and result of a


single SendNotification operation request.

XML

<SendNotificationResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<Notification/>

</SendNotificationResponseMessage>

SendNotificationResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of a SendNotification operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass Attribute

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes are moved.
- The message database (MDB) is offline.
- A password has expired.
- A quota was exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- Attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey Currently unused and is reserved for future use. It contains a value of 0.

MessageXml
Provides additional error response information.

Notification
Contains information about the subscription and the events that have
occurred since the last notification.

Parent elements
Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
SendNotification
Subscribe operation
Unsubscribe operation
SendNotificationResult
Article • 03/29/2023 • 2 minutes to read

The SendNotificationResult element contains the response of a client application to a


push notification.

XML

<SendNotificationResult>

<SubscriptionStatus/>

</SendNotificationResult>

SendNotificationResultType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

SubscriptionStatus
Describes the status of a push subscription.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
SendPrompt
Article • 03/29/2023 • 2 minutes to read

The SendPrompt element specifies the type of action allowed for a voting option.

XML

<SendPrompt> None | Send | VotingOption </SendPrompt>

SendPromptType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
VotingOptionData

Text value
The text value of the SendPrompt element is a voting option action. The following table
lists the possible values for this element.

Value Description

None No action.

Send The response is sent immediately.

VotingOption The approver can enter comments while approving or rejecting.


Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
VotingOptionData

EWS XML elements in Exchange


Sensitivity
Article • 03/29/2023 • 2 minutes to read

The Sensitivity element indicates the sensitivity level of an item.

XML

<Sensitivity/>

SensitivityChoicesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

AcceptItem
Represents an accept reply to a meeting request.

CalendarItem
Represents an Exchange calendar item.

Conditions
Represents the conditions that, when fulfilled, will trigger the rule actions
for a rule.

Contact
Represents an Exchange contact item.

DeclineItem
Represents a decline reply to a meeting request.

DistributionList
Represents a distribution list.

Exceptions
Represents all the available rule exception conditions for an Inbox rule.

Item
Represents a generic Exchange item.
Element Description

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

TentativelyAcceptItem Represents a tentatively accepted reply to a meeting request.

Text value
A text value is required. The following are the possible text values for this element:

Normal

Personal

Private

Confidential

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd


Name Value

Can be Empty False

See also
EWS XML elements in Exchange
SendSMSAlertToRecipients
Article • 03/29/2023 • 2 minutes to read

The SendSMSAlertToRecipients element indicates the mobile phone numbers to which


a Short Message Service (SMS) alert is to be sent.

XML

<SendSMSAlertToRecipients>

<Address/>

</SendSMSAlertToRecipients>

ArrayOfEmailAddressesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Address (EmailAddressType)
Represents a fully resolved e-mail address.

Parent elements

Element Description

Actions
Represents the set of actions that are available to be taken on a message when the
conditions are fulfilled.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
SentCcMe
Article • 03/29/2023 • 2 minutes to read

The SentCcMe element indicates whether the owner of the mailbox has to be in the
CcRecipients property of incoming messages in order for the condition or exception to
apply.

XML

<SentCcMe>true | false</SentCcMe>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conditions
Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions
Represents all the available rule exception conditions for an Inbox rule.

Text value
A text value of true indicates that the owner of the mailbox must be in the CcRecipients
property of the incoming messages in order for the condition or exception to apply. A
value of false indicates that the owner of the mailbox must not be in the CcRecipients
property of the incoming messages in order for the condition or exception to apply.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
SentOnlyToMe
Article • 03/29/2023 • 2 minutes to read

The SentOnlyToMe element indicates whether the owner of the mailbox has to be the
only one in the ToRecipients property of incoming messages in order for the condition
or exception to apply.

XML

<SentOnlyToMe/>true | false</SentOnlyToMe>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conditions
Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions
Represents all the available rule exception conditions for an Inbox rule.

Text value
A text value of true indicates that the owner of the mailbox must be the only one in the
ToRecipients property of the incoming messages in order for the condition or exception
to apply. A value of false indicates that the owner of the mailbox must not be the only
one in the ToRecipients property of the incoming messages in order for the condition or
exception to apply.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
SentTime
Article • 03/29/2023 • 2 minutes to read

The SentTime element specifies the time at which the item was sent.

XML

<SentTime></SentTime>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SearchPreviewItem

Text value
The text value of the SentTime element is the date and time when an item was sent.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
SentToAddresses
Article • 03/29/2023 • 2 minutes to read

The SentToAddresses element indicates the e-mail addresses that incoming messages
have to have been sent to in order for the condition or exception to apply.

XML

<SentToAddresses>

<Address/>

</SentToAddresses>

ArrayOfEmailAddressesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Address (EmailAddressType)
Represents a fully resolved e-mail address.

Parent elements

Element Description

Conditions
Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions
Represents all the available rule exception conditions for an Inbox rule.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
SentToMe
Article • 03/29/2023 • 2 minutes to read

The SentToMe element indicates whether the owner of the mailbox has to be in the
ToRecipients property of incoming messages in order for the condition or exception to
apply.

XML

<SentToMe>true | false</SentToMe>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conditions
Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions
Represents all the available rule exception conditions for an Inbox rule.

Text value
A text value of true indicates that the owner of the mailbox must be in the ToRecipients
property of the incoming messages in order for the condition or exception to apply. A
value of false indicates that the owner of the mailbox must not be in the ToRecipients
property of the incoming messages in order for the condition or exception to apply.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
SentToOrCcMe
Article • 03/29/2023 • 2 minutes to read

The SentToOrCcMe element indicates whether the owner of the mailbox has to be in
either a ToRecipients or CcRecipients property of incoming messages in order for the
condition or exception to apply.

XML

<SentToOrCcMe>true | false</SentToOrCcMe>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Conditions
Represents the conditions that, when fulfilled, will trigger the rule actions for a rule.

Exceptions
Represents all the available rule exception conditions for an Inbox rule.

Text value
A text value of true indicates that the owner of the mailbox must be in the ToRecipients
or CcRecipients property of the incoming messages in order for the condition or
exception to apply. A value of false indicates that the owner of the mailbox must not be
in the ToRecipients or CcRecipients property of the incoming messages in order for the
condition or exception to apply.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
SerializedSecurityContext
Article • 03/29/2023 • 2 minutes to read

The SerializedSecurityContext element is used in the Simple Object Access Protocol


(SOAP) header for token serialization in server-to-server authentication. Token
serialization is not supported.

XML

<SerializedSecurityContext>

<UserSid/>

<GroupSids/>

<RestrictedGroupSids/>

<PrimarySmtpAddress/>

</SerializedSecurityContext>

SerializedSecurityContextType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

UserSid
Represents the security descriptor definition language (SDDL) form of the
user security identifier in a serialized security context SOAP header.

GroupSids
Represents a collection of Active Directory directory service group object
security identifiers.

RestrictedGroupSids
Represents the group security identifier and attributes for a restricted
group.

PrimarySmtpAddress Represents the primary Simple Mail Transfer Protocol (SMTP) address of an
account to be used for server-to-server authorization.

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 (CAS) role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Server-to-server authorization in EWS


Server (MessageTracking)
Article • 03/29/2023 • 2 minutes to read

The Server element represents the physical server where the event occurred.

XML

<Server/>

NonEmptyStringType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

RecipientTrackingEvent
Contains information for a single event for a recipient.

Text value
A text value that represents a string is required if this element is used.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ServerHint
Article • 03/29/2023 • 2 minutes to read

The ServerHint element represents the starting point for tracking a message in a remote
site or forest.

XML

<ServerHint/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

FindMessageTrackingReport
Specifies criteria for the types of messages to find.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindMessageTrackingReport operation

EWS XML elements in Exchange


ServerReplyWithMessage
Article • 03/29/2023 • 2 minutes to read

The ServerReplyWithMessage element indicates the ID of the template message that is


to be sent as a reply to incoming messages.

XML

<ServerReplyWithMessage>

<ItemId>

</ServerReplyWithMessage>

ItemIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ItemId
Represents the unique identifier and change key of an item in the Exchange store.

Parent elements

Element Description

Actions
Represents the set of actions that are available to be taken on a message when the
conditions are fulfilled.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
ServerVersionInfo
Article • 03/29/2023 • 2 minutes to read

The ServerVersionInfo element represents the Microsoft Exchange Server version


number.

XML

<ServerVersionInfo MajorVersion="" MinorVersion="" MajorBuildNumber=""


MinorBuildNumber="" Version="" />

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

MajorVersion Describes the major version number.

MinorVersion Describes the minor version number.

MajorBuildNumber Describes the major build number.

MinorBuildNumber Describes the minor build number.

Version Describes the Exchange Web Services (EWS) schema version.

Child elements
None.

Parent elements
None.

Remarks
This element is returned in the SOAP header of an Exchange Web Services response
message.
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server that has the Client Access server
role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can Be Empty False

See also
EWS XML elements in Exchange
ServiceConfigurationResponseMessageT
ype
Article • 03/29/2023 • 2 minutes to read

The ServiceConfigurationResponseMessageType element contains service


configuration settings.

XML

<ServiceConfigurationResponseMessageType ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<MailTipsConfiguration/>

<UnifiedMessagingConfiguration/>

<ProtectionRulesConfiguration/>

</ServiceConfigurationResponseMessageType>

ServiceConfigurationResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of the response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description

Success
Describes a request that is fulfilled.
Value Description

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error
that the request encountered.

DescriptiveLinkKey
Currently unused and reserved for future use. This element
contains a value of 0.

MessageXml
Provides additional error response information.

MailTipsConfiguration Contains service configuration information for the mail


(MailTipsServiceConfiguration)
tips service.

UnifiedMessagingConfiguration
Contains service configuration information for the Unified
Messaging service.
Element Description

ProtectionRulesConfiguration
Contains service configuration information for the
protection rules service.

Parent elements

Element Description

ResponseMessages Contains an array of service configuration


(ArrayOfServiceConfigurationResponseMessageType) response messages.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
SetClientExtension
Article • 03/29/2023 • 2 minutes to read

The SetClientExtension element contains a request to set a client extension.

XML

<SetClientExtension>

<Actions/>

</SetClientExtension>

SetClientExtensionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Actions (ArrayOfSetClientExtensionActionsType)

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


SetClientExtensionResponse
Article • 03/29/2023 • 2 minutes to read

The SetClientExtensionResponse element contains the response to a


SetClientExtension request.

XML

<SetClientExtensionResponse>

<ResponseMessages/>

</SetClientExtensionResponse>

SetClientExtensionResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ResponseMessages

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
SetClientExtensionResponseMessage
Article • 03/29/2023 • 2 minutes to read

The SetClientExtensionResponseMessage element specifies the response message for a


SetClientExtension request.

XML

<SetClientExtensionResponseMessage>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</SetClientExtensionResponseMessage>

ResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml

Parent elements
ResponseMessages

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
SetEncryptionConfiguration
Article • 03/29/2023 • 2 minutes to read

The SetEncryptionConfiguration element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
SetEncryptionConfigurationResponse
Article • 03/29/2023 • 2 minutes to read

The SetEncryptionConfigurationResponse element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
SetEncryptionConfigurationResponseMe
ssage
Article • 03/29/2023 • 2 minutes to read

The SetEncryptionConfigurationResponseMessage element is intended for internal use


only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
SetFolderField
Article • 03/29/2023 • 2 minutes to read

The SetFolderField element represents an update that sets the value for a single
property on a folder in an UpdateFolder operation.

XML

<SetFolderField>

<FieldURI/>

<Folder/>

</SetFolderField>

XML

<SetFolderField>

<IndexedFieldURI/>

<SearchFolder/>

</SetFolderField>

XML

<SetFolderField>

<FieldURI/>

<TasksFolder/>

</SetFolderField>

XML

<SetFolderField>

<ExtendedFieldURI/>
<CalendarFolder/>

</SetFolderField>

XML

<SetFolderField>

<ExtendedFieldURI/>
<SearchFolder/>

</SetFolderField>

XML
<SetFolderField>

<ExtendedFieldURI/>
<Folder/>

</SetFolderField>

XML

<SetFolderField>

<IndexedFieldURI/>
<TasksFolder/>

</SetFolderField>

XML

<SetFolderField>

<FieldURI/>

<SearchFolder/>

</SetFolderField>

XML

<SetFolderField>

<FieldURI/>

<CalendarFolder/>

</SetFolderField>

XML

<SetFolderField>

<ExtendedFieldURI/>
<TasksFolder/>

</SetFolderField>

XML

<SetFolderField>

<IndexedFieldURI/>

<CalendarFolder/>

</SetFolderField>

XML

<SetFolderField>

<IndexedFieldURI/>

<Folder/>

</SetFolderField>

XML

<SetFolderField>

<FieldURI/>

<ContactsFolder/>

</SetFolderField>

XML

<SetFolderField>

<ExtendedFieldURI/>
<ContactsFolder/>

</SetFolderField>

XML

<SetFolderField>

<IndexedFieldURI/>

<ContactsFolder/>

</SetFolderField>

SetFolderFieldType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FieldURI
Identifies frequently referenced properties by URI.

IndexedFieldURI
Identifies individual members of a dictionary.

ExtendedFieldURI
Identifies extended MAPI properties.

Folder
Identifies a folder to update.
Element Description

CalendarFolder
Represents a folder that primarily contains calendar items.

ContactsFolder
Represents a Contacts folder in a mailbox.

SearchFolder
Represents a search folder that is contained in a mailbox.

TasksFolder
Represents a Tasks folder that is contained in a mailbox.

Parent elements

Element Description

Updates Contains a set of elements that defines append, set, and delete changes to
(Folder)
folder properties.

Remarks
If the property exists, the property value is set to the specified value. If the property
does not exist, the property is created with the specified value.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
UpdateFolder operation
EWS XML elements in Exchange
SetHoldOnMailboxes
Article • 03/29/2023 • 2 minutes to read

The SetHoldOnMailboxes element contains a SetHoldOnMailboxes request.

XML

<SetHoldOnMailboxes>

<ActionType/>

<HoldId/>

<Query/>

<Mailboxes/>

<Language/>

<IncludeNonIndexableItems/>

<Deduplication/>

<InPlaceHoldIdentity/>

</SetHoldOnMailboxes>

SetHoldOnMailboxesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ActionType (HoldActionType) | HoldId | Query | Mailboxes (ArrayOfStringsType) |
Language | IncludeNonIndexableItems | Deduplication | InPlaceHoldIdentity

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
SetHoldOnMailboxesResponse
Article • 03/29/2023 • 2 minutes to read

The SetHoldOnMailboxesResponse element represents a response to a


SetHoldOnMailboxes request.

XML

<SetHoldOnMailboxesResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<MailboxHoldResult/>
</SetHoldOnMailboxesResponse>

SetHoldOnMailboxesResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml | MailboxHoldResult

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


SetHoldOnMailboxesResponseMessage
Article • 03/29/2023 • 2 minutes to read

The SetHoldOnMailboxesResponseMessage element specifies the response message


for a SetHoldOnMailboxes request.

XML

<SetHoldOnMailboxesResponseMessage>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<MailboxHoldResult/>
</SetHoldOnMailboxesResponseMessage>

SetHoldOnMailboxesResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml | MailboxHoldResult

Parent elements
ResponseMessages

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
SetImGroup
Article • 03/29/2023 • 2 minutes to read

The SetImGroup element represents a request to change the display name of an instant
messaging group.

XML

<SetImGroup>

<GroupId/>

<NewDisplayName/>

</SetImGroup>

SetImGroupType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
GroupId | NewDisplayName

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
SetImGroupResponse
Article • 03/29/2023 • 2 minutes to read

The SetImGroupResponse element represents a response to a SetImGroup request.

XML

<SetImGroupResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</SetImGroupResponse>

SetImGroupResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


SetImListMigrationCompleted
Article • 03/29/2023 • 2 minutes to read

The SetImListMigrationCompleted element represents a request to indicate whether


the Exchange store contains the instant messaging items used by instant messaging
clients.

XML

<SetImListMigrationCompleted>

<ImListMigrationCompleted/>

</SetImListMigrationCompleted>

SetImListMigrationCompletedType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ImListMigrationCompleted

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


SetImListMigrationCompletedResponse
Article • 03/29/2023 • 2 minutes to read

The SetImListMigrationCompletedResponse element represents a response to a


SetImListMigrationCompleted request.

XML

<SetImListMigrationCompletedResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</SetImListMigrationCompletedResponse>

SetImListMigrationCompletedResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


SetItemField
Article • 03/29/2023 • 2 minutes to read

The SetItemField element represents an update to a single property of an item in an


UpdateItem operation.

XML

<SetItemField>

<FieldURI/>

<Item/>

</SetItemField>

XML

<SetItemField>

<ExtendedFieldURI/>
<Item/>

</SetItemField>

XML

<SetItemField>

<ExtendedFieldURI/>
<MeetingRequest/>

</SetItemField>

XML

<SetItemField>

<ExtendedFieldURI/>
<MeetingResponse/>

</SetItemField>

XML

<SetItemField>

<IndexedFieldURI/>

<Contact/>

</SetItemField>

XML
<SetItemField>

<IndexedFieldURI/>

<DistributionList/>

</SetItemField>

XML

<SetItemField>

<IndexedFieldURI/>

<MeetingResponse/>

</SetItemField>

XML

<SetItemField>

<FieldURI/>

<MeetingResponse/>

</SetItemField>

XML

<SetItemField>

<FieldURI/>

<MeetingRequest/>

</SetItemField>

XML

<SetItemField>

<FieldURI/>

<Contact/>

</SetItemField>

XML

<SetItemField>

<IndexedFieldURI/>

<Message/>

</SetItemField>

XML

<SetItemField>

<ExtendedFieldURI/>
<CalendarItem/>

</SetItemField>

XML

<SetItemField>

<ExtendedFieldURI/>
<Task/>

</SetItemField>

XML

<SetItemField>

<ExtendedFieldURI/>
<Message/>

</SetItemField>

XML

<SetItemField>

<FieldURI/>

<MeetingCancellation/>

</SetItemField>

XML

<SetItemField>

<FieldURI/>

<Task/>

</SetItemField>

XML

<SetItemField>

<IndexedFieldURI/>

<MeetingRequest/>

</SetItemField>

XML

<SetItemField>

<FieldURI/>

<CalendarItem/>

</SetItemField>

XML
<SetItemField>

<IndexedFieldURI/>
<Item/>

</SetItemField>

XML

<SetItemField>

<ExtendedFieldURI/>
<MeetingCancellation/>

</SetItemField>

XML

<SetItemField>

<FieldURI/>

<DistributionList/>
</SetItemField>

XML

<SetItemField>

<IndexedFieldURI/>

<MeetingCancellation/>

</SetItemField>

XML

<SetItemField>

<ExtendedFieldURI/>
<MeetingMessage/>

</SetItemField>

XML

<SetItemField>

<IndexedFieldURI/>

<Task/>

</SetItemField>

XML

<SetItemField>

<IndexedFieldURI/>

<CalendarItem/>

</SetItemField>

XML

<SetItemField>

<FieldURI/>

<MeetingMessage/>

</SetItemField>

XML

<SetItemField>

<IndexedFieldURI/>

<MeetingMessage/>

</SetItemField>

XML

<SetItemField>

<FieldURI/>

<Message/>

</SetItemField>

XML

<SetItemField>

<ExtendedFieldURI/>
<DistributionList/>

</SetItemField>

XML

<SetItemField>

<ExtendedFieldURI/>
<Contact/>

</SetItemField>

SetItemFieldType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FieldURI
Identifies frequently referenced properties by URI.

IndexedFieldURI
Identifies individual members of a dictionary.

ExtendedFieldURI
Identifies extended MAPI properties to set.

Item
Represents an item in the Exchange store.

Message
Represents an Exchange e-mail message to update.

CalendarItem
Represents an Exchange calendar item to update.

Contact
Represents an Exchange contact item to update.

DistributionList
Represents a distribution list to update.

MeetingMessage
Represents a meeting message to update.

MeetingRequest
Represents a meeting request to update.

MeetingResponse
Represents a meeting response to update.

MeetingCancellation Represents a meeting cancellation to update.

Task
Represents a task to update.

Parent elements

Element Description

Updates Contains a set of elements that define append, set, and delete changes to item
(Item)
properties.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
UpdateItem operation
SetRuleOperation
Article • 03/29/2023 • 2 minutes to read

The SetRuleOperation element represents an operation to update an existing rule.

UpdateInboxRules

Operations

XML

<SetRuleOperation>

<Rule/>

</SetRuleOperation>

SetRuleOperationType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Rule (RuleType)
Represents a rule in a user's mailbox.

Parent elements

Element Description

Operations
Contains an array of rule operations that can be performed on an Inbox.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
UpdateInboxRules

DeleteRuleOperation

CreateRuleOperation

EWS XML elements in Exchange


SetTeamMailbox
Article • 03/29/2023 • 2 minutes to read

The SetTeamMailbox element contains a request to set a site mailbox.

XML

<SetTeamMailbox>

<EmailAddress/>

<SharePointSiteUrl/>
<State/>

</SetTeamMailbox>

SetTeamMailboxRequestType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
EmailAddress (EmailAddressType) | SharePointSiteUrl | State
(TeamMailboxLifecycleStateType)

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
SetTeamMailboxResponse
Article • 03/29/2023 • 2 minutes to read

The SetTeamMailboxResponse element represents a response to a SetTeamMailbox


request.

XML

<SetTeamMailboxResponse>

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

</SetTeamMailboxResponse>

SetTeamMailboxResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
MessageText | ResponseCode | DescriptiveLinkKey | MessageXml

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty false


SetUserOofSettingsRequest
Article • 03/29/2023 • 2 minutes to read

The SetUserOofSettingsRequest element contains the arguments used to set a mailbox


user's Out of Office (OOF) settings.

XML

<SetUserOofSettingsRequest>

<Mailbox>...</Mailbox>

<UserOofSettings>...</UserOofSettings>

<SetUserOofSettingsRequest>

SetUserOofSettingsRequest

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Mailbox Identifies the mailbox user for a SetUserOofSettings or GetUserOofSettings


(Availability)
request.

UserOofSettings
Specifies the OOF settings.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Example
The following example of a SetUserOofSettings request sets an OOF setting for ten days.

XML

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<SetUserOofSettingsRequest
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">

<Mailbox
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Name>David Alexander</Name>

<Address>[email protected]</Address>

<RoutingType>SMTP</RoutingType>

</Mailbox>

<UserOofSettings
xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<OofState>Enabled</OofState>

<ExternalAudience>All</ExternalAudience>

<Duration>

<StartTime>2005-10-05T00:00:00</StartTime>

<EndTime>2005-10-25T00:00:00</EndTime>

</Duration>

<InternalReply>

<Message>I am out of office. This is my internal reply.</Message>

</InternalReply>

<ExternalReply>

<Message>I am out of office. This is my external reply.</Message>

</ExternalReply>

</UserOofSettings>

</SetUserOofSettingsRequest>

</soap:Body>

</soap:Envelope>

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd


Name Value

Can be Empty False

See also
SetUserOofSettings operation
SetUserOofSettingsResponse
Article • 03/29/2023 • 2 minutes to read

The SetUserOofSettingsResponse element contains the result of a


SetUserOofSettingsRequest message attempt.

XML

<SetUserOofSettingsResponse>

<ResponseMessage>...</ResponseMessage>

<SetUserOofSettingsResponse>

SetUserOofSettingsResponse

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessage
Provides descriptive information about the response status.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
SetUserOofSettings operation
SharedFolderId
Article • 03/29/2023 • 2 minutes to read

The SharedFolderId element represents the identifier of the shared folder the local
folder identifier for which should be returned by a GetSharingFolder operation request.

XML

<SharedFolderId/>

NonEmptyStringType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

GetSharingFolder Defines a request to get the local folder identifier of a specified shared folder.

Text value
The text value is a string that represents the identifier of the shared folder the local
folder identifier for which should be returned by a GetSharingFolder operation request.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetSharingFolder operation

EWS XML elements in Exchange


SharePointSiteUrl
Article • 03/29/2023 • 2 minutes to read

The SharePointSiteURL element contains the Uniform Resource Locator (URL) of the
SharePoint site that is linked with the site mailbox.

XML

<SharePointSiteURL></SharePointSiteURL>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SetTeamMailbox

Text value
The text value of the SharePointSiteURL element is the URL of the SharePoint site that is
linked with the site mailbox.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
SharePointUrl (MasterMailboxType)
Article • 03/29/2023 • 2 minutes to read

The SharePointUrl (MasterMailboxType) element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
SharingEffectiveRights
(CalendarPermissionReadAccessType)
Article • 03/29/2023 • 2 minutes to read

The SharingEffectiveRights element indicates the permissions that the user has for the
calendar data that is being shared.

XML

<SharingEffectiveRights>None | TimeOnly | TimeAndSubjectAndLocation |


FullDetails</SharingEffectiveRights>

CalendarPermissionReadAccessType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarFolder
Represents a folder that primarily contains calendar items.

Text value
The following table lists the possible values for the SharingEffectiveRights element.

Value Description
Value Description

None Indicates that the user does not have permission to view items in
the calendar.

TimeOnly Indicates that the user has permission to view only free/busy time
in the calendar.

TimeAndSubjectAndLocation Indicates that the user has permission to view free/busy time in
the calendar and the subject and location of appointments.

FullDetails Indicates that the user has permission to view all items in the
calendar, including free/busy time and subject, location, and
details of appointments.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
SharingEffectiveRights
(PermissionReadAccessType)
Article • 03/29/2023 • 2 minutes to read

The SharingEffectiveRights element indicates the permissions that the user has for the
contact data that is being shared.

XML

<SharingEffectiveRights>None | FullDetails</SharingEffectiveRights >

PermissionReadAccessType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ContactsFolder
Represents a Contacts folder that is contained in a mailbox.

Text value
The following table lists the possible values for the SharingEffectiveRights element.

SharingEffectiveRights element text values

Value Description
Value Description

None Indicates that the user does not have permission to read items in the folder.

FullDetails Indicates that the user has permission to read all items in the folder.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
SharingFolderId
Article • 03/29/2023 • 2 minutes to read

The SharingFolderId element represents the identifier of the local folder in a sharing
relationship.

XML

<SharingFolderId Id="" ChangeKey="" />

FolderIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id Contains a string that identifies a folder in the Exchange store. This attribute is
required.

ChangeKey Contains a string that identifies a version of a folder that is identified by the Id
attribute. This attribute is optional. Use this attribute to make sure that the correct
version of a folder is used.

Child elements
None.

Parent elements

Element Description

RefreshSharingFolder
Defines a request to refresh the specified local folder.

GetSharingFolderResponse
Defines a response to a GetSharingFolder operation
request.

GetSharingFolderResponseMessage Contains the status and result of a single GetSharingFolder


operation request.
Remarks
The schema that describes this element is located in the IIS Virtual directory that hosts
Exchange Web Services of the computer that is running Microsoft Exchange Server that
has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
SharingSecurity
Article • 03/29/2023 • 2 minutes to read

The SharingSecurity element is used in the Simple Object Access Protocol (SOAP)
header for calendar or contact sharing.

XML

<SharingSecurity/>

EncryptedDataContainerType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
The schema that describes this element is located in the IIS Virtual directory that hosts
Exchange Web Services of the computer that is running Microsoft Exchange Server that
has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types
Element Example

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ShowExternalRecipientCount
Article • 03/29/2023 • 2 minutes to read

The ShowExternalRecipientCount element indicates whether consumers of the


GetMailTips operation have to show mail tips that indicate the number of external
recipients to which a message is addressed.

XML

<ShowExternalRecipientCount>true | false</ShowExternalRecipientCount>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MailTipsConfiguration Contains service configuration information for the


(MailTipsServiceConfiguration)
mail tips service.

Text value
The text value of this element is true if consumers of the GetMailTips operation have to
show mail tips that indicate the number of external recipients to which a message is
addressed. The value is false if consumers of the GetMailTips operation do not have to
show mail tips that indicate the number of external recipients to which a message is
addressed.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetMailTips operation

EWS XML elements in Exchange


SID
Article • 03/29/2023 • 2 minutes to read

The SID element represents the security descriptor definition language (SDDL) form of
the security identifier (SID) for the account to use for impersonation or delegate access.

XML

<SID/>

SIDType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ConnectingSID Represents an account to impersonate when using the ExchangeImpersonation


SOAP header.
The following is the XPath expression to this element:
/ExchangeImpersonation/ConnectingSID

UserId
Identifies a delegate user or a user with folder access permissions.

Text value
The text value is a string representation of a SID.
Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Exchange Server with the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
SIPResponseCode
Article • 03/29/2023 • 2 minutes to read

The SIPResponseCode element specifies the SIP response code.

XML

<SIPResponseCode/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

PhoneCallInformation
Specifies the state information for a phone call.

Text value
A SIP response code.

Remarks
The schema that describes this element is located in the /ews/ directory of the computer
that is running Microsoft Exchange Server 2010 that has the Client Access server role
installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
SIPResponseText
Article • 03/29/2023 • 2 minutes to read

The SIPResponseText element specifies the SIP response text.

XML

<SIPResponseText/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

PhoneCallInformation
Specifies the state information for a phone call.

Text value
The SIP response text.

Remarks
The schema that describes this element is located in the /ews/ directory of the computer
that is running Exchange Server with the Client Access server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Size
Article • 03/29/2023 • 2 minutes to read

The Size element represents the size in bytes of an item or all the items in a
conversation in the current folder. This property is read-only.

XML

<Size/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

Contact
Represents an Exchange contact item.

Conversation Represents a single conversation.


(ConversationType)

DistributionList
Represents a distribution list.

FileAttachment
Represents a file that is attached to an item in the Exchange
store.

Item
Represents an item in the Exchange store.
Element Description

ItemAttachment
Represents an Exchange item that is attached to another
Exchange item.

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

Text value
The text value is an integer value that identifies the size of the item in bytes.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Code Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Size (long)
Article • 03/29/2023 • 2 minutes to read

The Size element specifies the total size of one or more mailbox items.

XML

<Size></Size>

long

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
KeywordStat | MailboxStat | SearchMailboxesResult | SearchPreviewItem

Text value
The text value of the Size element is the total size of one or more mailbox items.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
SizeRequested
Article • 03/29/2023 • 2 minutes to read

The SizeRequested element contains the requested photo size for a GetUserPhoto
operation.

XML

<SizeRequested>HR48x48 | HR64x64 | HR96X96 | HR120X120 | HR240X240 |


HR360X360 | HR432X432 | HR504X504 | HR648X648</SizeRequested>

UserPhotoSizeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
GetUserPhoto

Text value
The text value of the SizeRequested element is the requested photo size of a digital
image returned from the server. The following table identifies the text values for the
SizeRequested element.

Value Meaning

HR48x48 The image is 48 pixels high and 48 pixels wide.

HR64x64 The image is 64 pixels high and 64 pixels wide.


Value Meaning

HR96x96 The image is 96 pixels high and 96 pixels wide.

HR120x120 The image is 120 pixels high and 120 pixels wide.

HR240x240 The image is 240 pixels high and 240 pixels wide.

HR360x360 The image is 360 pixels high and 360 pixels wide.

HR432x432 The image is 432 pixels high and 432 pixels wide.

HR504x504 The image is 504 pixels high and 504 pixels wide.

HR648x648 The image is 648 pixels high and 648 pixels wide.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
SmtpAddress
Article • 03/29/2023 • 2 minutes to read

The SmtpAddress element represents the Simple Mail Transfer Protocol (SMTP) address
of an account to be used for impersonation or a Simple Mail Transfer Protocol (SMTP)
recipient address of a calendar or contact sharing request.

XML

<SmtpAddress/>

SmtpAddressType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ConnectingSID
Represents an account to impersonate when you are using the
ExchangeImpersonation SOAP header.
The following is the XPath expression to this element:
/ExchangeImpersonation/ConnectingSID

InvalidRecipient
Represents an invalid recipient for a calendar sharing or contact
sharing message.

Recipients Represents a collection of recipients that will be granted access to


(ArrayOfSmtpAddressType) the shared folder.

GetSharingFolder
Defines a request to get the local folder identifier of a specified
shared folder.
Text value
A text value that represents an SMTP address is required.

Remarks
The schema that describes this element is located in the IIS Virtual directory that hosts
Exchange Web Services of the computer that is running Microsoft Exchange Server that
has the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
SmtpAddress
(FederatedDirectoryGroupType)
Article • 03/29/2023 • 2 minutes to read

The SmtpAddress (FederatedDirectoryGroupType) element is intended for internal use


only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
SmtpAddress (MasterMailboxType)
Article • 03/29/2023 • 2 minutes to read

The SmtpAddress (MasterMailboxType) element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
SortBy
Article • 03/29/2023 • 2 minutes to read

The SortBy element contains an item property used for sorting the search result.

XML

<SortBy Order="">

<FieldURI/>

<IndexedFieldURI/>

</SortBy>

FieldOrderType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Order The text value of the Order attribute is the sort order. A text value of Ascending
indicates that the results are in ascending order. A text value of Descending indicates
that the results are in descending order.

Child elements
FieldURI | IndexedFieldURI

Parent elements
SearchMailboxes

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
SortOrder
Article • 03/29/2023 • 2 minutes to read

The SortOrder element defines how items are sorted in a FindItem or FindConversation
request.

XML

<SortOrder>

<FieldOrder/>

</SortOrder>

NonEmptyArrayOfFieldOrdersType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FieldOrder Represents a single field by which to sort results and indicates the direction for the
sort. One or more of these elements may be included. FieldOrder elements are
applied in the order specified for sorting.

Parent elements

Element Description

FindItem
Defines a request to find items in a mailbox.
The following is the XPath expression to this element: /FindItem

FindConversation
Defines a request to find conversations in a mailbox.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
FindItem operation

FindConversation operation

EWS XML elements in Exchange


SortOrder
(ConversationNodeSortOrder)
Article • 03/29/2023 • 2 minutes to read

The SortOrder element specifies the sort order used for the result of a
GetConversationItems request.

XML

<SortOrder>TreeOrderAscending | TreeOrderDescending | DateOrderAscending |


DateOrderDescending</SortOrder>

ConversationNodeSortOrder

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
GetConversationItems

Text value
The text value of the SortOrder element is the order in which conversations ordered. A
text value of TreeOrderAscending indicates that the conversations are ordered
according to the conversation tree in ascending order. A text value of
TreeOrderDescending indicates that the conversations are ordered according to the
conversation tree in descending order. A text value of DateOrderAscending indicates
that the conversations are ordered according to the conversation date in ascending
order. A text value of DateOrderDescending indicates that the conversations are
ordered according to the conversation date in descending order.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
SortValue
Article • 03/29/2023 • 2 minutes to read

The SortValue element specifies a value used for sorting.

XML

<SortValue></SortValue>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SearchPreviewItem | NonIndexableItemDetail

Text value
The text value of the SortValue element is the field used to sort the result set.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
SourceId
Article • 03/29/2023 • 2 minutes to read

The SourceId element specifies the identifier of the attributed contact in a persona.

XML

<SourceId Id="" ChangeKey=""/>

ItemIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id The text value of the Id attribute is the identifier of the contact.

ChangeKey The text value of the ChangeKey attribute is the change key of the contact.

Child elements
None.

Parent elements
Attribution (PersonaAttributionType)

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
SourceIds
Article • 03/29/2023 • 2 minutes to read

The SourceIds element contains the source identifiers to convert.

ConvertId

SourceIds

XML

<SourceIds>

<AlternateId/>

<AlternatePublicFolderId/>

<AlternatePublicFolderItemId/>

</SourceIds>

NonEmptyArrayOfAlternateIdsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

AlternateId
Describes an item or folder identifier to convert.

AlternatePublicFolderId
Describes a public folder identifier to convert.

AlternatePublicFolderItemId
Describes a public folder item identifier to convert.

Parent elements

Element Description
Element Description

ConvertId Defines a request to convert item and folder identifiers between Exchange supported
formats.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Exchange Server that has the Client Access server role
installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
ConvertId operation

EWS XML elements in Exchange

Converting Identifiers
SpecificUsers
Article • 03/29/2023 • 2 minutes to read

The SpecificUsers element specifies the email accounts that can access the app.

XML

<SpecificUsers>

<String/>

</SpecificUsers>

ArrayOfStringsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
String

Parent elements
ClientExtension

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


SpouseName
Article • 03/29/2023 • 2 minutes to read

The SpouseName element represents the name of a contact's spouse or partner.

XML

<SpouseName/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Text value
A text value is required.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)

Updating Contacts

Deleting Contacts
SpouseNames
Article • 03/29/2023 • 2 minutes to read

The SpouseNames element specifies an array of spouse or partner names and the
identifiers of their source attributions for the associated persona.

XML

<SpouseNames>

<StringAttributedValue/>

</SpouseNames>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
StringAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Standard
Article • 03/29/2023 • 2 minutes to read

The Standard element represents the date and time when the time changes from
daylight saving time to standard time.

XML

<Standard TimeZoneName="">

<Offset/>

<RelativeYearlyRecurrence/>

<Time/>

</Standard>

XML

<Standard TimeZoneName="">

<Offset/>

<AbsoluteDate/>

<Time/>

</Standard>

TimeChangeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

TimeZoneName
Describes the name of the time zone.

Child elements

Element Description

Offset
Describes the offset from the BaseOffset. Together with the BaseOffset
element, the Offset element identifies whether the time is standard
time or daylight saving time.
Element Description

RelativeYearlyRecurrence Describes a relative yearly recurrence pattern for a time zone transition
date.

AbsoluteDate
Represents the date when the time changes from standard time or
daylight saving time.

Time (TimeChangeType)
Describes the time when the time changes between standard time and
daylight saving time.

Parent elements

Element Description

MeetingTimeZone
Represents the time zone of the location where the meeting is hosted.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
StandardGroupBy
Article • 03/29/2023 • 2 minutes to read

The StandardGroupBy element represents the standard grouping and aggregating


mechanisms for a grouped FindItem operation.

FindItem

DistinguishedGroupBy

StandardGroupBy

XML

<StandardGroupBy/>

StandardGroupByType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

DistinguishedGroupBy
Provides standard groupings for FindItem queries.

Text value
A text value is required. The only value that can be used for this element is
ConversationTopic. ConversationTopic groups by message:ConversationTopic and
aggregates on item:DateTimeReceived (maximum). For more information about
aggregation, see AggregateOn.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
FindItem operation

FindItem

Finding Items
StandardTime
Article • 03/29/2023 • 2 minutes to read

The StandardTime element represents an offset from the time relative to Coordinated Universal Time
(UTC) that is represented by the Bias (UTC) element. This element also contains information about the
transition to standard time from daylight saving time in regions where daylight saving time is observed.

TimeZone (Availability)
StandardTime

XML

<StandardTime>

<Bias>int</Bias>

<Time>string</Time>

<DayOrder>short</DayOrder>

<Month>short</Month>

<DayOfWeek>Sunday or Monday or Tuesday or Wednesday or Thursday or Friday or


Saturday</DayOfWeek>

<Year>string</Year>

</StandardTime>

SerializableTimeZoneTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Bias Represents the offset from the UTC offset that is identified by the Bias (UTC) element for standard
time and daylight saving time. This value is in minutes.

Time Represents the transition time of day to and from standard time and daylight saving time.

DayOrder Represents the _n_th occurrence of the day that is specified in the DayOfWeek (TimeZone) element
that represents the date of transition from and to standard time and daylight saving time.

Month Represents the transition month of the year to and from standard time and daylight saving time.

DayOfWeek Represents the day of the week when the transition to and from standard time and daylight saving
(TimeZone) time occurs.

Year Defines a time zone that changes depending on the year. This element is optional. This element was
introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1).
Parent elements

Element Description

TimeZone Contains elements that identify time zone information. This element also contains information about the
(Availability) transition between standard time and daylight saving time. The following are the XPath expressions to this
element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/WorkingHours/TimeZone
/GetUserAvailabilityRequest/TimeZone

Remarks
The StandardTime element represents an offset time that is represented by the Bias (UTC) element.
When the child Bias element equals 0, the standard time is equal to the bias offset from UTC that is
represented by the Bias (UTC) element.

Example
The following example shows a region where daylight saving time is observed. The transition from
daylight saving time to standard time is observed at 2 A.M. on the fifth Sunday of the tenth month.

XML

<TimeZone xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Bias>480</Bias>

<StandardTime>

<Bias>0</Bias>

<Time>02:00:00</Time>

<DayOrder>5</DayOrder>

<Month>10</Month>

<DayOfWeek>Sunday</DayOfWeek>

</StandardTime>

<DaylightTime>

<Bias>-60</Bias>

<Time>02:00:00</Time>

<DayOrder>1</DayOrder>

<Month>4</Month>

<DayOfWeek>Sunday</DayOfWeek>

</DaylightTime>

</TimeZone>

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


See also
GetUserAvailability operation
Getting User Availability
Start
Article • 03/29/2023 • 2 minutes to read

The Start element represents the start of a duration.

XML

<Start/>

DateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

DeletedOccurrence
Represents a deleted occurrence of a recurring calendar item.

FirstOccurrence
Represents the first occurrence of a recurring calendar item.

LastOccurrence
Represents the last occurrence of a recurring calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Occurrence Represents a single modified occurrence of a recurring calendar item.

Text value
The text value represents the start of a duration.
Remarks
The UpdateItem operation can set the Start and End time of an Exchange store item. In
an UpdateItem request, the Start time can be set without also setting the End time. This
can cause an error if the Start time is later than the End time. Be aware that client
applications must perform adjustments to End time when that Start time is changed in
order to preserve the duration.

7 Note

The time zone offset information is lost if the Start and End dates of the recurring
master item do not have a date that is equal to the first occurrence of a weekly
recurrence pattern.

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.

Element information
Code Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
WeeklyRecurrence
EWS XML elements in Exchange
StartDate
Article • 03/29/2023 • 2 minutes to read

The StartDate element represents the start date of an item.

XML

<StartDate/>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Task
Represents a task in the Exchange store.

Flag
Specifies a flag on a mailbox item.

Text value
The text value represents the start date of a task.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Creating Tasks
Deleting Tasks
StartDate (Recurrence)
Article • 03/29/2023 • 2 minutes to read

The StartDate element represents the start date of a recurring task or calendar item.

XML

<StartDate/>

Date

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

EndDateRecurrence
Describes the start date and the end date of an item recurrence pattern.

NoEndRecurrence
Describes the start date of an item recurrence pattern that does not have
a defined end date.

NumberedRecurrence Describes the start date and the number of occurrences of a recurring
item.

Text value
A text value that represents a date is required if this element is used. The value cannot
be less than Apr, 1, 1601 00:00:00.
Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
StartDateTime
Article • 03/29/2023 • 2 minutes to read

The StartDateTime element specifies the start date and time for a rule or a search.

XML

<StartDate/>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

FindMessageTrackingReport Specifies criteria for the types of messages to find.

WithinDateRange
Specifies the date range within which incoming messages have to
have been received in order for the condition or exception to
apply.

Text value
A text value that represents a date/time is required if this element is used.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
StartFindInGALSpeechRecognition
Article • 03/29/2023 • 2 minutes to read

The StartFindInGALSpeechRecognition element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
StartFindInGALSpeechRecognitionRespo
nse
Article • 03/29/2023 • 2 minutes to read

The StartFindInGALSpeechRecognitionResponse element is intended for internal use


only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd


Element Example

Can be empty
StartTime
Article • 03/29/2023 • 2 minutes to read

The StartTime element represents the start of a time span.

XML

<StartTime/

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

TimeWindow
Identifies the time span queried for the user availability information.

The following is the XPath expression to this element:

/GetUserAvailabilityRequest/FreeBusyViewOptions/TimeWindow

DetailedSuggestionsWindow Identifies the time span that is queried for detailed information about suggested meeting times.

The following is the XPath expression to this element:

/GetUserAvailabilityRequest/SuggestionViewOptions/DetailedSuggestionsWindow

Duration (UserOofSettings)
Specifies the duration for which the Out of Office (OOF) status is enabled if the OofState element is set to Scheduled.

The following are the possible XPath expressions to this element:

/SetUserOofSettingsRequest/UserOofSettings/Duration

/GetUserOofSettingsResponse/OofSettings/Duration

CalendarEvent
Represents a unique calendar item occurrence. This is used for Availability inquiries. The StartTime element is required in
the CalendarEvent element. The StartTime element in the CalendarEvent element is unique to the CalendarEvent type
although it contains the same facet values that the StartTime elements in the Duration type contain.

The following is the XPath expression to this element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/CalendarEventArray/CalendarEvent[i]

Text value
A text value is required.

Remarks
The EndTime element represents the end of the time span.

The schema includes many StartTime elements.

7 Note

The schema that describes this element is located in the EWS virtual directory of the computer that is running
MicrosoftExchange Server 2007 that has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
Getting User Availability
StartTime (ReminderMessageDataType)
Article • 03/29/2023 • 2 minutes to read

The StartTime (ReminderMessageDataType) element specifies the starting time of the


item that the reminder is for.

XML

<StartTime/>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
ReminderMessageData

Text value
The text value of the StartTime (ReminderMessageDataType) element is the starting
time of the item the reminder is for.

Remarks
This element was introduced in Exchange Server 2013 Service Pack 1 (SP1).

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty True

See also
ReminderMessageData
EWS XML elements in Exchange
StartTimeInMinutes
Article • 03/29/2023 • 2 minutes to read

The StartTimeInMinutes element represents the start of the working day for a mailbox user.

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

FreeBusyView

WorkingHours

WorkingPeriodArray

WorkingPeriod

StartTimeInMinutes

XML

<StartTimeInMinutes>...</StartTimeInMinutes>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

WorkingPeriod Contains the work week days and hours of the mailbox user.
The following is the XPath expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/WorkingHours/WorkingPeriodArray/WorkingPeriod

Text value
A text value is required. The text value represents the start of the working day by how many minutes have elapsed since the day
began. For example, a start time of 8 A.M. is represented by 480 minutes.

The range of possible values for this element is 0 to 1440.

Remarks
The schema that describes this element is located in the EWS virtual directory of the computer that is running
MicrosoftExchange Server 2007 that has the Client Access server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
GetUserAvailabilityResponse
Getting User Availability
StartTimeZone
Article • 03/29/2023 • 2 minutes to read

The StartTimeZone element defines the time zone for the start time of a CalendarItem
or MeetingRequest.

XML

<StartTimeZone Id="" Name="">

<Periods/>

<TransitionsGroups/>
<Transitions/>

</StartTimeZone>

TimeZoneDefinitionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id Represents the unique identifier of the time zone definition.

Name Represents the descriptive name of the time zone definition.

Child elements

Element Description

Periods
Represents an array of Period elements that define the time offset at different
stages of the time zone.

TransitionsGroups Represents an array of TransitionsGroup elements that specify time zone


transitions.

Transitions
Represents an array of time zone transitions.

Parent elements
Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server that has the Client Access server
role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
StartTimeZoneId
Article • 03/29/2023 • 2 minutes to read

The StartTimeZoneId element specifies the time zone in which a meeting takes place.

XML

<StartTimeZoneId></StartTimeZoneId>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
CalendarItem | MeetingRequest

Text value
The text value of the StartTimeZoneId element is the time zone identifier of the time
zone used in the Start element.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
StartWallClock
Article • 03/29/2023 • 2 minutes to read

The StartWallClock element specifies the start time of a meeting in the time zone of the
location in which the meeting takes place.

XML

<StartWallClock></StartWallClock>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
CalendarItem | MeetingRequest

Text value
The text value of the StartWallClock element is the start time of a meeting in the time
zone of the location in which the meeting takes place.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
State
Article • 03/29/2023 • 2 minutes to read

The State element represents the state of residence for a contact item.

XML

<State/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Entry (PhysicalAddress)
Describes a single physical address for a contact item.

Text value
A string value that represents the name of a state is required if this element is used.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Creating Contacts (Exchange Web Services)
Updating Contacts
Deleting Contacts
State (TeamMailboxLifecycleStateType)
Article • 03/29/2023 • 2 minutes to read

The State element contains the lifecycle state that is set on a site mailbox.

XML

<State> Active | Closed | Unlinked | PendingDelete </State>

TeamMailboxLifecycleStateType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
SetTeamMailbox

Text value
The text value of the State element is the lifecycle state that is set on a site mailbox. A
text value of Active indicates that a site mailbox is in active use. A text value of Closed
indicates that a site mailbox has been closed and is not in active use. A text value of
Unlinked indicates that a site mailbox is not linked to a web-based collaboration
environment. The Active, Closed, and PendingDelete values are mutually exclusive, but
the Unlinked value is not mutually exclusive of the other values. A text value of
PendingDelete indicates that a site mailbox is pending deletion. A site mailbox has to
be closed before it can be set as PendingDelete.
Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
StateDefinition
Article • 03/29/2023 • 2 minutes to read

The StateDefinition element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Status
Article • 03/29/2023 • 2 minutes to read

The Status element represents the status of a task item.

XML

<Status/>

TaskStatusType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Task
Represents a task in the Exchange store.

Text value
A text value is required. The following are the possible text values for this element:

NotStarted

InProgress

Completed

WaitingOnOthers
Deferred

Remarks
Setting CompleteDate has the same effect as setting PercentComplete to 100 or Status
to Completed. In a request that sets at least two of these properties, the last processed
property will determine the value that is set for these elements. For example, if
PercentComplete is 100, CompleteDate is 1/1/2007, and Status is NotStarted, and the
properties are streamed in this order, the effect will be to set the Status of the task to
NotStarted, the CompleteDate to null, and the PercentComplete to 0.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Creating Tasks

Deleting Tasks
Status (HoldStatusType)
Article • 03/29/2023 • 2 minutes to read

The Status element specifies the hold status for a mailbox.

XML

<Status> NotOnHold | Pending | OnHold | PartialHold | Failed </Status>

HoldStatusType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
MailboxHoldStatus

Text value
The text value of the Status element is the hold status of a mailbox. The Status element
can have the values in the following list.

NotOnHold - The mailbox is not on hold.

Pending - The mailbox is pending either being placed or released on hold.

OnHold - The hold was successfully applied to the mailbox.


PartialHold - The hold was successfully applied to some mailboxes but not to all
mailboxes.

Failed - The hold failed to apply to the mailbox.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Status (MemberStatusType)
Article • 03/29/2023 • 2 minutes to read

The Status element provides information about the status of a distribution list member
on the server.

<Status>Unrecognized or Normal or Demoted</Status>

MemberStatusType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Member
Represents a member of a distribution list.

Text value
The following table lists the possible values for the Status element.

Status element values

Value Description

Unrecognized Member information is invalid or unrecognized.


Value Description

Normal Member information in a distribution list is in sync with the referenced object.

Demoted Referenced object is not available.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server that has the Client Access server
role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
StatusDescription
Article • 03/29/2023 • 2 minutes to read

The StatusDescription element contains an explanation of the task status.

XML

<StatusDescription/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Task
Represents a task in the Exchange store.

Text value
This is a read-only property.

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.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange

Creating Tasks

Deleting Tasks
StatusEvent
Article • 03/29/2023 • 2 minutes to read

The StatusEvent element represents a notification that no new activity has occurred in
the mailbox.

XML

<StatusEvent>

<Watermark/>

</StatusEvent>

BaseNotificationEventType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Watermark
Represents the last valid watermark for a subscription.

Parent elements

Element Description

Notification Contains information about the subscription and the events that have occurred
since the last notification.

Remarks
The StatusEvent element is returned in a notification for one of the following reasons:

A pull client issues a GetEvents request on a subscription that has no activity.


A push client has no events in the queue when the StatusFrequency has been
reached.

The StatusEventWatermark is used by a client application in the same manner as the


other event type watermarks. However, the watermark for the StatusEvent is not the
same as the watermarks used for other events. For example, a subscription has events
with watermarks 1, 2, and 3 and those events have been successfully communicated in a
notification. A period of inactivity occurs and a GetEvents request is sent. The Client
Access server (CAS) returns a status event and includes the last watermark, 3, as both
the PreviousWatermark and the current Watermark.

The watermark will not remain the same in all cases. Event entries are maintained for 30
days. To maintain an active subscription, the CAS periodically updates the watermarks
for subscription queues. The updated watermarks are sent to clients to maintain an
active subscription.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
Subscribe operation

GetEvents operation

Unsubscribe operation
StatusFrequency
Article • 03/29/2023 • 2 minutes to read

The StatusFrequency element represents the maximum timeout value, in minutes, in


which retries are attempted by the server.

Subscribe

PushSubscriptionRequest

StatusFrequency

XML

<StatusFrequency/>

SubscriptionStatusFrequencyType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

PushSubscriptionRequest Represents a subscription to a push-based event notification


subscription.

Text value
A text value that represents an integer is required if this element is used. The possible
values for this element are 1 to 1440, inclusive. This element is optional. The default
value is 30 minutes.

Remarks
The StatusFrequency value is used by the server to retry a push notification when it
does not receive a response to a push notification or status ping from the client. If the
server does not receive a response, it retries sending the notification several times
before it stops sending the notification. In EWS, the default retry interval is 30 seconds
and subsequent retries are always double the time of the last retry interval. Retry times
are not exact as they can be delayed due to other loads on the server. The following
table shows how the retry intervals occur in the 30 minutes allotted by the default
StatusFrequency value (assuming the server did not encounter any delays).

Retry Seconds Time

0 0 Initial sync

1 30 00:30

2 60 01:00

3 120 02:00

4 240 04:00

5 480 08:00

6 960 16:00

7 1920 32:00 - StatusFrequency default value of 30 exceeded, retry not sent

If the client does not receive notification messages from the server for a period of time
that exceeds twice the time specified by StatusFrequency, the client should take an
action such as recreating the subscription.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types
Name Value

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
Subscribe operation

GetEvents operation

Unsubscribe operation

Watermark
StopProcessingRules
Article • 03/29/2023 • 2 minutes to read

The StopProcessingRules element indicates whether subsequent rules are to be


evaluated.

XML

<StopProcessingRules>true | false</StopProcessingRules>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Actions
Represents the set of actions that are available to be taken on a message when the
conditions are fulfilled.

Text value
A text value of true indicates that subsequent rules should not be processed. A value of
false indicates that subsequent rules should continue to be evaluated.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty True

See also
EWS XML elements in Exchange
StorageQuota
Article • 03/29/2023 • 2 minutes to read

The StorageQuota element describes the storage quota for the managed folder.

XML

<StorageQuota/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

ManagedFolderInformation
Contains information about a managed folder.

Text value
A text value is required.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Adding Managed Folders


StoreEntryId
Article • 03/29/2023 • 2 minutes to read

The StoreEntryId element contains the Exchange store identifier of an item.

XML

<StoreEntryId/>

xs:base64Binary

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element name Description

AcceptItem
Represents an accept reply to a meeting request.

CalendarItem
Represents an Exchange calendar item.

Conditions
Represents the conditions that, when fulfilled, will trigger the rule actions
for a rule.

Contact
Represents a contact item in the Exchange store.

DeclineItem
Represents a decline reply to a meeting request.

DistributionList
Represents a distribution list.

Exceptions
Represents all the available rule exception conditions for an Inbox rule.

Item
Represents a generic Exchange item.
Element name Description

MeetingCancellation Represents a meeting cancellation in the Exchange store.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Message
Represents an Exchange e-mail message.

RemoveItem
Removes an item from the Exchange store.

Task
Represents a task in the Exchange store.

TentativelyAcceptItem Represents a tentatively accepted reply to a meeting request.

Text value
The text value is a string that represents the store item identifier.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

This element was introduced in Exchange Server 2010 Service Pack 2 (SP2).

Element information
Name Value

Namespace

Schema Name

Validation File

Can be Empty
StreamingSubscriptionRequest
Article • 03/29/2023 • 2 minutes to read

The StreamingSubscriptionRequest element represents a subscription to a streaming


event notification subscription.

Subscribe

StreamingSubscriptionRequest

XML

<StreamingSubscriptionRequest SubscribeToAllFolders="">

<FolderIds/>

<EventTypes/>

</StreamingSubscriptionRequest>

StreamingSubscriptionRequest

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

SubscribeToAllFolders Indicates whether the server will subscribe to all folders in the user's
mailbox. A value of true indicates that the server will subscribe.

Child elements

Element Description

FolderIds
Contains an array of folder identifiers that are used to identify folders to monitor for
event notifications.

EventTypes Contains a collection of event notifications that are used to create a subscription.

Parent elements
Element Description

Subscribe
Contains the properties that are used to create subscriptions.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
Subscribe operation

GetEvents operation

GetStreamingEvents operation

Unsubscribe operation
Street
Article • 03/29/2023 • 2 minutes to read

The Street element represents a street address for a contact item.

XML

<Street/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Entry (PhysicalAddress)
Describes a single physical address for a contact item.

Text value
The text value is a string that represents the street address of a contact.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)

Updating Contacts

Deleting Contacts
String
Article • 03/29/2023 • 2 minutes to read

The String element represents a string that is used by items, contacts, tasks, and
conversations.

XML

<String/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Categories
Contains a collection of strings that identify to which categories an
item in the mailbox belongs.

Children
Contains the names of the children of a contact.

Companies
Represents the collection of companies that are associated with a
contact or task.

Contacts
Contains a list of contacts that are associated with a task.

GlobalCategories
Contains the category list for all conversation items in a mailbox.

GlobalUniqueRecipients
Contains the recipient list of a conversation aggregated across a
mailbox.
Element Description

GlobalUniqueSenders
Contains a list of all the senders of conversation items in the
mailbox.

GlobalUniqueUnreadSenders Contains a list of all the people who have sent messages that are
currently unread in this conversation across all folders in the
mailbox.

ItemClasses Contains a list of the item classes that must be stamped on


incoming messages in order for the condition or exception to
apply.

MessageClassifications
Contains a list of the message classifications that must be
stamped on incoming messages in order for the condition or
exception to apply.

UniqueRecipients
Contains the list of recipients of the conversation. This element is
read-only.

UniqueSenders
Contains a list of all the senders of conversation items in the
current folder. This element is read-only.

UniqueUnreadSenders
Contains a list of all the people who have sent messages that are
currently unread in this conversation in the current folder.

Text value
The text value of this element is a string that represents a category, the child of a
contact, a company, a unique recipient of a conversation, or a contact that is associated
with a task.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.This element was introduced in Exchange Server 2010 Service
Pack 1 (SP1).

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema


Name Value

Validation File Types.xsd

Can be Empty False

See also
FindConversation operation

EWS XML elements in Exchange


StringArrayAttributedValue
Article • 03/29/2023 • 2 minutes to read

The StringArrayAttributedValue element specifies an instance of an array of string data


for a persona element.

XML

<StringArrayAttributedValue>

<Value/>

<Attributions/>

</StringArrayAttributedValue>

StringArrayAttributedValueType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Value | Attributions (ArrayOfValueAttributionsType)

Parent elements
Children (ArrayOfStringArrayAttributedValuesType)

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
StringAttributedValue
Article • 03/29/2023 • 2 minutes to read

The StringAttributedValue element specifies an instance in an array of attributes


associated with a persona element.

XML

<StringAttributedValue>

<Value/>

<Attributions/>

</StringAttributedValue>

StringAttributedValueType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Value | Attributions (ArrayOfValueAttributionsType)

Parent elements
DisplayNames | FileAses | FileAsIds | DisplayNamePrefixes | GivenNames | MiddleNames |
Surnames | Generations | Nicknames | Initials | YomiCompanyNames | YomiFirstNames |
YomiLastNames | BusinessHomePages | PersonalHomePages | OfficeLocations |
ImAddresses | ImAddresses2 | ImAddresses3 | Titles | Departments | CompanyNames |
Managers | AssistantNames | Professions | SpouseNames | Schools | Hobbies |
WeddingAnniversaries | Birthdays | Locations

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Subject (CalendarEventDetails)
Article • 03/29/2023 • 2 minutes to read

The Subject element represents the subject of a calendar item.

GetUserAvailabilityResponse

FreeBusyResponseArray

FreeBusyResponse

FreeBusyView

CalendarEventArray

CalendarEvent

CalendarEventDetails

Subject (CalendarEventDetails)

XML

<Subject/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarEventDetails Provides additional information for a calendar event.


The following is the XPath expression to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/CalendarEventArray/CalendarEvent[i]/CalendarEventDeta

Text value
A text value is required if this element is returned in the response. This element will not be returned if the IsPrivate element value is equal
to true. This element can contain an empty string. This element is optional if the CalendarEventDetails element is used.

Remarks
The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server
2007 that has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types
Element Example

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


Subject
Article • 03/29/2023 • 2 minutes to read

The Subject element represents the subject property of Exchange store items. The
subject is limited to 255 characters.

XML

<Subject/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

CancelCalendarItem
Represents a cancel calendar item response object.

Contact
Represents an Exchange contact item.

DistributionList
Represents a distribution list.

FindMessageTrackingReport
Specifies criteria for the types of messages to find.

ForwardItem
Represents a forward item smart response object.

Item
Represents an item in the Exchange store.

MeetingCancellation Represents a meeting cancellation in the Exchange store.


Element Description

MeetingMessage
Represents a meeting message in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.

Message
Represents an e-mail in the Exchange store.

MessageTrackingReport
Contains a single message that is returned in a
GetMessageTrackingReport operation.

MessageTrackingSearchResult Contains a single message result for a


FindMessageTrackingReportResponse element.

RemoveItem
Represents a remove item response object.

ReplyAllToItem
Represents a reply-to-all smart response object.

ReplyToItem
Represents a reply-to-item smart response object.

Task
Represents a task in the Exchange store.

Text value
A text value that contains the subject of an Exchange item is required.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False


See also
GetMessageTrackingReport operation

EWS XML elements in Exchange


SubmittedTime
Article • 03/29/2023 • 2 minutes to read

The SubmittedTime element represents the time that the message entered the server.

XML

<SubmittedTime/>

DateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MessageTrackingSearchResult Contains a single message result for a


FindMessageTrackingReportResponse element.

Text value
A text value that represents a date/time is required if this element is used.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
SubmitTime
Article • 03/29/2023 • 2 minutes to read

The SubmitTime element represents the time at which the message was sent to the
server.

XML

<SubmitTime/>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

MessageTrackingReport Contains a single message that is returned in a


GetMessageTrackingReport operation.

Text value
A text value that represents a date/time is required if this element is used.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetMessageTrackingReport operation

EWS XML elements in Exchange


Subscribe
Article • 03/29/2023 • 2 minutes to read

The Subscribe element contains the properties used to create subscriptions.

XML

<Subscribe>

<PullSubscriptionRequest/>

<PushSubscriptionRequest/>

<StreamingSubscriptionRequest/>

</Subscribe>

SubscribeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

PullSubscriptionRequest
Represents a subscription to a pull-based event notification.

PushSubscriptionRequest
Represents a subscription to a push-based event notification.

StreamingSubscriptionRequest
Represents a subscription to a streaming event notification.

Parent elements
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
Subscribe operation

GetEvents operation

GetStreamingEvents operation

Unsubscribe operation
SubscribeResponse
Article • 03/29/2023 • 2 minutes to read

The SubscribeResponse element defines a response to a Subscribe request.

SubscribeResponse

XML

<SubscribeResponse>

<ResponseMessages/>

</SubscribeResponse>

SubscribeResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

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.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty True

See also
Subscribe operation
SubscribeResponseMessage
Article • 03/29/2023 • 2 minutes to read

The SubscribeResponseMessage element contains the status and result of a single


Subscribe operation request.

SubscribeResponse
ResponseMessages
SubscribeResponseMessage

XML

<SubscribeResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<SubscriptionId/>

<Watermark/>

</SubscribeResponseMessage>

SubscribeResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of a Subscribe operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values

Value Description
Value Description

Success
Describes a request that is fulfilled.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password is expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the request
encountered.

DescriptiveLinkKey
Currently unused and reserved for future use. This element contains a
value of 0.

MessageXml
Provides additional error response information.

SubscriptionId Represents the identifier for a subscription.


(GetEvents)

Watermark
Represents an event bookmark in the mailbox event queue.
Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
Subscribe operation
GetEvents operation
Unsubscribe operation
SubscriptionId (GetEvents)
Article • 03/29/2023 • 2 minutes to read

The SubscriptionId element represents the identifier for a subscription.

XML

<SubscriptionId/>

SubscriptionIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

GetEvents
Represents the operation used by pull clients to request
notifications from the server.

Notification
Contains information about the subscription and the events that
have occurred since the last notification.

SubscribeResponseMessage Contains the status and result of a Subscribe request.

Unsubscribe
Contains the properties used to unsubscribe from a subscription.

Text value
A text value is required. The text value is a GUID.
Remarks
The GUID that represents the subscription identifier is generated by the Client Access
server when the subscription is created.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name messages schema

Validation file messages.xsd

Can be empty False

See also
Subscribe operation

GetEvents operation

Unsubscribe operation
SubscriptionId (GetStreamingEvents)
Article • 03/29/2023 • 2 minutes to read

The SubscriptionId element represents the identifier for a streaming subscription.

XML

<SubscriptionId/>

SubscriptionIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

GetStreamingEvents Represents the operation that is used by clients to request streaming


notifications from the server.

Text value
A text value is required. The text value is a GUID.

Remarks
The GUID that represents the subscription identifier is generated by the Client Access
server when the subscription is created.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
GetStreamingEvents operation

EWS XML elements in Exchange


SubscriptionIds
Article • 03/29/2023 • 2 minutes to read

The SubscriptionIds element contains an array of subscription identifiers that identify


the subscriptions to get streaming events for.

XML

<SubscriptionIds>

<SubscriptionId/>

</SubscriptionIds>

NonEmptyArrayOfSubscriptionIdsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

SubscriptionId Represents the identifier for a subscription that is queried for


(GetStreamingEvents)
events.

Parent elements

Element Description

GetStreamingEvents Represents the operation that is used by clients to request streaming


notifications from the server.

Text value
None.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Message schema

Validation File Messages.xsd

Can be Empty False

See also
GetStreamingEvents operation

EWS XML elements in Exchange


SubscriptionStatus
Article • 03/29/2023 • 2 minutes to read

The SubscriptionStatus element describes the status of a push subscription.

XML

<SubscriptionStatus>OK or Unsubscribe</SubscriptionStatus>

SubscriptionStatusType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

SendNotificationResult
Contains the response of the client application' to a push notification.

Text value
A text value is required. The following are the possible text values for this element:

OK

Unsubscribe

Remarks
This element describes the status of the subscription. The push subscription client
application sends the status back to the computer that is running Exchange 2007 that
has the Client Access server role installed after each push notification. If the
SubscriptionStatus value equals Unsubscribe, the Client Access server will stop sending
notifications and end the subscription. If the SubscriptionStatus value equals OK, the
Client Access server will continue to send notifications.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Suffix
Article • 03/29/2023 • 2 minutes to read

The Suffix element represents a suffix to a contact's name.

XML

<Suffix/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CompleteName
Represents the complete name of a contact.

Text value
A text value is required.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)


Suggestion
Article • 03/29/2023 • 2 minutes to read

The Suggestion element represents a single meeting suggestion.

GetUserAvailabilityResponse

SuggestionsResponse

SuggestionDayResultArray

SuggestionDayResult

SuggestionArray

Suggestion

XML

<Suggestion>

<MeetingTime>...</MeetingTime>

<IsWorkTime>...</IsWorkTime>

<SuggestionQuality>...</SuggestionQuality>

<AttendeeConflictDataArray>...</AttendeeConflictDataArray>

</Suggestion>

Suggestion

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

MeetingTime
Represents a suggested meeting time.

IsWorkTime
Represents whether the suggested meeting time occurs during scheduled work hours.

SuggestionQuality
Represents the quality of the suggested meeting time.

AttendeeConflictDataArray Contains an array of information that describes conflicts between users and resources and the
suggested meeting time.

Parent elements

Element Description

SuggestionArray Contains an array of suggested meeting times.


The following is the XPath expression to this element:
/GetUserAvailabilityResponse/SuggestionsResponse/SuggestionDayResultArray/SuggestionDayResult[i]/SuggestionArray
Remarks
The schema that describes this element is located in the EWS virtual directory of the computer that is running
MicrosoftExchange Server 2007 that has the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


SuggestionArray
Article • 03/29/2023 • 2 minutes to read

The SuggestionArray element contains an array of meeting suggestions.

GetUserAvailabilityResponse

SuggestionsResponse

SuggestionDayResultArray

SuggestionDayResult

SuggestionArray

XML

<SuggestionArray>

<Suggestion>...</Suggestion>

</SuggestionArray>

ArrayOfSuggestion

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Suggestion
Represents a single meeting suggestion.

Parent elements

Element Description

SuggestionDayResult Represents a single day that contains suggested meeting times.


The following is the XPath expression to this element:
/GetUserAvailabilityResponse/SuggestionsResponse/SuggestionDayResultArray/SuggestionDayResult[i]

Remarks
The schema that describes this element is located in the EWS virtual directory of the computer that is
running MicrosoftExchange Server 2007 that has the Client Access server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


SuggestionDayResult
Article • 03/29/2023 • 2 minutes to read

The SuggestionDayResult element represents a single day that contains suggested


meeting times.

GetUserAvailabilityResponse

SuggestionsResponse

SuggestionDayResultArray

SuggestionDayResult

XML

<SuggestionDayResult>

<Date>...</Date>

<DayQuality>...</DayQuality>

<SuggestionArray>...</SuggestionArray>

</SuggestionDayResult>

SuggestionDayResult

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Date
Represents the date that contains the suggested meeting times.

DayQuality
Represents the quality of the day for containing quality suggested meeting
times.

SuggestionArray Contains an array of meeting suggestions.


Parent elements

Element Description

SuggestionDayResultArray Contains an array of meeting suggestions organized by date.


The following is the XPath expression to this element:
/GetUserAvailabilityResponse/SuggestionsResponse/SuggestionDayResultArray

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access server
role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


SuggestionDayResultArray
Article • 03/29/2023 • 2 minutes to read

The SuggestionDayResultArray element contains an array of meeting suggestions


organized by date.

GetUserAvailabilityResponse

SuggestionsResponse

SuggestionDayResultArray

XML

<SuggestionDayResultArray>

<SuggestionDayResult>...</SuggestionDayResult>

</SuggestionDayResultArray>

ArrayOfSuggestionDayResult

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

SuggestionDayResult
Represents a single day that contains suggested meeting times.

Parent elements

Element Description
Element Description

SuggestionsResponse Contains response information and suggestion data for requested


meeting suggestions
The following is the XPath expression to this element:
/GetUserAvailabilityResponse/SuggestionsResponse

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


SuggestionQuality
Article • 03/29/2023 • 2 minutes to read

The SuggestionQuality element represents the quality of the suggested meeting time.

GetUserAvailabilityResponse

SuggestionsResponse

SuggestionDayResultArray

SuggestionDayResult

SuggestionArray

Suggestion

SuggestionQuality

XML

<SuggestionQuality>Excellent or Good or Fair or Poor</SuggestionQuality>

SuggestionQuality

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Suggestion Represents a single meeting time suggestion.


The following is the XPath expression to this element:
/GetUserAvailabilityResponse/SuggestionsResponse/SuggestionDayResultArray/SuggestionDayResult[i]/SuggestionArray/Suggestion[i]

Text value
A text value that represents a SuggestionQuality value is required. The following are the possible values:

Excellent 100 percent of users and resources are available for the suggested meeting time.

Good The minimum percentage of users and resources available is equal to or greater than the GoodThreshold element
value plus 50.

Fair The maximum percentage of users and resources available for a suggested meeting time is equal to the
GoodThreshold element value plus 50. The minimum value for a Fair quality meeting time is 50 percent.

Poor Less than 50 percent of the users and resources are available for the suggested meeting time.
Remarks
The SuggestionQuality type is also the type for the DayQuality and the MinimumSuggestionQuality elements.

The schema that describes this element is located in the EWS virtual directory of the computer that is running
MicrosoftExchange Server 2007 that has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


SuggestionsResponse
Article • 03/29/2023 • 2 minutes to read

The SuggestionsResponse element contains response status information and


suggestion data for requested meeting suggestions.

GetUserAvailabilityResponse

SuggestionsResponse

XML

<SuggestionsResponse>

<ResponseMessage>...</ResponseMessage>

<SuggestionDayResultArray>...</SuggestionDayResultArray>

</SuggestionsResponse>

SuggestionsResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessage
Provides descriptive information about the response status.

SuggestionDayResultArray
Contains an array of meeting suggestions organized by date.

Parent elements

Element Description

GetUserAvailabilityResponse
Contains the requested users' availability information.
The following is the XPath expression to this element:
/GetUserAvailabilityResponse

Remarks
This element is not included in a GetUserAvailability response if
SuggestionsViewOptions is not set in the GetUserAvailability request message.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


SuggestionsViewOptions
Article • 03/29/2023 • 2 minutes to read

The SuggestionsViewOptions element contains the options for obtaining meeting


suggestion information.

GetUserAvailabilityRequest

SuggestionsViewOptions

XML

<SuggestionsViewOptions>

<GoodThreshold>...</GoodThreshold>

<MaximumResultsByDay>...</MaximumResultsByDay>

<MaximumNonWorkingHourResultsByDay>...
</MaximumNonWorkingHourResultsByDay>

<MeetingDurationInMinutes>...</MeetingDurationInMinutes>

<MinimumSuggestionQuality>...</MinimumSuggestionQuality>

<SuggestionIntervalInMinutes>...</SuggestionIntervalInMinutes>

<DetailedSuggestionsWindow>...</DetailedSuggestionsWindow>

<CurrentMeetingTime>...</CurrentMeetingTime>

<GlobalObjectId>...</GlobalObjectId>

</SuggestionsViewOptions>

SuggestionsViewOptionsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

GoodThreshold
Specifies the percentage of attendees that must have the
time period open for the time period to qualify as a good
suggested meeting time.
Element Description

MaximumResultsByDay
Specifies the number of suggested meeting times per
day returned in the response.

MaximumNonWorkHourResultsByDay Specifies the number of suggested results for meeting


times outside regular working hours per day.

MeetingDurationInMinutes
Specifies the length of the meeting to be suggested.

MinimumSuggestionQuality
Specifies the quality of meeting suggestions to be
returned in the response.

DetailedSuggestionsWindow
Identifies the time span that is queried for detailed
information about suggested meeting times.

CurrentMeetingTime
Represents the start time of a meeting that you want to
update with the suggested meeting time results.

GlobalObjectId
This element is not used.

Parent elements

Element Description

GetUserAvailabilityRequest Contains the arguments used to obtain user availability information.


This is a root element.
The following is the XPath to this element:
/GetUserAvailabilityRequest

Remarks
This element is not required and can only occur once if used. This value can be null if the
value of the FreeBusyViewOptions element is not null.

7 Note

The schema that describes this element is located in the EWS virtual directory of
the computer that is running MicrosoftExchange Server 2007 that has the Client
Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

Getting User Availability


SuppressReadReceipt
Article • 03/29/2023 • 2 minutes to read

The SuppressReadReceipt element is used to suppress read receipts.

XML

<SuppressReadReceipt>

<ReferenceItemId/>

</SuppressReadReceipt>

SuppressReadReceiptType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ReferenceItemId
Identifies the item to which the response object refers.

Parent elements

Element Description

AdjacentMeetings
Describes all items that are adjacent to a meeting time.

The following are some of the XPath expressions to this element:

/CalendarItem/AdjacentMeetings

/MeetingRequest/AdjacentMeetings

/SetItemField/CalendarItem/AdjacentMeetings

/AppendToItemField/CalendarItem/AdjacentMeetings

/AcceptItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/DeclineItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/TentativelyAcceptItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/SetItemField/CalendarItem/AdjacentMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/AppendToItemField/CalendarItem/AdjacentMeetings

/CreateAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/GetAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

Element Description

ConflictingMeetings Describes all items that conflict with a meeting time.

The following are some of the XPath expressions to this element:

/CalendarItem/ConflictingMeetings

/MeetingRequest/ConflictingMeetings

/SetItemField/CalendarItem/ConflictingMeetings

/AppendToItemField/CalendarItem/ConflictingMeetings

/AcceptItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/DeclineItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/TentativelyAcceptItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/SetItemField/CalendarItem/ConflictingMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/AppendToItemField/CalendarItem/ConflictingMeetings
/CreateAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/GetAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

ResponseObjects
Contains a collection of all the response objects that are associated with an item in the Exchange
store.

Items Contains an array of items to create in the folder that is identified by the ParentFolderId
(NonEmptyArrayOfAllItemsType) (TargetFolderIdType) element.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
SuppressReadReceipts
Article • 03/29/2023 • 2 minutes to read

The SuppressReadReceipts element indicates whether read receipts should be


suppressed.

XML

<SuppressReadReceipts>true | false</SuppressReadReceipts>

Boolean

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
ConversationAction | MarkAllItemsAsRead

Text value
A text value of true for the SuppressReadReciepts element indicates that read receipts
are suppressed. A value of false indicates that read receipts will be sent to the sender.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty
Surname
Article • 03/29/2023 • 2 minutes to read

The Surname element represents the surname of a contact.

XML

<Surname/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Contact
Represents an Exchange contact item.

Text value
A text value is required.

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.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)

Updating Contacts

Deleting Contacts
Surnames
Article • 03/29/2023 • 2 minutes to read

The Surnames element specifies an array of surname values and the identifiers of their
source attributions for the associated persona.

XML

<Surnames>

<StringAttributedValue/>

</Surnames>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
StringAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
SyncFolderHierarchy
Article • 03/29/2023 • 2 minutes to read

The SyncFolderHierarchy element defines a request to synchronize a folder hierarchy on


a client.

XML

<SyncFolderHierarchy>

<FolderShape/> <SyncFolderId/>

<SyncState/>

</SyncFolderHierarchy>

SyncFolderHierarchyType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FolderShape Identifies the folder properties to include in a SyncFolderHierarchy response.

SyncFolderId Represents the folder that contains the items to synchronize. This element is
optional.

SyncState
Contains a base64-encoded form of the synchronization data that is updated after
each successful request. This is used to identify the synchronization state.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
SyncFolderHierarchy operation

EWS XML elements in Exchange


SyncFolderHierarchyResponse
Article • 03/29/2023 • 2 minutes to read

The SyncFolderHierarchyResponse element defines a response to a


SyncFolderHierarchy request.

XML

<SyncFolderHierarchyResponse>

<ResponseMessages/>

</SyncFolderHierarchyResponse>

SyncFolderHierarchyResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name messages schema

Validation file messages.xsd

Can be empty False

See also
SyncFolderHierarchy operation

EWS XML elements in Exchange


SyncFolderHierarchyResponseMessage
Article • 03/29/2023 • 2 minutes to read

The SyncFolderHierarchyResponseMessage element contains the status and result of a


single SyncFolderHierarchy operation request.

SyncFolderHierarchyResponse
ResponseMessages
SyncFolderHierarchyResponseMessage

XML

<SyncFolderHierarchyResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<SyncState/>

<IncludesLastFolderInRange/>

<Changes/>

</SyncFolderHierarchyResponseMessage>

SyncFolderHierarchyResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of a SyncFolderHierarchy operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass attribute values


Value Description

Success
Describes a request that is fulfilled.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while an item in the request was processing and subsequent items could not
be processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password has expired.
- A quota has been exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- An unauthorized access attempt by any client
- A server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the
request encountered.

DescriptiveLinkKey
Currently unused and is reserved for future use. It contains a value of
0.

MessageXml
Provides additional error response information.

SyncState
Contains a base64-encoded form of the synchronization data that is
updated after each successful request. This is used to identify the
synchronization state.
Element Description

IncludesLastFolderInRange Indicates whether the last item to synchronize has been included in
the response.

Changes (Hierarchy)
Contains a sequence array of change types that represent the types
of differences between the items on the client and the items on the
Exchange server.

Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server 2010 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
SyncFolderHierarchy operation
EWS XML elements in Exchange
SyncFolderId
Article • 03/29/2023 • 2 minutes to read

The SyncFolderId element represents the folder that contains the items to synchronize.

XML

<SyncFolderId>

<FolderId/>

</SyncFolderId>

XML

<SyncFolderId>

<DistinguishedFolderId/>

</SyncFolderId>

TargetFolderIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier and change key of a folder.

DistinguishedFolderId Identifies MicrosoftExchange Server 2007 folders that can be referenced


by name.

Parent elements

Element Description

SyncFolderHierarchy
Defines a request to synchronize a folder hierarchy in an Exchange store.
Element Description

SyncFolderItems
Defines a request to synchronize items in an Exchange store folder.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Exchange Server 2007 that has the Client Access server role
installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
SyncFolderItems operation
EWS XML elements in Exchange
SyncFolderItems
Article • 03/29/2023 • 2 minutes to read

The SyncFolderItems element defines a request to synchronize items in an Exchange


store folder.

XML

<SyncFolderItems>

<ItemShape/>

<SyncFolderId/>

<SyncState/>

<Ignore/>

<MaxChangesReturned/>

<SyncScope/>

</SyncFolderItems>

7 Note

SyncFolderItems operation is not supported for use against Office 365 Group
mailboxes.

SyncFolderItemsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ItemShape
Identifies the item properties and content to include in a SyncFolderItems
response. This element is required.

SyncFolderId
Represents the folder that contains the items to synchronize. This
element is required.
Element Description

SyncState
Contains a base64-encoded form of the synchronization data that is
updated after each successful request. This is used to identify the
synchronization state. This element is optional.

Ignore
Identifies items to skip during synchronization. This element is optional.

MaxChangesReturned Describes the maximum number of changes that can be returned in a


synchronization response. This element is required.

SyncScope
Specifies whether just items or items and folder associated information
are returned in a synchronization response. This element is optional.

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 that has the Client Access server
role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name messages schema

Validation file messages.xsd

Can be empty False

See also
SyncFolderItems operation

EWS XML elements in Exchange


SyncFolderItemsResponse
Article • 03/29/2023 • 2 minutes to read

The SyncFolderItemsResponse element defines a response to a SyncFolderItems


request.

XML

<SyncFolderItemsResponse>

<ResponseMessages/>

</SyncFolderItemsResponse>

SyncFolderItemsResponseType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Parent elements
None.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False


SyncFolderItemsResponseMessage
Article • 03/29/2023 • 2 minutes to read

The SyncFolderItemsResponseMessage element contains the status and result of a


single SyncFolderItems operation request.

SyncFolderItemsResponse
ResponseMessages
SyncFolderItemsResponseMessage

XML

<SyncFolderItemsResponseMessage ResponseClass="">

<MessageText/>

<ResponseCode/>

<DescriptiveLinkKey/>

<MessageXml/>

<SyncState/>

<IncludesLastItemInRange/>

<Changes/>

</SyncFolderItemsResponseMessage>

SyncFolderItemsResponseMessageType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

ResponseClass
Describes the status of a SyncFolderItems operation response.

The following values are valid for this attribute:

- Success
- Warning
- Error

ResponseClass Attribute
Value Description

Success
Describes a request that is fulfilled.

Warning Describes a request that was not processed. A warning may be returned if an error
occurred while processing an item in the request and subsequent items cannot be
processed.

The following are examples of sources of warnings:

- The Exchange store is offline during the batch.


- Active Directory Domain Services (AD DS) is offline.
- Mailboxes were moved.
- The message database (MDB) is offline.
- A password has expired.
- A quota was exceeded.

Error
Describes a request that cannot be fulfilled.

The following are examples of sources of errors:

- Invalid attributes or elements


- Attributes or elements that are out of range
- An unknown tag
- An attribute or element that is not valid in the context
- Any unauthorized access attempt by any client
- Any server-side failure in response to a valid client-side call

Information about the error can be found in the ResponseCode and MessageText
elements.

Child elements

Element Description

MessageText
Provides a text description of the status of the response.

ResponseCode
Provides an error code that identifies the specific error that the
request encountered.

DescriptiveLinkKey
Currently unused and is reserved for future use. It contains the value
of 0.

MessageXml
Provides additional error response information.

SyncState
Contains a base64-encoded form of the synchronization data that is
updated after each successful request. This is used to identify the
synchronization state.
Element Description

IncludesLastItemInRange Indicates whether the last item to synchronize has been included in
the response.

Changes (Items)
Contains a sequence array of change types that represent the types of
differences between the items on the client and the items on the
Exchange server.

Parent elements

Element Description

ResponseMessages
Contains the response messages for an Exchange Web Services request.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
SyncFolderItems operation
EWS XML elements in Exchange
SyncScope
Article • 03/29/2023 • 2 minutes to read

The SyncScope element specifies whether just items or items and folder associated
information are returned in a synchronization response.

XML

<SyncScope>NormalItems or NormalAndAssociatedItems</SyncScope>

SyncFolderItemsScopeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

SyncFolderItems The element that defines a request to synchronize items in an Exchange store
folder.
The following is the XPath expression to this element:
/SyncFolderItems

Text value
The following table lists the possible values for the SyncScope element.

SyncScope element values

Value Description
Value Description

NormalItems Specifies that only items in the folder are returned in a


synchronization response.

NormalAndAssociatedItems Specifies that both items in the folder and folder associated
information are returned in a synchronization response.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server that has the Client Access server
role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
SyncFolderItems operation

EWS XML elements in Exchange


SyncState
Article • 03/29/2023 • 2 minutes to read

The SyncState element contains a base64-encoded form of the synchronization data


that is updated after each successful request. This is used to identify the synchronization
state.

XML

<SyncState/>

String

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

SyncFolderHierarchy
Defines a request to synchronize a folder hierarchy on a
client.

SyncFolderHierarchyResponseMessage Contains the status and result of a SyncFolderHierarchy


request.

SyncFolderItems
Defines a request to synchronize items in an Exchange
store folder.

SyncFolderItemsResponseMessage
Contains the status and result of a SyncFolderItems
request.
Text value
A text value is required when this element is used.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file Messages.xsd

Can be empty False

See also
SyncFolderItems operation

SyncFolderHierarchy operation

EWS XML elements in Exchange


SyncState (base64Binary)
Article • 03/29/2023 • 2 minutes to read

The SyncState element specifies the synchronization state of a conversation.

XML

<SyncState></SyncState>

base64Binary

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Conversation (ConversationRequestType) | Conversation (ConversationResponseType)

Text value
The text value of the SyncState element is the synchronization state for a conversation.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element info value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


Task
Article • 03/29/2023 • 5 minutes to read

The Task element represents a task in the Exchange store.

XML

<Task>

<MimeContent/>

<ItemId/>

<ParentFolderId/>

<ItemClass/>

<Subject/>

<Sensitivity/>

<Body/>

<Attachments/>

<DateTimeReceived/>

<Size/>

<Categories/>

<InReplyTo/>

<IsSubmitted/>

<IsDraft/>

<IsFromMe/>

<IsResend/>

<IsUnmodified/>

<InternetMessageHeaders/>

<DateTimeSent/>

<DateTimeCreated/>

<ResponseObjects/>

<ReminderDueBy/>

<ReminderIsSet/>

<ReminderMinutesBeforeStart/>

<DisplayCc/>

<DisplayTo/>

<HasAttachments/>

<ExtendedProperty/>

<Culture/>

<ActualWork/>

<AssignedTime/>

<BillingInformation/>

<ChangeCount/>

<Companies/>

<CompleteDate/>

<Contacts/>

<DelegationState/>

<Delegator/>

<DueDate/>

<IsAssignmentEditable/>

<IsComplete/>

<IsRecurring/>

<IsTeamTask/>

<Mileage/>

<Owner/>

<PercentComplete/>

<Recurrence/>

<StartDate/>

<Status/>

<StatusDescription/>
<TotalWork/>

<EffectiveRights/>

<LastModifiedName/>

<LastModifiedTime/>

<IsAssociated/>

<WebClientReadFormQueryString/>

<WebClientEditFormQueryString/>

<ConversationId/>

<UniqueBody/>

</Task>

TaskType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

MimeContent
Contains the native Multipurpose Internet Mail Extensions
(MIME) stream of an object that is represented in base64Binary
format.

ItemId
Contains the unique identifier and change key of an item in the
Exchange store.

ParentFolderId Represents the identifier of the parent folder that contains the
item or folder.

ItemClass
Represents the message class of an item.

Subject
Represents the subject for Exchange store items and response
objects.

Sensitivity
Contains the status for an item's sensitivity.
Element Description

Body
Represents the actual body content of a message.

Attachments
Contains the items or files that are attached to an item in the
Exchange store.

DateTimeReceived
Represents the date and time that an item in a mailbox was
received.

Size
Represents the size, in bytes, of an item. This property is read-
only.

Categories
Represents a collection of strings that identify to which
categories an item in the mailbox belongs.

Importance
Describes the importance of an item.

InReplyTo
Represents the identifier of the item to which this item is a
reply.

IsSubmitted
Indicates whether an item has been submitted to the Outbox
default folder.

IsDraft
Represents whether an item has not yet been sent.

IsFromMe
Indicates whether a user sent an item to him or herself.

IsResend
Indicates whether the item had previously been sent.

IsUnmodified
Indicates whether the item has been modified.

InternetMessageHeaders
Represents the collection of all Internet message headers that
are contained in an item in a mailbox.

DateTimeSent
Represents the date and time that an item in a mailbox was
sent.

DateTimeCreated
Represents the date and time that a given item in the mailbox
was created.

ResponseObjects
Contains a collection of all the response objects that are
associated with an item in the Exchange store.

ReminderDueBy
Represents the date and time when the event occurs. This is
used by the ReminderMinutesBeforeStart element to
determine when the reminder is displayed.

ReminderIsSet
Indicates whether a reminder has been set for an item in the
Exchange store.
Element Description

ReminderMinutesBeforeStart
Represents the number of minutes before an event when a
reminder is displayed.

DisplayCc
Represents the display string that is used for the contents of
the Cc box. This is the concatenated string of all Cc recipient
display names.

DisplayTo
Represents the display string that is used for the contents of
the To box. This is the concatenated string of all To recipient
display names.

HasAttachments
Represents a property that is set to true if an item has at least
one visible attachment. This property is read-only.

ExtendedProperty
Identifies extended properties on folders and items.

Culture
Represents the culture for a given item in a mailbox.

ActualWork
Represents the actual amount of time that is spent on a task.

AssignedTime
Represents the time when a task is assigned to a contact.

BillingInformation
Holds billing information for a task.

ChangeCount
Specifies the version of the task.

Companies
Represents the collection of companies that are associated
with a contact or task.

CompleteDate
Represents the date on which a task is completed.

Contacts
Contains a list of contacts that are associated with a task.

DelegationState
Represents the status of a delegated task.

Delegator
Contains the name of the delegator who assigned the task.

DueDate
Represents the date when a task item is due.

IsAssignmentEditable
Indicates whether the task is editable or not.

IsComplete
Indicates whether the task has been completed or not.

IsRecurring
Indicates whether a task is part of a recurring item. This
element is read-only.

IsTeamTask
Indicates whether the task is owned by a team or not.

Mileage
Represents mileage for a task item.

Owner
Represents the owner of a task.
Element Description

PercentComplete
Describes the completion status of a task.

Recurrence Contains recurrence information for recurring tasks.


(TaskRecurrenceType)

StartDate
Represents the start date of a task item.

Status
Represents the status of a task item.

StatusDescription
Contains an explanation of the task status.

TotalWork
Contains a description of how much work is associated with an
item.

EffectiveRights
Contains the rights of the client based on the permission
settings for the item or folder. This element is read-only.

LastModifiedName
Contains the display name of the last user to modify an item.

LastModifiedTime
Indicates when an item was last modified.

IsAssociated
Indicates whether the item is associated with a folder.

WebClientReadFormQueryString Represents a URL to concatenate to the Microsoft Office


Outlook Web App endpoint to read an item in Outlook Web
App.

WebClientEditFormQueryString
Represents a URL to concatenate to the Outlook Web App
endpoint to edit an item in Outlook Web App.

ConversationId
Contains the identifier of an item or conversation.

UniqueBody
Represents an HTML fragment or plain text which represents
the unique body of this conversation.

Parent elements

Element Description

AdjacentMeetings
Describes all calendar items that are adjacent to a meeting time.

AppendToItemField Identifies data to append to a single property of an item/folder during an


UpdateItem operation.

ConflictingMeetings Identifies all items that conflict with a meeting time.

Create (ItemSync)
Identifies a single item to create in the local client store.

ItemAttachment
Represents an Exchange item that is attached to another Exchange item.
Element Description

Items
Contains an array of items.

SetItemField
Represents an update to a single property of an item in an UpdateItem
operation.

Update (ItemSync)
Identifies a single item to update in the local client store.

Text value
None.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
Creating Tasks
Deleting Tasks
TasksFolder
Article • 03/29/2023 • 2 minutes to read

The TasksFolder element represents a Tasks folder that is contained in a mailbox.

XML

<TasksFolder>

<FolderId/>

<ParentFolderId/>

<FolderClass/>

<DisplayName/>

<TotalCount/>

<ChildFolderCount/>

<ExtendedProperty/>

<ManagedFolderInformation/>

<UnreadCount/>

<PermissionSet/>

<EffectiveRights/>

</TasksFolder>

TasksFolderType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier and change key of a Tasks folder.

ParentFolderId Represents the identifier of the parent folder that contains the Tasks
folder.

FolderClass
Represents the folder class for a Tasks folder.

DisplayName (string)
Contains the display name of a Tasks folder.

TotalCount
Represents the total count of items within a Tasks folder.
Element Description

ChildFolderCount
Represents the number of child folders that are contained within a
Tasks folder. This property is read-only.

ExtendedProperty
Identifies extended properties on a Tasks folder.

ManagedFolderInformation Contains information about a managed folder.

UnreadCount
Represents the count of unread items within a Tasks folder.

PermissionSet Contains all the configured permissions for a folder. This element
(PermissionSetType)
was introduced in Microsoft Exchange Server 2007 Service Pack 1
(SP1).

EffectiveRights
Contains the client's rights based on the permission settings for the
item or folder. This element is read-only. This element was
introduced in Microsoft Exchange 2007 SP1.

Parent elements

Element Description

AppendToFolderField Specifies data to append to a folder property during an UpdateFolder


operation.

Create (FolderSync)
Identifies a single folder to create in the local client store.

SetFolderField
Represents an update to a single property on a folder in an UpdateFolder
operation.

Update (FolderSync)
Identifies a single folder to update in the local client store.

Folders
Contains an array of folders that are used in folder operations.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element info Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types
Element info Value

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
TasksFolderPermissionLevel
Article • 03/29/2023 • 2 minutes to read

The TasksFolderPermissionLevel element contains the permissions for the default Tasks
folder. This element was introduced in Microsoft Exchange Server 2007 Service Pack 1
(SP1).

XML

<TasksFolderPermissionLevel>

None or Editor or Reviewer or Author or Custom

</TasksFolderPermissionLevel>

DelegateFolderPermissionLevelType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

DelegatePermissions Contains the delegate permission level settings for a user. This element
was introduced in Exchange 2007 SP1.

Text value
The following table lists the text values that represent the permission levels.

Permission level text values


Permission level Description

None The delegate user has no access permissions to the Tasks folder.

Reviewer The delegate user can read items in the Tasks folder.

Author The delegate user can read and create items in the Tasks folder.

Editor The delegate user can read, create, and modify items in the Tasks folder.

Custom The delegate user has custom access permissions to the Tasks folder.

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.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
AddDelegate operation
UpdateDelegate operation
EWS XML elements in Exchange
Adding Delegates
TaskString
Article • 03/29/2023 • 2 minutes to read

The TaskString element contains a suggested task.

XML

<TaskString></TaskString>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
TaskSuggestion

Text value
The text value of the TaskString element is the suggested task that resulted from a task
entity extracted from an item in the mailbox.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
TaskSuggestion
Article • 03/29/2023 • 2 minutes to read

The TaskSuggestion element contains a task suggestion that resulted from an entity
extracted from an item.

XML

<TaskSuggestion>

<Position/>

<TaskString/>

<Assignees/>

</TaskSuggestion>

TaskSuggestionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Position | TaskString | Assignees

Parent elements
TaskSuggestions

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
TaskSuggestions
Article • 03/29/2023 • 2 minutes to read

The TaskSuggestions element specifies an array of task suggestions extracted from an


item.

XML

<TaskSuggestions>

<TaskSuggestion/>

</TaskSuggestions>

ArrayOfTaskSuggestionsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
TaskSuggestion

Parent elements
EntityExtractionResult

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
TaskTimedOut
Article • 03/29/2023 • 2 minutes to read

The TaskTimedOut element is intended for internal use only.

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
None.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
TelexNumbers
Article • 03/29/2023 • 2 minutes to read

The TelexNumbers element specifies an array of Telex numbers and the identifiers of
their source attributions for the associated persona.

XML

<TelexNumbers>

<PhoneNumberAttributedValue/>

</TelexNumbers>

ArrayOfPhoneNumberAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
PhoneNumberAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


TelUriAddress
Article • 03/29/2023 • 2 minutes to read

The TelUriAddress element contains the tel Uniform Resource Identifier (URI) for a
contact.

XML

<TelUriAddress></TelUriAddress>

NonEmptyStringType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
AddNewTelUriContactToGroup

Text value
The text value of the TelUriAddress element is the tel URI for a contact.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
TemplateDescription
Article • 03/29/2023 • 2 minutes to read

The TemplateDescription element specifies the description of the Rights Management


template.

XML

<TemplateDescription></TemplateDescription>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
RightsManagementLicenseData

Text value
The text value of the TemplateDescription element is the description of the Rights
Management template applied to an item.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Code Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
TemplateName
Article • 03/29/2023 • 2 minutes to read

The TemplateName element specifies the name of the Rights Management template.

XML

<TemplateName></TemplateName>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
RightsManagementLicenseData

Text value
The text value of the TemplateName element is the name of the Rights Management
template applied to an item.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
TentativelyAcceptItem
Article • 03/29/2023 • 2 minutes to read

The TentativelyAcceptItem element represents a Tentative reply to a meeting request.

XML

<TentativelyAcceptItem>

<ItemClass/>

<Sensitivity/>

<Body/>

<Attachments/>

<InternetMessageHeaders/>

<Sender/>

<ToRecipients/>

<CcRecipients/>

<BccRecipients/>

<IsReadReceiptRequested/>

<IsDeliveryReceiptRequested/>

<ReferenceItemId/>

<ReceivedBy/>

<ReceivedRepresenting/>

<ProposedStart/>

<ProposedEnd/>

</TentativelyAcceptItem>

TentativelyAcceptItemType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

ItemClass
Represents the message class of an item.

Sensitivity
Identifies the sensitivity of an item.

Body
Represents the actual body content of a message.

Attachments
Contains the item or file that is attached to an item in the Exchange store.

InternetMessageHeaders
Represents the Internet message header name for a given header within the headers collection.

Sender
Identifies the sender of an item.

ToRecipients
Contains a set of recipients of an item. These are the primary recipients of an item.

CcRecipients
Represents a collection of recipients that will receive a copy of the message.

BccRecipients
Represents a collection of recipients to receive a blind carbon copy (Bcc) of an e-mail.

IsReadReceiptRequested
Indicates whether the sender of an item requests a read receipt.
Element Description

IsDeliveryReceiptRequested Indicates whether the sender of an item requests a delivery receipt.

ReferenceItemId
Identifies the item to which the response object refers.

ReceivedBy
Identifies the delegate in a delegate access scenario. This element was introduced in Microsoft
Exchange Server 2007 Service Pack 1 (SP1).

ReceivedRepresenting
Identifies the principal in a delegate access scenario. This element was introduced in Microsoft
Exchange Server 2007 Service Pack 1 (SP1).

ProposedStart
Specifies the proposed start time of the meeting request.

ProposedEnd
Specifies the proposed end time of the meeting request.

Parent elements

Element Description

AdjacentMeetings
Describes all items that are adjacent to a meeting time.

The following are some of the XPath expressions to this element:

/CalendarItem/AdjacentMeetings

/MeetingRequest/AdjacentMeetings

/SetItemField/CalendarItem/AdjacentMeetings

/AppendToItemField/CalendarItem/AdjacentMeetings

/AcceptItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/DeclineItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/TentativelyAcceptItem/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/SetItemField/CalendarItem/AdjacentMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/AppendToItemField/CalendarItem/AdjacentMeetings

/CreateAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

/GetAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/AdjacentMeetings

ConflictingMeetings Describes all items that conflict with a meeting time.

The following are some of the XPath expressions to this element:

/CalendarItem/ConflictingMeetings

/MeetingRequest/ConflictingMeetings

/SetItemField/CalendarItem/ConflictingMeetings

/AppendToItemField/CalendarItem/ConflictingMeetings

/AcceptItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/DeclineItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/TentativelyAcceptItem/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/SetItemField/CalendarItem/ConflictingMeetings

/UpdateItem/ItemChanges/ItemChange/Updates/AppendToItemField/CalendarItem/ConflictingMeetings
/CreateAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

/GetAttachmentResponseMessage/Attachments/ItemAttachment/CalendarItem/ConflictingMeetings

ResponseObjects
Contains a collection of all the response objects that are associated with an item in the Exchange
store.

Items Contains an array of items to create in the folder identified by the ParentFolderId
(NonEmptyArrayOfAllItemsType) (TargetFolderIdType) element.

Remarks
The schema that describes this element is located in the EWS virtual directory of the computer that is running
MicrosoftExchange Server 2007 that has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Term
Article • 03/29/2023 • 2 minutes to read

The Term element specifies a highlighted term in a FindConversation or FindItem


response.

XML

<Term>

<Scope/>

<Value/>

</Term>

HighlightTermType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
Scope (HighlightTermType) | Value

Parent elements
HighlightTerms

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Code Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
TextBody
Article • 03/29/2023 • 2 minutes to read

The TextBody element specifies the text body.

XML

<TextBody BodyTypeType=" HTML | Text" IsTruncated=" true | false">


</TextBody>

BodyType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

BodyTypeType Indicates the body type. The value of Text for the BodyTypeType attribute
indicates that the body is in plain text form. The value of HTML for the
BodyTypeType attribute indicates that the body is in HTML form. The
BodyTypeType attribute is required.

IsTruncated Indicates that the body contents have been truncated. A text value of false for
the IsTruncated attribute indicates that the body contents have not been
truncated. The normalized body will be truncated if the text body length is
longer than the value set in the MaximumBodySize element.

Child elements
None.

Parent elements
Item | Contact | Message | DistributionList | CalendarItem | PostItem | Task

Text value
The text value of the TextBody element is the text body of the item.
Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Time
Article • 03/29/2023 • 2 minutes to read

The Time element represents the transition time of day to and from standard time and daylight saving time.

XML

<Time>...</Time>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

StandardTime Represents an offset from the time relative to Coordinated Universal Time (UTC) represented by the Bias (UTC) element.
This element also contains information about the transition to standard time from daylight saving time in regions where
daylight saving time is observed.

The following are the XPath expressions to the StandardTime element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/WorkingHours/TimeZone/StandardTime

/GetUserAvailabilityRequest/TimeZone/StandardTime

DaylightTime
Represents an offset from the time relative to UTC represented by the Bias (UTC) element in regions where daylight saving
time is observed. This element also contains information about when the transition to daylight saving time from standard
time occurs.

The following are the XPath expressions to the DaylightTime element:

/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/WorkingHours/TimeZone/DaylightTime

/GetUserAvailabilityRequest/TimeZone/DaylightTime

Text value
The text value represents hours, minutes, and seconds in the following format: hh:mm:ss.

Remarks
When the Time element occurs in the DaylightTime element, it represents the time of day that the transition from
daylight saving time to standard time occurs. When the Time element occurs in the StandardTime element, it
represents the time of day that the transition from standard time to daylight saving time occurs.

This element has a minimum occurrence of zero and a maximum occurrence of one.

Example
The following part of a request represents a transition time of 2 A.M. from standard time to daylight saving time.

XML

<StandardTime>

<Bias>0</Bias>

<Time>02:00:00</Time>

<DayOrder>5</DayOrder>

<Month>10</Month>

<DayOfWeek>Sunday</DayOfWeek>

</StandardTime

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
Getting User Availability
Time (TimeChangeType)
Article • 03/29/2023 • 2 minutes to read

The Time element describes the time when the time changes between standard time
and daylight saving time.

XML

<Time/>

Time

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Daylight
Represents the date and time when the time changes from daylight saving time to
standard time.

Standard Represents the date and time when the time changes from daylight saving time to
standard time.

Text value
The text value represents the time when the time changes between standard time and
daylight saving time.
Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
TimeOffset
Article • 03/29/2023 • 2 minutes to read

The TimeOffset element represents the time offset from Coordinated Universal Time
(UTC) for the time zone transition.

XML

<TimeOffset/>

duration

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

RecurringDateTransition Represents a time zone transition that occurs on a specific date each
year.

RecurringDayTransition
Represents a time zone transition that occurs on the same day each
year.

Text value
The text value of the TimeOffset element is a duration that specifies the time offset
from UTC for the time zone transition.
Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Timeout
Article • 03/29/2023 • 2 minutes to read

The Timeout element represents the duration, in minutes, that the subscription can
remain idle without a GetEvents request from the client.

XML

<Timeout/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

PullSubscriptionRequest Represents a subscription to a pull-based event notification


subscription.

Text value
A text value that represents an integer is required if this element is used. The possible
values for this element are 1 to 1440, inclusive. This element is required.

Remarks
The timeout timer for the subscription is reset by a successful GetEvents request.
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
Subscribe operation

GetEvents operation

Unsubscribe operation
Timeout (duration)
Article • 03/29/2023 • 2 minutes to read

The Timeout element specifies the length of time before a pull subscription is timed out
by the server.

XML

<Timeout></Timeout>

SubscriptionTimeoutType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
PullSubscriptionRequest

Text value
The text value of the Timeout element is the length of time, in minutes, before a pull
subscription is timed out by the server. The minimum value is 1; the maximum value is
1440.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
TimeStamp
Article • 03/29/2023 • 2 minutes to read

The Timestamp element represents the timestamp of a mailbox event.

XML

<TimeStamp/>

DateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CopiedEvent
Represents an event where an item or folder is copied.

CreatedEvent
Represents an event where an item or folder is created.

DeletedEvent
Represents an event where an item or folder is deleted.

ModifiedEvent Represents an event where an item or folder is modified.

MovedEvent
Represents an event where an item or folder is moved from one parent folder to
another parent folder.

NewMailEvent Represents an event triggered by a new mail item in a mailbox.

Text value
This property is read-only.

Remarks
This element is primarily available for use in client determination of event frequency.
This is not present in StatusEvent.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
Subscribe operation

GetEvents operation

Unsubscribe operation
TimeWindow
Article • 03/29/2023 • 2 minutes to read

The TimeWindow element identifies the time span queried for the user availability
information.

GetUserAvailabilityRequest

FreeBusyViewOptions

TimeWindow

XML

<TimeWindow>

<StartTime>dateTime</StartTime>

<EndTime>dateTime</EndTime>

</TimeWindow>

Duration

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

StartTime
Represents the start of a time span queried for the user availability information.

EndTime
Represents the end of a time span queried for the user availability information.

Parent elements

Element Description
Element Description

FreeBusyViewOptions
Specifies the type of free/busy information returned in the response.
The following is the XPath to this element:
/GetUserAvailabilityRequest/FreeBusyViewOptions

Remarks
The maximum value for this time period is 42 days. This maximum value can be
modified. Any requests for user availability information beyond the maximum value will
return an error. If any appointments are partially in the time span defined by the
StartTime and EndTime elements, that appointment is included in its entirety.

7 Note

The schema that describes this element is located in the /EWS/ directory of the
computer that is running Microsoft® Exchange Server 2007 that has the Client
Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation

Getting User Availability


TimeZone (Availability)
Article • 03/29/2023 • 2 minutes to read

The TimeZone element contains elements that identify time zone information. This element also contains
information about the transition between standard time and daylight saving time.

XML

<TimeZone>

<Bias/>

<StandardTime/>

<DaylightTime/>

</TimeZone>

SerializableTimeZone

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Bias (UTC)
Represents the general offset from Coordinated Universal Time (UTC). This value is in minutes.

StandardTime Represents an offset from the time relative to UTC represented by the Bias (UTC) element. This element
also contains information about the transition to standard time from daylight saving time in regions
where daylight saving time is observed.

DaylightTime
Represents an offset from the time relative to UTC represented by the Bias (UTC) element in regions
where daylight saving time is observed. This element also contains information about when the
transition to daylight saving time from standard time occurs.

Parent elements

Element Description

GetUserAvailabilityRequest Contains the arguments used to obtain user availability information. This is a root element.
The TimeZone element in the GetUserAvailabilityRequest message represents the time zone in
which the DateTime values in the request are specified. The DateTime values returned by the
Availability service are also in this time zone.
The following is the XPath to this element:
/GetUserAvailabilityRequest

Element Description

WorkingHours
Represents the time zone settings and working hours for the requested mailbox user.
The TimeZone element in the GetUserAvailabilityResponse message represents the time zone
settings of the requested mailbox user.
The following is the XPath to this element:
/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse/FreeBusyView/WorkingHours

Remarks
This element is required in the GetUserAvailabilityRequest element. This element occurs at most once or at
least zero times when the parent element is the WorkingHours element.

Example
The following example shows part of an XML request that identifies an offset from UTC of 8 hours in the
client application.

XML

<TimeZone xmlns="https://schemas.microsoft.com/exchange/services/2006/types">

<Bias>480</Bias>

<StandardTime>

<Bias>0</Bias>

<Time>02:00:00</Time>

<DayOrder>1</DayOrder>

<Month>11</Month>

<DayOfWeek>Sunday</DayOfWeek>

</StandardTime>

<DaylightTime>

<Bias>-60</Bias>

<Time>02:00:00</Time>

<DayOrder>2</DayOrder>

<Month>3</Month>

<DayOfWeek>Sunday</DayOfWeek>

</DaylightTime>

</TimeZone>

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetUserAvailability operation
Bias

Getting User Availability


TimeZone (Item)
Article • 03/29/2023 • 2 minutes to read

The TimeZone element provides a text description of a time zone.

XML

<TimeZone/>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CalendarItem
Represents an Exchange calendar item.

MeetingRequest
Represents a meeting request in the Exchange store.

Text value
The text value describes a time zone. This property is read-only.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange
TimeZoneContext
Article • 03/29/2023 • 2 minutes to read

The TimeZoneContext element is used in the Simple Object Access Protocol (SOAP)
header to specify the time zone definition that is to be used as the default when
assigning the time zone for the DateTime properties of objects that are created,
updated, and retrieved by using Exchange Web Services (EWS).

XML

<TimeZoneContext>

<TimeZoneDefinition/>

</TimeZoneContext>

TimeZoneContextType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

TimeZoneDefinition
Specifies the periods and transitions that define a time zone.

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 that has the Client Access server
role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
TimeZoneDefinition
Article • 03/29/2023 • 2 minutes to read

The TimeZoneDefinition element specifies the periods and transitions that define a time
zone.

XML

<TimeZoneDefinition Id="" Name="">

<Periods/>

<TransitionsGroups/>
<Transitions/>

</TimeZoneDefinition>

TimeZoneDefinitionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Id Represents the unique identifier of the time zone.

Name Represents the descriptive name of the time zone.

Child elements

Element Description

Periods
Represents an array of Period elements that define the time offset at different
stages of the time zone.

TransitionsGroups Represents an array of TransitionsGroup elements that specify time zone


transitions.

Transitions
Represents an array of time zone transitions.

Parent elements
Element Description

TimeZoneDefinitions Represents an array of time zone definitions.

TimeZoneContext
Represents the default time zone definition that is to be used for scoping
the DateTime properties of objects that are created, updated, and
retrieved by using Exchange Web Services (EWS).

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
TimeZoneDefinitions
Article • 03/29/2023 • 2 minutes to read

The TimeZoneDefinitions element represents an array of time zone definitions.

XML

<TimeZoneDefinitions>

<TimeZoneDefinition/>

</TimeZoneDefinitions>

ArrayOfTimeZoneDefinitionType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

TimeZoneDefinition
Specifies the periods and transitions that define a time zone.

Parent elements

Element Description

GetServerTimeZonesResponseMessage Contains the status and result of a GetServerTimeZones


operation request.

Remarks
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
EWS XML elements in Exchange
Title
Article • 03/29/2023 • 2 minutes to read

The Title element represents the title of a contact.

XML

<Title/>

String

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

CompleteName
Represents the complete name of a contact.

Text value
The text value is a string that represents the title of a contact.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty False

See also
EWS XML elements in Exchange

Creating Contacts (Exchange Web Services)


Titles
Article • 03/29/2023 • 2 minutes to read

The Titles element specifies an array of job titles and the identifiers of their source
attributions for the associated persona.

XML

<Titles>

<StringAttributedValue/>

</Titles>

ArrayOfStringAttributedValuesType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
StringAttributedValue

Parent elements
Persona

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
To
Article • 03/29/2023 • 2 minutes to read

The To element specifies the target of the time zone transition. The target is either a
time zone period or a group of time zone transitions.

XML

<To Kind=""/>

TransitionTargetType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

Kind Indicates whether the time zone transition target is a time zone period or of a group
of time zone transitions.

Kind attribute values

Value Description

Period Specifies that the time zone transition target is a time zone period.

Group Specifies that the time zone transition target is a group of time zone transitions.

Child elements
None.

Parent elements

Element Description
Element Description

AbsoluteDateTransition
Represents a time zone transition that occurs on a specific date and at
a specific time.

RecurringDayTransition
Represents a time zone transition that occurs on the same day each
year.

RecurringDateTransition Represents a time zone transition that occurs on a specified day of the
year.

Transition
Represents a time zone transition.

Text value
The text value is a string that specifies the unique identifier of the Period or
TransitionsGroup that is the target of the time zone transition.

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running Microsoft Exchange Server that has the Client Access server
role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ToDate
Article • 03/29/2023 • 2 minutes to read

The ToDate element specifies the date that the message was received.

XML

<ToDate></ToDate>

dateTime

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
FindMailboxStatisticsByKeywords

Text value
The text value of the ToDate element is the date the message was received.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Types schema

Validation file messages.xsd

Can be empty
ToFolderId
Article • 03/29/2023 • 2 minutes to read

The ToFolderId element represents the destination folder for a copied or moved item or
folder.

XML

<ToFolderId>

<FolderId/>

</ToFolderId>

XML

<ToFolderId>

<DistinguishedFolderId/>

</ToFolderId>

TargetFolderIdType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

FolderId
Contains the identifier of a destination folder for a copied or moved item
or folder.

DistinguishedFolderId Identifies a named destination folder for a copied or moved item or


folder.

Parent elements

Element Description
Element Description

MoveFolder
Defines a request to move a folder in the Exchange store.
The following is the XPath expression to this element:
/MoveFolder

CopyFolder
Defines a request to copy a folder in the Exchange store.
The following is the XPath expression to this element:
/CopyFolder

MoveItem
Defines a request to move an item in the Exchange store.
The following is the XPath expression to this element:
/MoveItem

CopyItem
Defines a request to copy an item in the Exchange store.
The following is the XPath expression to this element:
/CopyItem

Remarks
The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name Messages schema

Validation File Messages.xsd

Can be Empty False

See also
MoveFolder operation
CopyFolder operation
MoveItem operation
CopyItem operation
Token
Article • 03/29/2023 • 2 minutes to read

The Token element contains encrypted data that represents the identification token for
the shared data.

XML

<Token/>

EncryptedDataContainerType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

EncryptedSharedFolderData Contains the encrypted data that a client can use to authorize the
sharing of its calendar or contact data with other clients.

Remarks
The schema that describes this element is located in the IIS Virtual directory that hosts
Exchange Web Services of the computer that is running Microsoft Exchange Server that
has the Client Access server role installed.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
GetSharingMetadata operation

EWS XML elements in Exchange


Token (ClientAccessTokenType)
Article • 03/29/2023 • 2 minutes to read

The Token element specifies a client access token.

XML

<Token>

<Id/>

<TokenType/>

<TokenValue/>

<TTL/>

</Token>

ClientAccessTokenType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ID (String) | TokenType | TokenValue | TTL

Parent elements
GetClientAccessTokenResponseMessage

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
Token (String)
Article • 03/29/2023 • 2 minutes to read

The Token element contains a search refiner token.

XML

<Token></Token>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Refiner

Text value
The text value of the Token element is a search refiner token for a discovery search.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
TokenRequest
Article • 03/29/2023 • 2 minutes to read

The TokenRequest element specifies a single token request.

XML

<TokenRequest>

<Id/>

<TokenType/>

</TokenRequest>

ClientAccessTokenRequestType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
ID (String) | TokenType (ClientAccessTokenType)

Parent elements
TokenRequests

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


TokenRequests
Article • 03/29/2023 • 2 minutes to read

The TokenRequests element contains an array of token requests.

XML

<TokenRequests>

<TokenRequest/>

</TokenRequests>

NonEmptyArrayOfClientAccessTokenRequestsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
TokenRequest

Parent elements
GetClientAccessToken

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
TokenType
Article • 03/29/2023 • 2 minutes to read

The TokenType element specifies the type of token.

XML

<TokenType> CallerIdentity | ExtensionCallback | ScopedToken </TokenType>

ClientAccessTokenTypeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
TokenRequest | Token

Text value
The text value of the TokenType element is the token type. The text value of
CallerIdentity indicates that the token is a caller identity token. The text value of
ExtensionCallback indicates that the token is for an extension callback. The text value of
ScopedToken indicates that the client access token is a scoped token.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


TokenType (ClientAccessTokenType)
Article • 03/29/2023 • 2 minutes to read

The TokenType element identifies the type of client access token that will be returned in
the GetClientAccessToken response.

XML

<TokenType>CallerIdentity | ExtensionCallback | ScopedToken</TokenType>

ClientAccessTokenTypeType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
TokenRequest | Token (ClientAccessTokenType)

Text value
A text value of CallerIdentity means a caller identity client access token is returned. A
text value of ExtensionCallback indicates that an extension callback client access token
is returned. A text value of ScopedToken indicates that the client access token is a
scoped token.

Remarks
This element was introduced in Exchange Server 2013.
The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Element info value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty false


TokenValue
Article • 03/29/2023 • 2 minutes to read

The TokenValue element specifies the encoded client access token.

XML

<TokenValue></TokenValue>

string

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
Token (ClientAccessTokenType)

Text value
The text value of the TokenValue element is the encoded client access token.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
TooBigGroupAttendeeConflictData
Article • 03/29/2023 • 2 minutes to read

The TooBigGroupAttendeeConflictData element represents an attendee that was resolved as a distribution list but the distribution list was
too large to expand.

GetUserAvailabilityResponse

SuggestionsResponse

SuggestionDayResultArray

SuggestionDayResult

SuggestionArray

Suggestion

AttendeeConflictDataArray

TooBigGroupAttendeeConflictData

XML

<TooBigGroupAttendeeConflictData/>

TooBigGroupAttendeeConflictData

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

AttendeeConflictDataArray Contains an array of conflict data for attendees identified in the GetUserAvailabilityRequest.
The following is the XPath expression to this element:
/GetUserAvailabilityResponse/SuggestionsResponse/SuggestionDayResultArray/SuggestionDayResult[i]/SuggestionArray/Suggestion[i]/At

Remarks
Distribution lists that contain more than 100 members cannot be expanded.

The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server
2007 that has the Client Access server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd


Element Example

Can be Empty False

See also
GetUserAvailability operation

GetUserAvailabilityResponse

Getting User Availability


ToRecipients
Article • 03/29/2023 • 2 minutes to read

The ToRecipients element contains an array of recipients of an item. These are the
primary recipients of an item.

XML

<ToRecipients>

<Mailbox/>

</ToRecipients>

ArrayOfRecipientsType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements

Element Description

Mailbox
Identifies a mail-enabled Active Directory directory service object.

Parent elements

Element Description

RemoveItem
Removes an item from the Exchange store.

Message
Represents an Exchange e-mail message.

MeetingMessage
Represents a meeting in the Exchange store.

MeetingRequest
Represents a meeting request in the Exchange store.

MeetingResponse
Represents a meeting response in the Exchange store.
Element Description

MeetingCancellation Represents a meeting cancellation in the Exchange store.

AcceptItem
Represents an Accept reply to a meeting request.

TentativelyAcceptItem Represents a Tentative reply to a meeting request.

DeclineItem
Represents a Decline reply to a meeting request.

ReplyToItem
Contains a reply to the creator of an item in the Exchange store.

ReplyAllToItem
Contains a reply to all identified recipients of an item in the Exchange
store.

ForwardItem
Contains an Exchange store item to forward to recipients.

CancelCalendarItem
Represents the response object that is used to cancel a meeting.

Remarks
You cannot get ToRecipients by using a FindItem request. Use a GetItem request to get
the ToRecipients.

The schema that describes this element is located in the EWS virtual directory of the
computer that is running MicrosoftExchange Server 2007 that has the Client Access
server role installed.

Element information
Element Example

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema Name Types schema

Validation File Types.xsd

Can be Empty False

See also
EWS XML elements in Exchange
ToRecipients (ArrayOfSmtpAddressType)
Article • 03/29/2023 • 2 minutes to read

The ToRecipients element specifies a list of recipients to whom the item was sent.

XML

<ToRecipients>

<SmtpAddress/>

</ToRecipients>

ArrayOfSmtpAddressType

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
SmtpAddress

Parent elements
SearchPreviewItem

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.

Element information
Name Value
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/types

Schema name Types schema

Validation file Types.xsd

Can be empty
TotalConversationsInView
Article • 03/29/2023 • 2 minutes to read

The TotalConversationsInView element contains the count of conversations returned in


a FindConversation response.

XML

<TotalConversationsInView></TotalConversationsInView>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements
FindConversationResponse

Text value
The text value of the TotalConversationsInView element is the count of conversations
returned in a FindConversation response.

Remarks
This element was introduced in Exchange Server 2013.

The schema that describes this element is located in the IIS virtual directory that hosts
Exchange Web Services.
Element information
Name Value

Namespace https://schemas.microsoft.com/exchange/services/2006/messages

Schema name Messages schema

Validation file messages.xsd

Can be empty
TotalCount
Article • 03/29/2023 • 2 minutes to read

The TotalCount element represents the total count of items within a given folder.

XML

<TotalCount/>

int

Attributes and elements


The following sections describe attributes, child elements, and parent elements.

Attributes
None.

Child elements
None.

Parent elements

Element Description

Folder
Represents a folder in a mailbox.

CalendarFolder
Represents a calendar folder in a mailbox.

ContactsFolder
Represents a contacts folder in a mailbox.

SearchFolder
Represents a search folder in a mai

You might also like