Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.5   10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2    Statistic    FMM    Blog  

LDAP.Rename

Changes the distinguished name of an entry in the directory.

Component Version macOS Windows Linux Server iOS SDK
LDAP 6.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ❌ No
MBS( "LDAP.Rename"; LDAPRef; DN; NewRDN { ; NewParent; DeleteOldRdn } )   More

Parameters

Parameter Description Example Flags
LDAPRef The reference number for the LDAP connection. $ldap
DN The distinguished name of the entry to be renamed.
NewRDN The new relative distinguished name.
NewParent The distinguished name of the new parent for this entry.
This parameter enables you to move the entry to a new parent container.
Can be empty.
Optional
DeleteOldRdn 1 if the old relative distinguished name should be deleted; 0 if the old relative distinguished name should be retained. 1 Optional

Result

Returns OK or error.

Description

Changes the distinguished name of an entry in the directory.
This function is available effective with LDAP 3.

Examples

Moves an user from one group to other group:

$userDN = "CN=testUser,OU=TestOU1,OU=Groups,DC=example,DC=com"
$rdn = "CN=testUser"
$targetOU = "OU=TestOU2,OU=Groups,DC=example,DC=com"
$deleteOldRdn = 1

MBS( "LDAP.Rename" ; $ldap ; $personDN ; $rdn ; $targetOU ; $deleteOldRdn)

See also

Created 15th December 2015, last changed 13th July 2020


LDAP.ReleaseAll - LDAP.Search

Feedback: Report problem or ask question.