<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
0D54z00007momY0CAIOkta Classic EngineAdministrationAnswered2024-03-25T12:20:58.000Z2022-07-04T05:36:18.000Z2022-07-05T15:54:18.000Z
  • Hi @loch8 (loch8)​ , Thank you for reaching out to the Okta Community!

     

    The following should help you achieve what you are looking for. 

     

    Resource: https://developer.okta.com/docs/reference/okta-expression-language/#string-functions

     

    > CONDITIONAL FUNCTIONS: 

     

    [Condition] ? [Value if TRUE] : [Value if FALSE]

     

    > REQUIREMENT: find OLD_domain in user's email and replace with NEW_domain

     

    Syntax according to documentation: 

     

    String.stringContains("This is a test", "test") ? String.replace("This is a test", "is", "at") : user.email

     

     

    Example for this use case: 

     

    String.stringContains(user.email, "@oldDomain.com") ? String.replace(user.email, "@oldDomain.com","@newDomain.com") : user.email

     

    ⚠️ I recommend setting up a mock app to test this mapping before applying the changes in production.

     

    If my answer helped, remember to mark it as best to increase its visibility for other members of the Okta Community who might have the same questions as you. 

     

    Hope it helps! 

    Expand Post
This question is closed.
Loading
Help needed with Okta language strings