Provisioning of Extended Attributes

To provision extended attributes, write a Before Provisioning rule to modify the Provisioning Plan and prepare an attribute request which includes only the right value (not the full JSON).

The following is an example of a Before Provisioning rule to update extended complex schema attributes if the managed system supports the HTTP PATCH method:

Copy
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;
import com.fasterxml.jackson.databind.ObjectMapper;
import sailpoint.object.Application;
import sailpoint.object.ProvisioningPlan;
import sailpoint.object.ProvisioningPlan.AttributeRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

   try {
       AttributeRequest attrReq = plan.getAccountRequest(application.getName()).getAttributeRequest("manager");
        String valueList = attrReq.getValue().toString();
       // Here you get a value in JSON format, fetch your interesting value from the JSON
     // Parser Logic goes here.
     ObjectMapper mapper = new ObjectMapper();
     Map map = mapper.readValue(valueList , Map.class);
     String value = (String) map.get("value");
     // Prepare the right AttributeRequest
     attrReq.setName("manager.value");
     attrReq.setValue(value);
   } catch (Exception e) {
       e.printStackTrace();
   }

Note
You may need to enable the provisionMultivaluedRFCCompatible parameter to support the correct JSON for provisioning multivalued extended schema attributes for relaxed configuration. Add the following to your application XML to enable this parameter:

Copy
<entry key="provisionMultivaluedRFCCompatible">
    <value>
        <Boolean>true</Boolean>
    </value>
</entry>