I run standalone web application in IIS. It is in windows server that is connected to Active Directory.
Can I somehow recognise AD users in my webapp? And maybe authenticate and use SSO?
If someone can give me example or some pointers where to look for.
try
adoRecordset = adoCommand.Execute()
Catch ExecuteError As OLEException
// User did not manage to login
msgbox ExecuteError.message
adoConnection.close
I’m tryin now to check if user belongs to AD group.
I changed this strQuery line to:
strQuery = “SELECT Name, Member FROM ‘LDAP://CN=myGroup,OU=myContainer,DC=Domain,DC=fi’”
…and i think it shoud list members of myGroup to adoRecordset.
But how do I check what’s inside this OLEObject ADODB.Recordset?
Ok, little further…
This gives proper list on users in myGroup:
strQuery = "SELECT sAMAccountName FROM 'LDAP://" + LogonServer + "' WHERE objectCategory = 'Person' and memberOf = 'CN=myGroup,OU=myContainer,DC=domain,DC=fi' "
…and this lists users, but first you have to remove line ‘adoCommand.Properties(“Size Limit”) = 1’
While Not adoRecordset.eof
Listbox1.AddRow
x = Listbox1.LastIndex
Listbox1.Cell(x,0) = adoRecordset.Fields("sAMAccountName").Value
adoRecordset.MoveNext
Wend