---
title: "Update the connection between an external group and a team"
method: PATCH
path: "/orgs/{org}/teams/{team_slug}/external-groups"
tags: ["teams"]
---

# Update the connection between an external group and a team

`PATCH /orgs/{org}/teams/{team_slug}/external-groups`

Creates a connection between a team and an external group.  Only one external group can be linked to a team.

You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-cloud@latest/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation.

## Path parameters

- `org` string, required
- `team_slug` string, required

## Request body

- object
  - `group_id` integer, required — External Group Id

## Response `200`

Response

- ExternalGroup — Information about an external group's usage and its members
  - `group_id` integer, required — The internal ID of the group
  - `group_name` string, required — The display name for the group
  - `updated_at` string — The date when the group was last updated_at
  - `teams` object[], required — An array of teams linked to this group
    - `team_id` integer, required — The id for a team
    - `team_name` string, required — The name of the team
  - `members` object[], required — An array of external members linked to this group
    - `member_id` integer, required — The internal user ID of the identity
    - `member_login` string, required — The handle/login for the user
    - `member_name` string, required — The user display name/profile name
    - `member_email` string, required — An email attached to a user

## Other responses

- `422` — Unprocessable entity if you attempt to modify an enterprise team at the organization level.

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-2.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-2/versions/8ae6d0c8716e/schema)
