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 situation appears to be a bug in the ldap3 library. After switching to the non-Reader search method, I was able to get paged content.