Bonjour à tous ...
Je récupére le CheminLdap d'un groupe grace à cette fonction :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 /// <summary> public string EnvoisCheminLdapGroupe(string Groupe) { string Chemin = string.Empty; try { DirectorySearcher Chercheur = new DirectorySearcher(Ldap); Chercheur.Filter = "(&(objectClass=group)(cn=" + Groupe + "))"; if (GroupeExiste(Groupe)) { SearchResult Resultat = Chercheur.FindOne(); DirectoryEntry DirEntry = Resultat.GetDirectoryEntry(); Chemin = DirEntry.Properties["distinguishedName"].Value.ToString(); return Chemin; } else { return Chemin; } } catch (System.DirectoryServices.DirectoryServicesCOMException Erreur) { Journalisation("Erreur ActiveDIrectory - Fonction EnvoisCheminLdapGroupe", Erreur.ToString(), 0); throw Erreur; } }
mais il me faudrait le chemin Ldap de l'UO qui contient ce groupe ....et là je ne vois pas comment faire ...
QQn peut 'il me donner des pistes ?
MERCI
P.JEAN
Partager