代码之家  ›  专栏  ›  技术社区  ›  HarriS

MS Graph API:在查询中使用包含运算符

  •  0
  • HarriS  · 技术社区  · 1 年前

    如何在图形api请求中创建包含字符串?

    我想查找所有主题包含特定用户的关键字“橙色”的电子邮件。类似于:

    https://graph.microsoft.com/v1.0/users/[email protected]/messages?$search="to:[email protected] and contains(Subject, 'orange')"&$select=subject,from,toRecipients,receivedDateTime,bodyPreview
    

    我在哪里可以找到所有的图形api操作符和过滤器。我看了一眼: https://developer.microsoft.com/en-us/graph/graph-explorer 但只看到非常简单的例子

    1 回复  |  直到 1 年前
        1
  •  1
  •   Fuzz of the Interwebs    1 年前

    我做了一些测试。搜索看起来像在Outlook中一样工作。只需使用 key:'value' 内部有空格的配对 $search

    https://graph.microsoft.com/v1.0/users/[email protected]/messages?$search="to:[email protected] Subject:'orange'"&$select=subject,from,toRecipients,receivedDateTime,bodyPreview