Set new LDAP configuration
const url = 'https://example.com/api/v1/system/mconf/ldap';const options = { method: 'PUT', headers: { cookie: 'grommunioAuthJwt=<grommunioAuthJwt>', 'Content-Type': 'application/json' }, body: '{"disabled":false,"connection":{"server":"example","bindUser":"example","bindPass":"example","starttls":true},"baseDn":"example","objectID":"example","users":{"username":"example","displayName":"example","filters":["objectclass=person"],"filter":"(&(objectclass=person)(mailPrimaryAddress=*))","templates":["example"],"attributes":{"additionalProperty":"example"},"defaultQuota":1,"searchAttributes":["example"],"aliases":"example"},"groups":{"groupMemberAttr":"example","groupaddr":"example","groupfilter":"example","groupname":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/system/mconf/ldap \ --header 'Content-Type: application/json' \ --cookie grommunioAuthJwt=<grommunioAuthJwt> \ --data '{ "disabled": false, "connection": { "server": "example", "bindUser": "example", "bindPass": "example", "starttls": true }, "baseDn": "example", "objectID": "example", "users": { "username": "example", "displayName": "example", "filters": [ "objectclass=person" ], "filter": "(&(objectclass=person)(mailPrimaryAddress=*))", "templates": [ "example" ], "attributes": { "additionalProperty": "example" }, "defaultQuota": 1, "searchAttributes": [ "example" ], "aliases": "example" }, "groups": { "groupMemberAttr": "example", "groupaddr": "example", "groupfilter": "example", "groupname": "example" } }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”CSRF Token
Query Parameters
Section titled “Query Parameters”Update configuration even if validation failed
Request Body
Section titled “Request Body”object
Disable LDAP service
object
Space separated list of addresses of the LDAP server to connect to
DN of the user to perform initial bind with
Password for bindUser
Whether to initiate a StartTLS connection
Base DN to use for user search
Name of an attribute that uniquely identifies an LDAP object
Configuration for user search
object
Name of the attribute that corresponds to the username (e-mail address)
Name of the attribute that contains the name
List of additional filter expressions to use for user search
LDAP search filter to apply to user lookup
Example
(&(objectclass=person)(mailPrimaryAddress=*))List of mapping templates to use
LDAP attribute -> PropTag mapping to used for LDAP import. Any mappings specified take precedence over active templates
object
Name of the PropTag the attribute maps to
Storage quota of imported users if no mapping exists
List of attributes to use for searching
LDAP attribute containing alternative e-mail addresses
Configuration for group import
object
LDAP attribute containing the groups a user is member of
E-Mail address attribute of the group
Filter expression for groups
Attribute containing the group’s display name
Responses
Section titled “Responses”LDAP configuration updated
Validation of input parameters failed
object
List of errors encountered during validation
Examplegenerated
{ "message": "example", "errors": [ "example" ]}An error occurred while processing the request
object
String representation of the exception
Examplegenerated
{ "message": "example"}One of the required external services is unavailable
object
Description of the error
Examplegenerated
{ "message": "example"}