【问题标题】:EWS - Share extended properties with invited attendeesEWS - 与受邀参与者共享扩展属性
【发布时间】:2019-03-22 07:38:30
【问题描述】:

是否可以与 Exchange 约会的受邀参与者共享扩展属性?换句话说,是否可以使用 EWS 在 Exchange 中创建会议,并将其扩展属性(自定义字段)传递给与会者的会议副本(假设他们也使用 Exchange)?

到目前为止,我尝试的所有选项都不起作用 - 我只能通过 EWS 和 Outlook 查看组织者会议中的属性。

一个简单的工作示例或解决方案的解释会很棒。

更新。基于this thread,这是我尝试过的(但没有成功):

var exchangeAppointment = new Appointment(exchange);

...

ExtendedPropertyDefinition extendedPropertyDefinition = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "keyword", MapiPropertyType.String);
exchangeAppointment.SetExtendedProperty(extendedPropertyDefinition, "value");

var sendModeForSave = SendInvitationsMode.SendToAllAndSaveCopy;
await exchangeAppointment.Save(sendModeForSave);

foreach (var email in command.MeetingAttendeeEmails) {
    exchangeAppointment.RequiredAttendees.Add(email);
}

var sendModeForUpdate = SendInvitationsOrCancellationsMode.SendToAllAndSaveCopy;
await exchangeAppointment.Update(ConflictResolutionMode.AlwaysOverwrite, sendModeForUpdate);

【问题讨论】:

    标签: outlook office365 exchange-server microsoft-graph-api exchangewebservices


    【解决方案1】:

    您可以在 EWS 中使用自定义属性创建约会,然后使用 EWS Managed API 2.0 查看自定义扩展属性

    你可以参考这段代码:

       PropertySet YourProperyset = new PropertySet(BasePropertySet.FirstClassProperties);
        var extendendProperty = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Address, "organizer",MapiPropertyType.String);
        YourProperyset.Add(extendendProperty);
        var folderId = new FolderId(WellKnownFolderName.Calendar, new Mailbox(userName));
        var calendar = CalendarFolder.Bind(service, folderId);
        var calendarView = new CalendarView(start, stop);
        calendarView.PropertySet = YourProperyset;
        return calendar.FindAppointments(calendarView).ToList();
    

    更多信息,您可以参考以下链接:

    Create appointment with custom properties in EWS

    Viewing custom extended properties by using the EWS Managed API 2.0

    Set CustomProperties on appointment for all attendees

    【讨论】:

    • 感谢您的信息,但不幸的是我仍然无法使其正常工作。我遵循了最后一个链接中提供的所有信息,但我仍然无法在与会者的日历项目和收件箱项目中看到该属性(我正在使用 MAPI 来检查这些项目)。
    • 另请注意,我使用的是 Office365 帐户。
    • 您知道可能是什么问题吗?
    • 你可以参考这个链接:stackoverflow.com/questions/24526704/…
    • 是的。我在解决这个问题上又进了一步。现在我发现,如果所有与会者都在同一个域中(我猜来自同一个 Office 365 订阅),它确实有效。我想知道它的确切工作方式 - 是否有可能为不同域的与会者实现它?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-13
    • 1970-01-01
    相关资源
    最近更新 更多