Skip to content

Latest commit

 

History

History
128 lines (99 loc) · 4.83 KB

File metadata and controls

128 lines (99 loc) · 4.83 KB
title Get primaryChannel
description Retrieve the navigation property of a team that allows access to its default General channel.
author MSFTRickyCastaneda
ms.localizationpriority high
ms.subservice teams
doc_type apiPageType
ms.date 09/18/2024

Get primaryChannel

Namespace: microsoft.graph

Get the default channel, General, of a team.

[!INCLUDE national-cloud-support]

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.

This API supports admin permissions. Users with admin roles can access teams that they aren't members of.

[!INCLUDE permissions-table]

Note

The ChannelSettings.Read.Group and ChannelSettings.ReadWrite.Group permissions use resource-specific consent.

HTTP request

GET /teams/{id}/primaryChannel

Optional query parameters

This method supports the $filter, $select, and $expand OData query parameters to help 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 channel object in the response body.

Example

Request

The following example shows a request.

GET https://graph.microsoft.com/v1.0/teams/02bd9fd6-8f93-4758-87c3-1fb73740a315/primaryChannel

[!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]


Response

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('32e3b156-66b2-4135-9aeb-73295a35a55b')/primaryChannel/$entity",
    "id": "19:skypespaces_dd1e128ffa85453ab1f3015468e979d5@thread.skype",
    "displayName": "General",
    "description": "Microsoft Teams Platform team discussions",
    "email": "0686dc7a.microsoft.com@amer.teams.ms",
    "webUrl": "https://teams.microsoft.com/l/channel/19%3askypespaces_dd1e128ffa85453ab1f3015468e979d5%40thread.skype/General?groupId=32e3b156-66b2-4135-9aeb-73295a35a55b&tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47"
}