Microsoft Graph $按 singleValueExtendedProperties 过滤

问题描述 投票:0回答:1

我正在尝试通过 Graph api 过滤 singleValueExtendedProperties。 我要过滤的 singleValueExtendedProperties 是 PidTagDeferredSendTime (属性 ID:0x3FEF,数据类型:PtypTime,0x0040)。

我可以通过expand得到这个值。

https://graph.microsoft.com/v1.0/me/mailfolders/drafts/messages?$expand=singleValueExtendedProperties($filter=id eq 'SystemTime 0x3FEF')

但是,我想获取对 PidTagDeferredSendTime 有价值的消息列表。 我尝试了以下网址但失败了。

https://graph.microsoft.com/v1.0/me/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq 'SystemTime 0x3FEF' and ep/value ge '2023-04-24T04:00:00Z')

https://graph.microsoft.com/v1.0/me/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq 'SystemTime 0x3FEF' and contains(ep/value, '2024'))

https://graph.microsoft.com/v1.0/me/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq 'String {SystemTime 0x3FEF}' and ep/value ne null)&$expand=singleValueExtendedProperties($filter=id eq 'String {SystemTime 0x3FEF}')

如果有任何帮助/提示/想法,我将非常感激。

outlook microsoft-graph-api office365 microsoft-graph-sdks
1个回答
0
投票

您需要将

ep/value
转换为
Edm.DateTimeOffset
并且日期时间值应该不带单引号

GET /v1.0/me/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq 'SystemTime 0x3fef' and cast(ep/value, Edm.DateTimeOffset) ge 2023-04-24T04:00:00Z)

请求应该会成功,但我无法确认结果,这取决于你。

© www.soinside.com 2019 - 2024. All rights reserved.