<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
0D50Z00008G7UjLSAVOkta Classic EngineLifecycle ManagementAnswered2025-06-14T10:29:51.000Z2017-05-02T17:34:22.000Z2017-05-02T17:34:22.000Z

j5v7c (j5v7c) asked a question.

Expression that can handle multiple AD domains
I'm attempting to write an expression that returns an AD attribute value. I'm currently using "active_directory_1.externalId", but I now need to extend the expression to cover users from different AD domains. Is there a way to craft an expression that will return the value for externalID from whichever AD the user is in?

  • JP Manansala (Okta, Inc.)

    Hi Mark,

     

    Thanks for reaching out Okta Community Portal.

     

    Have you tried this expression:

     

    "hasDirectoryUser() ? findDirectoryUser().active_directory_1.externalId : null" --check if user has an Active Directory assignment, and if so, return their Active Directory "active_directory_1.externalId"

     

    Best,

     

    JP Manansala
    Expand Post
This question is closed.
Loading
Expression that can handle multiple AD domains