I want to get the user login name from LDAP, so I use SamAccountName, but keep getting the following error message.. I can get the value of the user's surname, givenname, name but not samAccountName. Can someone help?
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'samaccountName'
varmember=objGroup.IsMember("LDAP://cn=" & struser & "," & struserou)
For Each objmember In objgroup.MEMBERS
Response.Write "uid = " & objmember.samaccountName & "<br>"
Response.Write "sn = " & objmember.sn & "<br>"
Response.Write "givenname = " & objmember.givenname & "<br>"
Next
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'samaccountName'
varmember=objGroup.IsMember("LDAP://cn=" & struser & "," & struserou)
For Each objmember In objgroup.MEMBERS
Response.Write "uid = " & objmember.samaccountName & "<br>"
Response.Write "sn = " & objmember.sn & "<br>"
Response.Write "givenname = " & objmember.givenname & "<br>"
Next