Overview#

SCIM Filtering defines a standard set of SCIM operations that can be used for SCIM Search Requests and SCIM Read Requests

SCIM Filtering is OPTIONAL#

SCIM Clients may request a subset of SCIM Resources by specifying the 'filter' URL query parameter containing a filter expression. When specified only those SCIM Resources matching the filter expression SHALL be returned. The expression language that is used in the filter parameter supports references to attributes and literals. The literal values can be strings enclosed in double quotes, numbers, date times enclosed in double quotes, and Boolean values; i.e., true or false. String literals MUST be valid JSON strings.

The attribute name and attribute operator are case insensitive. For example, the following two expressions will evaluate to the same logical value:

filter=userName Eq "john"

filter=Username eq "john"

SCIM Filtering Rules:

  • The filter parameter MUST contain at least one valid Boolean expression.
  • Each expression MUST contain an attribute name followed by an attribute operator and optional value.
  • Multiple expressions MAY be combined using the two logical operators. Furthermore expressions can be grouped together using "()".

The operators supported in the expression are listed in the following table.

OperatorDescriptionBehavior
eqequalThe attribute and operator values must be identical for a match.
cocontainsThe entire operator value must be a substring of the attribute value for a match.
swstarts withThe entire operator value must be a substring of the attribute value, starting at the beginning of the attribute value. This criterion is satisfied if the two strings are identical.
prpresent (has value)If the attribute has a non-empty value, or if it contains a non-empty node for complex attributes there is a match.
gtgreater thanIf the attribute value is greater than operator value, there is a match. The actual comparison is dependent on the attribute type. For string attribute types, this is a lexicographical comparison and for DateTime types, it is a chronological comparison.
gegreater than or equalIf the attribute value is greater than or equal to the operator value, there is a match. The actual comparison is dependent on the attribute type. For string attribute types, this is a lexicographical comparison and for DateTime types, it is a chronological comparison.
ltless thanIf the attribute value is less than operator value, there is a match. The actual comparison is dependent on the attribute type. For string attribute types, this is a lexicographical comparison and for DateTime types, it is a chronological comparison.
leless than or equalIf the attribute value is less than or equal to the operator value, there is a match. The actual comparison is dependent on the attribute type. For string attribute types, this is a lexicographical comparison and for DateTime types, it is a chronological comparison.

Table 2: Attribute Operators #

OperatorDescriptionBehavior
andLogical AndThe filter is only a match if both expressions evaluate to true.
orLogical orThe filter is a match if either expression evaluates to true.

Table 3: Logical Operators

OperatorDescriptionBehavior
()Precedence groupingBoolean expressions may be grouped using parentheses to change the standard order of operations; i.e., evaluate OR logical operators before logical AND operators.

SCIM Filtering Examples:#

filter=userName eq "bjensen"

filter=name.familyName co "O'Malley"

filter=userName sw "J"

filter=title pr

filter=meta.lastModified gt "2011-05-13T04:42:34Z"

filter=meta.lastModified ge "2011-05-13T04:42:34Z"

filter=meta.lastModified lt "2011-05-13T04:42:34Z"

filter=meta.lastModified le "2011-05-13T04:42:34Z"

filter=title pr and userType eq "Employee"

filter=title pr or userType eq "Intern"

filter=userType eq "Employee" and (emails co "example.com" or emails co "example.org")

More Information#

There might be more information for this subject on one of the following:

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-4) was last changed on 22-May-2016 11:45 by jim