Hey hey, chiming in as well since we have the same requirement of clearing the manager field in IDN for inactive users (for the same reason as the original post explained).
I also went for a transform and tried a simple conditional transform first (pretty much identical to your example, @colin_mckibben) but this failed since the positiveCondition needs to be a string/object and can’t be left empty.
This was my first attempt (which caused identities to error due to the transform failing):
{
"attributes": {
"expression": "$status eq ACTIVE",
"positiveCondition": "$manager",
"negativeCondition": "none",
"status": {
"attributes": {
"sourceName": "AS01-OKTA",
"attributeName": "status"
},
"type": "accountAttribute"
},
"manager": {
"attributes": {
"sourceName": "AS01-OKTA",
"attributeName": "manager"
},
"type": "accountAttribute"
}
},
"type": "conditional",
"name": "Test Conditional Transform",
"requiresPeriodicRefresh": true
}
We also have identities in active states that might not have a manager attribute (service accounts) so I ended up expanding on the conditional transform a bit:
{
"attributes": {
"expression": "$status eq ACTIVE",
"positiveCondition": "$manager",
"negativeCondition": "none",
"status": {
"attributes": {
"sourceName": "AS01-OKTA",
"attributeName": "status"
},
"type": "accountAttribute"
},
"manager": {
"attributes": {
"values": [
{
"attributes": {
"sourceName": "AS01-OKTA",
"attributeName": "manager"
},
"type": "accountAttribute"
},
{
"attributes": {
"value": "none"
},
"type": "static"
}
]
},
"type": "firstValid"
}
},
"type": "conditional",
"name": "Manager if active (and provided)",
"requiresPeriodicRefresh": true
}
This example will output the $manager attribute from your Okta source if the user is active and has a manager - if the user isn’t active or is active but doesn’t have a manager, the output will be “none”. I’d prefer to leave it NULL for cleanliness sake but haven’t figured that out yet.
This seems to work fine (at least in preview) but I’ve had some trouble getting the identities to properly refresh - will see if the daily cycle will take care of that or if I need to do a full non optimised Okta account aggregation.
Hope this might be helpful to someone :).