Get/Fetch/Read User and Group details from CRX-AEM repository


Using a query debug URL listing out the users and their groups names in a JSON format.

Query Builder Debugger tool link:
--------------------------------------------
http://localhost:4502/libs/cq/search/content/querydebug.html

query in tool:
-----------------
p.hits=selective
p.limit=-1
p.properties=rep:authorizableId rep:externalId
path=/home/users
type=rep:User
p.properties=jcr:path

User List with group name:
----------------------------------
users list in aem:-
http://localhost:4502/bin/querybuilder.json?property=jcr:primaryType&property.value=rep:User

groups list in aem:-
http://localhost:4502/bin/querybuilder.json?property=jcr:primaryType&property.value=rep:Group

Output will be based on params
http://localhost:4502/bin/querybuilder.json?property=jcr:primaryType&property.value=rep:User





Other related links:-
http://experience-aem.blogspot.com/2013/09/cq-users-groups-crx-rmi-sample.html
https://stackoverflow.com/questions/41774616/can-i-retrieve-the-users-list-and-along-with-their-group-names

Note:-
All users in LDAP are not imported into AEM/CRX.