尝试通过MS Graph API检索会议室日历时出现ErrorItemNotFound [英] ErrorItemNotFound when trying to retrieve room calendar via MS Graph API

查看:111
本文介绍了尝试通过MS Graph API检索会议室日历时出现ErrorItemNotFound的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除了检索用户日历(代表用户)的日历视图之外,我们还努力通过Graph API使用以下方法获取房间的日历视图: https://graph.microsoft.com/beta/users/room1@ourdomain.com/calendarView.这是一个痛苦的过程,因为我们遇到了许多问题,并且目前停留在以下404响应中:

Next to retrieving calendar views of a user's calendar (on behalf of the user), we are trying hard to also get the calendar view of rooms via the Graph API using https://graph.microsoft.com/beta/users/room1@ourdomain.com/calendarView. It's a painful process since we've been running into many problems and are currently stuck with the following 404 response:

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"
    }
  }
}

已对会议室的电子邮件地址进行了双重检查,并且该资源存在,因为我们可以使用它创建约会,并且当我们检索在该位置有约会的用户的日历时,它甚至会在响应中返回.

The email address of the room has been double checked and the resource exists, since we can create appointments with it and it is even being returned in the response when we retrieve the calendar of the user who has an appointment in that location.

将应用程序权限和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,因此根据

App permissions and OAuth2 scopes are set to: 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, so that should not be an issue, judging by the documentation.

有人知道如何解决这个问题吗?

Does anyone know how to solve this?

推荐答案

最后!在与无数的Microsoft支持人员一起讨论了这些问题之后,每个人都说这不是他们的领地,也不知道将问题转发到何处,因此我与Exchange团队的人取得了联系.他建议了对我们有用的一件事:您要代表其检索房间资源日历的用户需要是该房间资源的委托人

FINALLY! After going through this with countless Microsoft support people, each of whom said this was not their territory and did not know where to forward the question, I got in touch with somebody from the Exchange team. He suggested the one thing that worked for us: the user on behalf of which you are retrieving the room resource calendar needs to be a delegate of that room resource!

此外,要检索用户可以选择的房间资源列表,我们需要使用findRooms端点,但这仅在 beta API上有效.这样做的唯一缺点是您似乎无法过滤用户作为代表的房间.因此,用户将获得一个房间列表,他可能会或可能无法为其检索日历.

In addition, to retrieve the list of room resources which the user can select from, we needed to use the findRooms endpoint but this only works on the beta API. The only drawback of this is that you cannot seem to filter for rooms of which the user is a delegate. So the user will get a list of rooms for which he might or might not be able to retrieve the calendar.

会议室资源calendarView响应的最后一个缺点是该响应不包含在会议室中计划的会议的名称.每个事件的描述仅包含会议组织者的名称.

A final drawback of the room resource calendarView response is that the response does not contain the names of the meetings planned in the rooms. The description of each event only contains the name of the meeting organizer.

这篇关于尝试通过MS Graph API检索会议室日历时出现ErrorItemNotFound的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆