Bewerken

Delen via


Get conversationMember in a chat

Namespace: microsoft.graph

Retrieve a conversationMember from a chat.

Note

The membership IDs returned by the server must be treated as opaque strings. The client should not try to parse or make any assumptions about these resource IDs.

The membership results could map to users from different tenants, as indicated in the response, in the future. The client should not assume that all members are from the current tenant only.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) Chat.ReadBasic ChatMember.ReadWrite, ChannelMember.Read.All, ChannelMember.ReadWrite, Chat.Read, Chat.ReadWrite, ChatMember.Read
Delegated (personal Microsoft account) Not supported. Not supported.
Application ChatMember.Read.All ChatMember.ReadWrite.All, ChannelMember.Read.All, ChannelMember.ReadWrite.All, Chat.Manage.Chat, Chat.Read.All, Chat.ReadBasic.All, Chat.ReadWrite.All, ChatMember.Read.Chat, TeamMember.Read.Group

Note: Permissions marked with * use resource-specific consent.

HTTP request

GET /chats/{chat-id}/members/{membership-id}
GET /users/{user-id | user-principal-name}/chats/{chat-id}/members/{membership-id}

Optional query parameters

This operation does not support the OData query parameters to customize the response.

Request headers

Header Value
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a conversationMember object in the response body.

Example

Request

The following example shows a request.

GET https://graph.microsoft.com/v1.0/chats/19:d0f51aeb0e8e43d0befb24be72b09ea7@thread.v2/members/MCMjMCMjMGY4MWIxZWEtYjg1Ny00YTljLTk5ZWItZTk5OGQ1MjA0NmQ1IyMxOTpkMGY1MWFlYjBlOGU0M2QwYmVmYjI0YmU3MmIwOWVhN0B0aHJlYWQudjIjIzhjMGMwYTJhLWM2NzktNDAxZS1hZGMzLWE0NWI1NDg4ODlhNg==

Response

The following example shows the response.

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

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#chats('19%3Ad0f51aeb0e8e43d0befb24be72b09ea7%40thread.v2')/members/$entity",
    "@odata.type": "#microsoft.graph.aadUserConversationMember",
    "id": "MCMjMCMjMGY4MWIxZWEtYjg1Ny00YTljLTk5ZWItZTk5OGQ1MjA0NmQ1IyMxOTpkMGY1MWFlYjBlOGU0M2QwYmVmYjI0YmU3MmIwOWVhN0B0aHJlYWQudjIjIzhjMGMwYTJhLWM2NzktNDAxZS1hZGMzLWE0NWI1NDg4ODlhNg==",
    "roles": [
        "owner"
    ],
    "displayName": "Niklas Lang",
    "visibleHistoryStartDateTime": "2022-05-02T12:49:36.881Z",
    "userId": "8c0c0a2a-c679-401e-adc3-a45b548889a6",
    "email": "Niklas.Lang@contoso.com",
    "tenantId": "0f81b1ea-b857-4a9c-99eb-e998d52046d5"
}