You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

调用Calendar getSchedule API无法获取会议室事件主题、位置等信息

使用Microsoft Graph getSchedule API获取Teams Rooms事件时缺少主题、地点信息

我正尝试通过服务主体或应用访问令牌,调用Microsoft Graph的Calendar getSchedule API,按Room ID获取Teams Rooms的事件信息。应用需要获取特定日期的事件详情,包括主题(subject)、地点(location)、开始时间和结束时间。

我调用的POST请求地址为:https://graph.microsoft.com/v1.0/users/{user_id/UserPrincipalName}/calendar/getSchedule,其中UserPrincipalName设为ls-meetingroom-gothamcity@test.com。

请求负载

{
    "schedules": ["ls-meetingroom-gothamcity@test.com", "ls-meetingroom-wakanda@test.com"],
    "startTime": {
        "dateTime": "2023-06-27T00:00:00",
        "timeZone": "India Standard Time"
    },
    "endTime": {
        "dateTime": "2023-06-27T23:59:59",
        "timeZone": "India Standard Time"
    },
    "availabilityViewInterval": 30
}

收到的响应

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.scheduleInformation)",
    "value": [
        {
            "scheduleId": "ls-meetingroom-gothamcity@test.com",
            "availabilityView": "000000000000000000000000000000000000000000000000",
            "scheduleItems": [],
            "workingHours": {
                "daysOfWeek": [
                    "monday",
                    "tuesday",
                    "wednesday",
                    "thursday",
                    "friday"
                ],
                "startTime": "08:00:00.0000000",
                "endTime": "17:00:00.0000000",
                "timeZone": {
                    "name": "Pacific Standard Time"
                }
            }
        },
        {
            "scheduleId": "ls-meetingroom-wakanda@test.com",
            "availabilityView": "000000000000000000000000000202002020002000000000",
            "scheduleItems": [
                {
                    "status": "busy",
                    "start": {
                        "dateTime": "2023-06-27T13:30:00.0000000",
                        "timeZone": "India Standard Time"
                    },
                    "end": {
                        "dateTime": "2023-06-27T14:00:00.0000000",
                        "timeZone": "India Standard Time"
                    }
                },
                {
                    "status": "busy",
                    "start": {
                        "dateTime": "2023-06-27T14:30:00.0000000",
                        "timeZone": "India Standard Time"
                    },
                    "end": {
                        "dateTime": "2023-06-27T15:00:00.0000000",
                        "timeZone": "India Standard Time"
                    }
                }
            ],
            "workingHours": {
                "daysOfWeek": [
                    "monday",
                    "tuesday",
                    "wednesday",
                    "thursday",
                    "friday"
                ],
                "startTime": "08:00:00.0000000",
                "endTime": "17:00:00.0000000",
                "timeZone": {
                    "name": "Pacific Standard Time"
                }
            }
        }
    ]
}

遇到的问题

当前响应仅能返回事件的开始时间、结束时间和状态,无法获取主题(subject)、**地点(location)**等所需的事件详情。

期望的响应

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.scheduleInformation)",
    "value": [
        {
            "scheduleId": "ls-meetingroom-gothamcity@test.com",
            "availabilityView": "000000000000000000000000000000000000000000000000",
            "scheduleItems": [
                {
                    "isPrivate": false,
                    "status": "busy",
                    "subject": "Test Meeting 27 Jun 11:30 start for 30 min",
                    "location": "Wakanda",
                    "isMeeting": true,
                    "isRecurring": false,
                    "isException": false,
                    "isReminderSet": false,
                    "start": {
                        "dateTime": "2023-06-27T11:30:00.0000000",
                        "timeZone": "India Standard Time"
                    },
                    "end": {
                        "dateTime": "2023-06-27T12:00:00.0000000",
                        "timeZone": "India Standard Time"
                    }
                }
            ]
        },
        {
            "scheduleId": "ls-meetingroom-wakanda@test.com",
            "availabilityView": "000000000000000000000000000202002020002000000000",
            "scheduleItems": [
                {
                    "isPrivate": false,
                    "status": "busy",
                    "subject": "Test Meeting 27 Jun 13:30 start for 30 min",
                    "location": "Wakanda",
                    "isMeeting": true,
                    "isRecurring": false,
                    "isException": false,
                    "isReminderSet": false,
                    "start": {
                        "dateTime": "2023-06-27T13:30:00.0000000",
                        "timeZone": "India Standard Time"
                    },
                    "end": {
                        "dateTime": "2023-06-27T14:00:00.0000000",
                        "timeZone": "India Standard Time"
                    }
                }
            ]
        }
    ]
}

内容的提问来源于stack exchange,提问作者Ashish Banjare

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.17 11:27:40