Oliver
Oliver

Reputation: 173

Graph API - get events returning 500 internal server error

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://learn.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"
      }
   }
}

Upvotes: 1

Views: 3394

Answers (1)

Jason Johnston
Jason Johnston

Reputation: 17692

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).

Upvotes: 1

Related Questions