0

I must get 200 users from my ldap school but the problem is I can't get more than 200 users else i am getting exception :

 String filter = "uid=G26274";
 String[] arrayFilter = filter.split("=");
 Filter filters = Filter.createNOTFilter(Filter.createEqualityFilter(arrayFilter[0], arrayFilter[1]));
 SearchRequest searchRequest = new SearchRequest(query, SearchScope.SUB, filters, getParameter);
 searchRequest.setSizeLimit(200);
 searchResult = this.conn.search(searchRequest);

I am using setSizeLimit function and i get the same result.

thank you

sinsuren
  • 1,745
  • 2
  • 23
  • 26
gaby_dev
  • 9
  • 1

1 Answers1

1

setSizeLimit is for getting smaller results and doesn't override server limit.

You need paging mode:

see the answer with example code

Community
  • 1
  • 1
Oleg Gritsak
  • 548
  • 7
  • 26