Ah, thank you for the details.
As a notice, I do not have access to a tenant so I canât test anything out. You will have to bear with me if I lead you astray.
In response to the Identity Attribute Rule, you have access to the complete identity object. See the documentation for more details.
What is uncertain is the state of the identity object that is passed into the rule. Is the object updated in real time as it is undergoing the refresh or is it stale data based on the identity at the start of the refresh.
If it is stale data base on the identity at the start of the refresh, then this solution would work fine for you as the old value would be stored in the identity object. To add further, you can actually access the identity object from within a transform as it is accessible by the Apache Velocity engine; documentation for details. So, the rule may be unnecessary complexity as you could get by with a transform.
If the object is updated in real time as the system calculates the new values for each attribute, then you have a race condition as attribute A may have already been refresh and you lost its old value.
I cannot speak to how SailPoint developed out the functionality and it may be worthwhile to get in contact with them. Alternatively, you could do lots of black box testing until you are confident in your understanding.
If we encounter the race condition, you could use the quick and dirty solution below:
Create a new attribute, C, to store both the old and new values of A. e.g. C = Leave,Terminated. The below transform should work to ensure C is calculated properly.
{
"name": "Get Attribute C",
"type": "static",
"attributes": {
"currentAValue": { //This transform will return the value of A prior to the refresh. e.g. Terminated.
"type": "split",
"attributes": {
"delimiter": ",",
"index": "1",
"input": {
"type": "static",
"attributes": {
"value": "$oldValue"
}
}
}
},
"newAValue": { //This transform will return the expected value of A after the refresh.
"type": "reference",
"attributes": {
"id": "Get Attribute A"
}
},
"value": "#if($newAValue != $currentAValue)$currentAValue,$newAValue#{else}$oldValue#end"
}
}
Then when you want the retrieve the old value of A you would use the below transform.
{
"name": "Get Attribute A (Old)",
"type": "split",
"attributes": {
"delimiter": ",",
"index": "0",
"input": {
"type": "reference",
"attributes": {
"id": "Get Attribute C"
}
}
}
}
Alternatively, you may be able to get by using a workflow. The Identity Attribute Change trigger will be able to capture this scenario perfectly.