Different CalendarId value returned for the same Event depending on the endpoint fetched through Graph Api.

Adolfo Rodriguez 11 Reputation points
2021-09-22T10:25:50.67+00:00

Hello community,

I recently started using Graph Explorer to play with the Graph Api and I wonder if somebody can give me a hand clarifying why calendarIDs returned in the Request Response are different when

Getting a Single Event + expand=calendar

than while

Listing All Events + expand=calendar

Please see below both scenarios:

Scenario 1 -> Call Specific Event and expand calendar info:

https://graph.microsoft.com/v1.0/me/events/AAMkADUzNTRjNzNlLWY5N2EtNDEwZi04OGZkLWIzMDFkNDE4OTk2OABGAAAAAAAUEVqzHEdPT45wNVcKzvRkBwBSo49ywRmPTZH4nZSozspTAAAAAAENAABSo49ywRmPTZH4nZSozspTAAAj6GGjAAA=?expand=calendar

  • As a result the calendarID looks like this:
    AAMkADUzNTRjNzNlLWY5N2EtNDEwZi04OGZkLWIzMDFkNDE4OTk2OAAuAAAAAAAUEVqzHEdPT45wNVcKzvRkAQBSo49ywRmPTZH4nZSozspTAAAAAAENAAA=

Scenario 2 -> Call All Events and expand calendar info for each one:
https://graph.microsoft.com/v1.0/me/events?expand=calendar

  • As a result the EventID looks like:
    AAMkADUzNTRjNzNlLWY5N2EtNDEwZi04OGZkLWIzMDFkNDE4OTk2OABGAAAAAAAUEVqzHEdPT45wNVcKzvRkBwBSo49ywRmPTZH4nZSozspTAAAAAAENAABSo49ywRmPTZH4nZSozspTAAAj6GGjAAA=
    which is the same as Scenario 1
  • But the CalendarID looks different (its longer and the end of the string does not match the one on Scenario 1):
    AAMkADUzNTRjNzNlLWY5N2EtNDEwZi04OGZkLWIzMDFkNDE4OTk2OABGAAAAAAAUEVqzHEdPT45wNVcKzvRkBwBSo49ywRmPTZH4nZSozspTAAAAAAEGAABSo49ywRmPTZH4nZSozspTAAAAADp2AAA=

As it can be seen CalendarIDs do not match for the same Event when using those two different endpoints. I also, find out that if I search for the specific calendarID on Scenario 1 through Graph Api:
https://graph.microsoft.com/v1.0/me/calendars/AAMkADUzNTRjNzNlLWY5N2EtNDEwZi04OGZkLWIzMDFkNDE4OTk2OAAuAAAAAAAUEVqzHEdPT45wNVcKzvRkAQBSo49ywRmPTZH4nZSozspTAAAAAAENAAA=

The resulting Response brings the expected Calendar details, but the ID is the same as Scenario 2!!!. So, my believe is that the calendarID from Scenario 1 is linked, somehow, to calendarID on Scenario 2.

My questions then are, Why are different IDs pointing to the same resource? Are they different formats of the same Id(i.e. ewsId, restId, entryId, etc.)? I have been following the docs and, so far, I haven't seen any specs about calendarIds been returned differently or in different formats depending on the endpoint targeted. Has anyone faced this problem before?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,396 questions
{count} votes