Hej,
Mam następujący problem, chcę wczytać z domeny nazwy wszystkich użytkowników, na ogół wszystko idzie dobrze, ale mam domenę w której jest grupa (nazwijmy ją roboczo Andrzeje), i użytkowników należących do tej grupy nie mogę wczytać. Nie znam konfiguracji tej grupy.
w skrócie mam takie coś:
search.Filter = "(&(objectClass=user)(objectCategory=Person))";
search.PropertiesToLoad.Add("userPrincipalName");
search.PropertiesToLoad.Add("samaccountname");
results = search.FindAll();
for (int i = 0; i < results.Count; i++)
{
if (results[i].Properties.Contains("userPrincipalName"))
{
string dataString = results[i].Properties["userPrincipalName"][0].ToString();
users.Add(dataString);
}
else if (results[i].Properties.Contains("samaccountname"))
{
string dataString = results[i].Properties["samaccountname"][0].ToString();
users.Add(dataString);
}
}
return users.ToArray();
Czy ktoś z Was miał podobny problem?