<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
0D54z000071RRgeCAGOkta Classic EngineIntegrationsAnswered2026-04-01T09:00:20.000Z2021-06-16T03:51:02.000Z2021-06-18T14:09:07.000Z

vfybs (vfybs) asked a question.

How to write an okta_expression with AND and OR nested?

I am seeing the following error

 

Error: The API returned an error: Api validation failed: validateRule. Causes: errorSummary: Invalid property status in expression (user.title == "A" OR user.title == "B") AND user.status == "C", errorSummary: conditions: Invalid expression

 

 

So if I can do (cond1 OR cond2) AND condC, how else can I express this logic in an urn:okta:expression:1.0 expression???


  • k5fuw (k5fuw)

    The error is not with your nesting (which looks fine, btw). The error specifically states "invalid property status", which would be clearer if it said "Invalid property: status". Unless "status" is a custom property/attribute that you've added to your Okta user profiles, the error is telling you that your expression is trying to use a property that doesn't exist.

      • k5fuw (k5fuw)

        Correct, the user object has a status attribute, but the user profile is itself a separate attribute of the user object. The status attribute exists at the same level as the profile attribute, not within the profile attribute array.

         

        Image is not available
        In Okta Expression Language, the "user" object refers only to the attributes that are defined inside the profile array.

         

        Unfortunately, there's no mention of how to check an object's status in the OEL documentation. To date, I've only ever used actual status values to filter the results of an API call. I'm not sure that there's a way to check the value of that attribute within an OEL expression.

        Expand Post
This question is closed.
Loading
How to write an okta_expression with AND and OR nested?