Hey all again. Another Active Directory c# problem. See th pattern? lol.
Ok, now out student accounts contain whats known as a MISID, I need to search the AD looking for any account with reference to this in the CN. for example,
My MISID would be 333333, now i know the user would be SC10333333, but they may also be SC093333, SC083333 etc.. So i just want to search by the MISID.
How can this be done, I have tried the following but it doesn't work:
/// Check for the existence of an Object
/// <param name="objectPath"></param>
/// <returns>True or False</returns>
public static bool Object_Exists(string CN=*333333,OU=this,OU=that,DC=domain,DC=local)
bool found = false;
if (DirectoryEntry.Exists("LDAP://" + objectPath))
found = true;