Tagged: ,

This topic has 2 replies, 2 voices, and was last updated 6 years, 3 months ago by Firos.

  • Author
  • #11583

    Updating group member entry replaces existing entry in group.

    How to add new group members along with old members ?

     Andrew Potter

    Firstly, OpenAM is not an identity management product. Things like OpenIDM provide more functionality for managing identities.
    That said, one way I’ve used to add members to group through the OpenAM APIs is to retrieve the current members, then PUT the complete set back.
    (OpenIDM can PATCH membership – don’t think that is available in OpenAM).

    So, assuming you’re using OpenDJ you might do something like this:
    curl –request GET –header “iplanetDirectoryPro: AQIC…*” http://<openam:port>/openam/groups/<groupname&gt;
    Parse the response to look for the ‘uniqueMember’ property which will be an array of DNs
    e.g. “uniqueMember”:[“uid=aaa,ou=People,dc=example,dc=com”,”uid=bbb,ou=People,dc=example,dc=com”]

    Now do the PUT with the augmented DN in the uniqueMember property
    curl –request PUT –header “iplanetDirectoryPro: AQIC…*” –header “Content-Type: application/json” –data ‘{“uniqueMember”:[“uid=aaa,ou=People,dc=example,dc=com”,”uid=bbb,ou=People,dc=example,dc=com”,”uid=ZZZ,ou=People,dc=example,dc=com”]}’ http://<openam:port>/openam/groups/<groupname&gt;


    Yes Andrew me also think that’s the only possible solution

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

©2022 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?