Last post Jun 29, 2010 08:46 AM by jithabc
Jun 29, 2010 03:56 AM|jithabc|LINK
I got stuck in LDAP query
I have a LDAP query I need to put this query in my DirectorySearcher in asp.net
"SELECT objectGUID FROM OU=Divsion Name,OU=Group,DC=domain,DC=local WHERE ou = 'Division Name'
How can implement this in my asp.net, here i am trying to retrieve the objectGUID exact for this division name.
THANKS IN ADVANCE
Jun 29, 2010 08:46 AM|jithabc|LINK
sorry I am resending my issue with more detail
HI I got stuck in LDAP query please help
My query Working in LDAP tool SELECT objectGUID FROM OU=Division Name, OU=GROUP, DC=domain, DC=local WHERE ou = 'Division Name’
This query retrieves me exact GUID of the division.
But in my program I am using bellow query its retrieve me all the GUID under that name but I need only that exact 'Division Name’ objectGUID.
DirectoryEntry enTry1 = new DirectoryEntry(LDAP://IP adress/OU= Division Name ,OU=GROUP,DC=Domain,DC=local);
DirectorySearcher mySearcher1 = new DirectorySearcher(enTry1);
mySearcher1.Filter = ("(anr=" + Division Name + ")");
foreach (System.DirectoryServices.SearchResult result1 in mySearcher1.FindAll())
can any one help me in this lot of thnaks in adavance