【问题标题】:Enumerating accounts you have permissions to impersonate using EWS Managed API枚举您有权使用 EWS 托管 API 模拟的帐户
【发布时间】:2016-11-23 19:38:11
【问题描述】:

我设置了impersonation 以允许我在我的ExchangeService 客户端对象上模拟和访问另一个帐户:

var client = new ExchangeService();
client.Credentials = new WebCredentials("account.one@somewhere.com", "password");
client.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx");
client.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, "account.two@somewhere.com");

这很好用,但是...在我的情况下,account.one@somewhere.com 不知道他们能够冒充谁。我如何枚举他们能够模拟的所有其他帐户?我尝试搜索示例,但找不到任何内容。

【问题讨论】:

    标签: c# .net exchangewebservices impersonation


    【解决方案1】:

    EWS 中没有任何内容可以为您提供该信息,这实际上取决于您设置模拟的方式。例如,可以为每个用户、组或租户中的每个收件人配置模拟。

    如果您要限制模拟并且想要枚举该限制,则使用启用邮件的安全组,为组成员启用模拟,然后在 EWS 中使用 ExpandGroup 将为您提供组成员的 SMTPAddress。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-04
      • 1970-01-01
      • 2011-09-25
      • 2019-07-20
      • 1970-01-01
      相关资源
      最近更新 更多