/// <summary> /// Remove AD object from a set of groups /// </summary> /// <param name="ldapConnectionInfo"></param> /// <param name="target"></param> /// <param name="groupsToRemoveFrom"></param> /// <returns>Object { bool operationSuccessful }</returns> public static Output AD_RemoveFromGroups([PropertyTab] LdapConnectionInfo ldapConnectionInfo, [PropertyTab] AD_RemoveFromGroupsTargetProperties target, [PropertyTab] AD_RemoveFromGroupsGroupProperties groupsToRemoveFrom) { var result = new Output(); using (var ldap = new LdapService(ldapConnectionInfo)) { result.operationSuccessful = ldap.RemoveFromGroups(target.Dn, groupsToRemoveFrom.Groups); } return(result); }