Ran in to a project today where I had to revisit the old LDAP query.
Here are some useful links:
LDAP Query Basics
Search Filter Syntax
Famous LDAP Filters for Active Directory Environments
How to search and find user accounts in Active Directory
Using Ldp.exe to Find Data in the Active Directory
How to Create Custom Active Directory LDAP Searches
How Can I Get a List of All the Users Whose Passwords Never Expire with PowerShell?
LDAP/AD Claims Provider For SharePoint 2013