Skip to content

Latest commit

 

History

History
161 lines (128 loc) · 5.83 KB

File metadata and controls

161 lines (128 loc) · 5.83 KB
title List joinedTeams
description Get the teams in Microsoft Teams that the user is a direct member of.
author MSFTRickyCastaneda
ms.localizationpriority high
ms.subservice teams
doc_type apiPageType
ms.date 08/19/2024

List joinedTeams

Namespace: microsoft.graph

Get the teams in Microsoft Teams that the user is a direct member of.

Note: This API doesn't return the host team of the shared channel that the user is a direct member of. Use the List associated teams API, to retrieve the host teams of the shared channels that the user has access to.

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

[!INCLUDE permissions-table]

Note

The 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.

HTTP request

GET /me/joinedTeams
GET /users/{id | user-principal-name}/joinedTeams

Optional query parameters

This method doesn't currently support the OData query parameters to customize the response.

Request headers

Header Value
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Accept application/json

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a collection of team objects in the response body.

Note

Currently, this API call returns all properties of a team object, but only the id, displayName, description, isArchived, and tenantId properties are populated. All other properties are returned as null. To get all properties with values, use the Get team operation.

Example

Request

The following example shows a request.

GET https://graph.microsoft.com/v1.0/me/joinedTeams

[!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",
  "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": null,
      "webUrl": null,
      "isArchived": false,
      "tenantId": "b3246f44-b4gb-4627-96c6-25b18fa2c910",
      "isMembershipLimitedToOwners": null,
      "memberSettings": null,
      "guestSettings": null,
      "messagingSettings": null,
      "funSettings": null,
      "discoverySettings": null,
      "tagSettings": null,
      "summary": null
    }
  ]
}

Related content