Last post Oct 04, 2012 03:23 PM by RichardD
Oct 01, 2012 03:56 PM|CDNtechy|LINK
I work for a software company whose software has a feature that uses LDAP connection strings to import users into the application, I have a client I am working with who will give me little to no access to their system but has asked us to write the connection
strings for them.
They are a rather large company with upwards of 5-10 thousand users to import from a multiple domains
Is there a sort of generic connection string that I may use a simple distinguished name in order to import the users that meet the attribute "Objectcategory=person"
I was provided a file from the clients IT dept, using ADfind "adfind -gc -b -f "objectcategory=person" dn>h:\person.txt"
I was given over 35000 lines of connection strings that are a mix of single users and OU's with multiple users.
What is the best way to approach this issue, I have looked everywhere for a small broad fix to suit their needs but so far I have been unsuccessful.
Oct 04, 2012 03:23 PM|RichardD|LINK
You can use the RootDSE to get the DN of the domain:
You can then use a
DirectorySearcher to search for users in that path.
Alternatively, if you're using .NET 3.5 or higher, you can use the classes from
System.DirectoryServices.AccountManagement, which is a high-level abstraction over multiple principal stores.