![](/img/trans.png)
[英]Creating appointment on Exchange server calendar as other user without impersonation (EWS)
[英]Edit Exchange appointment of other user
我正在編碼一項服務,該服務應將Outlook約會與另一個系統同步。 創建約會后,我需要向正文中添加一些信息。 該服務在某些技術帳戶下運行,並且還作為所有者添加到Outlook中的組織者日歷中。 但是,以下代碼不做任何更改:
var _exchangeService = new ExchangeService(ExchangeVersion.Exchange2010_SP2, TimeZoneInfo.Local)
{
Url = new Uri(someUrl),
Credentials = new NetworkCredential(someUser, somePwd, someDomain)
};
Appointment appointment = Appointment.Bind(_exchangeService, someId, new PropertySet(AppointmentSchema.Subject, AppointmentSchema.Start, AppointmentSchema.End));
string oldSubject = appointment.Subject;
appointment.Subject = appointment.Subject + " moved one hour later and to the day after " + appointment.Start.DayOfWeek + "!";
appointment.Start.AddHours(25);
appointment.End.AddHours(25);
appointment.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendOnlyToAll);
該示例代碼來自MSDN。 當組織者和技術帳戶是同一用戶時,該代碼才有效。
您對可能出什么問題有任何想法嗎? 謝謝!
該示例代碼來自MSDN。 當組織者和技術帳戶是同一用戶時,該代碼才有效。
這是正確的,因為您只能更改進行修改的用戶是所有者的約會(在某些情況下,這將要求您使用EWS Impersonation https://msdn.microsoft.com/zh-cn/library/office/ dd633680(v = exchg.80).aspx )。 對於擁有多個出席者的會議對象,一旦您在管理器郵箱更新中進行了更改,則需要將其發送給出席者,出席者隨后需要確認這些更新,以便將更新應用於出席者日歷中的約會版本。
干杯格倫
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.