Adding User Profile Attribute in ForgeRock OpenAM

In my earlier blog post titled Extending the ForgeRock OpenDJ Schema there was an embedded screen-cast that demonstrated how a new attribute could be added to the user profile in OpenDJ. We take one step further in this section to modify at Service in ForgeRock OpenAM to display that attribute in OpenAM Console. So if you’ve watched or if you know how to extend the OpenDJ schema to add a new user attribute, the following video log will tell you what you need to do on OpenAM to display it in the console.

Enjoy!

4 comments

  • Hello there,
    and if I wish to add an attribute on OpenAM User Profile web page?

    Ie. http://website/openam/XUI/#profile/details

    I’ve tried adding this line in the file /openam/XUI/templates/user/UserProfileTemplate.html:
    {{> form/_basicInput property=”mobile” label=”common.user.mobile” readonly=false}}

    and also adding the mobile attribute to the LDAP connector of OpenAM. What happens is that the new attribute is correctly displayed and populated on page but if I try to edit it, its value it is not submitted.

    Any ideas?

    • Do you get an error when you attempt to submit it? The OpenAM logs might give you more details. My guess is that, this may have to do with the write permission for the User in the underlying datastore (OpenDJ).

      • Thanks for you reply.

        No errors during submission (JS or whatever).
        OpenAM logs shows nothing special regarding the update (I’ve replaced IP addresses and personal data with fake ones).

        From amRest.access I read:
        “2017-02-07 10:35:03” myuserid|UPDATE “Not Available” “cn=dsameuser,ou=DSAME Users,dc=openam,dc=******,dc=***” id=stefano.coletta@0726,ou=user,dc=openam,dc=******,dc=**** “Not Available” amRest.access faab478e2155edd701 dc=openam,dc=*******,dc=*** INFO 192.168.X.Y Rest-1

        From access.csv I read:
        “cd8deac4-5a7d-4b5a-8e24-373eb5860241-475″,”2017-02-07T09:35:03.915Z”,”AM-ACCESS-OUTCOME”,”cd8deac4-5a7d-4b5a-8e24-373eb5860241-473″,”id=myuserid,ou=user,dc=openam,dc=********,dc=***”,”[“”faab478e2155edd701″”]”,”192.168.X.Y”,”8080″,”192.168.X.Z”,”41584″,”CREST”,”UPDATE”,,”false”,”PUT”,”http://myserver:80/openam/json/users/myuserid”,”{}”,”{“”accept””:[“”application/json, text/javascript, */*; q=0.01″”],””accept-api-version””:[“”protocol=1.0,resource=2.0″”],””host””:[“”myserver””],””if-match””:[“”*””],””referer””:[“”https://myserver/openam/XUI/””],””user-agent””:[“”Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0″”],””x-forwarded-for””:[“”192.168.A.B””],””x-logdigger””:[“”logme=0&reqid=f9ab20b3-3877-4181-931d-017f0cf65d1c&””],””x-logdigger-cliver””:[“”client-firefox 2.2.2″”],””x-requested-with””:[“”XMLHttpRequest””]}”,”{“”JSESSIONID””:””CAA3368010FB19413324C379B07FA599″”,””__utma””:””65829866.2094929260.1425034483.1428055236.1479833542.4″”,””__utmz””:””65829866.1479833542.4.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)””,””i18next””:””it-IT””,””amlbcookie””:””02″”}”,,”SUCCESSFUL”,,,”50″,”MILLISECONDS”,”Users”,”/”

        What I can observe is that the PUT sent by the browser to OpenAM contains this JSON:

        {“givenName”:”Stefano”,”sn”:”Coletta”,”mail”:”e-mail@example.com”,”telephoneNumber”:”5551234567″}

        The “mobile” field is not even sent to OpenAM!

        In fact the form refreshes reloading immediately the old value from OpenDJ.

        Any new ideas?

        Thank you.

        • Hi Stefano I am wondering if you were ever successfully able to add a new attribute to the profile page and have it get saved/submitted when you click the save button

Leave a Reply

Your email address will not be published. Required fields are marked *