Before Operation Rule for Single Account Aggregation

Hi guys,

I’m using an ID as the Account ID in a web services connector, but this ID doesn’t support the “Get Single User” endpoint.
I need to modify the nativeIdentity attribute in the Single Account Aggregation endpoint to use a different attribute.
I’ve written a Before Operation Rule to achieve this, but it’s not working as expected.
Could someone help me troubleshoot this?

import sailpoint.object.Attributes;
 
log.error("=== WS Before Operation Start ===");
 
if ("GetObject".equalsIgnoreCase(requestEndPoint.getOperationType())) {
    String userNTID = request.getAttribute("identityName");

	log.error("=== WS Before Operation idName" + identityName);

    if (userNTID != null) {
        String endpoint = application.getAttribute("baseUrl") + "/users/" + userNTID;

		log.error("=== WS Before Operation ep" + endpoint);

        request.setAttribute("endpoint", endpoint);
log.error("Updated endpoint: " + endpoint);
    } else {
        log.error("=== WS Before Operation userNTID is null!");
    }
}
 
log.error("=== WS Before Operation End ===");
 

If you look at your source configuration you should see that the operationType is “Get Object”, not “GetObject” as you have in your if statement.

For the userNTID you might try provisioningPlan.getNativeIdentity();

The above will require this library: sailpoint.object.ProvisioningPlan

If userNTID is not the account ID then you will need to iterate through the ProvisioningPlan object, but I assume for now that won’t be needed.

Hi @MattUribe ,

The userNTID is not the account ID. I need to replace this userNTID with the NativeIdentity in the endpoint url.

Ok, then take a look at this doc: Web Services Before Operation Rule

The section where it iterates over the provisioningPlan is what you are looking for:

In the above example they are looking for webId, but it should get you close enough to find the userNTID in the provisioning plan.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.