获取 multiValueLegacyExtendedPropertyGet multiValueLegacyExtendedProperty

使用 $expand 获取包含多值扩展属性的资源实例。Get a resource instance that contains a multi-value extended property by using $expand.

使用查询参数 $expand,可以获取使用指明的扩展属性扩展的指定实例。Using the query parameter $expand allows you to get the specified instance expanded with the indicated extended property. 这是当前获取 multiValueLegacyExtendedProperty 对象(表示扩展属性)的唯一方式。This is currently the only way to get the multiValueLegacyExtendedProperty object that represents an extended property.

支持以下用户资源: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
calendarcalendar 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

获取通过与 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=multiValueExtendedProperties($filter=id eq '{id_value}')
GET /users/{id|userPrincipalName}/messages/{id}?$expand=multiValueExtendedProperties($filter=id eq '{id_value}')
GET /me/mailFolders/{id}/messages/{id}?$expand=multiValueExtendedProperties($filter=id eq '{id_value}')

获取 mailFolder 实例:Get a mailFolder instance:

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

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

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

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

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

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

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

获取 contactFolder 实例:Get a contactFolder instance:

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

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

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

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

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

路径参数Path parameters

参数Parameter 类型Type 说明Description
id_valueid_value StringString 要匹配的扩展属性的 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.

请求标头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.

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

示例Example

请求Request

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

GET https://graph.microsoft.com/v1.0/me/events('AAMkAGE1M2_bs88AACbuFiiAAA=')?$expand=multiValueExtendedProperties($filter=id%20eq%20'StringArray%20{66f5a359-4659-4830-9070-00050ec6ac6e}%20Name%20Recreation')
响应Response

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

注意:为了简单起见,会将此处所示的 event 对象截断。将从实际调用中返回所有属性。Note: The event 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/events/$entity",
    "@odata.id": "https://graph.microsoft.com/v1.0/users('ddfcd489-628b-40d7-b48b-57002df800e5@1717622f-1d94-4d0c-9d74-709fad664b77')/events('AAMkAGE1M2_bs88AACbuFiiAAA=')",
    "@odata.etag": "W/\"mODEKWhc/Um6lA3uPm7PPAAAm8k15A==\"",
    "id": "AAMkAGE1M2_bs88AACbuFiiAAA=",
    "start": {
        "dateTime": "2015-11-26T17:00:00.0000000",
        "timeZone": "UTC"
    },
    "end": {
        "dateTime": "2015-11-30T05:00:00.0000000",
        "timeZone": "UTC"
    },
    "organizer": {
        "emailAddress": {
            "name": "Christine Irwin",
            "address": "christine@contoso.com"
        }
    },
    "multiValueExtendedProperties@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Me/events('AAMkAGE1M2_bs88AACbuFiiAAA%3D')/multiValueExtendedProperties",
    "multiValueExtendedProperties": [
        {
            "id": "StringArray {66f5a359-4659-4830-9070-00050ec6ac6e} Name Recreation",
            "value": [
                "Food",
                "Hiking",
                "Swimming"
            ]
        }
    ]
}