Can't Retrieve Resources (rooms) from Exchange Web Services

允我心安 提交于 2019-12-22 05:28:16

问题


I'm stumped. I'm using Exchange Web Services to retrieve calendar information from both my local and other calendars in my company, but the ".Resources" are always empty. We use Resources to store conference room information. Interestingly even ".RequiredAttendees" is empty, but I can retrieve values from the ".DisplayTo" and ".DisplayCc" without issue. Any suggestions? I have included a cope snippet below for reference.

  CalendarView calendarView = new CalendarView(startDate, endDate);
  Mailbox mailbox = new Mailbox(mailboxSMTP);
  FolderId calendarFolder = new FolderId(WellKnownFolderName.Calendar, mailbox);
  FindItemsResults<Appointment> findResults = service.FindAppointments(calendarFolder, calendarView);

  foreach (Appointment appointment in findResults.Items)
  {// foreach 1
      ...

Thanks, Greg


回答1:


EWS may not request the Resources property by default, but you should be able to specifically request it by adding it to the PropertySet before calling FindAppointments.

calendarView.PropertySet.Add(AppointmentSchema.Resources);


来源:https://stackoverflow.com/questions/6391919/cant-retrieve-resources-rooms-from-exchange-web-services

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