| title | List teams |
|---|---|
| description | List all teams in an organization. |
| author | akhilkohlimicrosoft |
| ms.localizationpriority | high |
| ms.subservice | teams |
| doc_type | apiPageType |
| ms.date | 04/05/2024 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
List all teams in an organization.
[!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]
GET /teamsThis method supports the $filter, $select, $top, $skiptoken, and $count OData query parameters to help customize the response.
| Header | Value |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Accept | application/json |
Don't supply a request body for this method.
If successful, this method returns a 200 OK response code and collection of team objects in the response body.
Note
Currently, this API call returns all properties of a team object, but only populates the id, displayName, description, and visibility properties. All other properties are returned as null. To get all populated properties, use the Get team operation.
The following example shows a request.
GET https://graph.microsoft.com/beta/teams
[!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#teams",
"value": [
{
"id": "172b0cce-e65d-44ce-9a49-91d9f2e8493a",
"createdDateTime": null,
"displayName": "Contoso Team",
"description": "This is a Contoso team, used to showcase the range of properties supported by this API",
"internalId": null,
"classification": null,
"specialization": null,
"visibility": "public",
"webUrl": null,
"isArchived": null,
"isMembershipLimitedToOwners": null,
"memberSettings": null,
"guestSettings": null,
"messagingSettings": null,
"funSettings": null,
"discoverySettings": null,
"tagSettings": null,
"summary": null
},
{
"id": "890972b0cce-e65d-44ce-9a49-568hhsd7n",
"createdDateTime": null,
"displayName": "Contoso General Team",
"description": "This is a general Contoso team",
"internalId": null,
"classification": null,
"specialization": null,
"visibility": "private",
"webUrl": null,
"isArchived": null,
"isMembershipLimitedToOwners": null,
"memberSettings": null,
"guestSettings": null,
"messagingSettings": null,
"funSettings": null,
"discoverySettings": null,
"tagSettings": null,
"summary": null
}
]
}The following example shows a request.
GET https://graph.microsoft.com/beta/teams?$filter=startswith(displayName, 'A')&$top=2
[!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#teams",
"value": [
{
"id": "172b0cce-e65d-44ce-9a49-91d9f2e8493a",
"createdDateTime": null,
"displayName": "A Contoso Team",
"description": "This is a Contoso team, used to showcase the range of properties supported by this API",
"internalId": null,
"classification": null,
"specialization": null,
"visibility": "public",
"webUrl": null,
"isArchived": null,
"isMembershipLimitedToOwners": null,
"memberSettings": null,
"guestSettings": null,
"messagingSettings": null,
"funSettings": null,
"discoverySettings": null,
"tagSettings": null,
"summary": null
},
{
"id": "890972b0cce-e65d-44ce-9a49-568hhsd7n",
"createdDateTime": null,
"displayName": "A Contoso Notification Team",
"description": "This is a notification Contoso team",
"internalId": null,
"classification": null,
"specialization": null,
"visibility": "private",
"webUrl": null,
"isArchived": null,
"isMembershipLimitedToOwners": null,
"memberSettings": null,
"guestSettings": null,
"messagingSettings": null,
"funSettings": null,
"discoverySettings": null,
"tagSettings": null,
"summary": null
}
]
}Example 3: Use $filter and $select to get id and description for team with displayName equals "A Contoso Team"
The following example shows a request.
GET https://graph.microsoft.com/beta/teams?$filter=displayName eq 'A Contoso Team'&$select=id,description
[!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#teams(id,description)",
"value": [
{
"id": "172b0cce-e65d-44ce-9a49-91d9f2e8493a",
"description": "This is a Contoso team, used to showcase the range of properties supported by this API"
}
]
}