Skip to main content

LdapServer

warning

This API is partially documented or under construction.

Overview​

Synology LDAP Server API client.

Manages LDAP Server configuration, users, profiles, and base DNs on DSM 7.x+.

Requires the LDAP Server package installed and at least one LDAP directory configured on the target NAS.

Methods​

ldap_config​

Get LDAP Server configuration.
Returns the current LDAP client/server settings including base DN, server address, encryption, schema type, and connection status.

Internal API​

SYNO.Core.Directory.LDAP

Returns​

dict[str, object] or str
LDAP configuration dictionary. When LDAP is not configured, base_dn is empty and error contains a status code (e.g. 2703).


ldap_basedn_list​

List LDAP Base DNs.
.. note:: This method requires an active LDAP configuration. Returns error 2701 if LDAP is not configured.

Internal API​

SYNO.Core.Directory.LDAP.BaseDN

Returns​

dict[str, object] or str
List of configured Base DNs.


ldap_profile_list​

List LDAP client profiles.
.. note:: Requires an active LDAP configuration.

Internal API​

SYNO.Core.Directory.LDAP.Profile

Returns​

dict[str, object] or str
List of LDAP profiles.


ldap_user_list​

List LDAP users.
.. note:: Requires an active LDAP configuration.

Internal API​

SYNO.Core.Directory.LDAP.User

Parameters​

offset int
Pagination offset (default 0).

limit int
Maximum results per page (default 100).

Returns​

dict[str, object] or str
{"data": {"items": [...], "total": N}, "success": true}.


ldap_refresh​

Refresh LDAP user/group cache.
Triggers a re-sync of local LDAP cache with the LDAP server.
.. note:: Requires an active LDAP configuration.

Internal API​

SYNO.Core.Directory.LDAP.Refresh

Returns​

dict[str, object] or str
API response.


ldap_login_notify_get​

Get LDAP login notification settings.
.. note:: Requires an active LDAP configuration.

Internal API​

SYNO.Core.Directory.LDAP.Login.Notify

Returns​

dict[str, object] or str
Login notification configuration.