title | description | author | ms.localizationpriority | ms.subservice | doc_type |
---|---|---|---|---|---|
List members of a chat |
Retrieve members of a chat. |
anandjo |
high |
teams |
apiPageType |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
List all conversation members in a chat.
This method supports federation. For one-on-one chats, at least one chat member must belong to the tenant the request initiates from. For group chats, the chat must be initiated by a user in the tenant the request initiates from.
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.
[!INCLUDE national-cloud-support]
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.
[!INCLUDE permissions-table]
Note
The ChatMember.Read.Chat and Chat.Manage.Chat permissions use resource-specific consent.
GET /chats/{chat-id}/members
GET /users/{user-id | user-principal-name}/chats/{chat-id}/members
This operation doesn't support the OData query parameters to customize the response.
Header | Value |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Don't supply a request body for this method.
If successful, this method returns a 200 OK
response code and a list of conversationMember objects in the response body.
The following example shows a request.
GET https://graph.microsoft.com/beta/me/chats/19:8b081ef6-4792-4def-b2c9-c363a1bf41d5_5031bb31-22c0-4f6f-9f73-91d34ab2b32d@unq.gbl.spaces/members
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context":"https://graph.microsoft.com/beta/$metadata#users('8b081ef6-4792-4def-b2c9-c363a1bf41d5')/chats('19%3A8b081ef6-4792-4def-b2c9-c363a1bf41d5_5031bb31-22c0-4f6f-9f73-91d34ab2b32d%40unq.gbl.spaces')/members",
"@odata.count":3,
"value":[
{
"@odata.type":"#microsoft.graph.aadUserConversationMember",
"id":"8b081ef6-4792-4def-b2c9-c363a1bf41d5",
"roles":[
"owner"
],
"displayName":"John Doe",
"userId":"8b081ef6-4792-4def-b2c9-c363a1bf41d5",
"email":null,
"tenantId":"6e5147da-6a35-4275-b3f3-fc069456b6eb",
"visibleHistoryStartDateTime":"2019-04-18T23:51:43.255Z"
},
{
"@odata.type":"#microsoft.graph.aadUserConversationMember",
"id":"2de87aaf-844d-4def-9dee-2c317f0be1b3",
"roles":[
"owner"
],
"displayName":"Bart Hogan",
"userId":"2de87aaf-844d-4def-9dee-2c317f0be1b3",
"email":null,
"tenantId":"6e5147da-6a35-4275-b3f3-fc069456b6eb",
"visibleHistoryStartDateTime":"0001-01-01T00:00:00Z"
},
{
"@odata.type":"#microsoft.graph.aadUserConversationMember",
"id":"07ad17ad-ada5-4f1f-a650-7a963886a8a7",
"roles":[
"owner"
],
"displayName":"Minna Pham",
"userId":"07ad17ad-ada5-4f1f-a650-7a963886a8a7",
"email":null,
"tenantId":"6e5147da-6a35-4275-b3f3-fc069456b6eb",
"visibleHistoryStartDateTime":"2019-04-18T23:51:43.255Z"
}
]
}