Microsoft Graph API:$filter 和 $search 无法协同工作

Microsoft Graph API: $filter & $search not working together

我正在使用 Graph API 在收件箱中查找具有特定主题且未读的邮件以下载其附件。我能够使用 $search 通过形成 URL:

成功搜索具有特定主题的消息
https://graph.microsoft.com/v1.0/users/myEmailId/mailFolders/Inbox/messages?$search=%22subject%3ASome%20Daily%20Email%22

而且我能够使用此 URL:

成功过滤未读邮件
https://graph.microsoft.com/v1.0/users/myEmailId/mailFolders/Inbox/messages?$filter=isread%20eq%20false

但是,当我尝试组合这两个查询参数时,我收到错误请求异常。我试过使用这个 URL :

https://graph.microsoft.com/v1.0/users/myEmailId/mailFolders/Inbox/messages?$search=%22subject%3ASome%20Daily%20Email%22&$filter=isread%20eq%20false

我试过(我知道这很愚蠢)逆向版本,首先放置 $filter,然后放置 $search。而且我还尝试在 URL 中编码“&”。

请告诉我如何通过同时传递 $filter 和 $search 来正确调用 URL。

提前致谢。

$filter 参数在设计上不适用于 $search(请参阅 Microsoft Graph optional query parameters):

Note: You can currently search messages but not contacts or events. A $search request returns up to 250 results. You cannot use $filter or $orderby in a search request.