EWS托管API:ServiceResponseException:在商店中找不到指定的文件夹。 (服务器构建版本639.21) [英] EWS Managed API: ServiceResponseException: The specified folder could not be found in the store. (server build version 639.21)

查看:80
本文介绍了EWS托管API:ServiceResponseException:在商店中找不到指定的文件夹。 (服务器构建版本639.21)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用模拟(使用服务帐户的凭据和所有邮箱的ApplicationImpersonation)登录。
我在另一个用户的电子邮件地址上自动发现。 (没问题)
获取wellknownfoldername.calendar的folderID(没问题)
试图订阅(拉)到该folderID会返回错误:  ServiceResponseException:在商店中找不到指定的文件夹。

与同一商店中的另一个用户一起尝试(新创建的邮箱但我还没有登录)给出了ServiceResponseException:连接没有成功。请稍后再试。  (可能是因为邮箱树尚未构建但仅在首次登录后才建立)

确保代码完全正常运行 我尝试使用服务帐户本身的电子邮件地址。没有问题,它订阅罚款和事件产生结果。

那么为什么pullsubscription告诉我"在商店中找不到指定的文件夹" ?没有访问权限?可能我需要做的不仅仅是在shell中运行它:  new-managementroleassignment -name" test -role" ApplicationImpersonation" -user" EWSserviceaccount"


 所以...当我打开Outlook作为我想模仿的普通​​用户并添加"服务帐户"时作为日历的所有者,它有效。代码没有问题。嗯......很明显,我使用ApplicationImpersonation的方式不能正确地为普通用户邮箱提供服务帐户权限。让我们看看... http://msdn.microsoft.com/en-us/library/bb204095.aspx状态


 为所有用户配置Exchange模拟 在组织中

解决方案

据我所知,您正在正确设置服务帐户。您不应该授予服务帐户所有者对标准用户日历的权​​限(这会在某种程度上违背使用模拟的目的)。

我会将您的问题发送给我们的假冒和拉取订阅专家

I am using impersonation (using credentials of service account with ApplicationImpersonation for all mailboxes) to log on.
I autodiscover on an email address of another user. (no problem)
get the folderID of wellknownfoldername.calendar (no problem)
trying to subscribe (pull) to that folderID returns an error:  ServiceResponseException: The specified folder could not be found in the store.

trying it with another user in same store (mailbox created fresh but I did not log in to it yet) gives
ServiceResponseException: Connection did not succeed. Try again later.  (probably because the mailbox tree is not built yet but only after first logon)

To be sure the code works at all  I try it with the email address of the service account itself
No Problems there, it Subscribes fine and events yield results.


So why does the pullsubscription tell me that "The specified folder could not be found in the store" ? No access??
Maybe I need to do more than just running this in the shell:  new-managementroleassignment -name "test -role "ApplicationImpersonation" -user "EWSserviceaccount"

[EDIT]
 so... when I open outlook as the ordinary user that I want to impersonate and add the "service account" as owner to the calendar, it works. The code has no issues. hmmm...
So obviously the way I used ApplicationImpersonation can not be the correct way to give the service account proper permissions on the normal user mailboxes. Let's see...http://msdn.microsoft.com/en-us/library/bb204095.aspx states

 To configure Exchange Impersonation for all users in an organization

解决方案

You are setting up your service account correctly as far as I can tell. You shouldn't have to grant the service account owner rights to the standard user's calendar (that would somewhat defeat the purpose of using impersonation).

I'll send your question to our impersonation and pull subscription specialists.


这篇关于EWS托管API:ServiceResponseException:在商店中找不到指定的文件夹。 (服务器构建版本639.21)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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