title | description | author | doc_type | ms.subservice | ms.localizationpriority |
---|---|---|---|---|---|
Get channel |
Retrieve the properties and relationships of a channel. |
nkramer |
apiPageType |
teams |
medium |
Namespace: microsoft.graph
Retrieve the properties and relationships of a channel.
This method supports federation. Only a user who is a member of the shared channel can retrieve channel information.
[!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.
This API supports admin permissions. Global admins and Microsoft Teams service admins can access teams that they aren't a member of.
[!INCLUDE permissions-table]
Note
- The ChannelSettings.Read.Group and ChannelSettings.ReadWrite.Group permissions use resource-specific consent.
- The Group.Read.All, Group.ReadWrite.All, Directory.Read.All, and Directory.ReadWrite.All permissions are supported only for backward compatibility. We recommend that you update your solutions to use an alternative permission listed in the previous table and avoid using these permissions going forward.
GET /teams/{team-id}/channels/{channel-id}
This method supports the $filter
and $select
OData query parameters to help customize the response.
Populating the email and summary property for a channel is an expensive operation that results in slow performance. Use $select
to exclude the email and summary property to improve performance.
Note: The summary property can only be retrieved via the
select
parameter, as shown in Example 2 in this topic.
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 channel object in the response body.
The following example shows a request.
GET https://graph.microsoft.com/v1.0/teams/893075dd-2487-4122-925f-022c42e20265/channels/19:561fbdbbfca848a484f0a6f00ce9dbbd@thread.tacv2
[!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
{
"id": "19:561fbdbbfca848a484f0a6f00ce9dbbd@thread.tacv2",
"createdDateTime": "2020-05-27T19:22:25.692Z",
"displayName": "General",
"description": "AutoTestTeam_20210311_150740.2550_fim3udfdjen9",
"membershipType": "standard",
"isArchived": false
}
The following example shows a request to get the channelSummary property.
GET https://graph.microsoft.com/v1.0/teams/893075dd-2487-4122-925f-022c42e20265/channels/19:561fbdbbfca848a484f0a6f00ce9dbbd@thread.tacv2?$select=summary
[!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/v1.0/$metadata#teams('8bb12236-b929-42e0-94a0-1c417466ebf8')/channels(summary)/$entity",
"summary":{
"ownersCount":2,
"membersCount":3,
"guestsCount":1,
"hasMembersFromOtherTenants":false
}
}