Filter disabled users on AD
See original GitHub issueI have just migrated from ldapjs and appreciate changes and corrections made on the code. Nevertheless, a filter using previously with ldapjs not work. It’s normaly should remove desactivate users on AD (see last part of filter below).
const searchOptions = {
scope: 'sub',
sizeLimit: 50,
attributes: ["sAMAccountName", "name", "mail", "telephoneNumber", "sn", "givenName"],
filter: '(&(objectCategory=person)(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))'
};
Without userAccountControl Filter, I’ve got all users but with I’ve an empty result.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
How to Find Disabled Active Directory User Accounts
1. Run Disabled Users Report ... Click on Reports and under Account Status click on Disabled Users. Next, click the run button to...
Read more >How to Find Disabled Users in AD with or without PowerShell
Learn how to find disabled users in AD and export the list to a CSV file using a PowerShell script or Netwrix Auditor...
Read more >PowerShell command to find all disabled users in Active ...
For example, this command will show the samAccountName, first name, and last name of the disabled users. Get-ADUser -Filter {Enabled -eq $false} ...
Read more >How can I create a filter in Active Directory to show only ...
In Active Directory, it is easy to create a filter to show only Disabled Computer Accounts by ticking the box "Disabled Accounts" in...
Read more >LDAP/AD Filter disabled users? - Openfire Support
Well, I finally got everything up and running with all filters in place in a test environment but I have one issue. In...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can confirm this works now. user is not listed when disabled and reappears once enabled in Active Directory my filter looked like this:
Looks like I was unnecessarily escaping filter names & values. Can you please try v1.6.0 and see if that resolves your issue?