How to Access NativeIdentity in Web Services After Operation Rule for "Get Object" Operation

Hi all,

I’m configuring a Web Services connector for a source that does not support a “Get User by ID” API. To work around this, I’m configuring the “Get Object” operation to call the “Get Users” API (which returns all users), and then filtering the results in a Web Services After Operation Rule to return only the user matching the requested ID.

The challenge I’m facing is: how do I access the NativeIdentity (i.e., the ID of the user being requested) inside the After Operation Rule?

I understand that in other rule types, the NativeIdentity is available via the AccountRequest, but in the After Operation Rule, the inputs are limited to:

  • application

  • requestEndPoint

  • processedResponseObject

  • rawResponseObject

  • restClient

I don’t see any obvious way to access the NativeIdentity from the requestEndPoint.

However, I can see in the ccg.log that the NativeIdentity is being passed correctly. Here’s a snippet:

{
"Operation": "GetObject",
"ObjectType": "account",
"NativeIdentity": "xyz123",
"message": "TestSource_WSAO_GetUserByName updatedMapInfo is {data=[]}",
...
}

So SailPoint clearly has the NativeIdentity somewhere in context — I just don’t know how to access it in the rule code.

Question:
Is there a supported way to access the NativeIdentity in a Web Services After Operation Rule for a “Get Object” operation? Can it be retrieved from the requestEndPoint, or is there another method?

In the After Operation rule, can’t you just get the attribute that you use for Native Identity?

Eg, say your native Identity was account attribute ‘email’ then you can use

Map updatedMapInfo = new HashMap();
if (processedResponseObject != null){
 
    for (Map iterateMap : processedResponseObject) {
        if (iterateMap != null ) {
            Set keySet = iterateMap.keySet();
            for (String s : keySet) {
                if (s.equals("email")) {
            String nativeId = (String) iterateMap.get("email");

You can use the transientValue approach where you can store a value in the application from the BeforeOp rule and then access the same from AfterOp rule.

1 Like

I ended up putting $plan.nativeIdentity$ in the body of the operation, then retrieved it in the AfterOp rule.

1 Like

i typically just use the processsedResponseObject, and then interate and do a .get(“the id attribute”) off of the record.