I'm trying to fetch data from OID(oracle internet dictionary) LDAP using Excel. Below is the code i have wrote but still its not fetching the data.
Public Function RegUsers()
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim isLDAPUserFound As Boolean
Dim str_UserId As String
Try
conn = New ADODB.Connection
conn.Provider = "ADSDSOObject"
conn.Open
isLDAPUserFound = False
str_UserId = "abc123"
If isLDAPUserFound = False Then
rs = conn.Execute("<LDAP://url:port/o=xyzx>;" & "(uid=" & str_UserId & ");uid,mail,CN;subtree")
If Not rs.BOF Then
isLDAPUserFound = True
MsgBox("Something Fonund")
End If
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Function
Please help me sort this problem.
Note : I have doubt about provider name and should we give system account which is having LDAP admin privileges if yes where should we mention.