This documentation is archived and is not being maintained.

Tracking meeting responses by using the EWS Managed API 2.0

EWS Managed API

Last modified: October 13, 2012

Applies to: EWS Managed API | Exchange Server 2007 Service Pack 1 (SP1) | Exchange Server 2010

Note: This content applies to the EWS Managed API 2.0 and earlier versions. For the latest information about the EWS Managed API, see Web services in Exchange.

In Exchange Web Services, a calendar item can represent a meeting between multiple parties. Meeting attendees are stored on the calendar item in one of three collections. These collections are listed in the following table.

Collection name



Contains attendees who must attend the meeting.


Contains attendees who are not required to attend the meeting.


Contains meeting resources such as meeting rooms or equipment.

When an attendee responds to a meeting request, the response is stored within the associated attendee collection on the meeting organizer's meeting item. You can use the Microsoft Exchange Web Services (EWS) Managed API to review attendees' responses to meeting requests.

To review attendee responses

  1. Bind to the meeting organizer's meeting item by using its unique identifier. The following code shows how to bind to an existing meeting item and provide it with connection configuration information by using an ExchangeService object named service. The ItemId has been shortened to preserve readability.

    Appointment meeting = Appointment.Bind(service, new ItemId("AAMkA="));
  2. Iterate through each attendee’s collection, checking the response for each attendee. The following code shows how to iterate through the RequiredAttendees, OptionalAttendees, and Resources collections on the meeting organizer's meeting item. Each attendee's response is written to the console.

    // Check responses from required attendees.
    for (int i = 0; i < meeting.RequiredAttendees.Count; i++)
        Console.WriteLine("Required attendee - " + meeting.RequiredAttendees[i].Address + ": " + meeting.RequiredAttendees[i].ResponseType.Value.ToString());
    // Check responses from optional attendees.
    for (int i = 0; i < meeting.OptionalAttendees.Count; i++)
        Console.WriteLine("Optional attendee - " + meeting.OptionalAttendees[i].Address + ": " + meeting.OptionalAttendees[i].ResponseType.Value.ToString());
    // Check responses from resources.
    for (int i = 0; i < meeting.Resources.Count; i++)
        Console.WriteLine("Resource attendee - " + meeting.Resources[i].Address + ": " + meeting.Resources[i].ResponseType.Value.ToString());

For information about the possible values for ResponseType, see MeetingResponseType.

The following example shows the XML that is sent by using the Bind method. The ItemId attribute has been shortened to preserve readability.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="" 
      <t:RequestServerVersion Version="Exchange2010" />
            <t:ItemId Id="AAMkA=" />

The following example shows the XML that is returned by using the Bind method. The ItemId and ChangeKey attributes have been shortened and several elements within CalendarItem have been omitted to preserve readability. Required attendee User1 has accepted the meeting invitation, required attendee User2 has tentatively accepted the meeting invitation, and optional attendee User3 has declined the meeting invitation. Optional attendee User4 and resource attendee Resource1 have not yet responded to the meeting invitation.

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="">
      <h:ServerVersionInfo MajorVersion="14" MinorVersion="0" MajorBuildNumber="478" MinorBuildNumber="0" Version="Exchange2010" 
         xmlns:xsd="" />
   <s:Body xmlns:xsi="" xmlns:xsd="">
      <m:GetItemResponse xmlns:m="" xmlns:t="">
            <m:GetItemResponseMessage ResponseClass="Success">
                     <t:ItemId Id="AAMkA=" ChangeKey="DwAAA" />
                     <t:ParentFolderId Id="AAMkA=" ChangeKey="AQAAAA=" />
                     <t:Subject>Tuesday Status Meeting</t:Subject>
                     <t:Body BodyType="Text">The purpose of this meeting is to discuss project status.</t:Body>

For information about compiling this code, see Getting started with the EWS Managed API 2.0.

  • Write appropriate error handling code for common search errors.

  • Review the client request XML that is sent to the Exchange server.

  • Review the server response XML that is sent from the Exchange server.

  • Set the service binding as shown in Setting the Exchange service URL by using the EWS Managed API 2.0. Do not hard code URLs because if mailboxes move, they might be serviced by a different Client Access server. If the client cannot connect to the service, retry setting the binding by using the AutodiscoverUrl(String) method.

  • Set the target Exchange Web Services schema version by setting the requestedServerVersion parameter of the ExchangeService constructor. For more information, see Versioning EWS requests by using the EWS Managed API 2.0.

  • Use HTTP with SSL for all communication between client and server.

  • Always validate the server certificate that is used for establishing the SSL connections. For more information, see Validating X509 certificates by using the EWS Managed API 2.0.

  • Do not include user names and passwords in trace files.

  • Verify that Autodiscover lookups that use HTTP GET to find an endpoint always prompt for user confirmation; otherwise, they should be blocked.