none
How to get Attendees Status About Accepting or Rejecting Appointment Using EWS RRS feed

  • Question

  • Dear All,

    How to get Attendees Status About Accepting or Rejecting Appointment Using EWS ?

    As show in screen shot Attendee get the Appointment Request, while he accept the request status will be change in calendar as show in other screen shot.

    Attendees Accept the Appointment then Shows "Accepted on Dated". Now i want to track this status from appointment using C# code (Exchange server - EWS).

    I have use following code for status but not working

      for (int i = 0; i < meeting.RequiredAttendees.Count; i++)
                {
                    Console.WriteLine("Required attendee - " + meeting.RequiredAttendees[i].Address + ": " + meeting.RequiredAttendees[i].ResponseType.Value.ToString());

                    lblRes.InnerText = "Required attendee - " + meeting.RequiredAttendees[i].Address + ": " + meeting.RequiredAttendees[i].ResponseType.Value.ToString();

                }

    Output will Come : Required attendee - my.test@abc.com: Unknown (Though Attendee accept the request for appointment)

    Waiting for positive reply.

    Thanks and Regards,

    Hardik Ramwani

    Friday, July 19, 2013 3:58 PM

Answers

  • What your doing will only work on the Organizers of the events Calendar appointment. If you want to know from an attendees calendar whether they have accepted a meeting and when they accepted you need to use the following two extended properties

    PidLidResponseStatus http://msdn.microsoft.com/en-us/library/office/cc839923.aspx
    PidLidAppointmentReplyTime http://msdn.microsoft.com/en-us/library/office/cc842121.aspx

    eg

                ExtendedPropertyDefinition PidLidResponseStatus = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Appointment, 0x8218, MapiPropertyType.Integer);
                ExtendedPropertyDefinition PidLidAppointmentReplyTime = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Appointment, 0x8220, MapiPropertyType.SystemTime);
                PropertySet psPropSet = new PropertySet(BasePropertySet.FirstClassProperties);
                psPropSet.Add(PidLidAppointmentReplyTime);
                psPropSet.Add(PidLidResponseStatus);
    
                CalendarView cview = new CalendarView(DateTime.Now, DateTime.Now.AddDays(7));
                cview.PropertySet = psPropSet;
    
                FolderId folderId = new FolderId(WellKnownFolderName.Calendar,"brads@domain.com");
                FindItemsResults<Appointment> fiItems = service.FindAppointments(folderId, cview);
                foreach (Appointment apt in fiItems.Items) { 
                    Object PropVal1 = null;
                    Object PropVal2 = null;
                    Console.Write(apt.Subject);
                    if (apt.TryGetProperty(PidLidResponseStatus, out PropVal1))
                    {
                        Console.Write("Reponse Status : " + PropVal1.ToString());
                    }
                    if (apt.TryGetProperty(PidLidAppointmentReplyTime, out PropVal2))
                    {
                        Console.Write("Reponse Date : " + PropVal2.ToString());
                    }
                }
    Cheers
    Glen
    Monday, July 22, 2013 7:12 AM

All replies

  • What your doing will only work on the Organizers of the events Calendar appointment. If you want to know from an attendees calendar whether they have accepted a meeting and when they accepted you need to use the following two extended properties

    PidLidResponseStatus http://msdn.microsoft.com/en-us/library/office/cc839923.aspx
    PidLidAppointmentReplyTime http://msdn.microsoft.com/en-us/library/office/cc842121.aspx

    eg

                ExtendedPropertyDefinition PidLidResponseStatus = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Appointment, 0x8218, MapiPropertyType.Integer);
                ExtendedPropertyDefinition PidLidAppointmentReplyTime = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Appointment, 0x8220, MapiPropertyType.SystemTime);
                PropertySet psPropSet = new PropertySet(BasePropertySet.FirstClassProperties);
                psPropSet.Add(PidLidAppointmentReplyTime);
                psPropSet.Add(PidLidResponseStatus);
    
                CalendarView cview = new CalendarView(DateTime.Now, DateTime.Now.AddDays(7));
                cview.PropertySet = psPropSet;
    
                FolderId folderId = new FolderId(WellKnownFolderName.Calendar,"brads@domain.com");
                FindItemsResults<Appointment> fiItems = service.FindAppointments(folderId, cview);
                foreach (Appointment apt in fiItems.Items) { 
                    Object PropVal1 = null;
                    Object PropVal2 = null;
                    Console.Write(apt.Subject);
                    if (apt.TryGetProperty(PidLidResponseStatus, out PropVal1))
                    {
                        Console.Write("Reponse Status : " + PropVal1.ToString());
                    }
                    if (apt.TryGetProperty(PidLidAppointmentReplyTime, out PropVal2))
                    {
                        Console.Write("Reponse Date : " + PropVal2.ToString());
                    }
                }
    Cheers
    Glen
    Monday, July 22, 2013 7:12 AM
  • Hello Glen,

    Thanks for reply, you save my time.

    One more query i face regards get the body Content of Appointment.

    I can not access " body " in the Appointment, other are access threw given code as given.

    Thanks and regards

    Hardik Ramwani

    Tuesday, July 23, 2013 12:40 PM
  • Hardik,

    Use apt.Load(). The body property is not returned in a FindItem call.

    With regards,


    Michael | Microsoft Exchange Developer Content

    The Exchange Development Forum Guide has useful information for using the Exchange Development Forum.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Wednesday, July 24, 2013 12:36 AM
    Moderator