---
title: "PUT /sources/ldap/{slug}/"
method: PUT
path: "/sources/ldap/{slug}/"
tags: ["sources"]
---

# PUT /sources/ldap/{slug}/

`PUT /sources/ldap/{slug}/`

LDAP Source Viewset

## Path parameters

- `slug` string, required — Internal source name, used in URLs.

## Request body

- LDAPSourceRequest — LDAP Source Serializer
  - `name` string, required — Source's display Name.
  - `slug` string, required — Internal source name, used in URLs.
  - `enabled` boolean
  - `promoted` boolean — When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon.
  - `authentication_flow` string, uuid, nullable — Flow to use when authenticating existing users.
  - `enrollment_flow` string, uuid, nullable — Flow to use when enrolling new users.
  - `user_property_mappings` string[]
  - `group_property_mappings` string[]
  - `policy_engine_mode` 'all' | 'any'
  - `user_matching_mode` 'identifier' | 'email_link' | 'email_deny' | 'username_link' | 'username_deny'
  - `user_path_template` string
  - `icon` string
  - `server_uri` string, uri, required
  - `peer_certificate` string, uuid, nullable — Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair.
  - `client_certificate` string, uuid, nullable — Client certificate to authenticate against the LDAP Server's Certificate.
  - `bind_cn` string
  - `bind_password` string
  - `start_tls` boolean
  - `sni` boolean
  - `base_dn` string, required
  - `additional_user_dn` string — Prepended to Base DN for User-queries.
  - `additional_group_dn` string — Prepended to Base DN for Group-queries.
  - `user_object_filter` string — Consider Objects matching this filter to be Users.
  - `group_object_filter` string — Consider Objects matching this filter to be Groups.
  - `group_membership_field` string — Field which contains members of a group.
  - `user_membership_attribute` string — Attribute which matches the value of `group_membership_field`.
  - `object_uniqueness_field` string — Field which contains a unique Identifier.
  - `password_login_update_internal_password` boolean — Update internal authentik password when login succeeds with LDAP
  - `sync_users` boolean
  - `sync_users_password` boolean — When a user changes their password, sync it back to LDAP. This can only be enabled on a single LDAP source.
  - `sync_groups` boolean
  - `sync_parent_group` string, uuid, nullable
  - `lookup_groups_from_user` boolean — Lookup group membership based on a user attribute instead of a group attribute. This allows nested group resolution on systems like FreeIPA and Active Directory
  - `delete_not_found_objects` boolean — Delete authentik users and groups which were previously supplied by this source, but are now missing from it.
  - `sync_outgoing_trigger_mode` 'none' | 'immediate' | 'deferred_end'
  - `sync_group_hierarchy` boolean — Sync group parentage/hierarchy from LDAP directories.

## Response `200`

- LDAPSource — LDAP Source Serializer
  - `pk` string, uuid, required
  - `name` string, required — Source's display Name.
  - `slug` string, required — Internal source name, used in URLs.
  - `enabled` boolean
  - `promoted` boolean — When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon.
  - `authentication_flow` string, uuid, nullable — Flow to use when authenticating existing users.
  - `enrollment_flow` string, uuid, nullable — Flow to use when enrolling new users.
  - `user_property_mappings` string[]
  - `group_property_mappings` string[]
  - `component` string, required — Get object component so that we know how to edit the object
  - `verbose_name` string, required — Return object's verbose_name
  - `verbose_name_plural` string, required — Return object's plural verbose_name
  - `meta_model_name` string, required — Return internal model name
  - `policy_engine_mode` 'all' | 'any'
  - `user_matching_mode` 'identifier' | 'email_link' | 'email_deny' | 'username_link' | 'username_deny'
  - `managed` string, nullable, required — Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update.
  - `user_path_template` string
  - `icon` string
  - `icon_url` string, required
  - `icon_themed_urls` ThemedUrls, required — Themed URLs - maps theme names to URLs for light and dark themes
    - `light` string, nullable
    - `dark` string, nullable
  - `server_uri` string, uri, required
  - `peer_certificate` string, uuid, nullable — Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair.
  - `client_certificate` string, uuid, nullable — Client certificate to authenticate against the LDAP Server's Certificate.
  - `bind_cn` string
  - `start_tls` boolean
  - `sni` boolean
  - `base_dn` string, required
  - `additional_user_dn` string — Prepended to Base DN for User-queries.
  - `additional_group_dn` string — Prepended to Base DN for Group-queries.
  - `user_object_filter` string — Consider Objects matching this filter to be Users.
  - `group_object_filter` string — Consider Objects matching this filter to be Groups.
  - `group_membership_field` string — Field which contains members of a group.
  - `user_membership_attribute` string — Attribute which matches the value of `group_membership_field`.
  - `object_uniqueness_field` string — Field which contains a unique Identifier.
  - `password_login_update_internal_password` boolean — Update internal authentik password when login succeeds with LDAP
  - `sync_users` boolean
  - `sync_users_password` boolean — When a user changes their password, sync it back to LDAP. This can only be enabled on a single LDAP source.
  - `sync_groups` boolean
  - `sync_parent_group` string, uuid, nullable
  - `connectivity` object, nullable, required — Get cached source connectivity
  - `lookup_groups_from_user` boolean — Lookup group membership based on a user attribute instead of a group attribute. This allows nested group resolution on systems like FreeIPA and Active Directory
  - `delete_not_found_objects` boolean — Delete authentik users and groups which were previously supplied by this source, but are now missing from it.
  - `sync_outgoing_trigger_mode` 'none' | 'immediate' | 'deferred_end'
  - `sync_group_hierarchy` boolean — Sync group parentage/hierarchy from LDAP directories.

## Other responses

- `400`
- `403`

---

[API](https://skmtc.dev/goauthentik/apis/authentik.md) · [All operations](https://skmtc.dev/goauthentik/apis/authentik/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/goauthentik/authentik/revisions/4e42e86021d7/schema)
