【问题标题】:Expanding and Filtering MS Graph API Does Not Work扩展和过滤 MS Graph API 不起作用
【发布时间】:2019-12-08 04:39:18
【问题描述】:

我需要从与特定event 关联的用户邮箱中获取eventMessage

我有活动的iCalUId,但我无法过滤它:

/users/${roomEmailAddress}/messages
?$expand=microsoft.graph.eventMessage/event($filter=iCalUId eq '${iCalUId}')

我要做的是获取所有消息,然后展开以便我看到与每条消息关联的事件,然后过滤每个事件以找到我关心的事件。

但是,我收到所有事件的响应,并且过滤机制不起作用。

我哪里出错了?

【问题讨论】:

    标签: microsoft-graph-api microsoft-graph-mail microsoft-graph-calendar


    【解决方案1】:

    图表不支持在$expand 中包含$filter。来自documentation

    $expand:

    • 不支持nextLink
    • 不支持超过 1 级展开
    • 不支持额外参数($filter$select

    可以做的是利用$search 参数来查找所有事件消息($search="kind:meetings),然后找到$expand 相关事件:

    /me/messages?$search="kind:meetings"&$expand=microsoft.graph.eventMessage/event
    

    【讨论】:

      【解决方案2】:

      这对我有用,首先我过滤然后我扩展列表

      https://graph.microsoft.com/v1.0/sites/{sideID}/lists/{listID}/items?$filter=fields/{Name of Field} eq '{VALUE}'&$expand=fields

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-05-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多