where to find GlideLDAPGroups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2020 11:53 PM
Hello
We are importing users and groups from ldap. But for some reason the SN ldap group is not populated with users.
I have debugged "LDAPUtils" and can see that: var group = new GlideLDAPGroups(target, geString);
is called with the correct values.
target - the object from sys_user_group
geString - a string with one or more usernames
I could not find "GlideLDAPGroups" to get deeper. It's not a script include !?
Where can I find "GlideLDAPGroups" ?
Sincerely Detlef Biedermann
- Labels:
-
Personal Developer Instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2020 03:32 AM
v_gr.get("031b08892fd020109da8532a2799b6a7"); // get object 'ldap_group_itil';
gs.info(v_gr.name);
var geString = 'uid=ldap_itil,ou=people,dc=pitcom,dc=com'; // set user 'ldap_itil'
var group = new GlideLDAPGroups(v_gr, geString);
group.setMembers();
#####################################################################################
Sincerely Detlef
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2020 04:38 AM
so if the source field looks like this:
Then the code would be:
var v_gr = new GlideRecord("sys_user_group");
v_gr.get("031b08892fd020109da8532a2799b6a7"); // get object 'ldap_group_itil';
gs.info(v_gr.name);
var geString = 'KuntaKinta'; // set user 'ldap_itil'
var group = new GlideLDAPGroups(v_gr, geString);
group.setMembers();
So the value in the source field needs to start with ldap: and then the value that comes after : is the value that needs to be in the string that is used in the code.
Does that make sense?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 08:52 AM
Hi Goran, thank you for the info. I was trying to use the setMembers() method. What it does is all users are deleted and, then it inserts the one I added in the function.
Is there any addmember() method?
Thank you!