{"meta":{"title":"REST-API-Endpunkte für externe Gruppen","intro":"Verwende die REST-API, um die externen Identitätsanbietergruppen anzeigen, die für deine Organisation verfügbar sind, und um die Verbindung zwischen externen Gruppen und Teams in deiner Organisation zu verwalten.","product":"REST-API","breadcrumbs":[{"href":"/de/enterprise-server@3.19/rest","title":"REST-API"},{"href":"/de/enterprise-server@3.19/rest/teams","title":"Teams"},{"href":"/de/enterprise-server@3.19/rest/teams/external-groups","title":"Externe Gruppen"}],"documentType":"article"},"body":"# REST-API-Endpunkte für externe Gruppen\n\nVerwende die REST-API, um die externen Identitätsanbietergruppen anzeigen, die für deine Organisation verfügbar sind, und um die Verbindung zwischen externen Gruppen und Teams in deiner Organisation zu verwalten.\n\n## Informationen zu externen Gruppen\n\nUm diese Endpunkte verwenden zu können, müssen authentifizierte Benutzer entweder Teambetreuer oder Besitzer der Organisation sein, die dem Team zugeordnet ist.\n\n> [!NOTE]\n> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2022-11-28`. Curl examples below omit these standard headers for brevity.\n\n## Get an external group\n\n```\nGET /orgs/{org}/external-group/{group_id}\n```\n\nDisplays information about the specific group's usage.  Provides a list of the group's external members as well as a list of teams that this group is connected to.\nYou can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see \"GitHub's products\" in the GitHub Help documentation.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n- **`group_id`** (integer) (required)\n  The unique identifier of the group.\n\n- **`per_page`** (integer)\n  The number of results per page for the \"members\" array (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n- **`page`** (integer)\n  The page number of the \"members\" array results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n### HTTP response status codes\n\n- **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/api/v3/orgs/ORG/external-group/GROUP_ID\n```\n\n**Response schema (Status: 200):**\n\n* `group_id`: required, integer\n* `group_name`: required, string\n* `updated_at`: string\n* `teams`: required, array of objects:\n  * `team_id`: required, integer\n  * `team_name`: required, string\n* `members`: required, array of objects:\n  * `member_id`: required, integer\n  * `member_login`: required, string\n  * `member_name`: required, string\n  * `member_email`: required, string\n\n## List external groups available to an organization\n\n```\nGET /orgs/{org}/external-groups\n```\n\nLists external groups provisioned on the enterprise that are available to an organization. You can query the groups using the display_name parameter, only groups with a group_name containing the text provided in the display_name parameter will be returned.  You can also limit your page results using the per_page parameter. GitHub Enterprise Server generates a url-encoded page token using a cursor value for where the next page begins. For more information on cursor pagination, see \"Offset and Cursor Pagination explained.\"\nYou can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see \"GitHub's products\" in the GitHub Help documentation.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n- **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n- **`page`** (integer)\n  Page token\n\n- **`display_name`** (string)\n  Limits the list to groups containing the text in the group name\n\n### HTTP response status codes\n\n- **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/api/v3/orgs/ORG/external-groups\n```\n\n**Response schema (Status: 200):**\n\n* `groups`: array of objects:\n  * `group_id`: required, integer\n  * `group_name`: required, string\n  * `updated_at`: required, string\n\n## List a connection between an external group and a team\n\n```\nGET /orgs/{org}/teams/{team_slug}/external-groups\n```\n\nLists a connection between a team and an external group.\nYou can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see \"GitHub's products\" in the GitHub Help documentation.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n- **`team_slug`** (string) (required)\n  The slug of the team name.\n\n### HTTP response status codes\n\n- **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/external-groups\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List external groups available to an organization](#list-external-groups-available-to-an-organization).\n\n## Update the connection between an external group and a team\n\n```\nPATCH /orgs/{org}/teams/{team_slug}/external-groups\n```\n\nCreates a connection between a team and an external group.  Only one external group can be linked to a team.\nYou can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see \"GitHub's products\" in the GitHub Help documentation.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n- **`team_slug`** (string) (required)\n  The slug of the team name.\n\n#### Body parameters\n\n- **`group_id`** (integer) (required)\n  External Group Id\n\n### HTTP response status codes\n\n- **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PATCH \\\n  http(s)://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/external-groups \\\n  -d '{\n  \"group_id\": 123\n}'\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Get an external group](#get-an-external-group).\n\n## Remove the connection between an external group and a team\n\n```\nDELETE /orgs/{org}/teams/{team_slug}/external-groups\n```\n\nDeletes a connection between a team and an external group.\nYou can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n- **`team_slug`** (string) (required)\n  The slug of the team name.\n\n### HTTP response status codes\n\n- **204** - No Content\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  http(s)://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/external-groups\n```\n\n**Response schema (Status: 204):**"}