<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
0D54z000074uxfjCAAOkta Classic EngineDirectoriesAnswered2024-02-06T13:51:25.000Z2021-07-23T11:01:52.000Z2021-07-26T12:01:48.000Z
Expression language : null values

Hi,

 

I'm trying to push an expiration date from Okta to Active Directory.

The date is not always defined as only temp contracts or trainnee have this field set in Okta.

I would like to only push values into the "AccountExpires" field when a date is set in the "EndDate" filed in Okta.

 

So far I've come up with :

user.endDate != null ? Time.fromIso8601ToWindows(Time.fromStringToIso8601(user.endDate,"dd/MM/YYYY")) : null

But this return an syntax error. However this is working :

user.endDate != "" ? Time.fromIso8601ToWindows(Time.fromStringToIso8601(user.endDate,"dd/MM/YYYY")) : ""

But will push "" in the AccountExpires field in ActiveDrectory when the source field is null.

 

What am I missing here ?

 

 


  • Hi,

     

    I've tested both expressions in my environment and both work. As this would require us to further investigate your Okta tenant, I would recommend that you open a proper Support Ticket by either opening one from the Support Portal or by reaching out to us at: (800) 219-0964

     

    Thank You,

     

    Liviu Scarlat

    Technical Support Engineer

    Okta Global Customer Care

     

    Expand Post
This question is closed.
Loading
Expression language : null values