CA Identity ManagerCA Identity GovernanceCA Identity Portal
Issue/Introduction
I use the CA Identity Manager 14.1 and i want provisioning a value to an active directory custom attribute. With Idm 12.5 i used the payload attribute to set this custom value, and it worked correctly, E.g.: for the payload value: "personalPager:01:0004=B999;"
Now i got the following error when i set the "personalPager:01:0004=B999;" value to the payload attribute: Invalid JSON data at line 1 column 1 at com.ca.identitymanager.provisioning.managedobject.impl.AccountImpl.modifyPersistedObject(AccountImpl.java:717) at com.netegrity.llsdk6.imsimpl.BaseObject.modifyObject(BaseObject.java:2112) at com.netegrity.llsdk6.imsimpl.BaseObject.modifyObject(BaseObject.java:2048)
Environment
With this issue Client was using an Event Listener for a Modify User Event. Here is an extract of the custom java code: { AccountProvider genericAccountProvider = (AccountProvider)imsEnvironment. getManagedObjectProvider(ProvisioningObjectType.PROVISIONING_ACCOUNT_OBJECTTYPE); ObjectType objectType = genericAccountProvider.getObjectType(imaccount.getHandle().getNamespace()); AccountProvider accountProvider = (AccountProvider)imsEnvironment.getManagedObjectProvider(objectType); ManagedObject managedObject = accountProvider.getManagedObject(imaccount.getHandle().toString(), null); String attrName = "payload"; if(!managedObject.containsAttribute(attrName)) { AttributeRightsCollection attrs = new AttributeRightsCollection(); attrs.addEntry(new AttributeRight(attrName, PermissionType.READWRITE)); managedObject.addAttributes(attrs); } managedObject.setAttribute(attrName, "personalPager:01:0004=B999;"); managedObject.modifyObject(); }
Cause
The following line: managedObject.setAttribute(attrName, "personalPager:01:0004=B999;"); is a wrong coding as IM expects a JSON syntax.
Resolution
Change the code to: managedObject.setAttribute(attrName, "{\"name\":\"personalPager\",\"value\":\"B999\"}");