|
|
|
|
|
- Adding a new object into an LDAP server
LDAPValidateAdd (Function) In french: LDAPValideAjout Validates the addition of a new object into an LDAP server.
LDAPStartAdd("MaSessionLDAP")
LDAPAddAttribute("MaSessionLDAP", "objectClass", "top")
LDAPAddAttribute("MaSessionLDAP", "objectClass", "person")
LDAPAddAttribute("MaSessionLDAP", "objectClass", "organizationalPerson")
LDAPAddAttribute("MaSessionLDAP", "objectClass", "user")
LDAPAddAttribute("MaSessionLDAP", "objectCategory", ...
"CN=Person, CN=Schema, CN=Configuration, DC=societe, DC=fr")
LDAPAddAttribute("MaSessionLDAP", "instanceType", "4")
LDAPAddAttribute("MaSessionLDAP", "cn", "Test")
LDAPAddAttribute("MaSessionLDAP", "sAMAccountName", "Test")
LDAPValidateAdd("MaSessionLDAP", "cn=Test, cn=Users, dc=societe, dc=fr")
Syntax
<Result> = LDAPValidateAdd(<LDAP session> , <Object DN>)
<Result>: Boolean - True if the addition was performed,
- False otherwise. ErrorInfo returns more details about the error.
<LDAP session>: Character string Name of LDAP session used. <Object DN>: Character string Distinguished Name (DN) of object to add. Remarks Adding a new object into an LDAP server To add a new object into an LDAP server, you must define the different attributes of this object as well as their values. To optimize object creation speed, attributes and their values are defined locally: a single communication with the server is established during validation of the addition. The steps are: - Initialize the addition (LDAPStartAdd)
- Add attributes and their values LDAPAddAttribute). This operation can be performed as many times as necessary.
- Associate the attributes and their values with an object using LDAPValidateAdd.
Please note As modification operations are performed locally before being transferred to the server, it is essential to respect the logical order of modifications (for example, it will not be possible to modify an attribute deleted by the previous line of code).
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|