<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
0D51Y00008pdesESAQOkta Classic EngineUniversal DirectoryAnswered2024-04-16T11:15:24.000Z2020-07-02T12:53:30.000Z2020-07-03T11:38:15.000Z

MarioC.86423 (Boerse Stuttgart) asked a question.

Group Rules Filter User Email

Hi, how to create a Group Rule with following conditions: IF User.Email "*@mail1.com" OR "*@mail2.com" AND NOT "*external@mail1.com" OR "*external@mail2.com"

 

I want to add all Users with Email Address ending @mail1.com or @mail2.com to a group without external employees they have a prefix external@mail1.com or external@mail2.com

 

Thank you


  • feok4 (feok4)

    we use something like this, which you should be able to use to exclude users with a prefix:

     

    !(isMemberOfGroup("NAME OF OUR GROUP")) AND !(String.stringContains(user.email,"@domain1.com") or String.stringContains(user.email,"@domain2.com"))

  • feok4 (feok4)

    I understand that - my example shows how you can look for multiple items in a line. If you're still stuck, reach out to support - the Okta folks are great when helping with their expressions...

  • MarioC.86423 (Boerse Stuttgart)

    Got it 🙂

     

    (String.stringContains(user.email,"@domain1.com") OR String.stringContains(user.email,"@domain2.com")) AND NOT String.stringContains(user.email,"external")

     

    It works all users that contains "external" are excluded

    Expand Post
This question is closed.
Loading
Group Rules Filter User Email