- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2020 05:45 PM
Hello everyone,
Ive spent a good amount of time trying to get users into groups via LDAP. The user import works, the groups import works, but when i try to configure things to get users into the already existing group, nothing works. I saw a post that said you shouldnt map the u_member field, so i left it blank, can anyone lend some wisdom on getting users into groups?
OnAfter script:
//
// After a group has been inserted the line of code below will get
// all the users that belong to the group according to LDAP and
// put the users into this group. This is done by getting
// the value from the u_members field from the source record.
// If you do not want to put the users in the group then you
// can comment out or remove the line below. If you are using
// something other than Active Directory and user membership is
// not indicated via the 'member' attribute then you can add the
// following line to indicate what field should be used. This
// line would be added before the the call to addMembers.
//
ldapUtils.setMemberField('u_member');
//
ldapUtils.addMembers(source, target);
Solved! Go to Solution.
- Labels:
-
Integrations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2020 06:59 PM
1# Remove u_member from field maps
2# OnAfter script only needs be like ldapUtils.addMembers(source, target);
3# OnStart needs to be below
gs.include("LDAPUtils");
var ldapUtils = new LDAPUtils();
ldapUtils.setLog(log);
Make sure you are mapping source field from ldap import to source field on user record (sys_user).
It needs be like
ldap:CN=XXX\, CCCCC,OU=Users,DC=XXXX,DC=com

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2020 06:59 PM
1# Remove u_member from field maps
2# OnAfter script only needs be like ldapUtils.addMembers(source, target);
3# OnStart needs to be below
gs.include("LDAPUtils");
var ldapUtils = new LDAPUtils();
ldapUtils.setLog(log);
Make sure you are mapping source field from ldap import to source field on user record (sys_user).
It needs be like
ldap:CN=XXX\, CCCCC,OU=Users,DC=XXXX,DC=com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2020 06:01 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2020 06:12 AM
I think you got it wrong.
I was trying to say was as part of your user import transform map make sure you are mapping source to source field on sys_user record.
also go to sys_user table and open one of the user who is member of the group you are importing. We need to make sure the source field has full length.
1st go to u_van_ldap_group_import.list and make sure the dn field is not getting cut off. change the length of that field to like 400.
2nd go to your user import table and make sure the length of the source field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2020 07:18 AM