Skip to content

Commit ed9e0ba

Browse files
authored
Merge pull request #26180 from microsoftgraph/users/sumanac/allmembersv1
Publish allMembers api to v1.0
2 parents 61f4f5e + 82e436f commit ed9e0ba

File tree

9 files changed

+293
-43
lines changed

9 files changed

+293
-43
lines changed

api-reference/beta/api/channel-list-allmembers.md

Lines changed: 60 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "List allMembers"
3-
description: "List all members in a team channel."
3+
description: "Get a list of all members in a channel."
44
author: "sumitgupta"
55
ms.localizationpriority: high
66
ms.subservice: "teams"
@@ -14,27 +14,29 @@ Namespace: microsoft.graph
1414

1515
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]
1616

17-
Retrieve a list of [conversationMember](../resources/conversation member.md) objects from a team [channel](../resources/channel.md). It supports all types of channels. In the case of shared channels, it includes all cross-tenant and cross-team members in a channel.
17+
Get a list of all [members](../resources/conversationmember.md) in a [channel](../resources/channel.md). It supports all types of channels. In the case of shared channels, it includes all cross-tenant and cross-team members in a channel.
1818

1919
> [!NOTE]
20-
> 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.
21-
> In the future, membership results could be mapped to users from different tenants, as indicated in the response. The client should not assume that all members are from the current tenant.
22-
> [!NOTE]
23-
> Currently, pagination is not supported, a maximum of 999 members can be returned in the response. If there are more than 999 members in a channel, the API only fetches the first 999 members.
20+
> The membership IDs returned by the server must be treated as opaque strings. Users shouldn't try to parse or make any assumptions about these resource IDs.
21+
22+
[!INCLUDE [national-cloud-support](../../includes/all-clouds.md)]
2423

2524
## Permissions
2625

27-
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see [Permissions](/graph/permissions-reference).
26+
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](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference).
27+
28+
<!-- { "blockType": "permissions", "name": "channel-list-allmembers" } -->
29+
[!INCLUDE [permissions-table](../includes/permissions/channel-list-allmembers-permissions.md)]
2830

29-
|Permission type | Least privileged permissions | Higher privileged permissions |
30-
|:--------------------|:---------------------------------------------------------|:---------------------------------------------------------|
31-
|Delegated (work or school account) | Group.Read.All | ChannelMember.ReadWrite.All, ChannelMember.Read.AllChannelMember.Read.All |
32-
|Delegated (personal Microsoft account) | Not supported | Not supported |
33-
|Application | ChannelMember.Read.All | ChannelMember.ReadWrite.All |
31+
> [!NOTE]
32+
> The `ChannelMember.Read.Group` and `ChannelMember.ReadWrite.Group` permissions use [resource-specific consent](/microsoftteams/platform/graph-api/rsc/resource-specific-consent). Currently, these permissions don't work for shared channels.
3433
3534
## HTTP request
3635

3736
<!-- { "blockType" : "ignored" } -->
37+
```http
38+
GET /teams/{team-id}/channels/{channel-id}/allMembers
39+
```
3840

3941
### Optional query parameters
4042

@@ -52,7 +54,7 @@ Don't supply a request body for this method.
5254

5355
## Response
5456

55-
If successful, this method returns a `200 OK` response code and a list of [conversationMember](../resources/conversationmember.md) objects in the response body.
57+
If successful, this method returns a `200 OK` response code and a collection of [conversationMember](../resources/conversationmember.md) objects in the response body.
5658

5759
## Examples
5860

@@ -108,40 +110,57 @@ The following example shows the response.
108110
<!-- {
109111
"blockType": "response",
110112
"truncated": true,
111-
"@odata.type": "microsoft.graph.conversationMember"
113+
"@odata.type": "Collection(microsoft.graph.conversationMember)"
112114
} -->
113115

114116
```http
115117
HTTP/1.1 200 OK
116118
Content-type: application/json
117119
118120
{
119-
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#teams('2ab9c796-2902-45f8-b712-7c5a63cf41c4')/channels('19%3A20bc1df46b1148e9b22539b83bc66809%40thread.skype')/allMembers",
120-
"@odata.count": 2,
121-
"value": [
122-
{
123-
"@odata.type": "#microsoft.graph.aadUserConversationMember",
124-
"id": "MmFiOWM3OTYtMjkwMi00NWY4LWI3MTItN2M1YTYzY2Y0MWM0IyNlZWY5Y2IzNi0wNmRlLTQ2OWItODdjZC03MGY0Y2JlMzJkMTQ=",
125-
"roles": [
126-
"Member"
127-
],
128-
"displayName": "Caleb Foster",
129-
"userId": "eef9cb36-06de-469b-87cd-70f4cbe32d14",
130-
"email": "calfos@contoso.com",
131-
"tenantId": "ar8133445-c7e2-418a-8803-0e68d4b88607"
132-
},
133-
{
134-
"@odata.type": "#microsoft.graph.aadUserConversationMember",
135-
"id": "MmFiOWM3OTYtMjkwMi00NWY4LWI3MTItN2M1YTYzY2Y0MWM0IyNiMzI0NmY0NC1jMDkxLTQ2MjctOTZjNi0yNWIxOGZhMmM5MTA=",
136-
"roles": [
137-
"Owner"
138-
],
139-
"displayName": "Eric Solomon",
140-
"userId": "b3246f44-c091-4627-96c6-25b18fa2c910",
141-
"email": "ericsol@contoso.com",
142-
"tenantId": "df81db53-c7e2-418a-8803-0e68d4b88607"
143-
}
144-
]
121+
"@odata.context": "https://graph.microsoft.com/beta/$metadata#teams('2ab9c796-2902-45f8-b712-7c5a63cf41c4')/channels('19%3A20bc1df46b1148e9b22539b83bc66809%40thread.skype')/allMembers",
122+
"@odata.count": 2,
123+
"value": [
124+
{
125+
"@odata.type": "#microsoft.graph.aadUserConversationMember",
126+
"id": "MmFiOWM3OTYtMjkwMi00NWY4LWI3MTItN2M1YTYzY2Y0MWM0IyNlZWY5Y2IzNi0wNmRlLTQ2OWItODdjZC03MGY0Y2JlMzJkMTQ=",
127+
"roles": [
128+
"Member"
129+
],
130+
"displayName": "Caleb Foster",
131+
"userId": "eef9cb36-06de-469b-87cd-70f4cbe32d14",
132+
"email": "calfos@contoso.com",
133+
"tenantId": "ar8133445-c7e2-418a-8803-0e68d4b88607"
134+
},
135+
{
136+
"@odata.type": "#microsoft.graph.aadUserConversationMember",
137+
"id": "MmFiOWM3OTYtMjkwMi00NWY4LWI3MTItN2M1YTYzY2Y0MWM0IyNiMzI0NmY0NC1jMDkxLTQ2MjctOTZjNi0yNWIxOGZhMmM5MTA=",
138+
"roles": [
139+
"Owner"
140+
],
141+
"displayName": "Eric Solomon",
142+
"userId": "b3246f44-c091-4627-96c6-25b18fa2c910",
143+
"email": "ericsol@contoso.com",
144+
"tenantId": "df81db53-c7e2-418a-8803-0e68d4b88607"
145+
}
146+
]
145147
}
146-
147148
```
149+
150+
## Related content
151+
152+
[List the members of a team](team-list-members.md).
153+
154+
<!-- uuid: 8fcb5dbc-d5aa-4681-8e31-b001d5168d79
155+
2015-10-25 14:57:30 UTC -->
156+
<!--
157+
{
158+
"type": "#page.annotation",
159+
"description": "channel member list",
160+
"keywords": "",
161+
"section": "documentation",
162+
"tocPath": "",
163+
"suppressions": [
164+
]
165+
}
166+
-->
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
description: "Automatically generated file. DO NOT MODIFY"
3+
ms.topic: include
4+
ms.localizationpriority: medium
5+
---
6+
7+
|Permission type|Least privileged permissions|Higher privileged permissions|
8+
|:---|:---|:---|
9+
|Delegated (work or school account) | ChannelMember.Read.All | ChannelMember.ReadWrite.All |
10+
|Delegated (personal Microsoft account) | Not supported. | Not supported. |
11+
|Application | ChannelMember.Read.Group | ChannelMember.ReadWrite.Group, ChannelMember.Read.All, ChannelMember.ReadWrite.All |

api-reference/beta/resources/channel.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ where files are shared, and where tabs are added.
3737
|[Get files folder](../api/channel-get-filesfolder.md)| [driveItem](driveitem.md) | Retrieves the details of the SharePoint folder where the files for the channel are stored. |
3838
|[List tabs](../api/channel-list-tabs.md) | [teamsTab](teamstab.md) | Lists tabs pinned to a channel.|
3939
|[List channel members](../api/channel-list-members.md) | [conversationMember](conversationmember.md) collection | Get the list of members in a channel.|
40-
|[List all members](../api/channel-list-allmembers.md) | [conversationMember](conversationmember.md) collection | Get a list of conversationMember objects from a team channel.|
40+
|[List all members](../api/channel-list-allmembers.md) | [conversationMember](conversationmember.md) collection | Get a list of all [members](../resources/conversationmember.md) in a [channel](../resources/channel.md). |
4141
|[Add channel member](../api/channel-post-members.md) | [conversationMember](conversationmember.md) | Add a member to a channel. Only supported for channels with a **membershipType** of `private` or `shared`.|
4242
|[Get channel member](../api/channel-get-members.md) | [conversationMember](conversationmember.md) collection | Get a member in a channel.|
4343
|[Archive channel](../api/channel-archive.md) | None | Archive a channel.|
@@ -106,7 +106,7 @@ For a POST request example, see [Request (create channel in migration state)](/m
106106
|allMembers|[conversationMember](conversationmember.md) collection |A collection of membership records associated with the channel. It includes both direct and indirect members of shared channels.|
107107
|[filesFolder](../api/channel-get-filesfolder.md)|[driveItem](driveitem.md)|Metadata for the location where the channel's files are stored.|
108108
|members|[conversationMember](conversationmember.md) collection|A collection of membership records associated with the channel.|
109-
|messages|[chatMessage](chatmessage.md) collection|A collection of all the messages in the channel. Nullable.|
109+
|messages|[chatMessage](chatmessage.md) collection| A collection of all the messages in the channel. Nullable.|
110110
|operations|[teamsAsyncOperation](teamsasyncoperation.md) collection| The async operations that ran or are running on this team. |
111111
|planner|[teamsChannelPlanner](teamschannelplanner.md) | Selective Planner services available to this channel. Currently, only shared channels are supported. Read-only. Nullable. |
112112
|sharedWithTeams|[sharedWithChannelTeamInfo](../resources/sharedwithchannelteaminfo.md) collection|A collection of teams with which a channel is shared.|
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
title: "List allMembers"
3+
description: "Get a list of all members in a channel."
4+
author: "sumanac"
5+
ms.localizationpriority: high
6+
ms.subservice: "teams"
7+
doc_type: apiPageType
8+
ms.date: 01/29/2025
9+
---
10+
11+
# List allMembers
12+
13+
Namespace: microsoft.graph
14+
15+
Get a list of all [members](../resources/conversationmember.md) in a [channel](../resources/channel.md). It supports all types of channels. In the case of shared channels, it includes all cross-tenant and cross-team members in a channel.
16+
17+
> [!NOTE]
18+
> The membership IDs returned by the server must be treated as opaque strings. Users shouldn't try to parse or make any assumptions about these resource IDs.
19+
20+
[!INCLUDE [national-cloud-support](../../includes/all-clouds.md)]
21+
22+
## Permissions
23+
24+
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](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference).
25+
26+
<!-- { "blockType": "permissions", "name": "channel-list-allmembers" } -->
27+
[!INCLUDE [permissions-table](../includes/permissions/channel-list-allmembers-permissions.md)]
28+
29+
> [!NOTE]
30+
> The `ChannelMember.Read.Group` and `ChannelMember.ReadWrite.Group` permissions use [resource-specific consent](/microsoftteams/platform/graph-api/rsc/resource-specific-consent). Currently, these permissions don't work for shared channels.
31+
32+
## HTTP request
33+
34+
<!-- { "blockType" : "ignored" } -->
35+
```http
36+
GET /teams/{team-id}/channels/{channel-id}/allMembers
37+
```
38+
39+
### Optional query parameters
40+
41+
This method supports the `$filter` and `$select` [OData query parameters](/graph/query-parameters) to help customize the response.
42+
43+
## Request headers
44+
45+
| Header | Value |
46+
|:---------------|:--------|
47+
|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).|
48+
49+
## Request body
50+
51+
Don't supply a request body for this method.
52+
53+
## Response
54+
55+
If successful, this method returns a `200 OK` response code and a collection of [conversationMember](../resources/conversationmember.md) objects in the response body.
56+
57+
## Examples
58+
59+
### Request
60+
61+
The following example shows a request.
62+
63+
<!-- {
64+
"blockType": "request",
65+
"name": "channel-list-allMembers",
66+
"sampleKeys": ["2ab9c796-2902-45f8-b712-7c5a63cf41c4", "19%3A20bc1df46b1148e9b22539b83bc66809%40thread.skype"]
67+
} -->
68+
```msgraph-interactive
69+
GET https://graph.microsoft.com/v1.0/teams/2ab9c796-2902-45f8-b712-7c5a63cf41c4/channels/19%3A20bc1df46b1148e9b22539b83bc66809%40thread.skype/allMembers
70+
```
71+
72+
### Response
73+
74+
The following example shows the response.
75+
76+
>**Note:** The response object shown here might be shortened for readability.
77+
<!-- {
78+
"blockType": "response",
79+
"truncated": true,
80+
"@odata.type": "Collection(microsoft.graph.conversationMember)"
81+
} -->
82+
83+
```http
84+
HTTP/1.1 200 OK
85+
Content-type: application/json
86+
87+
{
88+
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#teams('2ab9c796-2902-45f8-b712-7c5a63cf41c4')/channels('19%3A20bc1df46b1148e9b22539b83bc66809%40thread.skype')/allMembers",
89+
"@odata.count": 2,
90+
"value": [
91+
{
92+
"@odata.type": "#microsoft.graph.aadUserConversationMember",
93+
"id": "MmFiOWM3OTYtMjkwMi00NWY4LWI3MTItN2M1YTYzY2Y0MWM0IyNlZWY5Y2IzNi0wNmRlLTQ2OWItODdjZC03MGY0Y2JlMzJkMTQ=",
94+
"roles": [
95+
"Member"
96+
],
97+
"displayName": "Caleb Foster",
98+
"userId": "eef9cb36-06de-469b-87cd-70f4cbe32d14",
99+
"email": "calfos@contoso.com",
100+
"tenantId": "ar8133445-c7e2-418a-8803-0e68d4b88607"
101+
},
102+
{
103+
"@odata.type": "#microsoft.graph.aadUserConversationMember",
104+
"id": "MmFiOWM3OTYtMjkwMi00NWY4LWI3MTItN2M1YTYzY2Y0MWM0IyNiMzI0NmY0NC1jMDkxLTQ2MjctOTZjNi0yNWIxOGZhMmM5MTA=",
105+
"roles": [
106+
"Owner"
107+
],
108+
"displayName": "Eric Solomon",
109+
"userId": "b3246f44-c091-4627-96c6-25b18fa2c910",
110+
"email": "ericsol@contoso.com",
111+
"tenantId": "df81db53-c7e2-418a-8803-0e68d4b88607"
112+
}
113+
]
114+
}
115+
```
116+
117+
## Related content
118+
119+
[List the members of a team](team-list-members.md).
120+
121+
<!-- uuid: 8fcb5dbc-d5aa-4681-8e31-b001d5168d79
122+
2015-10-25 14:57:30 UTC -->
123+
<!--
124+
{
125+
"type": "#page.annotation",
126+
"description": "channel member list",
127+
"keywords": "",
128+
"section": "documentation",
129+
"tocPath": "",
130+
"suppressions": [
131+
]
132+
}
133+
-->
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
description: "Automatically generated file. DO NOT MODIFY"
3+
ms.topic: include
4+
ms.localizationpriority: medium
5+
---
6+
7+
|Permission type|Least privileged permissions|Higher privileged permissions|
8+
|:---|:---|:---|
9+
|Delegated (work or school account) | ChannelMember.Read.All | ChannelMember.ReadWrite.All |
10+
|Delegated (personal Microsoft account) | Not supported. | Not supported. |
11+
|Application | ChannelMember.Read.Group | ChannelMember.ReadWrite.Group, ChannelMember.Read.All, ChannelMember.ReadWrite.All |

api-reference/v1.0/resources/channel.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ where files are shared, and where tabs are added.
3535
|[Get files folder](../api/channel-get-filesfolder.md)| [driveItem](driveitem.md) | Retrieves the details of the SharePoint folder where the files for the channel are stored. |
3636
|[List tabs](../api/channel-list-tabs.md) | [teamsTab](teamstab.md) | Lists tabs pinned to a channel.|
3737
|[List channel members](../api/channel-list-members.md) | [conversationMember](conversationmember.md) collection | Get the list of members in a channel.|
38+
|[List all members](../api/channel-list-allmembers.md) | [conversationMember](conversationmember.md) collection | Get a list of all [members](../resources/conversationmember.md) in a [channel](../resources/channel.md). |
3839
|[Add channel member](../api/channel-post-members.md) | [conversationMember](conversationmember.md) | Add a member to a channel. Only supported for channels with a **membershipType** of `private` or `shared`.|
3940
|[Get channel member](../api/channel-get-members.md) | [conversationMember](conversationmember.md) collection | Get a member in a channel.|
4041
|[Archive channel](../api/channel-archive.md) | None | Archive a channel in a team.|
@@ -98,6 +99,7 @@ For a POST request example, see [Request (create channel in migration state)](/m
9899

99100
| Relationship | Type |Description|
100101
|:---------------|:--------|:----------|
102+
|allMembers|[conversationMember](conversationmember.md) collection |A collection of membership records associated with the channel, including both direct and indirect members of shared channels.|
101103
|[filesFolder](../api/channel-get-filesfolder.md)|[driveItem](driveitem.md)|Metadata for the location where the channel's files are stored.|
102104
|members|[conversationMember](conversationmember.md) collection|A collection of membership records associated with the channel.|
103105
|messages|[chatMessage](chatmessage.md) collection|A collection of all the messages in the channel. A navigation property. Nullable.|

api-reference/v1.0/toc/teamwork-and-communications/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,8 @@ items:
513513
href: ../../api/channel-list-tabs.md
514514
- name: List channel members
515515
href: ../../api/channel-list-members.md
516+
- name: List all members
517+
href: ../../api/channel-list-allmembers.md
516518
- name: Add channel member
517519
href: ../../api/channel-post-members.md
518520
- name: Get channel member

0 commit comments

Comments
 (0)