<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D5KZ00001IIZsF0AXOkta Classic EngineLifecycle ManagementAnswered2025-08-29T15:23:09.000Z2025-08-22T13:28:09.000Z2025-08-29T15:23:09.000Z

1810a.54142 (Customer) asked a question.

Termination date is not cleared when a user is Rehired

Workday syncs the terminationDate to OKTA and then OKTA updates the accountExpires attribute in AD - this following mapping works great: user.terminationDate != null ? Time.fromIso8601ToWindows(Time.fromStringToIso8601(user.terminationDate + " 22:00:00", "MM-dd-YYYY HH:mm:ss")) : 0

 

However, Workday does not clear the termination date when a user is Rehired. Need to add in a check if the terminationDate is greater then the hireDate.

 

User A: hire date 06-01-2025 terminationDate is blank - account expires should be set to 0

User B: hire date 06-01-2025 terminationDate 11-01-2025 - account expires populated with 11-01-2025

User C: hire date 06-01-2025 terminationDate 01-01-2025 - account expires should be set to 0

 

How can this be accomplished


  • RohitU.50441 (Trevonix)

    @1810a.54142 (Customer)​ the expressions could possibly go deeper and time stamps can be checked as wel.

     

    Below is one such example to check end date against start date.

     

    user.endDate != null &&

    Time.fromIso8601ToUnix(Time.fromStringToIso8601(user.endDate, "MM-dd-YYYY"))

    >

    Time.fromIso8601ToUnix(Time.fromStringToIso8601(user.startDate, "MM-dd-YYYY"))

    ? 1: 0

     

    If endDate is not null, compare it with startDate.

     

    If endDate is greater than startDate, 1

     

    Otherwise, return 0 (no expiration)

    Expand Post
    Selected as Best
  • User17157611498146715886 (Customer Support Online Community and Social Care)

    Hello @1810a.54142 (Customer)​ , thank you for contacting Okta Community!

     

    The Okta Community Questions forum isn't really meant for in-depth troubleshooting.

    I’ve noticed that you already have a Support ticket open. I recommend that you continue the discussion with the assigned Technical Support Engineers. They'll be able to access additional tools and resources to help you get to the bottom of it.

     

    Regards. 

    Help others in the community by liking or hitting Select as Best if this response helped you.

    Just released: More Okta Community badges just added

    Expand Post
  • TimL.58332 (Workflows)

    @1810a.54142 (Customer)​ - You can have If/Else statements inside of If/Else statements.

     

    Evaluation ? If True : If False

     

    You can do :

     

    Evaluation ? If True (Evaluation ? If True : IfFalse) : If False

     

    I've seen them nested pretty deep. What this means is you should be able to do something like:

     

    If !null start up another evaluation to do B/C steps. The following isn't likely accurate I'm not actually testing it just doing it from memory. But it would look something like:

     

    profile.attribute != null ? profile.attribute lt '2025-01-10' ? New value when true : New value when false : 0 (because it was null)

    Expand Post
  • RohitU.50441 (Trevonix)

    @1810a.54142 (Customer)​ the expressions could possibly go deeper and time stamps can be checked as wel.

     

    Below is one such example to check end date against start date.

     

    user.endDate != null &&

    Time.fromIso8601ToUnix(Time.fromStringToIso8601(user.endDate, "MM-dd-YYYY"))

    >

    Time.fromIso8601ToUnix(Time.fromStringToIso8601(user.startDate, "MM-dd-YYYY"))

    ? 1: 0

     

    If endDate is not null, compare it with startDate.

     

    If endDate is greater than startDate, 1

     

    Otherwise, return 0 (no expiration)

    Expand Post
    Selected as Best
This question is closed.
Loading
Termination date is not cleared when a user is Rehired