如何在 Microsoft Graph Mail API 上为 $filter 使用“in"运算符? [英] How can I use the 'in' operator for $filter on Microsoft Graph Mail API?
问题描述
我正在尝试使用 microsoft graph mail api 使用 in 运算符查询少量电子邮件,但找不到示例.
I'm trying to use the microsoft graph mail api to query for a small amount of emails using the in operator but cannot find an example.
这就是我尝试使用它的方式:https://graph.microsoft.com/v1.0/me/messages?$filter=(from/emailAddress/address) in 'test@email.com, tester@address.com'
This is how I am trying to use it:
https://graph.microsoft.com/v1.0/me/messages?$filter=(from/emailAddress/address) in 'test@email.com, tester@address.com'
在他们的 文档中,它说您可以将 in 运算符用于 $filter.
In their documentation, it says that you can use the in operator for $filter.
推荐答案
我不反对其他答案,如果有人在寻找 IN 运算符的使用格式,我只是留下这个片段:
I am not opposing other answers, I am just leaving this snippet if anyone was looking for IN operator usage format:
$filter=displayName in ('group-1', 'group-2')
编码后的完整url示例:
Full url example after encoding:
https://graph.microsoft.com/v1.0/groups?$filter=displayName%20in%20%28%27group-1%27%2C%20%27group-2%27%29
这篇关于如何在 Microsoft Graph Mail API 上为 $filter 使用“in"运算符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!