public List<User> getAllUsers() throws RemoteException {
        LOG.debug("fetching all crowd users");
        
        int maxResults = 100;
        int startIndex = 0;
        List<User> results = new ArrayList<>();
        StringBuilder request = new StringBuilder("search?entity-type=user&expand=user&restriction=active%3dtrue")
            .append("&max-results=").append(maxResults)
            .append("&start-index=");
        
        try {
            while (true) {
                final HttpUriRequest getRequest = RequestBuilder.get(crowdServer.resolve(request.toString() + startIndex))
                    .setConfig(requestConfig)
                    .addHeader(HEADER_ACCEPT_APPLICATION_XML)
                    .addHeader(HEADER_ACCEPT_CHARSET_UTF8)
                    .build();

                try(final CloseableHttpResponse response = client.execute(getRequest, clientContext)) {
                    if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
                        handleHTTPError(response);
                    }
                    final Users users = JAXB.unmarshal(response.getEntity().getContent(), Users.class);
                    if (users != null && users.user != null) {
                        for (final User user : users.user) {
                            user.name = JID.escapeNode(user.name);
                            results.add(user);
                        }

                        if (users.user.size() != maxResults) {
                            break;
                        } else {
                            startIndex += maxResults;
                        }
                    } else {
                        break;
                    }
                }
            }
            
        } catch (IOException ioe) {
            handleError(ioe);
        }
        
        return results;
    }
Get all the users from Crowd
@return a List of User containing all the users stored in Crowd
@throws RemoteException if an exception occurred communicating with the crowd server
xmppserver/src/main/java/org/jivesoftware/openfire/crowd/CrowdManager.java