| title | List allChannels |
|---|---|
| description | Get the list of channels either in this team or shared with this team (incoming channels). |
| author | devjha-ms |
| doc_type | apiPageType |
| ms.localizationpriority | high |
| ms.subservice | teams |
| ms.date | 09/16/2024 |
Namespace: microsoft.graph
Get the list of channels either in this team or shared with this team (incoming channels).
[!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: This API supports admin permissions. Microsoft Teams service admins can access teams that they are not a member of.
GET /teams/{team-id}/allChannelsThis method supports the $filter and $select OData query parameters to help customize the response.
Populating the email and moderationSettings properties for a channel is an expensive operation that results in slow performance. Use $select to exclude the email and moderationSettings properties to improve performance.
| Name | Description |
|---|---|
| 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 collection of channel objects in the response body. The response also includes the @odata.id property which can be used to access the channel and run other operations on the channel object.
Note
Currently, invoking the URL returned from the @odata.id property fails for cross-tenant shared channels. You can solve this issue if you remove the /tenants/{tenant-id} part from the URL before you call this API. For more information, see Known issues with Microsoft Graph.
The following example shows a request.
GET https://graph.microsoft.com/v1.0/teams/893075dd-2487-4122-925f-022c42e20265/allChannels
[!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
{
"value": [
{
"@odata.id": "https://graph.microsoft.com/v1.0/tenants/b3246f44-b4gb-4627-96c6-25b18fa2c910/teams/893075dd-2487-4122-925f-022c42e20265/channels/19:561fbdbbfca848a484f0a6f00ce9dbbd@thread.tacv2",
"id": "19:561fbdbbfca848a484f0a6f00ce9dbbd@thread.tacv2",
"createdDateTime": "2020-05-27T19:22:25.692Z",
"displayName": "General",
"description": "AutoTestTeam_20210311_150740.2550_fim3udfdjen9",
"membershipType": "standard",
"tenantId": "b3246f44-b4gb-4627-96c6-25b18fa2c910",
"isArchived": false
},
{
"@odata.id": "https://graph.microsoft.com/v1.0/tenants/b3246f44-b4gb-5678-96c6-25b18fa2c910/teams/893075dd-5678-5634-925f-022c42e20265/channels/19:561fbdbbfca848a484gabdf00ce9dbbd@thread.tacv",
"id": "19:561fbdbbfca848a484gabdf00ce9dbbd@thread.tacv2",
"createdDateTime": "2020-05-27T19:22:25.692Z",
"displayName": "Shared channel from Contoso",
"membershipType": "shared",
"tenantId": "b3246f44-b4gb-5678-96c6-25b18fa2c910",
"isArchived": false
}
]
}The following example shows a request.
GET https://graph.microsoft.com/v1.0/teams/893075dd-2487-4122-925f-022c42e20265/allChannels?$filter=membershipType eq 'shared'
[!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
{
"value": [
{
"@odata.id": "https://graph.microsoft.com/v1.0/tenants/b3246f44-b4gb-5678-96c6-25b18fa2c910/teams/893075dd-5678-5634-925f-022c42e20265/channels/19:561fbdbbfca848a484gabdf00ce9dbbd@thread.tacv",
"id": "19:561fbdbbfca848a484gabdf00ce9dbbd@thread.tacv2",
"createdDateTime": "2020-05-27T19:22:25.692Z",
"displayName": "Shared channel from Contoso",
"membershipType": "shared",
"tenantId": "b3246f44-b4gb-5678-96c6-25b18fa2c910",
"isArchived": false
}
]
}