| Après l`appel de LDAPConnecte on peux rechercher l`utilisateur désiré par le code suivant :
strInfo est une chaîne
strFiltre est une chaîne = "(&(objectCategory=person) (objectClass=user) ((sAMAccountName=" + NOMDUSAGER + ")))"
strDN = LDAPRecherche(strSession, "DC=compagnie,DC=entreprise", strFiltre)
SI PAS ErreurDétectée() ALORS
SI strDN <> "" ALORS
strInfo = "Nom:"+ LDAPValeur(strSession, strDN, "sn", 1)+ RC
strInfo = "Prenom:"+ LDAPValeur(strSession, strDN, "givenName", 1) + RC
strInfo = "Courriel:"+ LDAPValeur(strSession, strDN, "mail", 1) + RC
strInfo = "sAMAccountName:"+ LDAPValeur(strSession, strDN, "sAMAccountName", 1) + RC
strInfo = "userPrincipalName:"+ LDAPValeur(strSession, strDN, "userPrincipalName", 1) + RC
strInfo = "DN:"+ strDN + RC
Info(strInfo)
FIN
FIN
|