Microsoft Graph API getSchedule 按日历筛选 [英] Microsoft Graph API getSchedule filter by calendars

查看:99
本文介绍了Microsoft Graph API getSchedule 按日历筛选的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 microsoft graph API 并希望为特定日历获取用户的繁忙时段,因此有一个端点 /getSchedule 其采用如下主体:

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"
} 

在这个端点中,我想按日历过滤,我尝试在 schedules 数组中传递 calendarId 而不是电子邮件,它给出了无效电子邮件的错误.

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.

谷歌日历 /freeBusy 中提供了类似的 api,它接受 calendarIds 数组并仅返回这些日历的插槽.我也想要微软日历中的相同功能,这可能吗?

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.

您可以在 uservoice 上请求此类功能.

You can request such feature on uservoice.

这篇关于Microsoft Graph API getSchedule 按日历筛选的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆