Hi, I have a requirement to create a lifecycle state transform in which if password crosses 98 days, then account in AD should be disabled and if password crosses 120 days, then account should be deleted in AD. I am using below transform for same but it is not working.
{
"name": "Password Check Transform",
"type":"static",
"attributes": {
"currentDate": {
"type": "dateCompare",
"attributes": {
"firstDate": {
"type": "dateFormat",
"attributes": {
"input": {
"type":"dateMath",
"attributes": {
"expression": "now"
}
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
}
},
"secondDate": {
"type": "dateFormat",
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"sourceName": "AD",
"attributeName": "pwdLastSet"
}
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
}
},
"operator": "gt",
"positiveCondition": "true",
"negativeCondition": "false"
}
},
"98DayCheck": {
"type": "dateCompare",
"attributes": {
"firstDate": {
"type": "dateFormat",
"attributes": {
"input": {
"type":"dateMath",
"attributes": {
"expression": "now+98d"
}
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
}
},
"secondDate": {
"type": "dateFormat",
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"sourceName": "AD",
"attributeName": "pwdLastSet"
}
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
}
},
"operator": "gt",
"positiveCondition": "true",
"negativeCondition": "false"
}
},
"120DayCheck": {
"type": "dateCompare",
"attributes": {
"firstDate": {
"type": "dateFormat",
"attributes": {
"input": {
"type":"dateMath",
"attributes": {
"expression": "now+120d"
}
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
}
},
"secondDate": {
"type": "dateFormat",
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"sourceName": "AD",
"attributeName": "pwdLastSet"
}
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
}
},
"operator": "gt",
"positiveCondition": "true",
"negativeCondition": "false"
}
}
},
"value": "#if($98DayCheck=='true')LPS98#elseif($120DayCheck=='true')LPS120#end"
}