【问题标题】:The account does not have permission to impersonate the requested user该帐户无权模拟请求的用户
【发布时间】:2013-02-18 17:01:44
【问题描述】:

我在尝试访问资源邮箱时收到此错误。请任何人帮助我。我是 EWS 的新手。

我可以通过 OWA(Outlook web app) 访问资源邮箱。但我不是这个邮箱的所有者,因为它是共享邮箱。

我的代码:

ServicePointManager.ServerCertificateValidationCallback = CertificateValidationCallBack;
ExchangeService newExchangeService = new ExchangeService  (ExchangeVersion.Exchange2007_SP1);
newExchangeService.Credentials = new NetworkCredential(username, password, domain);
newExchangeService.AutodiscoverUrl(email-id, RedirectionUrlValidationCallback);

newExchangeService.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, email_which_i_want_to_access);

Folder visitorsFolder = Folder.Bind(newExchangeService, WellKnownFolderName.Inbox);
foreach (Folder childfolder in visitorsFolder.FindFolders(new FolderView(10)))
        {
            Console.WriteLine(childfolder.DisplayName);
        }

【问题讨论】:

    标签: c# impersonation exchangewebservices exchange-server-2007 exchange-server-2010


    【解决方案1】:

    问题可能是您没有模拟邮箱的权限,但您可能具有代理访问权限。请参阅我对这个类似问题的回答,了解当您具有委托访问权限时如何访问邮箱: https://stackoverflow.com/a/9242792/64161

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-07-16
      • 1970-01-01
      • 2018-02-01
      • 1970-01-01
      • 2021-08-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多