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.
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.
None
0 Points
1 Post
LDAP Connection String - assistance needed
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.
Contributor
2851 Points
545 Posts
Re: LDAP Connection String - assistance needed
Oct 04, 2012 03:23 PM|RichardD|LINK
You can use the RootDSE to get the DN of the domain:
http://wiki.asp.net/page.aspx/462/how-to-query-active-directory-without-hard-coding-the-domain-name/
http://msdn.microsoft.com/en-us/library/ms684291%28VS.85%29.aspx
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.