sAMAccountName and Regular Expressions

Posted on 2012-08-10
Last Modified: 2012-08-10

Does anyone know if we can use regular expressions in LDAP query for sAMAccountName attribute???

I have an LDAP filter to import users from AD into SharePoint profiles. I want to import just the users with "sAMAccountName=123456" (only numbers-6 digits long). The reason is I want to avoid importing generic user accounts which have alpha values in sAMAccountName.

I tried : sAMAccountName=[0-9]{6}  which didn't help.

I really appreciate any help.
Question by:BoozTech
    LVL 29

    Accepted Solution

    Unfortunately it doesn't look like it.
    Wild cards yes, REs no.

    Author Comment

    Thank you. I guess I will have to find an attribute which I can use in my LDAP query for users with all numeric sAMAccountName.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
    Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
    This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
    This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now