1

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"
      }
   }
}
Oliver
  • 153
  • 1
  • 15

1 Answers1

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

Jason Johnston
  • 17,194
  • 2
  • 20
  • 34
  • Makes sense, they used the 'old' method to share. Will try this now and report back – Oliver May 26 '17 at 13:13
  • Still getting the same error message after removing the old permissions and then re-granting them through OWA – Oliver May 26 '17 at 13:26
  • 1
    Ok, let me check with the team. – Jason Johnston May 26 '17 at 14:12
  • So with the new sharing model, you should find the shared calendars under the `/me/calendars` endpoint, so you no longer need to access it as `/users//calendars`. Can you try that? – Jason Johnston May 30 '17 at 15:17
  • 1
    Great, that seems to be working using `/me/calendars/{id}/events`. The changes don't quite seem to be captured in documentation yet. Thanks again! – Oliver May 30 '17 at 16:42
  • 1
    Thanks for bringing up this issue, @Oliver. The transitional behavior is now documented in the [Known isses](https://developer.microsoft.com/en-us/graph/docs/concepts/known_issues) article. – Angelgolfer-ms May 31 '17 at 01:32
  • @JasonJohnston: Is there a Uservoice or a Github issue tracking the update that makes Outlook automatically change the sharing from the 'old' to the 'new' method? – RasmusW Nov 29 '17 at 20:01
  • But for new API end points how can I get shared group calendar. I tried what is giving in Microsoft documentation. But /me/calendarGroups/ this endpoints is also not giving me all groups. – Negi Rox May 31 '18 at 17:30