Unable to Parse login date in EPic with transform

Hi Team.,

I am running into a bit of a pickle. I am attempting to pull the login date from Epic but it is not parsing it correctly. It’s only returning the static. Has anyone been able to parse the date for Logins from EPic in a transform before?

{
    
    "name": "XXXXXXX",
    "type": "dateFormat",
    "attributes": {
        "input": {
            "type": "firstValid",
            "attributes": {
                "values": [
                    {
                        "attributes": {
                            "sourceName": "XXXX",
                            "attributeName": "Last successful login"
                        },
                        "type": "accountAttribute"
                    },
                    {
                        "type": "static",
                        "attributes": {
                            "value": "0"
                        }
                    }
                ]
            }
        },
        "inputFormat": "EPOCH_TIME_WIN32",
        "outputFormat": "ISO8601"
    },
    "internal": false
}

Hi @P96337 ,

I could see that implemented transform will check only for the “Last successful login” for each identity on soruce “XXXX”. If it’s not found then it has to return a static value which is 0 in your case since this is a firstValid transform.

ITHT :slightly_smiling_face:

Welcome back @P96337 :waving_hand:

Allow me to help you troubleshoot the Epic login date parsing issue.

Since your transform is only returning the static value “0”, this indicates the firstValid transform is not finding valid data in the “Last successful login” attribute, so it’s falling back to your static fallback.

First, let’s check what format Epic is actually providing for login dates. Select your Epic source and view a few accounts to check the value in “Last successful login” account attribute.

Note: Epic systems often use different date formats than expected.

The value you see for the dates may be in one of these formats documented in dateFormat transform: Date Format | SailPoint Developer Community

Try this diagnostic version to see what data you’re actually getting:

{
    "name": "Epic-Login-Debug",
    "type": "firstValid",
    "attributes": {
        "values": [
            {
                "type": "accountAttribute",
                "attributes": {
                    "sourceName": "XXXX",
                    "attributeName": "Last successful login"
                }
            },
            {
                "type": "static",
                "attributes": {
                    "value": "NO_DATA_FOUND"
                }
            }
        ]
    }
}

Your potential solutions would be based on Epic date Format. Supported inputFormat options are already documented in the transform link above.

For instance If Epic uses Java epoch (milliseconds):

{
    "name": "Epic-Login-Java-Epoch",
    "type": "dateFormat", 
    "attributes": {
        "input": {
            "type": "firstValid",
            "attributes": {
                "values": [
                    {
                        "type": "accountAttribute",
                        "attributes": {
                            "sourceName": "XXXX",
                            "attributeName": "Last successful login"
                        }
                    },
                    {
                        "type": "static",
                        "attributes": {
                            "value": "0"
                        }
                    }
                ]
            }
        },
        "inputFormat": "EPOCH_TIME_JAVA",
        "outputFormat": "ISO8601"
    }
}

If Epic uses string format:

{
    "name": "Epic-Login-String",
    "type": "dateFormat",
    "attributes": {
        "input": {
            "type": "firstValid", 
            "attributes": {
                "values": [
                    {
                        "type": "accountAttribute",
                        "attributes": {
                            "sourceName": "XXXX",
                            "attributeName": "Last successful login"
                        }
                    },
                    {
                        "type": "static",
                        "attributes": {
                            "value": "01/01/1970"
                        }
                    }
                ]
            }
        },
        "inputFormat": "MM/dd/yyyy",
        "outputFormat": "ISO8601"
    }
}

Epic date format might be custom, so the diagnostic step is crucial!

Let us know what the diagnostic transform shows and we can help you further.

Good luck!

Thanks Amar,

It is returning the static value when using the debug

Hey @P96337,

The NO_DATA_FOUND result tells us the attribute “Last successful login” doesn’t exist in Epic source schema or does have a value null.

When I verified neither did I see Last successful login as a valid account attribute in source nor did I see it referenced in EPIC APIs; is this a custom account attribute in your source configuration?

Epic Healthcare connector DOES have a date-related attribute: ContactDate

According to SailPoint documentation: “ContactDate is last modified date. Defaults to current date if not provided.”

Confirm the account attribute you are using in transform is valid by below steps in order: -

  1. Go to account schema in your EPIC source and confirm the attribute exist.
  2. Open a few accounts in the source or export accounts and confirm value of the attribute is not null.
  3. Validate the accounts are correlated to identities.

Work around: Update your transform to use ContactDate instead of “Last successful login” if the above check fails: -

{
    "name": "Epic-ContactDate-Transform",
    "type": "dateFormat",
    "attributes": {
        "input": {
            "type": "firstValid",
            "attributes": {
                "values": [
                    {
                        "attributes": {
                            "sourceName": "EPIC HC",
                            "attributeName": "ContactDate"
                        },
                        "type": "accountAttribute"
                    },
                    {
                        "type": "static",
                        "attributes": {
                            "value": "0"
                        }
                    }
                ]
            }
        },
        "inputFormat": "EPOCH_TIME_WIN32",
        "outputFormat": "ISO8601"
    }
}

Of course, test with a debug transform similar to above to validate data.

Recommended solution: Work with your Epic admins to identify available login timestamp fields for custom attributes. Check what format the dates are in and adjust inputFormat accordingly in transform.