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

shi*_*use 5 azure odata office365 azure-ad-graph-api microsoft-graph-api

我正在尝试使用 microsoft graph mail api 使用 in 运算符查询少量电子邮件,但找不到示例。

这就是我尝试使用它的方式:https : //graph.microsoft.com/v1.0/me/messages?$filter=(from/emailAddress/address) in'test@email.com, tester@address.com'

在他们的文档中,它说您可以将 in 运算符用于 $filter。

Bol*_*enk 4

我并不反对其他答案,如果有人正在寻找 IN 运算符使用格式,我只是留下这个片段:

$filter=displayName in ('group-1', 'group-2')
Run Code Online (Sandbox Code Playgroud)

编码后的完整 url 示例:

https://graph.microsoft.com/v1.0/groups?$filter=displayName%20in%20%28%27group-1%27%2C%20%27group-2%27%29
Run Code Online (Sandbox Code Playgroud)