Click HERE to see how Saviynt Intelligence is transforming the industry. |
03/06/2024 08:01 AM - last edited on 03/06/2024 11:48 PM by Sunil
HI Team,
we have a requirement for filtering a particular type of account from AD.
For example: User ABC is having 2 different accounts, one with naming convention ABC and other with A-ABC.
How can we filter out A- accounts from the set of accounts.
Object filter used now is (&(objectCategory=person)(objectClass=user)(samAccountname=*)).
How can we add samAccountname does not start with A-?
Please advise.
Any update or solution for this?
Thanks,
Ekata
[This message has been edited by moderator to merge reply comment]
03/07/2024 08:04 PM
Hi @Ebharati
Please refer to the below Object filters. Please test it first in LDAP browser before using in a Saviynt connection.
(&(objectCategory=person)(objectClass=user)(!(samAccountName=A*)))
(&(objectCategory=person)(objectClass=user)(!(samAccountname=A-*)))
Regards,
Dhruv Sharma
03/07/2024 08:11 PM
Hello,
Below is one typical example which I am using for 1 of my case
If you specifically want to filter for `sAMAccountName` with a 5-digit number after 'A', you can use the following LDAP filter:
(&(objectClass=user)(sAMAccountName=A?????))
In this filter, each question mark (?) represents a single character, and there are five of them after 'A'. This ensures that you are looking for accounts where the `sAMAccountName` starts with 'A' and is followed by exactly five digits.