Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 871
user803947 Avatar asked Jun 17 '11 21:06

user803947


1 Answers

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);
like image 186
Jason Dove Avatar answered Oct 04 '22 21:10

Jason Dove