Skip to main content
Oct 16, 2015 2:26 AM UTC
Solved

I need Group id of a Closed user group.

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.
Sam205505050Accepted solution
Level 6
Oct 16, 2015 2:26 AM UTC

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
Oct 16, 2015 2:26 AM UTC

Can you try this

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

UserManager um = AccessControlUtil.getUserManager(adminSession);

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

Translate