none
Count the Attendees of a meeting, that have sended an Accept Response to the organisator with EWS RRS feed

  • Question

  • Hello,

    I am struggling to count the attendees, who accepted the meeting invitation for a meeting over EWS.

    I am able to see the organisators meetings through impersonation and count the number of required attendees for the meeting.

                //Determine User to impersonat
                string impersonated_email = "user@domain";
                service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, impersonated_email);
    
                //Bind User Calendar
                FolderId UserCalendarId = new FolderId(WellKnownFolderName.Calendar, impersonated_email);
                CalendarFolder UserCalendar = CalendarFolder.Bind(service, UserCalendarId);
    
                // Initialize values for the start and end times, and the number of appointments to retrieve.
                DateTime startDate = DateTime.Now.AddDays(0);
                DateTime endDate = startDate.AddDays(1);
    
                // Execute the search in the calendar folder and return the view
                CalendarView userCalendar = new CalendarView(startDate, endDate);
                userCalendar.PropertySet = new PropertySet(BasePropertySet.FirstClassProperties);
                FindItemsResults<Appointment> apt = service.FindAppointments(WellKnownFolderName.Calendar, userCalendar);
    
                foreach (Item item in apt.Items)
                {
                    //Console.WriteLine(item.Subject);
                    ServiceResponseCollection<GetItemResponse> myColl = service.BindToItems(new[] { new ItemId(item.Id.UniqueId) }, userCalendar.PropertySet);
                    foreach (GetItemResponse temp in myColl)
                    {
                        Appointment app = (Appointment)temp.Item;
                        Int32 Tn = app.RequiredAttendees.Count-1;
                        Console.WriteLine(app.Subject + " " +Tn);
                    }
    

    I would like to also see how many required attendees have accepted the meeting invitation.

    Kind Regards

    Ioannis

    Wednesday, January 15, 2014 8:34 AM

Answers

  • Hi,

    Attendee class has a property : Attendee.ResponseType.

    Appointment app;
                
    int count = app.RequiredAttendees.Count(x => (x.ResponseType.HasValue && x.ResponseType.Value == MeetingResponseType.Accept));
    

    Regards,

    Désiré GOVIN, Refresh IT Solutions.com

    Wednesday, January 15, 2014 9:44 AM

All replies

  • Hi,

    Attendee class has a property : Attendee.ResponseType.

    Appointment app;
                
    int count = app.RequiredAttendees.Count(x => (x.ResponseType.HasValue && x.ResponseType.Value == MeetingResponseType.Accept));
    

    Regards,

    Désiré GOVIN, Refresh IT Solutions.com

    Wednesday, January 15, 2014 9:44 AM
  • Hello Désiré,

    Thank you very much. It works perfect!

    Regards,

    Ioannis

    Wednesday, January 15, 2014 10:10 AM