Documentation for GlideLDAPUsers()?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2020 04:56 PM
There is an OOB UI Action Refresh from LDAP that runs this script:
var ldap = new GlideLDAPUsers();
ldap.load(current.user_name.toString());
action.setRedirectURL(current);
gs.addInfoMessage(gs.getMessage("Reload of LDAP data for {0} has been started",current.name));
I am trying to determine what ldap.load returns or what other methods might be available? I haven't been able to find any GlideLDAPUsers documentation.
I want to run a script that loops over all of our active users and flag any that are no longer in the external LDAP user directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2020 10:31 PM
As an admin/developer we may not be able to access it just like the class GlideRecord
It is at platform level.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2020 09:53 AM
Thanks,
I figured it was internal, but was hoping that like GlideRecord, documentation are available. I've figured out that it returns an object, that likely contains ldap directory elements. I was hoping to easily catch when an active sys_user record that was created via ldap in the past was no longer in LDAP.
I ended up not using GlideLDAPUsers().
Instead, I wrote a fix script that compared all active 'ldap' sys_user records against the contents of the latest LDAP import table updates. Users not in the latest LDAP import have been flagged for deactivation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2020 10:40 PM
Thanks for sharing the update.
Let me know if I have answered your original question.
If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2023 07:59 AM
Can you share your fix script for comparing all active 'ldap' sys_user records against the contents of the latest LDAP import table?