0

我已经使用 o365 api 客户端库将 asp.net Web 应用程序与 office 365 邮件集成。我有一个特定的要求,假设我已经在我的数据库中存储了其他用户的 o365 邮件 ID。o365 邮件用户名/密码也存储在我的本地数据库。有没有办法使用邮件 ID/凭据查看其他用户的邮件详细信息?如果有人有任何想法,请分享。

提前致谢。

4

1 回答 1

1

If your app is using OAuth code flow , it seems that only allow access to mail, calendar and contacts belonging to the authenticated user . You may use OAuth2 client credential flow, for your scenario and the app will be able to make calls to interact with any mailboxes in that tenant. Another choice is to use EWS Managed API ,since you get the password of the other user ,you will get the credentials like:

  ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
  service.Credentials = new WebCredentials("user_with_access@example.com", "password");

Check this thread for a demo.

于 2016-03-23T07:37:56.560 回答