1

I'm using microsoft graph API and want to get user's busy slots for particular calendars, so there is an end point /getSchedule which takes body like :

{        
    "schedules": ["adelev@contoso.onmicrosoft.com", "meganb@contoso.onmicrosoft.com"],
    "startTime": {
        "dateTime": "2019-03-15T09:00:00",
        "timeZone": "Pacific Standard Time"
    },
    "endTime": {
        "dateTime": "2019-03-15T18:00:00",
        "timeZone": "Pacific Standard Time"
    },
    "availabilityViewInterval": "60"
} 

In this endpoint I want to filter by calendars, I tried passing calendarId in schedules array instead of email it's giving error of invalid email.

there is similar api provided in google calendar /freeBusy that accepts array of calendarIds and returns slots for those calendars only. I want same functionality in microsoft calendars as well, is this possible?

Abhay Sehgal
  • 1,603
  • 2
  • 15
  • 21

1 Answers1

2

This feature only works with the main calendar of the users you're passing in (via their email address).

As of today it's not possible to use that method with other calendars than main user's calendars, you'd have to query those calendars yourself and determine the availability time yourself.

You can request such feature on uservoice.

baywet
  • 4,377
  • 4
  • 20
  • 49
  • Ok, so I've to call /me/calendars/{id}/calendarView for each calendar or there is any other endpoint where I can get multiple calendars events? – Abhay Sehgal Aug 26 '20 at 13:10
  • 1
    not as far as I know, all the endpoints I know about return you the events for the specific calendar you're on. The only "exception" to that could be group calendars as they often reflect events that are in the end part of multiple people's calendars (the group members), but I don't think that's what you're looking for. – baywet Aug 26 '20 at 13:30