![]() Property names such as "psmemberOf" might be case sensitive - see LDAP Browser Response.Write(res.Properties("psmemberOf")(i).ToString) ("psmemberOf")ĭim res As SearchResult = Searcher.FindOneįor i = 0 To res.Properties("psmemberOf").Count() - 1 Searcher.Filter = "(&(objectcategory=user)(SAMAccountName=" & Username & "))" So, this might give you an idea Dim ldapdomain As String = "LDAP:///dc=edc,dc=edu"ĭim Entry As New (ldapdomain)ĭim Searcher As New (Entry) * not sure if these properties are named in the same way in your ldap, check in LDAP Browser then get either property of memberOf (in your case it is psmemberof) or property for users (member property*) you filter by either user (SAMAccountName property*) or by group (cn property) Technically speaking there is no difference Your task can be done inġ) search for user, and see if he is a member of group X Ģ) search for group X and see if user is a member of this group Once connection is working you can decide on the next steps. ![]() Well, you should try to establish connection to ldap as I'm not sure if you already solved it.įollow my example and replace ldapdomain with the path to the server (you can get it from LDAP Browser), use username and password if required or get rid of them.
0 Comments
Leave a Reply. |