【发布时间】:2019-05-13 08:15:17
【问题描述】:
除了(代表用户)检索用户日历的日历视图之外,我们还努力通过 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 判断,这应该不是问题。
有人知道怎么解决吗?
【问题讨论】:
-
请求
https://graph.microsoft.com:443/v1.0/users/room1@ourdomain.com会得到什么? -
返回错误代码
Request_ResourceNotFound,描述为Resource 'room1@ourdomain.com' does not exist or one of its queried reference-property objects are not present.。但我再次仔细检查,并在预约时定义了正确名称的资源并可用。