---
title: "Preview Users that would belong to the specified Team"
method: POST
path: "/teammembership/previewteam"
tags: ["TeamMemberships"]
---

# Preview Users that would belong to the specified Team

`POST /teammembership/previewteam`

Lists all the Users that would belong to the specified Team, including information about whether they are directly assigned and/or indirectly assigned via external security groups.

## Request body

- GetTeamMembershipPreviewRequest — Lists all the Users that would belong to the specified Team, including information about whether they are directly assigned and/or indirectly assigned via external security groups.
  - `Description` string
  - `ExternalSecurityGroups` NamedReferenceItem[], required — The externally-managed security groups (e.g., Active Directory groups) who belong to the team.
    - `DisplayIdAndName` boolean
    - `DisplayName` string
    - `Id` string
  - `Id` string
  - `MemberUserIds` string[], required — The users who belong to the team.
  - `Name` string, required — Gets or sets the name of this team.
  - `Slug` string
  - `SpaceId` string

## Response `200`

The requested Preview of Team Membership

- TeamMembershipPreview[]
  - `ExternalSecurityGroups` NamedReferenceItem[]
    - `DisplayIdAndName` boolean
    - `DisplayName` string
    - `Id` string
  - `IsDirectlyAssigned` boolean
  - `SpaceId` string
  - `TeamId` string
  - `TeamName` string
  - `UserId` string

## Other responses

- `400` — Bad request. Either the payload was not structurally valid or business rules did not permit the operation.
- `404` — Not found. One or more of the entities involved in the operation was not found.

---

[API](https://skmtc.net/octopus/apis/octopus-server-api.md) · [All operations](https://skmtc.net/octopus/apis/octopus-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/octopus/octopus-server-api/revisions/b296c3a60aa5/schema)
