What would be the syntax for LDAP for the below scenario:
Where sAMAccountName = GRA-* without $. I want the records which are highlighted in green.

This is my current LADP Filter for your reference:
(&(objectClass=user)sAMAccountName=GRA-*))
Anyone, Please help with the correct syntax.
Your filter can work, but you're missing a
(in front ofsAMAccountName:But you may be able to do better. If those ones that end in
$are computer objects (which always havesAMAccountNames that end in$, but also have anobjectClassofuser), then you can make sure you only get user objects by including(objectCategory=person):If, for whatever reason, those
$objects are actually user accounts, then you can exclude them with(!sAMAccountName=*$):