获取 singleValueLegacyExtendedPropertyGet singleValueLegacyExtendedProperty

命名空间:microsoft.graphNamespace: microsoft.graph

可以获取使用特定扩展属性扩展的单个资源实例,或包含与筛选器匹配的扩展属性的资源实例集合。You can get a single resource instance expanded with a specific extended property, or a collection of resource instances that include extended properties matching a filter.

使用查询参数 $expand,可以获取使用特定的扩展属性扩展的指定资源实例。Using the query parameter $expand allows you to get the specified resource instance expanded with a specific extended property. id 属性上使用 $filtereq 运算符来指定扩展属性。Use a $filter and eq operator on the id property to specify the extended property. 这是当前获取 singleValueLegacyExtendedProperty 对象(表示扩展属性)的唯一方式。This is currently the only way to get the singleValueLegacyExtendedProperty object that represents an extended property.

要获取具有某些扩展属性的资源实例,请使用 $filter 查询参数并在 id 属性上应用 eq 运算符。To get resource instances that have certain extended properties, use the $filter query parameter and apply an eq operator on the id property. 另外,对于数字扩展属性,请在 value 属性上应用以下某个运算符:eqnegegtleltIn addition, for numeric extended properties, apply one of the following operators on the value property: eq, ne,ge, gt, le, or lt. 对于字符串类型的扩展属性,请在 value 上应用 containsstartswitheqne 运算符。For string-typed extended properties, apply a contains, startswith, eq, or ne operator on value.

该筛选器应用于资源在已登录用户的邮箱中的所有实例。The filter is applied to all instances of the resource in the signed-in user's mailbox.

在扩展属性的 id 中筛选字符串名称 (Name) 是区分大小写的。Filtering the string name (Name) in the id of an extended property is case-sensitive. 筛选扩展属性的 value 属性是区分大小写的。Filtering the value property of an extended property is case-insensitive.

支持以下用户资源:The following user resources are supported:

以及以下组资源:As well as the following group resources:

有关何时使用开放扩展或扩展属性,以及如何指定扩展属性的详细信息,请参阅扩展属性概述See Extended properties overview for more information about when to use open extensions or extended properties, and how to specify extended properties.

权限Permissions

根据您要获取的扩展属性的资源以及所请求的权限类型(委派或应用程序),必须至少调用下表中指定的权限,才能调用此 API。Depending on the resource you're getting the extended property from and the permission type (delegated or application) you request, the permission specified in the following table is the minimum required to call this API. 若要了解详细信息,包括如何选择权限的信息,请参阅权限To learn more, including how to choose permissions, see Permissions.

支持的资源Supported resource 委派(工作或学校帐户)Delegated (work or school account) 委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) 应用程序Application
日历calendar Calendars.ReadCalendars.Read Calendars.ReadCalendars.Read Calendars.ReadCalendars.Read
联系人contact Contacts.ReadContacts.Read Contacts.ReadContacts.Read Contacts.ReadContacts.Read
contactFoldercontactFolder Contacts.ReadContacts.Read Contacts.ReadContacts.Read Contacts.ReadContacts.Read
事件event Calendars.ReadCalendars.Read Calendars.ReadCalendars.Read Calendars.ReadCalendars.Read
日历group calendar Group.Read.AllGroup.Read.All 不支持Not supported 不支持Not supported
事件group event Group.Read.AllGroup.Read.All 不支持Not supported 不支持Not supported
帖子group post Group.Read.AllGroup.Read.All 不支持Not supported Group.Read.AllGroup.Read.All
mailFoldermailFolder Mail.ReadMail.Read Mail.ReadMail.Read Mail.ReadMail.Read
邮件message Mail.ReadMail.Read Mail.ReadMail.Read Mail.ReadMail.Read

HTTP 请求HTTP request

获取通过与筛选器匹配的扩展属性扩展的资源实例GET a resource instance expanded with an extended property that matches a filter

获取通过与 id 属性中的筛选器匹配的扩展属性展开的资源实例。请确保对筛选器字符串中的空白字符应用 URL 编码Get a resource instance expanded with the extended property which matches a filter on the id property. Make sure you apply URL encoding to the space characters in the filter string.

获取邮件实例:Get a message instance:

GET /me/messages/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')
GET /users/{id|userPrincipalName}/messages/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')
GET /me/mailFolders/{id}/messages/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')

获取 mailFolder 实例:Get a mailFolder instance:

GET /me/mailFolders/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')
GET /users/{id|userPrincipalName}/mailFolders/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')

获取事件实例:Get an event instance:

GET /me/events/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')
GET /users/{id|userPrincipalName}/events/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')

获取日历实例:Get a calendar instance:

GET /me/calendars/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')
GET /users/{id|userPrincipalName}/calendars/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')

获取联系人实例:Get a contact instance:

GET /me/contacts/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')
GET /users/{id|userPrincipalName}/contacts/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')
GET /me/contactFolders/{id}/contacts/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')
GET /users/{id|userPrincipalName}/contactFolders/{id}/contacts/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')

获取 contactFolder 实例:Get a contactFolder instance:

GET /me/contactfolders/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')
GET /users/{id|userPrincipalName}/contactFolders/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')

获取组事件实例:Get a group event instance:

GET /groups/{id}/events/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')

获取组 post 实例:Get a group post instance:

GET /groups/{id}/threads/{id}/posts/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')
GET /groups/{id}/conversations/{id}/threads/{id}/posts/{id}?$expand=singleValueExtendedProperties($filter=id eq '{id_value}')

获取包括与筛选器匹配的数值扩展属性的资源实例GET resource instances that include numeric extended properties matching a filter

获取支持的资源实例,其中包含与筛选器匹配的数字扩展属性。Get instances of a supported resource that have a numeric extended property matching a filter. 筛选器在 id 属性上使用 eq 运算符,并在 value 属性上使用以下运算符之一:eqnegegtleltThe filter uses an eq operator on the id property, and one of the following operators on the value property: eq, ne,ge, gt, le, or lt. 请务必对筛选器字符串中的以下字符应用 URL 编码:冒号、正斜杠和空格。Make sure you apply URL encoding to the following characters in the filter string - colon, forward slash, and space.

以下语法行显示对 id 使用 eq 运算符的筛选器,对属性值使用另一个 eq 运算符。The following syntax lines show a filter that uses an eq operator on the id, and another eq operator on the property value. 可以使用适用于数值的其他运算符中的任何一个(negegtlelt)替换 value 上的 eq 运算符。You can substitute the eq operator on the value by any one of the other operators (ne,ge, gt, le, or lt) that apply to numeric values.

获取邮件实例:Get message instances:

GET /me/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')
GET /users/{id|userPrincipalName}/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')
GET /me/mailFolders/{id}/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')

获取 mailFolder 实例:Get mailFolder instances:

GET /me/mailFolders?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')
GET /users/{id|userPrincipalName}/mailFolders?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')

获取事件实例:Get event instances:

GET /me/events?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')
GET /users/{id|userPrincipalName}/events?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')

获取日历实例:Get calendar instances:

GET /me/calendars?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')
GET /users/{id|userPrincipalName}/calendars?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')

获取联系人实例:Get contact instances:

GET /me/contacts?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')
GET /users/{id|userPrincipalName}/contacts?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')
GET /me/contactFolders/{id}/contacts?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')
GET /users/{id|userPrincipalName}/contactFolders/{id}/contacts?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')

获取 contactFolder 实例:Get contactFolder instances:

GET /me/contactfolders?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')
GET /users/{id|userPrincipalName}/contactFolders?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')

获取组事件实例:Get group event instances:

GET /groups/{id}/events?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')

获取组 post 实例:Get group post instances:

GET /groups/{id}/threads/{id}/posts?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')
GET /groups/{id}/conversations/{id}/threads/{id}/posts?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')

获取资源实例,其中包括与筛选器匹配的字符串类型的扩展属性GET resource instances with string-typed extended properties matching a filter

获取 messageevent 资源的实例,其中包括与筛选器匹配的字符串类型的扩展属性。Get instances of the message or event resource that have a string-typed extended property matching a filter. 筛选器在 id 属性上使用 eq 运算符,并在 value 属性上使用以下运算符之一:containsstartswitheqneThe filter uses an eq operator on the id property, and one of the following operators on the value property: contains, startswith, eq, or ne. 请务必对筛选器字符串中的以下字符应用 URL 编码:冒号、正斜杠和空格。Make sure you apply URL encoding to the following characters in the filter string - colon, forward slash, and space.

获取 message 实例:Get message instances:

GET /me/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and contains(ep/value, '{property_value}'))
GET /users/{id|userPrincipalName}/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and contains(ep/value, '{property_value}'))
GET /me/mailFolders/{id}/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and contains(ep/value, '{property_value}'))

GET /me/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and startswith(ep/value, '{property_value}'))
GET /users/{id|userPrincipalName}/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and startswith(ep/value, '{property_value}'))
GET /me/mailFolders/{id}/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and startswith(ep/value, '{property_value}'))

GET /me/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')
GET /users/{id|userPrincipalName}/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')
GET /me/mailFolders/{id}/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')

GET /me/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value ne '{property_value}')
GET /users/{id|userPrincipalName}/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value ne '{property_value}')
GET /me/mailFolders/{id}/messages?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value ne '{property_value}')

获取 event 实例:Get event instances:

GET /me/events?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and contains(ep/value, '{property_value}'))
GET /users/{id|userPrincipalName}/events?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and contains(ep/value, '{property_value}'))

GET /me/events?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and startswith(ep/value, '{property_value}'))
GET /users/{id|userPrincipalName}/events?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and startswith(ep/value, '{property_value}'))

GET /me/events?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')
GET /users/{id|userPrincipalName}/events?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')

GET /me/events?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value ne '{property_value}')
GET /users/{id|userPrincipalName}/events?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value ne '{property_value}')

获取组 event 实例:Get group event instances:

GET /groups/{id}/events?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and contains(ep/value, '{property_value}'))
GET /groups/{id}/events?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and startswith(ep/value, '{property_value}'))
GET /groups/{id}/events?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}')
GET /groups/{id}/events?$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value ne '{property_value}')

路径参数Path parameters

参数Parameter 类型Type 说明Description
id_valueid_value 字符串String 要匹配的扩展属性的 ID。它必须遵照其中一种支持的格式。有关详细信息,请参阅 Outlook 扩展属性概述。必需。The ID of the extended property to match. It must follow one of the supported formats. See Outlook extended properties overview for more information. Required.
property_valueproperty_value StringString 要匹配的扩展属性的值。The value of the extended property to match. 如果在上面的 HTTP 请求部分中列出,则为必需参数。Required where listed in the HTTP request section above. 如果 {property_value} 不是字符串,请务必在与 {property_value} 比较时,将 ep/value 显式转换为相应的 Edm 数据类型。If {property_value} is not a string, make sure you explicitly cast ep/value to the appropriate Edm data type when comparing it with {property_value}. 有关示例,请参阅下面的请求 4See request 4 below for examples.

请求头Request headers

名称Name 说明Description
AuthorizationAuthorization Bearer {token}。必需。Bearer {token}. Required.

请求正文Request body

请勿提供此方法的请求正文。Do not supply a request body for this method.

响应Response

如果成功,此方法返回 200 OK 响应代码。If successful, this method returns a 200 OK response code.

获取通过匹配的扩展属性扩展的资源实例GET resource instance expanded with a matching extended property

响应正文包括通过匹配的 singleValueLegacyExtendedProperty 对象扩展的对象,此对象表示请求的资源实例。The response body includes an object representing the requested resource instance, expanded with the matching singleValueLegacyExtendedProperty object.

获取包含与筛选器匹配的扩展属性的资源实例GET resource instances that contain an extended property matching a filter

响应主体包含一个或多个对象,它们表示包含匹配的扩展属性的资源实例。The response body includes one or more objects representing the resource instances that contain a matching extended property. 响应正文不包含扩展属性。The response body does not include the extended property.

示例Example

请求 1Request 1

第一个示例通过包含一个单值扩展属性获取并展开指定的邮件。此筛选器返回其 idString {66f5a359-4659-4830-9070-00047ec6ac6e} Name Color 字符串(包含 URL 编码,此处为了便于阅读,已将其删除)匹配的扩展属性。The first example gets and expands the specified message by including a single-value extended property. The filter returns the extended property that has its id matching the string String {66f5a359-4659-4830-9070-00047ec6ac6e} Name Color (with URL encoding removed here for ease of reading).

GET https://graph.microsoft.com/v1.0/me/messages/AAMkAGE1M2_bs88AACHsLqWAAA=?$expand=singleValueExtendedProperties($filter=id%20eq%20'String%20{66f5a359-4659-4830-9070-00047ec6ac6e}%20Name%20Color')

响应 1Response 1

响应正文包括指定邮件的所有属性以及此筛选器返回的扩展属性。The response body includes all the properties of the specified message and extended property returned from the filter.

注意:为了简单起见,会将此处所示的邮件对象截断。将从实际调用中返回所有属性。Note: The message object shown here is truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Me/messages/$entity",
    "@odata.id": "https://graph.microsoft.com/v1.0/users('ddfcd489-628b-40d7-b48b-57002df800e5@1717622f-1d94-4d0c-9d74-709fad664b77')/messages('AAMkAGE1M2_bs88AACHsLqWAAA=')",
    "@odata.etag": "W/\"CQAAABYAAACY4MQpaFz9SbqUDe4+bs88AACbyS4H\"",
    "id": "AAMkAGE1M2_bs88AACHsLqWAAA=",
    "subject": "RE: Talk about emergency prep",
    "sender": {
        "emailAddress": {
            "name": "Christine Irwin",
            "address": "christine@contoso.com"
        }
    },
    "from": null,
    "toRecipients": [
        {
            "emailAddress": {
                "name": "Christine Irwin",
                "address": "christine@contoso.com"
            }
        }
    ],
    "singleValueExtendedProperties@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Me/messages('AAMkAGE1M2_bs88AACHsLqWAAA%3D')/singleValueExtendedProperties",
    "singleValueExtendedProperties": [
        {
            "id": "String {66f5a359-4659-4830-9070-00047ec6ac6e} Name Color",
            "value": "Green"
        }
    ]
}

请求 2Request 2

第二个示例展示了如何获取具有筛选器中指定的字符串类型单值扩展属性的邮件。The second example gets messages that have the string-typed single-value extended property specified in the filter. 此筛选器查找如下扩展属性:The filter looks for the extended property that has:

  • 它的 id 等同于字符串 String {66f5a359-4659-4830-9070-00047ec6ac6e} Name Color(包含 URL 编码,但此处为了方便阅读,已将其删除)。Its id equal to the string String {66f5a359-4659-4830-9070-00047ec6ac6e} Name Color (with URL encoding removed here for ease of reading).

  • 它的 value 等于字符串 GreenIts value equal to the string Green.

GET https://graph.microsoft.com/v1.0/me/messages?$filter=singleValueExtendedProperties%2FAny(ep%3A%20ep%2Fid%20eq%20'String%20{66f5a359-4659-4830-9070-00047ec6ac6e}%20Name%20Color'%20and%20ep%2Fvalue%20eq%20'Green')

响应 2Response 2

成功的响应将由 HTTP 200 OK 响应代码表示,响应正文包括其扩展属性与筛选器匹配的邮件的所有属性。响应正文是类似于获取邮件集合中的响应。该响应不包括匹配的扩展属性。A successful response is indicated by an HTTP 200 OK response code, and the response body includes all the properties of the messages that have the extended property matching the filter. The response body is similar to the response from getting a message collection. The response does not include the matching extended property.

请求 3Request 3

第三个示例展示了如何获取具有筛选器中指定的字符串类型单值扩展属性的邮件。The third example gets messages that have the string-typed single-value extended property specified in the filter. 此筛选器查找如下扩展属性:The filter looks for the extended property that has:

  • 它的 id 等同于字符串 String {66f5a359-4659-4830-9070-00047ec6ac6e} Name Color(包含 URL 编码,但此处为了方便阅读,已将其删除)。Its id equal to the string String {66f5a359-4659-4830-9070-00047ec6ac6e} Name Color (with URL encoding removed here for ease of reading).

  • 它的 value 包含字符串 greenIts value containing the string green.

GET https://graph.microsoft.com/v1.0/Me/messages?$filter=singleValueExtendedProperties/any(ep:ep/Id eq 'String {66f5a359-4659-4830-9070-00047ec6ac6e} Name Color' and contains(ep/Value, 'green'))

响应 3Response 3

成功的响应将由 HTTP 200 OK 响应代码表示,响应正文包括其扩展属性与筛选器匹配的邮件的所有属性。A successful response is indicated by an HTTP 200 OK response code, and the response body includes all the properties of the messages that have the extended property matching the filter. 例如,如果邮件包含 id 等于字符串 String {66f5a359-4659-4830-9070-00047ec6ac6e} Name Color 的单值扩展属性和 value Light green,则会与筛选器匹配并包含在响应中。For example, a message that has a single-value extended property with the id equal to the string String {66f5a359-4659-4830-9070-00047ec6ac6e} Name Color, and the value Light green, would match the filter and be included in the response.

响应正文类似于获取邮件集合中的响应。The response body is similar to the response from getting a message collection. 响应中不包含匹配的扩展属性。The response does not include the matching extended property.

请求 4Request 4

接下来的两个示例展示了如何获取具有非字符串类型单值扩展属性的邮件。The next 2 examples show how to get messages that have non-string typed single-value extended properties. 为了方便阅读,从中删除了必要的 URL 编码。For ease of reading, they do not include the necessary URL encoding.

下面的示例展示了查找以下扩展属性的筛选器:The following example shows a filter that looks for the extended property that has:

  • 它的 id 与字符串 CLSID {00062008-0000-0000-C000-000000000046} Name ConnectorSenderGuid 匹配。Its id matching the string CLSID {00062008-0000-0000-C000-000000000046} Name ConnectorSenderGuid.

  • 它的 value 是 GUID b9cf8971-7d55-4b73-9ffa-a584611b600bIts value being the GUID b9cf8971-7d55-4b73-9ffa-a584611b600b. 若要将属性值与 GUID 比较,请将 ep/value 转换为 Edm.GuidTo compare the property value with a GUID, cast ep/value to Edm.Guid.

GET https://graph.microsoft.com/v1.0/me/messages?$filter=singleValueExtendedProperties/any(ep:ep/id eq 'CLSID {00062008-0000-0000-C000-000000000046} Name ConnectorSenderGuid' and cast(ep/value, Edm.Guid) eq (b9cf8971-7d55-4b73-9ffa-a584611b600b))

接下来的示例展示了查找以下扩展属性的筛选器:The next example shows a filter that looks for the extended property that has:

  • 它的 id 与字符串 Integer {66f5a359-4659-4830-9070-00047ec6ac6e} Name Pallete 匹配。Its id matching the string Integer {66f5a359-4659-4830-9070-00047ec6ac6e} Name Pallete.

  • 它的 value 等于整数 12。Its value equal to the integer 12. 若要将属性值与整数比较,请将 ep/value 转换为 Edm.Int32To compare the property value with an integer, cast ep/value to Edm.Int32.

GET https://graph.microsoft.com/v1.0/me/messages?$filter=singleValueExtendedProperties/any(ep:ep/id eq 'Integer {66f5a359-4659-4830-9070-00047ec6ac6e} Name Pallete' and cast(ep/value, Edm.Int32) eq 12)

响应 4Response 4

对于前面两个示例中的任意一个,成功响应由 HTTP 200 OK 响应代码表示,响应正文包括扩展属性与相应筛选器匹配的邮件的所有属性。For each of the preceding 2 examples, a successful response is indicated by an HTTP 200 OK response code, and the response body includes all the properties of the messages that have the extended property matching the corresponding filter. 响应正文类似于获取邮件集合中的响应。The response body is similar to the response from getting a message collection. 响应中不包含匹配的扩展属性。The response does not include the matching extended property.