我想使用Microsoft根据电子邮件中的标题搜索电子邮件。在消息头我们有DKIM-Signature字段,我想搜索所有电子邮件不包含abc.com域在他们的DKIM-Signature字段。
v=1; a=rsa-sha256; c=relaxed/relaxed; d=abc.com;我想使用Microsoft图形api来完成它。
发布于 2021-08-24 00:57:19
您应该能够使用dkim-签名扩展属性例如

然后使用高级查询https://learn.microsoft.com/en-us/graph/aad-advanced-queries并包含或开始使用例如查找所有具有DKIM特定部分的电子邮件。
https://graph.microsoft.com/v1.0/me/mailfolders('Inbox')/messages?$filter=singleValueExtendedProperties/Any(ep:+ep/id+eq+'String {00020386-0000-0000-C000-000000000046}+Name+dkim-signature'+and+contains(ep/value,'v=1; a=rsa-sha256; c=relaxed/relaxed; d=blah-com.xxxx.blahsmtp.com'))&$count=true&Select=Subject,From&$Expand=SingleValueExtendedProperties($filter=(Id eq 'String {00020386-0000-0000-C000-000000000046}+Name+dkim-signature'))
或者,在您的示例中,您可以使用not否定该查询。
https://graph.microsoft.com/v1.0/me/mailfolders('Inbox')/messages?$filter=NOT singleValueExtendedProperties/Any(ep:+ep/id+eq+'String {00020386-0000-0000-C000-000000000046}+Name+dkim-signature'+and+startswith(ep/value,'v=1; a=rsa-sha256; c=relaxed/relaxed; d=blah-com.xxxxx.blah.com'))&$count=true&Select=Subject,From&$Expand=SingleValueExtendedProperties($filter=(Id eq 'String {00020386-0000-0000-C000-000000000046}+Name+dkim-signature'))
https://stackoverflow.com/questions/68898275
复制相似问题