Hello Everyone,
While everyone sleeps need just a little look into the code below.
I had to add a LOA state that if the date is 5 days before the AD accountsexpire attribute to mark them LOA else the normal active before and inactive after the account expires. Now i have this working for the two in other code but when now added the LOA i am getting a Null response back on the lifecycle state. Any help would be greatful.
"name": "IDN LifeCycle_v1",
"type": "static",
"attributes": {
"requiresPeriodicRefresh": "true",
"activestate": {
"attributes": {
"firstDate": "now",
"secondDate": {
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "accountExpires",
"sourceName": " ACTIVE DIRECTORY NON-EMPLOYEE ACCOUNT SOURCE"
}
},
"inputFormat": "EPOCH_TIME_WIN32",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"operator": "LT",
"positiveCondition": "yes",
"negativeCondition": "no"
},
"type": "dateCompare"
},
"inactivestate": {
"attributes": {
"firstDate": "now",
"secondDate": {
"type": "firstValid",
"attributes": {
"values": [
{
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "accountExpires",
"sourceName": "VALEY ACTIVE DIRECTORY NON-EMPLOYEE ACCOUNT SOURCE"
}
},
"inputFormat": "EPOCH_TIME_WIN32",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
}
],
"ignoreErrors": "true"
}
},
"operator": "GT",
"positiveCondition": "yes",
"negativeCondition": "no"
},
"type": "dateCompare"
},
"LOA": {
"attributes": {
"firstDate": {
"attributes": {
"expression": "no",
"roundUp": false
},
"type": "dateMath"
},
"secondDate": {
"type": "firstValid",
"attributes": {
"values": [
{
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "accountExpires",
"sourceName": " ACTIVE DIRECTORY NON-EMPLOYEE ACCOUNT SOURCE"
}
},
"inputFormat": "EPOCH_TIME_WIN32",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
{
"attributes": {
"expression": "now+5d/d",
"roundUp": false
},
"type": "dateMath"
}
]
}
},
"operator": "LT",
"positiveCondition": "yes",
"negativeCondition": "no"
},
"type": "dateCompare"
},
"value": "#if($inactivestate=='yes')inactive#elseif($LOA=='yes')LOA#elseif(($activestate=='yes') && ($inactivestate=='no'))active#{else}UNKNOWN#end"
},
"internal": false
}