【发布时间】:2020-05-18 07:23:46
【问题描述】:
说实话,我有点惊讶我没能在谷歌上找到答案(不是 MS Graph API,也不是 MS Outlook REST API)——看起来我是唯一一个面临任务的人按收件人排序邮件消息(例如,在已发送邮件文件夹中)。
在手册中,我看到it is possible to order messages by sender;我可以要求类似的东西
GET https://graph.microsoft.com/v1.0/me/messages?$orderby=from/emailAddress/address
或
GET https://graph.microsoft.com/v1.0/me/messages?$orderby=from/emailAddress/name,from/emailAddress/address
但是收件人呢,实际上是一个数组(甚至 3 个数组:toRecipients、ccRecipients 和 bccRecipients)?
我已经尝试了所有我能想象到的 API 请求,但只得到了错误。我错过了什么吗?
【问题讨论】:
-
请分享尝试的查询。
-
不确定它会有什么帮助,但仍然......我尝试了一些或多或少合理的查询以及许多明显愚蠢的查询。通过或多或少的合理性,我的意思是了解 toRecipients 的“数组性质”的查询。由于我没有找到正确的语法,我尝试了:GET graph.microsoft.com/v1.0/me/messages?$orderby=toRecipients[0]/… GET graph.microsoft.com/v1.0/me/messages?$orderby=toRecipients/0/… 甚至:GET graph.microsoft.com/v1.0/me/messages?$orderby=toRecipients.0/… 并得到了一个 BadRequest
-
谢谢伊戈尔。它有助于避免重复工作。我将对此进行更深入的研究,然后再回复您。
-
好的,收到回复,将其添加为答案。
标签: microsoft-graph-api outlook-restapi microsoft-graph-mail