使用 Microsoft Graph 筛选扩展属性
Filter on Extended Properties using Microsoft Graph
https://graph.microsoft.io/en-us/docs/api-reference/beta/api/singlevaluelegacyextendedproperty_get
在此文档中,在 "GET resource instances using $filter" 部分下,它有这个示例:
获取消息实例:
GET /me/messages?$filter=singleValueExtendedProperties/Any(ep: ep/propertyId eq '{propertyId_value}' and ep/value eq '{property_value}')
当我使用图形资源管理器对其进行测试时:https://graph.microsoft.io/en-us/graph-explorer
GET https://graph.microsoft.com/beta/me/messages?$filter=singleValueExtendedProperties/Any(ep: ep/propertyId eq 'String {00062008-0000-0000-C000-000000000046} Name TestPropertName' and ep/value ne null)
我遇到了这个异常:
"error": {
"code": "BadRequest",
"message": "Could not find a property named 'propertyId' on type 'microsoft.graph.singleValueLegacyExtendedProperty'.",
"innerError": {
"request-id": "1224fbd4-f033-4897-b1c0-bef1bf3116f8",
"date": "2016-08-12T23:10:57"
}
}
为什么找不到propertyId
?
此外,我在调用时看到同样的错误
GET /me/messages/<id>?$expand=singleValueExtendedProperties($filter=propertyId eq '{propertyId_value}')
属性Id 属性 实际上是一个已知错误,我们正在推出修复程序。解决方法是改用 id 属性,并且应该会在下周对大多数客户开放(如果尚未开放的话)。文档也将在下周更新。
干杯!
Angelgolfer-ms
https://graph.microsoft.io/en-us/docs/api-reference/beta/api/singlevaluelegacyextendedproperty_get
在此文档中,在 "GET resource instances using $filter" 部分下,它有这个示例:
获取消息实例:
GET /me/messages?$filter=singleValueExtendedProperties/Any(ep: ep/propertyId eq '{propertyId_value}' and ep/value eq '{property_value}')
当我使用图形资源管理器对其进行测试时:https://graph.microsoft.io/en-us/graph-explorer
GET https://graph.microsoft.com/beta/me/messages?$filter=singleValueExtendedProperties/Any(ep: ep/propertyId eq 'String {00062008-0000-0000-C000-000000000046} Name TestPropertName' and ep/value ne null)
我遇到了这个异常:
"error": {
"code": "BadRequest",
"message": "Could not find a property named 'propertyId' on type 'microsoft.graph.singleValueLegacyExtendedProperty'.",
"innerError": {
"request-id": "1224fbd4-f033-4897-b1c0-bef1bf3116f8",
"date": "2016-08-12T23:10:57"
} }
为什么找不到propertyId
?
此外,我在调用时看到同样的错误
GET /me/messages/<id>?$expand=singleValueExtendedProperties($filter=propertyId eq '{propertyId_value}')
属性Id 属性 实际上是一个已知错误,我们正在推出修复程序。解决方法是改用 id 属性,并且应该会在下周对大多数客户开放(如果尚未开放的话)。文档也将在下周更新。
干杯!
Angelgolfer-ms