使用EWS托管API为其他用户创建约会? [英] Using EWS Managed API to create appointments for other users?

查看:79
本文介绍了使用EWS托管API为其他用户创建约会?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在EWS托管API中,可以轻松为特定用户创建约会:

In EWS Managed API is it easy to create an appointment for a specific user:

ExchangeService service = new ExchangeService();
service.Credentials = new NetworkCredentials ( "administrator", "password", "domain" );
service.AutodiscoverUrl(emailAddress);

Appointment appointment = new Appointment(service);
appointment.Subject = "Testing";
appointment.Start = DateTime.Now;
appointment.End = appointment.Start.AddHours(1);
appointment.Save();

这将为管理员创建一个约会.但是说我想实际为另一个用户创建约会(而不是将该用户添加为我约会的参与者).是否可以通过EWS托管API?

This will create a appointment for the administrator. But say I wanted to actually create an appointment for another user (not add that user as an attendee to me appointment). It this possible via the EWS Managed API?

推荐答案

我从这篇文章中弄清楚了: http://msdn.microsoft.com/en-us/library/dd633680(EXCHG.80).aspx

I figured it out from this article: http://msdn.microsoft.com/en-us/library/dd633680(EXCHG.80).aspx

您应该使用service.ImpersonatedUserId属性.

这篇关于使用EWS托管API为其他用户创建约会?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆