使用EWS 2.0检索外出状态 [英] Retrieve out of office Status using EWS 2.0

查看:75
本文介绍了使用EWS 2.0检索外出状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以检查使用EWS 2.0 Api的人员的外出状态.我尝试使用"OofSettings"类来检索外出"状态.如果我检查自己不在办公室的状态,效果很好,但是说当我尝试传递别人的电子邮件地址时,访问被拒绝.这是我使用的代码.

Is there any way to check Out Of Office status of a person using EWS 2.0 Api. I tried using "OofSettings" class to retrieve the Out Of Office status. It works fine if I check my own out of office status but says Access is denied when I try to pass someone else's email address. Here is the code I used.

OofSettings userOOFSettings = service.GetUserOofSettings("sneh.tekriwal@intel.com");
//Now to check out of office status
Console.WriteLine(userOOFSettings.State); //Works fine when I check OOO status for my own email id

但是,当我更改电子邮件地址并使用我的任何同事时,它使我无法访问. 有什么办法解决此问题,因为我无法在其他邮箱上冒充他人. 谢谢:)

But when I change the email address and use any of my colleagues, it gives me access is denied. Is there any way around this as, I cannot get impersonation on other mailbox. Thanks :)

推荐答案

如果您具有Exchange 2010或更高版本,则可以使用不需要访问目标邮箱的OOF邮件提示来获得OOF状态,请参见

If you have Exchange 2010 or later then you can get the OOF status using the OOF mailtip which doesn't require access to the target mailbox see 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 for a sample

欢呼 格伦

这篇关于使用EWS 2.0检索外出状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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