当前位置: 首页 > 知识库问答 >
问题:

Connecting with EWS API service to outlook.com account with oAuth2 token

印辉
2023-03-14

I'm able to authenticate with live.com with my account on outlook.com at url

https://login.microsoftonline.com/common/v2.0

I receive an accessToken and id token.

My question is whether I can use this accessToken to retrieve exchange data about my emails through EWS API service using this token?ExchangeService.

   _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")
> https://outlook.office365.com/EWS/Exchange.asmx

My question is whether I can retrieve email data from exchange service ASMX with the idToken/accessToken supplied from live.com for outlook.com accounts?

共有1个答案

西门山
2023-03-14

It seems like the retrieving of data with EWS Managed API is not supported with outlook.com accounts.

you can read (in the yellow section) about it here and also here.

Basically, there are 2 portals today that apps can be created with:

    null
 类似资料:

相关问答

相关文章

相关阅读