Active Directory - User List/Modification


Please note I'm programming in VB.NET and not classic ASP or C#
Here's what I need. I need to create web (VB.NET) application that will access Active Drictory and dispaly all current users (user list).  I want to retreive acouts from specific OUs (OU1, OU2) and some user acouts should not be in the list (like: previous employees, disable acounts, system acounts, etc).
When user is clicked (can be a link) I need to provide a way to update his/her information.

And one more thing. Later on we would like to use this kind of approach with SharePoint MOSS 2007. Is it possible to do so and what would be approach to accomplish this task? I never had a chance to work with SharePoint and my knowledge of it is very basic (I know what it's for).

Thank you,
Who is Participating?
wizard_340Connect With a Mentor Commented:
Your first "question" is a very open-ended.  A little Google goes a long way to starting your application:
Unfortunately, AD is rather explicit and environments can differ according to administrative styles.  Finding all active users and gathering their name, email address, class memberships (for possibly qualifying system accounts), their GUID, and manager, for example:

            Static strActiveOnly As String = "(&(objectCategory=user)(objectClass=user)(!UserAccountControl:1.2.840.113556.1.4.803:=2))"
            Dim adRoot As New DirectoryServices.DirectoryEntry("LDAP://daldc1.tarragoncorp.local/DC=tarragoncorp,DC=local")
            With adRoot
                .Username = Nothing
                .Password = Nothing
                .AuthenticationType = DirectoryServices.AuthenticationTypes.Delegation
            End With
            Dim adUserSearcher As New DirectoryServices.DirectorySearcher(adRoot, strActiveOnly)
            With adUserSearcher
                .SearchScope = DirectoryServices.SearchScope.Subtree
                .PageSize = 1000
            End With
                Dim adUserResults As DirectoryServices.SearchResultCollection = adUserSearcher.FindAll

Filtering your results will be dependant on your AD environment, and how users have been assigned/distinguished, so only specific questions could be answered.

As to your second question, yes you can code web parts to include in MOSS.  It's already heavilly dependant on active directory for its security, so including something like this is not uncommon - out of the box, SharePoint already includes the capicity to email between one another based on the email address imported from AD.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.