问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/63556249/microsoft-graph-api-getschedule-filter-by-calendars