Using Boolean Attributes in a Group Rule Expression
Last Updated:
Overview
Admins may come across issues when trying to set up a group rule when using an expression to target Boolean attribute values where an error the following error is generated.
Error: user does not match the rule
Applies To
- Group rules
- Groups
- Boolean Attributes
- Universal Directory
- Lifecycle Management
Cause
The error is generated due to the Okta Expression Language validator from the group rules not identifying the attribute value for a boolean type attribute the same as for a string type attribute, which normally requires " " (double quotes) to define the value ( eg., =="Value1") as indicated in the below screenshot.
Solution
To avoid this error, the expression used in the group rule would need to be slightly modified so that the validator recognizes it, removing the "" from the boolean value.
An example of this would be the following:
user.boolean_attribute==true
The validator will recognize the expression and the group rule will function as well as any other. Admins can create additional and more complex expressions based on the use case.
