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

如何通过Microsoft Graph API查询指定会议室的日程事件?

查询指定会议室的日程事件(Microsoft Graph API)

核心逻辑

会议室在Microsoft Graph中属于特殊的用户账户(资源账户),无需纠结组场景,直接使用用户类的日历事件接口即可完成查询。

操作步骤

  1. 获取目标会议室的标识
    调用接口 GET https://graph.microsoft.com/v1.0/places/microsoft.graph.room 获取所有会议室列表,从返回数据中提取目标会议室的 id 或 userPrincipalName(通常格式为会议室名称@域名.com)。

  2. 查询会议室默认日历事件
    使用以下基础接口直接查询该会议室的默认日历事件:

    GET https://graph.microsoft.com/v1.0/users/{room-id-or-userPrincipalName}/calendar/events
    

    可添加查询参数过滤结果,比如按时间范围筛选:

    GET https://graph.microsoft.com/v1.0/users/{room-id-or-userPrincipalName}/calendar/events?$filter=start/dateTime ge '2024-01-01T00:00:00Z' and end/dateTime le '2024-01-31T23:59:59Z'
    
  3. (可选)查询非默认日历事件
    如果需要访问会议室的非默认日历,先调用接口获取日历列表:

    GET https://graph.microsoft.com/v1.0/users/{room-id-or-userPrincipalName}/calendars
    

    再用目标日历的 id 调用接口查询事件:

    GET https://graph.microsoft.com/v1.0/users/{room-id-or-userPrincipalName}/calendars/{calendar-id}/events
    

内容的提问来源于stack exchange,提问作者Bryan Dellinger

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.20 05:55:23