Consider a scenario where on your production server, you have thousands of groups and thousands of users.
Now, at some point of time, you need to find out all the users belonging to some specific group.
There is obviously a way, where in you can just login to alfresco and search for a group and find out users from that group. But do keep in mind that, this will take some time to give you the result. You also need to be careful while entering the search criteria like you are searching for All root groups or children groups.
Instead, To make your job simpler, You can use below webscript to get this done quickly for you. Putting it here for quick easy handy reference. I am sure this will be helpful to you at some point of time.
http://server:port/alfresco/service/api/groups/{groupName}/children?authorityType=USER
Example usage -
http://localhost:8080/alfresco/service/api/groups/TEST_GROUP/children?authorityType=USER
Note :
There is also an option that you can query for all sub groups of the given group. You need to pass authorityType as GROUP.
Thanks,
Ramesh C
Now, at some point of time, you need to find out all the users belonging to some specific group.
There is obviously a way, where in you can just login to alfresco and search for a group and find out users from that group. But do keep in mind that, this will take some time to give you the result. You also need to be careful while entering the search criteria like you are searching for All root groups or children groups.
Instead, To make your job simpler, You can use below webscript to get this done quickly for you. Putting it here for quick easy handy reference. I am sure this will be helpful to you at some point of time.
http://server:port/alfresco/service/api/groups/{groupName}/children?authorityType=USER
Example usage -
http://localhost:8080/alfresco/service/api/groups/TEST_GROUP/children?authorityType=USER
Note :
There is also an option that you can query for all sub groups of the given group. You need to pass authorityType as GROUP.
Thanks,
Ramesh C