Create or update IdP group connections

Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.

Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty groups array will remove all connections for a team.

Note: You can also specify a team by org_id and team_id using the route PATCH /organizations/:org_id/team/:team_id/team-sync/group-mappings.

PATCH /orgs/:org/teams/:team_slug/team-sync/group-mappings

Parameters

Name Type Description
groups array of objects Required. The IdP groups you want to connect to a GitHub team. When updating, the new groups object will replace the original one. You must include any existing groups that you don't want to remove.

groups object

Name Type Description
group_id string Required. ID of the IdP group.
group_name string Required. Name of the IdP group.
group_description string Required. Description of the IdP group.

Example

{
  "groups": [
    {
      "group_id": "123",
      "group_name": "Octocat admins",
      "description": "The people who configure your octoworld."
    }
  ]
}

Response

Status: 200 OK
{
  "groups": [
    {
      "group_id": "123",
      "group_name": "Octocat admins",
      "group_description": "The people who configure your octoworld."
    }
  ]
}