除了检索用户日历(代表用户)的日历视图之外,我们还努力通过Graph API使用以下方法获取房间的日历视图:
https://graph.microsoft.com/beta/users/room1@ourdomain.com/calendarView
。这是一个痛苦的过程,因为我们遇到了许多问题,并且目前停留在以下404
响应中:
https://graph.microsoft.com:443/v1.0/users/room1@ourdomain.com/calendarView?startDateTime=2018-12-04T23:00:00.000Z&endDateTime=2019-02-10T22:59:59.999Z
{
"error": {
"code": "ErrorItemNotFound",
"message": "The specified object was not found in the store.",
"innerError": {
"request-id": "358a003a-57a4-4f0e-91da-edc17c1fa2d8",
"date": "2018-12-12T07:38:33"
}
}
}
已对会议室的电子邮件地址进行了双重检查,并且资源存在,因为我们可以使用它创建约会,并且当我们检索在该位置有约会的用户的日历时,它甚至会在响应中返回。
应用程序权限和OAuth2范围设置为:openid email profile offline_access https://graph.microsoft.com/Calendars.Read https://graph.microsoft.com/Calendars.Read.Shared https://graph.microsoft.com/User.Read
https://graph.microsoft.com/User.ReadBasic.All https://graph.microsoft.com/User.Read.All
,因此根据the documentation来看,这应该不是问题。
有人知道如何解决吗?
答案 0 :(得分:1)
我已经尝试了所有可能的方法,但是没有任何方法可以访问。 这就是我在Graph资源管理器中尝试的以下内容:
https://graph.microsoft.com/v1.0/users/meetingroom1@domain.com/events
-> DelegatedCalendarAccessDenied
https://graph.microsoft.com/v1.0/users/meetingroom1@domain.com/calendarView?startDateTime=2019-01-14&endDateTime=2019-01-18
-> ErrorItemNotFound
https://graph.microsoft.com/v1.0/users/meetingroom1@domain.com/calendar/calendarView?startDateTime=2019-01-14&endDateTime=2019-01-18
-> ErrorItemNotFound
v1.0
和beta
上的所有三个。
这不是权利的问题,因为在我的测试中,我将Graph Explorer授予了Directory.ReadWrite.All
范围。导致以下scp
声明。
第一个请求似乎是最有前途的(由于不同的错误),我还使自己成为了一个完全控制Rooms-mailbox的代表。仍然没有帮助。
对https://graph.microsoft.com/v1.0/users/meetingroom1@domain.com
的请求给出了结果,如描述会议室的结果。
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users/$entity",
"businessPhones": [],
"displayName": "Meeting room 1",
"givenName": null,
"jobTitle": null,
"mail": "meetingroom1@domain.com",
"mobilePhone": null,
"officeLocation": null,
"preferredLanguage": null,
"surname": null,
"userPrincipalName": "meetingroom1@domain.com",
"id": "3e0a7b7e-xxxx-xxxx-xxxx-xxxxcxxxx120"
}
完成所有这些测试之后,我只能得出结论,您无法访问Rooms邮箱中的事件。这是故意的(仅在使用调度助手时)或错误。
也许周围的一些Microsoft人员可以澄清这一点?
答案 1 :(得分:0)
最后!在与无数的Microsoft支持人员一起讨论了这些问题之后,每个人都说这不是他们的领地,并且不知道将问题转发到哪里,我与Exchange团队的人取得了联系。他建议了对我们有用的一件事:您要代表其检索会议室资源日历的用户需要是该会议室资源的委托!
此外,要检索用户可以选择的房间资源列表,我们需要使用findRooms
端点,但这仅在 beta API上有效。这样做的唯一缺点是您似乎无法过滤用户作为代表的房间。因此,用户将获得一个房间列表,他可能会或可能无法为其检索日历。
会议室资源calendarView响应的最后一个缺点是该响应不包含在会议室中计划的会议的名称。每个事件的描述仅包含会议组织者的名称。