To update a disable provisioning policy

Hi All,

I am developing a disable provisioning policy to capture the timestamp when an account is disabled. After being disabled, the account should be moved to the “disabled items” OU, and the timestamp needs to be recorded. Although the transformation works outside the policy, it is not functioning within it.
PFB attached. Can someone help ?
finaltransform.txt (1.7 KB)

Hi,

If you need the date and timestamp of when the account is disabled, you don’t need user end date.

Use below config

{
    "name": "Disable Account",
    "description": null,
    "usageType": "DISABLE",
    "fields": [
        {
            "name": "AC_NewParent",
            "transform": {
                "type": "static",
                "attributes": {
                    "value": "OU=Disabled Items,DC=XX,DC=xx,DC=XXXx"
                }
            },
            "attributes": {},
            "isRequired": false,
            "type": "string",
            "isMultiValued": false
        },
        {
            "name": "description",
            "transform":{
                "type": "static",
                "attributes": {
                "disabledate": {
                    "type": "dateMath",
                    "attributes": {
                        "expression": "now",
                        "roundUp": true
                    }
                },
                "value": "the account is disabled on $disabledate"
            }
        },
            "attributes": {},
            "isRequired": false,
            "type": "string",
            "isMultiValued": false
        }
    ]
}

– Krish

@KRM7 - thanks for swift reply,
but to Add the transform to existing policy we must use a identity attribute…
so i tried with that…
let me try
again…

1 Like

@nidhipriya you can use a before rule to update the terminated timestamp and update the date using the same

{
Date currDate = new Date();
long adTimestamp = (currDate.getTime()*10000L) + 116444736000000000L;
return Long.toString(adTimestamp);
}

Hi @KRM7 -
i just modified the transform to convert the date format from ISO8601 to yyyyMMddHHmmss.Z , but its not yielding expected results.
trans.txt (1.0 KB)

@schattopadhy - Thank you,
let me try …

{
    "name": "Test AD Static Transform",
    "type": "static",
    "attributes": {
        "date": {
            "type": "dateMath",
            "attributes": {
                "expression": "now",
                "roundUp": true
            }
        },
        "value": "Disabled by IDN on $date"
    },
    "internal": false
}

Output:
Disabled by IDN on 2025-03-10T16:02:33.121494Z

{
    "name": "Test AD Static Transform",
    "type": "static",
    "attributes": {
        "date": {
            "type": "dateFormat",
            "attributes": {
                "inputFormat": "yyyy-MM-dd'T'HH:mm",
                "outputFormat": "yyyyMMddHHmmss.Z",
                "input": {
                    "type": "dateMath",
                    "attributes": {
                        "expression": "now",
                        "roundUp": true
                    }
                }
            }
        },
        "value": "Disabled by IDN on $date"
    },
    "internal": false
}

Output:
Disabled by IDN on 20250310160700.+0000

The output format for the DateMath transform is “yyyy-MM-dd’T’HH:mm”

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.