I may have worded that a bit wrong. The value from the HR source is not empty, the value coming back from the Transform will be empty sometimes which causes an error on the Identity. (I guess Transform can’t return an empty value?)
Here is an example for the ‘DeliverToMailboxAndForward’ Attribute.
If Identity is in ‘Sunset’ LCS AND the HR Attribute ‘emailforward’ is ‘True’, we want to return a value of ‘False’ ELSE don’t return anything.
{
"name": "deliverAndForward",
"type": "conditional",
"attributes": {
"expression": "$lifecycleState eq sunset",
"positiveCondition": "$forwardingResult",
"negativeCondition": "",
"lifecycleState": {
"type": "firstValid",
"attributes": {
"values": [
{
"type": "identityAttribute",
"attributes": {
"name": "cloudLifecycleState"
}
},
{
"type": "static",
"attributes": {
"value": "active"
}
}
]
}
},
"forwardingResult": {
"type": "conditional",
"attributes": {
"expression": "$emailForward eq true",
"positiveCondition": "false",
"negativeCondition": "",
"emailForward": {
"type": "firstValid",
"attributes": {
"values": [
{
"type": "identityAttribute",
"attributes": {
"name": "emailforward"
}
},
{
"type": "static",
"attributes": {
"value": "false"
}
}
]
}
}
}
}
},
"internal": false
}
Since this Attribute will be setup as Attribute Sync – we can’t have it pushing values such as ‘N/A’ or ‘NULL’ etc. to the Exchange Online properties.
Same thing happens with the ‘forwardingRecipient’ transform. We want to Attribute Sync the email to the EXO Property of the Identity if LCS = ‘Sunset’ and emailForward = ‘True’ so we can’t have an arbitrary value pushed to Entra.
{
"name": "forwardingrecipient",
"type": "conditional",
"attributes": {
"expression": "$lifecycleState eq sunset",
"positiveCondition": "$forwardingResult",
"negativeCondition": "",
"lifecycleState": {
"type": "firstValid",
"attributes": {
"values": [
{
"type": "identityAttribute",
"attributes": {
"name": "cloudLifecycleState"
}
},
{
"type": "static",
"attributes": {
"value": "active"
}
}
]
}
},
"forwardingResult": {
"type": "conditional",
"attributes": {
"expression": "$emailForward eq true",
"positiveCondition": "$recipientValue",
"negativeCondition": "",
"emailForward": {
"type": "firstValid",
"attributes": {
"values": [
{
"type": "identityAttribute",
"attributes": {
"name": "emailforward"
}
},
{
"type": "static",
"attributes": {
"value": "false"
}
}
]
}
},
"recipientValue": {
"type": "firstValid",
"attributes": {
"values": [
{
"type": "accountAttribute",
"attributes": {
"sourceName": "CORP HR",
"attributeName": "ForwardingRecipient"
}
},
{
"type": "static",
"attributes": {
"value": ""
}
}
]
}
}
}
}
},
"internal": false
}
These work for an Identity that is terminated and moves to ‘Sunset’, but causes all other Identities to error because of the ‘blank’.
Was really hoping to use Attribute Sync, but haven’t figured it out.
Any thoughts or suggestions?
Thanks!