code: private void updateWithGroupDn(final LDAPGroup group, final LdapConnection connection, final String groupDn, final String scope) throws IOException, LdapException, CursorException, FrameworkException {
  
  		final Map<String, String> possibleGroupNames = getGroupMapping();
  		final List<LDAPUser> members                 = new LinkedList<>();
  		final Set<String> memberDNs                  = new LinkedHashSet<>();
  
  		// fetch DNs of all group members
  		try (final EntryCursor cursor = connection.search(groupDn, "(objectclass=*)", SearchScope.valueOf(scope))) {
  
  			while (cursor.next()) {
  
  				final Entry entry           = cursor.get();
  				final Attribute objectClass = entry.get("objectclass");
  
  				for (final java.util.Map.Entry<String, String> groupEntry : possibleGroupNames.entrySet()) {
  
  					final String possibleGroupName  = groupEntry.getKey();
  					final String possibleMemberName = groupEntry.getValue();
  
  					if (objectClass.contains(possibleGroupName)) {
  
  						// add group members
  						final Attribute groupMembers = entry.get(possibleMemberName);
  						if (groupMembers != null) {
  
  							for (final Value value : groupMembers) {
  
  								memberDNs.add(value.getString());
  							}
  						}
  					}
  				}
  			}
  		}
  
  		// resolve users
  		for (final String memberDN : memberDNs) {
  
  			try (final EntryCursor cursor = connection.search(memberDN, "(objectclass=*)", SearchScope.valueOf(scope))) {
  
  				while (cursor.next()) {
  
  					members.add(getOrCreateUser(cursor.get()));
  				}
  			}
  		}
  
  		logger.info("{} users updated", members.size());
  
  		// update members of group to new state (will remove all members that are not part of the group, as expected)
  		group.setProperty(StructrApp.key(Group.class, "members"), members);
  	}
docs: ----- private methods -----