ldap3
ldap3 copied to clipboard
reader search_paged not returning results - What am I doing wrong?
I'm using the ldap3 library version 2.9.1 and python 3.10 on Windows 10. My search is working using the Reader.search method but when I switch to the Reader.search_paged, I get 0 results. Even if the query filter and such are exactly the same.
This works and returns 1000 rows:
obj_user = ObjectDef('user', conn_object)
obj_user += AttDef('sAMAccountName')
thesearch = '(sAMAccountName=a*)'
attributes = ['cn', 'distinguishedName']
r = Reader(conn_object, object_def=obj_user, base=bind_domain, query=thesearch)
r.search(attributes=attributes)
for currowindex, currow in enumerate(r):
print('cn=', currow['cn'].value)
If I change out r.search for r.search_paged(paged_size=500) I get nothing.
This appears to be a bug in the library. I switched to the non-reader search method and got actual content.
I'm hitting this too with 2.9.1
Also experiencing this with 2.9.1.