EWS-managed: Fetch required and optional attendees of appointments

二次信任 提交于 2019-12-20 01:46:03

问题


As far as I am now, I know how to fetch appointments from exchange server, BUT as soon as I want to see the required and optional attendees, these fields are empty ... I checked the appointment trice and there is an attendee, except me. Do I have to config Outlook differently or do I miss something?

            List<Appointment> listOfAppointments = new List<Appointment>();

        CalendarFolder cfolder = CalendarFolder.Bind(MyService, WellKnownFolderName.Calendar);
        CalendarView cview = new CalendarView(from.ToUniversalTime(), to.ToUniversalTime());
        cview.PropertySet = new PropertySet(ItemSchema.Subject);
        cview.PropertySet.Add(AppointmentSchema.Start);
        cview.PropertySet.Add(AppointmentSchema.End);
        cview.PropertySet.Add(AppointmentSchema.Location);
        cview.PropertySet.Add(AppointmentSchema.ICalUid);
        cview.PropertySet.Add(AppointmentSchema.Organizer);
        cview.PropertySet.Add(AppointmentSchema.IsAllDayEvent);
        cview.PropertySet.Add(AppointmentSchema.DateTimeCreated);

        FindItemsResults<Appointment> result = cfolder.FindAppointments(cview);

thats how I fetch the appointments, as I figured from exceptions and trail and error, I don't need to ask exchange for attendees... but maybe I am missing something.


回答1:


The FindAppointments operation do not return the attendees of meetings. Instead, specify a propertyset of PropertySet.IdOnly to get only the ids of the items. Then, use the ExchangeService.LoadPropertiesForItems to perform a batch load of the properties you need.



来源:https://stackoverflow.com/questions/7473165/ews-managed-fetch-required-and-optional-attendees-of-appointments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!