<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
0D51Y00005vSKJbSAOOkta Classic EngineLifecycle ManagementAnswered2019-03-15T13:47:18.000Z2019-01-29T16:56:49.000Z2019-01-30T06:45:09.000Z
Using the Okta Expression Language to search for contains in the profile editor

I am looking to search the DN of an incoming user for a value, and populate an Okta attribute based on finding. Something like:  String.stringContains(appuser.firstName, “dummy”) ? appuser.firstName : appuser.lastName

 

Has anyone successfully searched the string for a match in the profile editor?


  • VanH.30758 (Lytx, Inc.)

    Hmm. I've worked a little bit with it. So it sounds like you're looking for a value in the distinguished name of the active directory integration and if it does to output their first name, otherwise lastname. If that's the case, it appears to be working for me.

     

    This is what I have:

    String.stringContains(appuser.dn,"itsupport")?appuser.firstName:appuser.lastName

     

    My DN contains the words "itsupport", so it outputs my first name.

     

    This was done in my AD mapping. If you're trying to do it in another map you have to reference the application variable name, for example "active_directory".

     

    Hopefully I'm not off base.

    Expand Post
This question is closed.
Loading
Using the Okta Expression Language to search for contains in the profile editor