Avatar of farjack1
Flag for United States of America

asked on 

I wanted to Authenticate user group in LDAP

i am working vb.net desktop application, i am very new in LDAP so i have a problem to authenticate user group in LDAP, since i have authencated user, for user authentication i write this code

  Dim entry As DirectoryEntry = New DirectoryEntry("LDAP://servername:389/ou=people,dc=xyz,dc=com")
        entry.AuthenticationType = AuthenticationTypes.None
        entry.Username = "uid=" & username & ",ou=people,dc=xyz,dc=com"
        entry.Password = pwd


            Dim search As DirectorySearcher = New DirectorySearcher(entry)
            Dim result As SearchResult = search.FindOne()

            If result Is Nothing Then
                Return False
            End If

            _path = result.Path

            Return True

        Catch ex As Exception
                       Return False
        End Try

this is working correct now need to authenticate user group i know the user group please send me code for this.

.NET Programming

Avatar of undefined
Last Comment

8/22/2022 - Mon