【问题标题】:Find unanswered emails using Microsoft Graph API使用 Microsoft Graph API 查找未答复的电子邮件
【发布时间】:2022-08-11 08:36:16
【问题描述】:

我正在尝试使用 Microsoft Graph 在文件夹中查找所有未答复的电子邮件。 我能找到的最接近的东西是 PidTagLastVerbExecuted 属性,它给了我最后执行的动词,例如:

https://graph.microsoft.com/v1.0/me/messages?$filter=parentFolderId eq \'<my_folder_id>\'&$select=subject,parentFolderId&$expand=SingleValueExtendedProperties($filter=id eq \'Integer 0x1081\')

但是,如果电子邮件首先被回复然后转发,则 LastVerbExecuted 是“转发”,而不是“已回答”。 那么如何确定收件箱中的电子邮件是否已得到答复? 在 IMAP 中有“ANSWERED”标志,但我在 Graph 中找不到类似的东西。

谢谢你的帮助!

    标签: microsoft-graph-api


    【解决方案1】:

    等效的 IMAP 属性是 pidtagmessagestatus https://docs.microsoft.com/en-us/office/client-developer/outlook/mapi/pidtagmessagestatus-canonical-property 例如查找已回复的电子邮件(已回复或转发)

    https://graph.microsoft.com/v1.0/me/messages?$filter=singleValueExtendedProperties/any(ep:ep/id eq 'Integer 0x0E17' and cast(ep/value, Edm.Int32) eq 512)
    

    或未答复的将是

    https://graph.microsoft.com/v1.0/me/messages?$filter=singleValueExtendedProperties/any(ep:ep/id eq 'Integer 0x0E17' and cast(ep/value, Edm.Int32) ne 512)
    

    需要注意的一件事是它是按位值,并且图表不允许您对按位值进行过滤(EWS 确实有按位搜索过滤器)。因此,可能存在一些边缘情况,其他东西可能会使用该属性会破坏图形过滤器,因此我建议您放置一个客户端过滤器来检查按位值。

    【讨论】:

      猜你喜欢
      • 2022-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-02-01
      相关资源
      最近更新 更多