>>>>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")
>>>strGroup = "CN=oeb-test,"
>>>strOU = "OU=Test,OU=OEB,OU=SAAS-users,"
>>>*' 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,
>>
>>Thank you very much for the sample code. I will create a test and try it on a customer AD (I don't have one to test on my PC)
>
>There are more functions I wrote here, if you need
>
>
http://www.atoutfox.org/articles.asp?ACTION=FCONSULTER&ID=0000000886Thank you very much.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham