Hi,You can use [1] to get CommunityMemberUserProfile like below
:CommunityMemberUserProfile userProfile =
(CommunityMemberUserProfile)this.getSocialComponentForUserProfile(resource,
request, "social/members/components/hbs/userprofile");and then use
userProfile to invoke
getMembersOfGroups.[1]:https://helpx.adobe.com/experience-manager/6-5/sites/developing/using/reference-materials/javadoc/com/adobe/cq/social/members/endpoints/CommunityMemberUserProfileOperations.html#getSocialComponentForUserPro...