无法使用具有Room完全访问权限的Exchange Web服务删除会议

时间:2017-04-03 08:22:57

标签: c# .net office365 exchange-server exchangewebservices

我们在使用EWS从Exchange删除约会时遇到问题。

我有房间的完全访问权限,我可以通过Outlook取消,但不能从我们的应用程序中取消。

获取日历项目
收集约会=新收集();

if (service != null)
{
    CalendarView calView = new CalendarView(fromDate, toDate);
    FindItemsResults<Item> masterResults = service.FindItems(WellKnownFolderName.Calendar, calView);
    masterResults.Items.ToList().ForEach(c =>
        {
            Appointment appointment = c as Appointment;
            appointment = Appointment.Bind(service, new ItemId(c.Id.UniqueId));
            appointments.Add(appointment);
        });
}

我们从上面的列表中选择一个约会并尝试取消面临异常的约会。

取消约会代码:

Appointment appointment = Appointment.Bind(service, new ItemId(uniqueId));

var cancelresult = appointment.CancelMeeting("The metting cancelled.");

我们收到一条消息“用户必须是CancelCalendarItem操作的组织者”的异常。这让我很困惑,因为当我检查deletedAppointment对象时,我的电子邮件地址被设置为组织者。

我可以完全访问房间,并且可以从Outlook取消会议。

有人可以为此提供帮助吗?

1 个答案:

答案 0 :(得分:2)

如果您想取消约会,则需要访问组织者的日历,找到该约会并取消该约会。您不能将会议室邮箱中的约会副本用作其他对象,也不会包含应该收到取消消息的所有潜在与会者。