是否有任何方法可以使用 EWS 2.0 Api 检查人员的外出状态。我尝试使用“OofSettings”类来检索“外出”状态。如果我检查自己的外出状态,效果很好,但当我尝试传递其他人的电子邮件地址时,却显示“访问被拒绝”。这是我使用的代码。
OofSettings userOOFSettings = service.GetUserOofSettings("<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="74071a111c5a00111f061d031518341d1a0011185a171b19" rel="noreferrer noopener nofollow">[email protected]</a>");
//Now to check out of office status
Console.WriteLine(userOOFSettings.State); //Works fine when I check OOO status for my own email id
但是当我更改电子邮件地址并使用任何同事的电子邮件地址时,我的访问被拒绝。 有什么办法可以解决这个问题,因为我无法在其他邮箱上进行模拟。 谢谢:)
最佳答案
如果您有 Exchange 2010 或更高版本,则可以使用 OOF 邮件提示获取 OOF 状态,这不需要访问目标邮箱,请参阅 http://blogs.msdn.com/b/devmsg/archive/2014/06/03/ews-how-to-retrieve-the-oof-out-of-facility-settings-message-using-ews-for-an-exchange-user.aspx示例
干杯 格伦
关于c# - 使用 EWS 2.0 检索外出状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28072469/