Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Active Directory User Names
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01669941
Message ID:
01670001
Vues:
67
>>>>>Hi,
>>>>>
>>>>>First, general AD question. Is each user name in the AD unique? That is, there is only one JOHN SMITH and next person with the same name would have to be somewhat different; e.g. JOHN SMITH2?
>>>>>
>>>>>Second question. Can you get ALL user names in the AD from a VFP 9 application? If yes, how?
>>>>>
>>>>>TIA
>>>>
>>>>For you second question this may help, it verifies the existence of a user, but you can easily change it to list all the users.
>>>>
>>>>
PROCEDURE verifyIfUserExists(tcUserID)
>>>>LOCAL lcUserId
>>>>lcUserId ='CN='+tcUserID
>>>>objRootLDAP = Getobject("LDAP://RootDSE")
>>>>strDNSDomain = objRootLDAP.Get("DefaultNamingContext") && Get the context
>>>>strGroup = "CN=oeb-test,"
>>>>strOU = "OU=Test,OU=OEB,OU=SAAS-users,"  && You correct specifications
>>>>*' Prepare the OU and the Group
>>>>objGroup = Getobject("LDAP://"+ strGroup + strOU + strDNSDomain)
>>>>objOU =Getobject("LDAP://" +strOU + strDNSDomain)
>>>>
>>>>For Each objUser In objOU
>>>>  If objUser.Class = Lower("User")
>>>>    IF objUser.name = lcUserId
>>>>      RETURN .T.
>>>>    ENDIF
>>>>  ENDIF
>>>>Endfor
>>>>RETURN .F.
>>>>
>>>>ENDPROC
>>>
>>>Mike,
>>>
>>>Are the following values something specific to the customer AD:
>>>
>>>RootDSE
>>>"CN=oeb-test,"
>>>"DefaultNamingContext"
>>>
>>>
>>>And if so, what are the names of these parameters so that I can ask the customer IT?
>>>
>>>Thank you.
>>
>>Just to clarify RootDSE is not mine, it applies as is.
>
>Thank you for clarifying.
>What is the "CN=oeb-test,"? Is there a name for this parameter so I can ask the customer to provide it?4

CN=Common Name, it is name of the branch in the hierarchy in Active Directory. As you may or may not know active directory can have many entities. OEB-Test is one of the entities, like in the image attached prod.carvertechnologies.ca (highlighted) in a CN.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform