<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
0D54z00008jUZDiCAOOkta Classic EngineIntegrationsAnswered2023-01-31T21:46:43.000Z2023-01-30T20:48:21.000Z2023-01-31T21:46:43.000Z

RubyM.45323 (Customer) asked a question.

Help with an OEL. If value for attribute is empty or null, then create email based on users first.lastname

(user.nonConformingEmailAddress =='' OR user.nonConformingEmailAddress ==null)? (appuser.preferredName.PreferredLastName) + “@domain.com”: user.nonConformingEmailAddress

This is what I've come up with. And have messed with it a few times without making it work.

Basically

  1. If nonConformingEmailAddress is null or empty, and isContractor is empty, then create an email addressed based on attributes preferredName.PreferredLastName and append @ domain.com , else use user.nonConformingEmailAddress. And if nonConformingEmailAddress is empty, and isContractor is not empty, assign preferredName.PreferredLastName and append @ SecondDomain.com

Help and thank you

 


  • Mihai N. (Okta, Inc.)

    Hi @RubyM.45323 (Customer)​ , Thank you for reaching out to the Okta Community!

     

    The context is not clear here so I'm operating based on what I consider common assumptions when I suggest the following example syntaxes. 

    I also want to mention the following caveats: 

    • the attributes mentioned in the context of user.* or appuser.* use the variable names mentioned under your Okta Admin Dashboard → Directory → Profile Editor and are case sensitive.
    • "empty" does not not mean "null" - as such the following syntaxes are dependent on the "isContractor" attribute to not be null (to clarify - it must have had a value at some point) - otherwise the syntaxes do not work.  
    • attribute mapping only works from App to Okta OR Okta to App NOT Okta to Okta.  

     

     

    APP ==> OKTA Mapping

     

    (appuser.nonConformingEmailAddress =="" OR appuser.nonConformingEmailAddress ==null) AND appuser.isContractor == "" ? appuser.PreferredLastName + "@domian.com" : (appuser.nonConformingEmailAddress =="" OR appuser.nonConformingEmailAddress ==null) AND appuser.isContractor != "" ? appuser.PreferredLastName + "@SecondDomian.com" : appuser.nonConformingEmailAddress

     

     

    OKTA ==> APP mapping

     

    (user.nonConformingEmailAddress =="" OR user.nonConformingEmailAddress ==null) AND user.isContractor == "" ? user.PreferredLastName + "@domian.com" : (user.nonConformingEmailAddress =="" OR user.nonConformingEmailAddress ==null) AND user.isContractor != "" ? user.PreferredLastName + "@SecondDomian.com" : user.nonConformingEmailAddress

     

     

     

    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 my answer helps! 

    --------------------------------

    Community members help others by clicking Like or Select as Best on responses. Try it today.

    Expand Post
This question is closed.
Loading
Help with an OEL. If value for attribute is empty or null, then create email based on users first.lastname