Im retrieving all appointments with EWS for a specific room in my office 365 account. When returning the appointment(s) the subject property of the appointment contains the name of the organizer instead of the subject i gave the appointment.
Im i doing something wrong?
Code example for how im doing it:
ExchangeService service = new ExchangeService();
service.Credentials = new WebCredentials("username", "password");
service.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx");
DateTime StartDate = DateTime.Today.AddDays(-30);
DateTime EndDate = DateTime.Today.AddDays(60);
CalendarView cv = new CalendarView(StartDate, EndDate);
FolderId CalendarFolderId = new FolderId(WellKnownFolderName.Calendar, "[email protected]");
CalendarFolder calendar = CalendarFolder.Bind(service, CalendarFolderId);
FindItemsResults<Appointment> appointments = calendar.FindAppointments(cv);
foreach (Appointment appointment in appointments.ToList())
{
//this contains the wrong value.....
string subject = appointment.Subject;
//this is correct and has the same value as the incorrect subject
string organizer = appointment.Organizer.Name;
}