By Oliver


2017-05-25 13:44:35 8 Comments

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 comments

@Jason Johnston 2017-05-26 12:16:47

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

@Oliver 2017-05-26 13:13:13

Makes sense, they used the 'old' method to share. Will try this now and report back

@Oliver 2017-05-26 13:26:25

Still getting the same error message after removing the old permissions and then re-granting them through OWA

@Jason Johnston 2017-05-26 14:12:10

Ok, let me check with the team.

@Jason Johnston 2017-05-30 15:17:50

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/<user-id>/calendars. Can you try that?

@Oliver 2017-05-30 16:42:56

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!

@Angelgolfer-ms 2017-05-31 01:32:31

Thanks for bringing up this issue, @Oliver. The transitional behavior is now documented in the Known isses article.

@RasmusW 2017-11-29 20:01:15

@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?

@Negi Rox 2018-05-31 17:30:04

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.

Related Questions

Sponsored Content

1 Answered Questions

MSGraph findMeetingTimes API return 500 Error

1 Answered Questions

Microsoft Graph API to get outlook calendar events not working

  • 2018-12-17 08:17:24
  • Rajesh Lohar
  • 266 View
  • 0 Score
  • 1 Answer
  • Tags:   microsoft-graph

0 Answered Questions

How to filter group members in Microsoft graph API?

1 Answered Questions

1 Answered Questions

[SOLVED] MS Graph Onenote API endpoint not working

  • 2018-07-23 07:47:33
  • Chengxian Mo
  • 241 View
  • 0 Score
  • 1 Answer
  • Tags:   microsoft-graph

1 Answered Questions

[SOLVED] Microsoft Graph API and shared calendar permissions

  • 2018-04-19 19:49:15
  • Ben Davis
  • 496 View
  • 1 Score
  • 1 Answer
  • Tags:   microsoft-graph

1 Answered Questions

Add custom fields in microsoft graph calendar event

  • 2018-03-27 09:21:40
  • atiwari
  • 104 View
  • 0 Score
  • 1 Answer
  • Tags:   microsoft-graph

0 Answered Questions

Error getting outlook.com tasks using Graph API

  • 2017-11-24 22:25:21
  • Illeris
  • 30 View
  • 1 Score
  • 0 Answer
  • Tags:   microsoft-graph

1 Answered Questions

[SOLVED] Create a mail enabled security group with graph api

  • 2017-01-03 08:33:12
  • WD1979
  • 601 View
  • 1 Score
  • 1 Answer
  • Tags:   microsoft-graph

0 Answered Questions

Sending emails through the Microsoft Graph API started throwing 500

  • 2016-09-25 09:27:20
  • Jorgen Solberg
  • 111 View
  • 1 Score
  • 0 Answer
  • Tags:   microsoft-graph

Sponsored Content