Hi there
I need to search appointments by required or optional attendees using EWS. I've tried with a search filter collection and a query string but none of these options worked.
Search Filter Collection
var attendeeFilter = new SearchFilter.SearchFilterCollection(LogicalOperator.Or) { new SearchFilter.ContainsSubstring(AppointmentSchema.RequiredAttendees, mailAddress), new SearchFilter.ContainsSubstring(AppointmentSchema.OptionalAttendees, mailAddress), }; FindItemsResults<Item> results = ews.FindItems(WellKnownFolderName.Calendar, attendeeFilter, view);
Query String
string queryString = string.Format("(RequiredAttendees:{0} OR OptionalAttendees:{0})", mailAddress); FindItemsResults<Item> results = ews.FindItems(WellKnownFolderName.Calendar, queryString, view);
Does anyone know the magic trick to achieve this?