Retrieve out of office Status using EWS 2.0

不羁岁月 提交于 2019-12-24 05:10:49

问题


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 :)


回答1:


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

Cheers Glen



来源:https://stackoverflow.com/questions/28072469/retrieve-out-of-office-status-using-ews-2-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!