简体   繁体   English

无法使用EWS访问Exchange设备邮箱

[英]Unable to access Exchange Equipment mailbox with EWS

I have setup an Office365 equipment mailbox, so that I can open it in outlook (using Open->Other User's Mailbox), but I am unable to access the mailbox using the C# EWS api. 我已经设置了Office365设备邮箱,以便可以在Outlook中打开它(使用“打开”->“其他用户的邮箱”),但是无法使用C#EWS api访问该邮箱。 Code to access the mailbox: 访问邮箱的代码:

_service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, delegateBox);
 _inbox = Folder.Bind(_service, WellKnownFolderName.Inbox);

The result is the following exception: 结果是以下异常:

Exception in ProcessWebException
Microsoft.Exchange.WebServices.Data.ServiceResponseException: The SMTP address has no mailbox associated with it.
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ProcessWebException(WebException webException)
at   Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(HttpWebRequest request)
at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.InternalExecute()
at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToFolder(FolderId folderId, PropertySet propertySet)
at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToFolder[TFolder](FolderId folderId, PropertySet propertySet)
at Microsoft.Exchange.WebServices.Data.Folder.Bind(ExchangeService service, WellKnownFolderName name)

Check that delegateBox actually corresponds to that user's email . 检查delegateBox实际上是否与该用户的email相对应。 Note that user's email can be VERY different from its "login name + domain". 请注意,用户的电子邮件与其“登录名+域”可能会非常不同。

When testing delegation/impersonation access, I recommend to set up delegated/impersonated account as an additional mailbox in Outlook. 测试委派/模拟访问时,建议将委派/模拟帐户设置为Outlook中的其他邮箱。 It will allow to verify there is an actual access to delegated/impersonated mailbox, and to see the actual email addresses. 它将允许验证对委派/模拟邮箱的实际访问权限,并查看实际的电子邮件地址。

Resources accounts are disabled by default to you cannot log in. Maybe this is the case. 默认情况下,资源帐户已禁用,您无法登录。也许是这种情况。

Why do you want to impersonate as an equipment? 您为什么要模拟为设备?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用EWS访问Exchange Process邮箱 - Accessing Exchange Process mailbox using EWS 当用户没有自己的邮箱时,我们如何通过 EWS 访问交换邮箱? - How can we access the exchange mailboxes via EWS when the user has no own mailbox? Microsoft.Exchange.WebServices.Data.ServiceResponseException:无法访问帐户或邮箱 - Microsoft.Exchange.WebServices.Data.ServiceResponseException: Unable to access an account or mailbox 通过EWS访问其他用户的Exchange邮箱时发生ErrorMissingEmailAddress错误 - ErrorMissingEmailAddress error when accessing other user's Exchange mailbox by EWS Microsoft.Exchange.WebServices.Data.ServiceResponseException:无法访问为具有完全访问权限的用户抛出的帐户或邮箱 - Microsoft.Exchange.WebServices.Data.ServiceResponseException: Unable to access an account or mailbox thrown for user having fullright access 使用EWS连接到邮箱时的401未经授权访问 - 401 UnAuthorized Access when using EWS to connect to mailbox 如何使用Exchange Web服务(EWS)API通过共享邮箱发送电子邮件 - How to send email via a Shared MailBox using Exchange Web Services (EWS) API 即使 Exchange 服务器中存在邮箱,EWS 解析名称也不会返回邮箱 - EWS Resolve name doesn't return mailbox even if that exists in the exchange server 使用EWS托管API将新联系人添加到Outlook邮箱并将其链接到Exchange Server - Add a new contact to an Outlook mailbox using EWS Managed API and link it to Exchange Server 如何通过 EWS 从 Exchange 2013 中的一个公用文件夹邮箱获取公用文件夹 - How to get public folders from one Public folder mailbox in Exchange 2013 via EWS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM