none
Feteching mailbox calender appointments and responses RRS feed

  • Question

  • Hi,

    We are trying to achieve the following functionality through Exchange Webservices (version Exchange 2010/Exchange 2010 SP1):-

    1. Get all      appointments from Exchange server.
    2. Get      attendee response (whether accepted/declined) for every appointment.

    Our problem is we are getting ResponseType of a Microsoft.Exchange.WebServices.Data.Attendee as unknown.

    We have done some research and found that the Attendee response can be retrieved from the mail box of the appointment’s organizer only.

    We are using the following algorithm for our implementation:-

    Step 1:- Get a list of the emailIds from users from Exchange.

    Step 2:- Iterate through all emailIds and get all appointments for every user one by one using the following code:-

    Mailbox mailbox = new Mailbox(emailId);

          FolderId id = new FolderId(WellKnownFolderName.Calendar, mailbox);

    FindItemsResults<Appointment> _appointments = ExchangeServiceProxy.FindAppointments(id, new CalendarView(DateTime.Now.AddDays(-6), DateTime.Now.AddDays(5)));

    Step 3:- Iterate through all appointments fetched in step 3.

    Step 4:- Iterate through all attendees in the appointment from step 3 and display their response.

    The FindAppontments method fetches all the appointments from user’s mailbox, whether he is an organizer/attendee.

    But the Response of all attendees is present only in those appointments to which the user is an organizer.

    Our question is

    1. what would be the best approach to achieve the whole functionality, keeping accuracy and performance in mind?

    2. Is there any cmdlet that can achieve this?

    Kindly note:-We have given sufficient priviledges to the service account used to log-in into EWS.

    Regards,

    Abhagwat

    Thursday, October 24, 2013 6:52 AM

All replies

  • >> Our problem is we are getting ResponseType of a Microsoft.Exchange.WebServices.Data.Attendee as unknown.

    With what code ?

    To get the attendee responses you need to do a FindAppointments and then you need to use either Load or better use LoadPropertiesFromItems to return recipient/attendees collection as this information wont be returned with the findItem operation see http://blogs.msdn.com/b/exchangedev/archive/2010/03/16/loading-properties-for-multiple-items-with-one-call-to-exchange-web-services.aspx

    >> 1. what would be the best approach to achieve the whole functionality, keeping accuracy and performance in mind?

    The appointment stored in the Organizer mailbox and the corresponding appointment stored in the attendees mailbox are separate objects. So the only place you will find attendee response data is in the Organizer Item.

    >>2. Is there any cmdlet that can achieve this?

    No this is Mailbox data so you will need to use a Mailbox API like EWS to access it.

    Cheers
    Glen

    Friday, October 25, 2013 4:00 AM