<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
0D54z00009fsMcvCAEOkta Classic EngineAuthenticationAnswered2023-09-21T14:34:34.000Z2023-09-20T16:48:07.000Z2023-09-21T14:34:34.000Z
OKTA Expression Rule

Hi Okta Masters,

 

How can I make this expression language work?

 

(user.countryCode==“AE” OR user.UltiproLocationCode==“AE” OR user.countryCodeISO3==“ARE” OR user.countryCode==“AR” OR user.UltiproLocationCode==“AR” OR user.countryCodeISO3==“ARG” OR user.countryCode==“BR” OR user.UltiproLocationCode==“BR” OR user.countryCodeISO3==“BRA" OR user.countryCode=="CA" OR user.UltiproLocationCode=="CA" OR user.countryCodeISO3=="CAN" OR user.countryCode=="CO” OR user.UltiproLocationCode=="CO” OR user.countryCodeISO3=="COL” OR user.countryCode==“DE” OR user.UltiproLocationCode==“DE” OR user.countryCodeISO3==“DEU” OR user.countryCode==“ES” OR user.UltiproLocationCode==“ES” OR user.countryCodeISO3==“ESP” OR user.countryCode==“FR” OR user.UltiproLocationCode==“FR” OR user.countryCodeISO3==“FRA” OR user.countryCode==“IT” OR user.UltiproLocationCode==“IT” OR user.countryCodeISO3==“ITA" OR user.countryCode==“JP” OR user.UltiproLocationCode==“JP” OR user.countryCodeISO3==“JPN” OR user.countryCode==“KE” OR user.UltiproLocationCode==“KE” OR user.countryCodeISO3==“KEN” OR user.countryCode==“MX” OR user.UltiproLocationCode==“MX” OR user.countryCodeISO3==“MEX” OR user.countryCode==“NG” OR user.UltiproLocationCode==“NG” OR user.countryCodeISO3==“NGA” OR user.countryCode==“PK” OR user.UltiproLocationCode==“PK” OR user.countryCodeISO3==“PAK” OR user.countryCode==“SG” OR user.UltiproLocationCode==“SG" OR user.countryCodeISO3==“SGP" OR user.countryCode==“UA" OR user.UltiproLocationCode==“UA" OR user.countryCodeISO3==“UKR” OR user.countryCode==“NL” OR user.UltiproLocationCode==“NL” OR user.countryCodeISO3==“NLD OR user.countryCode==“US” OR user.UltiproLocationCode==“US” OR user.countryCodeISO3==“USA”) && user.oktaAcctStatus=="active"

 

/help/servlet/rtaImage?refid=0EM4z000007H6Pp

 

 


  • This is now resolved. I added this String.startsWith(user.UltiproLocationCode,"US")) && user.oktaAcctStatus=="active" in the end of the condition.

    Selected as Best
  • TimL.58332 (Workflows)

    First question: What occurs when you simplify it? Are you still getting an error?

     

    user.countryCode==“AE” && user.oktaAcctStatus=="active"

     

    Next,

     

    (user.countryCode==“AE” OR user.UltiproLocationCode==“AE”) && user.oktaAcctStatus=="active"

     

    If the above are both successful Its possible it is exceeding some limit I am not aware of. I've never tried doing an OEL as long as this one.

    Expand Post
  • Mihai N. (Okta, Inc.)

    @TimL.58332 (Workflows)​  & @User15717589852053945299 (Customer)​ sorry for barging in on the conversation. I was running some tests and writing up a long winded story about how you should check for typos and use of proper "quote" characters as it ruined my day once 😂 , when I noticed that this might be the case here. Check example BR & CA in below screenshot:

     

    image 

     

    Expand Post
  • This is now resolved. I added this String.startsWith(user.UltiproLocationCode,"US")) && user.oktaAcctStatus=="active" in the end of the condition.

    Selected as Best
This question is closed.
Loading
OKTA Expression Rule