TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kasper
NA
3
0
"Basic" Manager lookup in AD
Feb 4 2010 6:07 AM
Hi developers and AD people! ;-)
I got some quite simple code for some AD lookup:
DirectorySearcher
sea =
new
DirectorySearcher
();
sea.Filter = txt_SearchText.Text; (Here I put basic queries like "name=Tommy Jensen" or "surname=jen*")
SearchResult
seares = sea.FindOne();
StringBuilder
str =
new
StringBuilder
();
System.DirectoryServices.
ResultPropertyCollection
prop = seares.Properties;
ICollection
coll = prop.PropertyNames;
IEnumerator
enu = coll.GetEnumerator();
while
(enu.MoveNext())
{
str.Append(enu.Current +
" = "
+ seares.Properties[enu.Current.ToString()][0] +
"\n"
);
}
rtb_SearchResult.Text = str.ToString();
My question is:
How do I lookup a manager using wildcard (*) or looking up a adspath?
Can I write something like: "manager=CN=Tommy*" or "adspath=LDAP://CN=Tommy*" or am I totally misunderstanding some fundamentals?
What would a query saying "give me the name of all people whose manager is tommy*" look like?
Regards Kasper.
Reply
Answers (
1
)
Creating active directly users
How to verify if a user has been authenticated