Graph API - get events returning 500 internal server error

十年热恋 提交于 2019-12-28 04:30:05

问题


Trying to use the Graph API (through https://developer.microsoft.com/en-us/graph/graph-explorer/) to return events from a shared calendar using the following endpoint:

https://graph.microsoft.com/v1.0/users/<user>/calendar/events

When <user> is replaced with my email, the events are returned as expected, however if it is replaced with a colleague (who has shared the calendar with me), I get the following 500 response:

{
    "error": {
        "code": "ErrorInternalServerTransientError",
        "message": "An internal server error occurred. Try again later.",
        "innerError": {
            "request-id": "b26e5b81-56f0-40b6-bb7b-89c1508c4c77",
            "date": "2017-05-25T13:11:16"
        }
    }
}

Fairly new to the Graph API, so any guidance would be appreciated.

Edit:

Just tried to replicate this using a local node.js server, I followed the following example (every step worked fine): https://docs.microsoft.com/en-us/outlook/rest/node-tutorial

However, when I create a new function to fetch the calendar of my colleague, I get the similar response from before:

ERROR:{
   "statusCode":500,
   "code":"InternalServerError",
   "message":"Error while processing response.",
   "requestId":"65fa8d30-3bbf-498c-869f-f4bb89bec8d5",
   "date":"2017-05-25T19:13:07.000Z",
   "body":{
      "code":"InternalServerError",
      "message":"Error while processing response.",
      "innerError":{
         "request-id":"65fa8d30-3bbf-498c-869f-f4bb89bec8d5",
         "date":"2017-05-25T19:13:07"
      }
   }
}

回答1:


Apparently there are two versions of calendar sharing, which I'll refer to as the "old" and the "new". The details aren't important, it's sufficient to know that this is an implementation detail within Microsoft's clients (Outlook, OWA, etc.). In your case, the person that shared their calendar with you did so with a client that used the "old" method, and the REST API doesn't have access to calendars shared with that method. We're working on addressing that problem in the API.

In the meantime, if the user that shared their calendar can remove the sharing, then use Outlook on the web, Outlook on iOS, or Outlook on Android to re-share, it should unblock you. (With the requirement that their mailbox is hosted on Office 365).



来源:https://stackoverflow.com/questions/44182175/graph-api-get-events-returning-500-internal-server-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!