且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Office 365 API中访问其他用户的日历

更新时间:2023-12-02 11:44:46

[UPDATE] 现在对REST API提供了服务帐户支持.请参阅

[UPDATE] Service account support is available now for REST APIs. Please see Building Daemon or Service Apps with Office 365 Mail, Calendar, and Contacts APIs (OAuth2 client credential flow) for more info.

感谢您对Office 365 API的疑问和兴趣!当前,您可以使用Office 365 API来访问经过身份验证的用户的日历,但不能访问其他用户的日历.使服务帐户被授权访问组织或整个组织内多个用户的邮件/日历/联系人已经在我们的路线图上,并且其优先级很高,请保持关注.

Thanks for your question and interest in Office 365 APIs! Currently, you can use the Office 365 API to access the authenticated user's calendar but not another user's calendar. Enabling a service account to be authorized to access mail/calendar/contacts of multiple users within an organization or the entire organization is on our roadmap and is prioritized pretty high, so stay tuned.

同时,您可以使用Exchange Web服务(EWS)托管API来实现您的应用程序.但是,通过模拟EWS应用程序,服务帐户可以对用户的整个邮箱(而不仅仅是日历)具有读/写访问权限.一旦我们在Office 365 API中添加了对服务帐户的支持,您将能够使用OAuth并缩小应用程序的访问范围,以仅读取用户的日历.

In the mean time, you can use Exchange Web Services (EWS) Managed API to implement your application. However, with EWS app impersonation, the service account has read/write access to the user's entire mailbox, and not just the calendar. Once we add support for service accounts in Office 365 API, you will be able to use OAuth and scope down the access of the app to only read a user's calendar.

这里有一些链接说明了EWS应用程序模拟的工作方式.

Here are a few links explaining how EWS app impersonation works.

  • EWS Managed API download
  • Impersonation and EWS in Exchange
  • Working with impersonation by using the EWS Managed API

如果您有任何疑问或需要更多信息,请告诉我.

Please let me know if you have any questions or need more info.

谢谢

Venkat