【发布时间】:2014-08-18 06:04:14
【问题描述】:
我正在使用 EWS 检索我的 Office 365 帐户中特定房间的所有约会。返回约会时,约会的主题属性包含组织者的名称,而不是我给约会的主题。
我做错了什么?
我如何做的代码示例:
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, "room1@company.com");
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;
}
【问题讨论】:
标签: c# exchangewebservices office365 appointment