【发布时间】:2017-10-28 17:27:53
【问题描述】:
我可以使用我在 outlook.com 上的帐户在 url 上通过 live.com 进行身份验证
https://login.microsoftonline.com/common/v2.0
我收到一个 accessToken 和 id 令牌。
我的问题是我是否可以使用 this accessToken 通过 EWS API 服务使用此令牌检索有关我的电子邮件的交换数据?交换服务。
_exchangeService = new ExchangeService(ExchangeVersion.Exchange2007_SP1) { ConnectionGroupName = Guid.NewGuid().ToString() };
_exchangeService.Credentials = new WebCredentials("xxxxxxx", "xxxxxxxx", "outlook.com");
// _credentials = new OAuthCredentials(user.PasswordToken);
// Set the URL.
_exchangeService.TraceEnabled = true;
_exchangeService.AutodiscoverUrl("xxxxx")
通过以下 URL 中的 ExchangeService.asmx 向 Outlook 365 进行身份验证,以获取 Exchange 服务,如以下 sample 中所做的那样。
> https://outlook.office365.com/EWS/Exchange.asmx
我的问题是我是否可以使用 live.com 为 outlook.com 帐户提供的 idToken/accessToken 从交换服务 ASMX 检索电子邮件数据?
【问题讨论】:
标签: outlook openid exchangewebservices