Provisioning Policy with Transform

Hello,
I’m trying to get my transform to work but it doesn’t do anything.
I tried my transform using the CLI and it worked fine, however in the provisioning policy for the same user, it doesn’t work:

[
    {
        "name": "Account",
        "description": null,
        "usageType": "CREATE",
        "fields": [
            {
                "name": "FirstName",
                "transform": {
                    "type": "identityAttribute",
                    "attributes": {
                        "name": "firstname"
                    }
                },
                "attributes": {},
                "isRequired": false,
                "type": "string",
                "isMultiValued": false
            },
            {
                "name": "LastName",
                "transform": {
                    "type": "identityAttribute",
                    "attributes": {
                        "name": "lastname"
                    }
                },
                "attributes": {},
                "isRequired": false,
                "type": "string",
                "isMultiValued": false
            },
            {
                "name": "PreferredName",
                "transform": {
                    "type": "identityAttribute",
                    "attributes": {
                        "name": "firstname"
                    }
                },
                "attributes": {},
                "isRequired": false,
                "type": "string",
                "isMultiValued": false
            },
            {
                "name": "StartDate",
                "transform": {
                    "type": "dateFormat",
                    "attributes": {
                        "name": "Change Start Date Format",
                        "input": {
                            "type": "identityAttribute",
                            "attributes": {
                                "name": "startDate"
                            }
                        }
                    }
                },
                "attributes": {},
                "isRequired": false,
                "type": "string",
                "isMultiValued": false
            }
       ]
    }
]

The transform:

{
    "id": "",
    "name": "Change Start Date Format",
    "type": "dateFormat",
    "attributes": {
        "inputFormat": "dd/MM/yyyy H:m:s a z",
        "outputFormat": "yyyy-MM-ddTHH:mm:ss"
    },
    "internal": false
}

When I test in CLI:

Original value: 12/4/2017 0:0:0 AM UTC
Transformed value: 2017-04-12T00:00:00

However, when I print the provisioning plan in the before operation rule (it is a webservice connector), for the same user, it doesn’t appear.
What am I doing wrong?

Thank you.

Hi @veroniqueb, I assume you are trying to reference the transform script with the name “Change Start Date Format”, but from what I see in your provisioning policy, you are using type: dateFormat instead and not type: reference.

You can try this:

{
    "name": "StartDate",
    "transform": {
        "type": "reference",
        "attributes": {
            "id": "Change Start Date Format",
            "input": {
                "type": "identityAttribute",
                "attributes": {
                    "name": "startDate"
                }
            }
        }
    },
    "attributes": {},
    "isRequired": false,
    "type": "string",
    "isMultiValued": false
}

Reference | SailPoint Developer Community

Hope this helps.

1 Like

Thank you, that was this + the source being cached for some reasons and not changing when I update it and test again.

1 Like

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