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
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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With