---
title: "Update LDAP mapping for a team"
method: PATCH
path: "/admin/ldap/teams/{team_id}/mapping"
tags: ["enterprise-admin"]
---

# Update LDAP mapping for a team

`PATCH /admin/ldap/teams/{team_id}/mapping`

Updates the [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. [LDAP synchronization](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap#enabling-ldap-sync) must be enabled to map LDAP entries to a team. Use the [Create a team](https://docs.github.com/enterprise-server@3.6/rest/teams/teams/#create-a-team) endpoint to create a team with LDAP mapping.

## Path parameters

- `team_id` integer, required

## Request body

- object
  - `ldap_dn` string, required — The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team.

## Response `200`

Response

- LdapMappingTeam
  - `ldap_dn` string
  - `id` integer
  - `node_id` string
  - `url` string
  - `html_url` string
  - `name` string
  - `slug` string
  - `description` string, nullable
  - `privacy` string
  - `permission` string
  - `members_url` string
  - `repositories_url` string
  - `parent` unknown

---

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