Adding new attribute to WebSphere Portal

WHen you configure websphere portal to use LDAP as a user repository, it only maps the standard set of attributes from WebSphere Portal to underlying LDAP. But what if your LDAP has some business specific attribute that you want to access through either theme or portlets Ex. Tivoli Directory Server 6.2 has postOfficeBox attributes that you want to access either from your theme or portlet using PUMA API but that attribute is not defined in WebSphere Portal In situations like that you might want to add new attribute in WebSphere Portal.

Follow these steps to add new attribute

  • Execute ./ConfigEngine.sh wp-la-install-ear task, this task will install WIMSYSTEM.ear which contains wimejb.jar on your portal server. The wimejb.jar is used for actual attribute addition

  • After installing WIMSystem.ear restart both server1 and WebSphere_Portal

  • The configuration task makes calls to wimejb for adding attributes. The wimejb is secured so in order to access it you will have to either Change the sas.client.properties to set values for these two properties

    com.ibm.CORBA.loginUserid=wasadmin
    com.ibm.CORBA.loginPassword=wasadmin

    or enter WAS admin's user id and password at the time of executing the configuration task.

  • YOu will have to set following 5 properties in order to add new attribute. You have two options either you can set these properties in wkplc.properites or you can create addattribute.properties file like this

    la.providerURL=corbaloc:iiop:localhost:10031
    la.propertyName=postOfficeBox
    la.entityTypes=PersonAccount
    la.dataType=String
    la.multiValued=yes

    In this file value of propviderURL should be the servername:bootstapport number.

  • Execute the following configuration task to add the postOfficeBox as attribute to the WebSphere Portal

    ./ConfigEngine.sh wp-add-property -DparentProperties=/software/IBM/WebSphere/wp_profile/ConfigEngine/config/helpers/addattribute.properties


  • Query WebSphere Portal using ./ConfigEngine.sh wp-query-attribute-config to check the updated attribute attribute mapping, you should see name of the postOfficeBox attribute in the list

    Take a look at Querying LDAP Attributes for further details on querying LDAP attributes

  • Restart the WebSphere_Portal server so that your changes take effect

5 comments:

Pankaj Kumar Sinha said...

first of all i want to thank you for the wonderful effort that you have made for sharing your experiences with others through this blog.
I tried adding new attribut using steps given and was successful in doing it.
I am wondering if you have blogged on how to show newely added attributes in "edit my profile" page

Sunil Patil said...

Take a look at Adding attribute to Edit My profile link for information on how to add attributes to Edit My Profile

Unknown said...

I followed your steps and it worked, Many thanks

I tried it in portal server where no LDAP is configured.
If I want to add to portal where an LDAP is configured, will the same steps work?

Ramkumar said...

Sunil, Do you know how to remove a custom attribute which is added using 'wp-add-property' ?? thanks!

Unknown said...

Hi, In case if you face following issue while installing the wp-la-install-ear follow the below steps.

com.ibm.websphere.management.exception.AdminException: ADMA0043E: C:\Users\Administrator\AppData\Local\Temp\WIMSYSTEM1645f2b1298.ear does not exist for installation.

Solution: http://www-01.ibm.com/support/docview.wss?uid=swg21461940
Check the Windows Environment Variables, and see what TEMP, and/or TMP are set to. If they have a variable defined in the path such as %USERPROFILE% then that can cause a problem.

Change the Windows Environment Variable to point to a fix location such as the C:\ drive

Set the TEMP and/or TMP variable to point to: C:\TEMP
Log off of windows and log back in
Run Content Engine CMUI and redploy ear file