Server-Side Authentication (Groovy)

This topic contains 2 replies, has 2 voices, and was last updated by  srinath.m 3 days, 22 hours ago.

  • Author
  • #24057

    Trying to get the groups that a user is a member of within script module

    String[] memberOf = idRepository.getAttribute(username,”memberOf”);

    for (String m : memberOf) {
    logger.message(“memberof : ” + m);




    String memberOf = idRepository.getAttribute(username,”memberOf”);
    logger.message(“memberOf : ” + memberOf );


    Hi Tom,

    For our usecase, we get an array of values for memberOf attribute.
    Below is the REST API we use to get values of isMemberOf

    Request :


    	"isMemberOf": ["cn=SITE_ADMIN,ou=Roles,ou=applications,ou=groups,dc=example,dc=com", "cn=TEST_ADMIN,ou=networkLabUnits,ou=applications,ou=groups,dc=example,dc=com", "cn=TEST_SG,ou=networkLabUnits,ou=applications,ou=groups,dc=example,dc=com"]
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

©2018 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?