如何在 Microsoft Graph Mail API 上为 $filter 使用“in"运算符?上为、运算符、如何在、Graph

2023-09-06 18:05:05 作者:我要逆袭

我正在尝试使用 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
 
精彩推荐
图片推荐