Microsoft Graph api 403 读取其他用户时拒绝访问

Microsoft Graph api 403 access denied when reading other users

我正在使用 angular 和 nodejs 创建一个应用程序,我需要能够读取另一个用户的事件列表。现在我正在尝试使用“https://graph.microsoft.com/v1.0/users/otherusername@companyurl.com/events" this gives me the 403 "Access is denied. Check credentials and try again.". However, if I use "https://graph.microsoft.com/v1.0/users/myusername@companyurl.com/events”它有效(正如大多数人所期望的那样)。我的问题是,为什么当我使用 outlook 时我可以使用日程安排助手查看 "otherusername@companyurl.com" 的事件而无需成为管理员,但在我的应用程序中由于凭据我无法看到他们的事件?

我用来连接到 Microsoft Graph api 的库是 https://github.com/AzureAD/azure-activedirectory-library-for-js

我在azure中设置的委托权限是

应用程序权限(我知道这些需要管理员权限)

Graph api permission scopes

感谢任何帮助,谢谢。

Fugal - 这是设计使然。您可以使用 FindMeetingTimes API 来安排与其他用户的会议。这只需 Calendar.Read 许可即可完成。有关详细信息,请参阅 http://graph.microsoft.io/en-us/docs/api-reference/beta/api/user_findmeetingtimes

要使用 /events 端点查看其他用户的日历,您需要特殊权限(类似于 Calendar.Read.Shared),我们仍在添加该权限。添加后,您将能够使用 /Events 访问其他用户明确与您共享的任何日历。但是,如果您只想安排会议,FindMeetingTimes 应该足够了。