LdapServices.getADGroups

Returns all Active Directory group names associated with a user including nested groups, using the Active Directory tokenGroups attribute to obtain this information. Connection parameters for the Active Directory system are taken from the XIldap.properties file properties file.

This method works as follows:

  1. Connects to the Ldap Registry using the user identified by properties Ldap.BindDistinguishedName and Ldap.BindPassword in XIldap.properties file. If these properties are missing, attempts to bind anonymously.
  2. Searches the registry for the user name starting from the location identified by parameter baseDistinguishedName and obtains the full distinguished name (DN) identifying the user.
  3. Obtains a list of groups for the user by searching for the special Active Directory tokenGroups attribute within the user DN.
  4. Searches for each group in turn starting from the location identified by parameter baseDistinguishedName.

Javascript example:

 var root = "DC=ebasetech,DC=com";
 var groups = LdapServices.getADGroups(fields.USER.value, root, true);
 for each (var group in groups)
 {
   tables.GROUPS.insertRow();
   tables.GROUPS.NAME.value = group;
 }
 

returns UNKNOWNjava.lang.String[]

Parameters

java.lang.String  userName,  java.lang.String  baseDistinguishedName,  boolean  removeDomainNameFromUser,