We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Object Filter in AD connection for Specific account import

Yaswanth
New Contributor III
New Contributor III

Hi,

We are trying to import accounts from AD which are AXXXXX where XXXXX is 5 digit number. Could you please help us to configure a object filter for this?

Thanks,

6 REPLIES 6

rushikeshvartak
All-Star
All-Star

Certainly! 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.

 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Yaswanth
New Contributor III
New Contributor III

Above filter is unliked/deleted all the accounts

(&(objectClass=user)(sAMAccountName=A*)) pulling all the accounts but A????? is not working

(&(objectClass=user)(samAccountName=A\d{5}))

In this example:

  • objectClass=user ensures that you're only looking at user objects.
  • samAccountName=A\d{5} specifies that the samAccountName attribute should start with the letter 'A' and be followed by exactly five digits.

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

The Above solution is also not working..

Yaswanth
New Contributor III
New Contributor III

Can suggest a proper filter for which is starting with A and then 5 digits

eg: A12345

Please test from LDAP browser 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.