<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
0D54z000077gGpbCAEOkta Classic EngineAuthenticationAnswered2024-10-28T09:05:16.000Z2021-08-18T17:09:47.000Z2021-08-23T18:06:28.000Z

c11lv (c11lv) asked a question.

Routing Rule Regex for Boolean and Undefined

According to the following article: https://support.okta.com/help/s/article/What-is-the-Undefined-Value-in-an-Okta-attribute?language=en_US you can actually have three values for a boolean: true, false, and undefined

 

This is great, and I use this for controlling specific aspects of my user experience, however, I can't seem to figure out how to create a routing rule that can work with undefined when it's in a user attribute.

 

Basically, I need a routing rule that checks if the value is "not true", and there isn't an option for "not equals" in the matches section (the only options are Starts With, Equals, Contains, Matches Regex) , so I am attempting a regex pattern, something like (false|undefined) so I can route people to a specific IDP when they are not true. Maybe I am making it more complex than needed, so please guide me if there is already a proper solution for this. False works well, but someone with undefined skips this check and continues down my default rules.

 

Any help is greatly appreciated!


  • Hello, William

     

    This is a normal behavior, so you can create 2 rules.

    One for false and the other for undefined, and select the action you would like them to accomplish.

    As well, you can add an idea to the OktaIdeas portal asking for the "not equal" option to be added.

     

    Vicente-Okta

    Expand Post
  • c11lv (c11lv)

    But what permutation? Doing "Equals" undefined does not work either in a rule, hence why I switched to using Regex. Are you suggesting using the "Matches Regex" two times, one per rule and putting false in one, then undefined in another?

     

    I can do both now, and respond with results because I think I've already attempted this and failed. Let me try again.

    Expand Post
    • c11lv (c11lv)

      I attempted the following permutations with no success:

      1. Equals undefined
      2. Starts With un
      3. Starts With undefined
      4. Contains un
      5. Contains undefined
      6. Matches Regex undefined
      7. Matches Regex (undefined)
      Expand Post
  • Hello, @c11lv (c11lv)​ 

     

    Just confirmed that undefined will not work for a routing rule.

    You can use only tru or false, in this case you might need to add a diferent atribute so you can get the rule working.

    As well you can request an enhacement on our OktaIdeas portal.

     

    Vicente

    Okta, Inc

     

     

    Expand Post
This question is closed.
Loading
Routing Rule Regex for Boolean and Undefined