POST api/2.0/settings/ldap This function requires authentication

Description

Saves the LDAP settings specified in the request and starts importing/synchronizing users and groups by LDAP.

Parameters
Name Description Type Example
EnableLdapAuthentication
sent in body
Specifies if the LDAP authentication is enabled or not System.Boolean
StartTls
sent in body
Specifies if the StartTLS is enabled or not System.Boolean
Ssl
sent in body
Specifies if the SSL is enabled or not System.Boolean
SendWelcomeEmail
sent in body
Specifies if the welcome email is sent or not System.Boolean
Server
sent in body
LDAP server URL address System.String
UserDN
sent in body
Absolute path to the top level directory containing users for the import System.String
PortNumber
sent in body
Port number System.Int32
UserFilter
sent in body
User filter value to import the users who correspond to the specified search criteria. The default filter value (uid=*) allows importing all users System.String
LoginAttribute
sent in body
Attribute in a user record that corresponds to the login that LDAP server users will use to log in to ONLYOFFICE System.String
LdapMapping
sent in body
Correspondence between the user data fields on the portal and the attributes in the LDAP server user record System.Collections.Generic.Dictionary{ASC.ActiveDirectory.Base.Settings.MappingFields
AccessRights
sent in body
Group access rights System.Collections.Generic.Dictionary{ASC.ActiveDirectory.Base.Settings.AccessRight
GroupMembership
sent in body
Specifies if the groups from the LDAP server are added to the portal or not System.Boolean
GroupDN
sent in body
The absolute path to the top level directory containing groups for the import System.String
UserAttribute
sent in body
Attribute that determines whether this user is a member of the groups System.String
GroupFilter
sent in body
Group filter value to import the groups who correspond to the specified search criteria. The default filter value (objectClass=posixGroup) allows importing all users System.String
GroupAttribute
sent in body
Attribute that specifies the users that the group includes System.String
GroupNameAttribute
sent in body
Attribute that corresponds to a name of the group where the user is included System.String
Authentication
sent in body
Specifies if the user has rights to read data from LDAP server or not System.Boolean
Login
sent in body
Login System.String
Password
sent in body
Password System.String
AcceptCertificate
sent in body
Specifies if the certificate is accepted or not System.Boolean
Example
POST api/2.0/settings/ldap
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "EnableLdapAuthentication": true,
  "StartTls": true,
  "Ssl": true,
  "SendWelcomeEmail": true,
  "Server": "some text",
  "UserDN": "some text",
  "PortNumber": 1234,
  "UserFilter": "some text",
  "LoginAttribute": "some text",
  "GroupMembership": true,
  "GroupDN": "some text",
  "UserAttribute": "some text",
  "GroupFilter": "some text",
  "GroupAttribute": "some text",
  "GroupNameAttribute": "some text",
  "Authentication": true,
  "Login": "some text",
  "Password": "some text",
  "AcceptCertificate": true
}
Returns

LDAP operation status

Example Response

application/json

{
  "status": 0,
  "response": {
    "Completed": true,
    "Id": "some text",
    "Status": "some text",
    "Error": "some text",
    "Warning": "some text",
    "Percents": 1234,
    "CertificateConfirmRequest": "some text",
    "Source": "some text",
    "OperationType": "some text"
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <Completed>True</Completed>
    <Id>some text</Id>
    <Status>some text</Status>
    <Error>some text</Error>
    <Warning>some text</Warning>
    <Percents>1234</Percents>
    <CertificateConfirmRequest>some text</CertificateConfirmRequest>
    <Source>some text</Source>
    <OperationType>some text</OperationType>
  </response>
</result>