I am in the process of migrating an ACS 4.2.6 instance to a new data center and have the tedious task of creating locally authenticated users in place of the LDAP-authenticated users on the source system. Part of this process will entail adding users to the appropriate groups. Is there a way to print out a list of users and the groups to which they belong? I found these 2 API calls to generate a list of users and groups:
curl -u admin:****** "http://localhost:8080/alfresco/s/api/people" > users_20210708.json curl -u admin:****** "http://localhost:8080/alfresco/s/api/groups" > groups_20210708.json
...but the list of users didn't include their group membership, nor did the list of groups include which users were a part of them. I know I can get this information from the admin console, but I was hoping for an easier way,
Thank you in advance!
From what i could recall, there are no apis OOTB as of ACS5.2.x, not sure about upcoming versions though. However,
Try these apis in combination :
http://127.0.0.1:8080/alfresco/s/api/people --> Gives the list of users
Iterate the list of users and call the below api for each user -->
http://127.0.0.1:8080/alfresco/service/api/people/{userId}?groups=true
Example:
http://127.0.0.1:8080/alfresco/service/api/people/admin?groups=true
This should give you user's associated groups.
Alternatively you can also try this script: https://github.com/abhinavmishra14/alfresco-scripts/blob/master/src/main/java/com/github/abhinavmish...
It will give you a user report with their groups and associated sites as well. A sample report can be seen here: https://github.com/abhinavmishra14/alfresco-scripts/blob/master/samples/userReports.json
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.