VanH.30758 (Lytx, Inc.) asked a question.
0D50Z00008G7VLBSA3Okta Classic EngineAdministrationAnswered2026-04-19T09:00:16.000Z2018-03-01T02:51:13.000Z2020-06-03T11:45:04.000Z
Okta Expressions - IF/Than/Else - Populating Mobile Number into Active Directory from Workday
Hi all,I'm new to Okta's expression language and I'm trying to work out an issue I'm having with a new project initiative involving automating signatures via Mimecast (mail going out) and Office 365 (internal mail only). I'm trying to pull the mobile number value from Workday (our HR system) into AD attribute customAttribute15, but i'd like to have the word "Mobile" appear before the phone number, if it exists. If it does not exist then I'd like to return nothing. Example:workday.mobilePhone = 555-555-5555 This is what I have so far:String.len(workday.mobilePhone) > 0 ? String.join("Mobile", + workday.mobilePhone) : null My thought process on this was that if the variable length is greater than no characters, then add "Mobile" and the phone number pulled from Workday. Otherwise return nothing. I keep getting the error "Error in Evaluating Expression", but I believe it works for users that do not have a mobile number populated. Any expert advice would be greatly appreciated. Regards,Van Huynh
- VanH.30758 (Lytx, Inc.)Thank you very much for the response Jaypee! I still got an error with that try but you definitely simplified the code and gave me a great lead and I got it working! The expression that worked was: workday.mobilePhone != null ? "Mobile " + workday.mobilePhone : null I guess we just didn't need the parentheses. We do testing for automated Office 365 signatures using the extensionAttribute tomorrow! Cheers!Expand Post
JP Manansala (Okta, Inc.)Hi Van, Thanks for posting your inquiry in Okta Community Portal. Try using this custom expression: workday.mobilePhone != null ? ("Mobile" + workday.mobilePhone) : null Best, JPMExpand Post- VanH.30758 (Lytx, Inc.)Thank you very much for the response Jaypee! I still got an error with that try but you definitely simplified the code and gave me a great lead and I got it working! The expression that worked was: workday.mobilePhone != null ? "Mobile " + workday.mobilePhone : null I guess we just didn't need the parentheses. We do testing for automated Office 365 signatures using the extensionAttribute tomorrow! Cheers!Expand Post
5cjpl (5cjpl)Hello,
I am trying to import Manager attribute from AD to OKTA using below query but getting an error "Error evaluating expression". We have two AD domains.
getManagerAppUser("active_directory", "active_directory").email
Could you please help in getting this fixed.
Thanks in Advance.
Expand Post
qfjck (qfjck)This is what we have in ours; (Profile editor > Directories > Select domain > Select AD to Okta user > make sure the attribute is there, if not add it then add:
Image is not availableExpand Post
This question is closed.
