简体   繁体   中英

Microsoft Graph API getSchedule filter by calendars

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?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM