I need Group id of a Closed user group. | Community
Skip to main content
October 16, 2015
Solved

I need Group id of a Closed user group.

  • October 16, 2015
  • 1 reply
  • 731 views

Can i get the groupid of CUG.I can  get group name like(content-author,dsc,...etc,).but I need groupId of that group.Please let me know how can I get groupId.Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sam205505050

Can you try this

Session adminSession = resourceResolver.adaptTo(Session.class);

UserManager um = AccessControlUtil.getUserManager(adminSession);

um.getAuthorizable("Group_Name").getID();

1 reply

Sam205505050Accepted solution
Level 6
October 16, 2015

Can you try this

Session adminSession = resourceResolver.adaptTo(Session.class);

UserManager um = AccessControlUtil.getUserManager(adminSession);

um.getAuthorizable("Group_Name").getID();