【问题标题】:When retrieving an appointment with EWS the subject contains the organizer name检索与 EWS 的约会时,主题包含组织者名称
【发布时间】: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


    【解决方案1】:

    您的代码没有问题,但这与邮箱的配置方式有关。使用 Rooom 邮箱,您可以使用 Remote Power-shell 和 set-calendarprocessing cmdlet 配置自动处理设置,请参阅http://technet.microsoft.com/en-us/library/dd335046(v=exchg.150).aspx 例如

    对于您的特定问题,已使用 DeleteSubject 参数配置邮箱,该参数“指定是删除还是保留传入会议请求的主题。此参数的有效输入为 $true 或 $false。默认值为 $true。 "和 AddOrganizerToSubject 参数,“指定会议组织者的名称是否用作会议请求的主题。此参数的有效输入为 $true 或 $false。默认值为 $true。”

    您将无法修复现有数据,但如果您重新配置邮箱,发送的任何新约会都会以您想要的方式显示

    干杯 格伦

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-06-12
      • 2011-04-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多