objectClass("User") {
search {
scim {
limitations {
supportedFilter attribute("userName").eq().anySingleValue()
supportedFilter attribute("externalId").eq().anySingleValue()
supportedFilter attribute("groups").child("value").eq().anySingleValue()
}
}
}
}
SCIM search operation customization
The SCIM 2.0 framework provides automatic search support with SCIM filter translation.
This document is part of the SCIM 2.0 connector tutorial. See Introduction to SCIMREST framework for other topics.
Basic search
The framework automatically implements search based on discovered schema and assumes that SCIM server fully supports SCIM standard standard.
Hovewer most real world SCIM 2.0 does not support specification fully or allow to search using any attribute, so you can specify limitations for search handler.
SCIM filter specifications
Use the supportedFilter method to declare supported filters:
scim {
limitations {
supportedFilter attribute("userName").eq().anySingleValue()
supportedFilter attribute("externalId").eq().anySingleValue()
}
}
The filter specification API:
-
attribute(name)- Specify the attribute -
.eq()- Equals filter -
.contains()- Contains filter -
.anySingleValue()- Single value filter
Filter specification examples
// Equals filter on userName
supportedFilter attribute("userName").eq().anySingleValue()
// Equals filter on externalId
supportedFilter attribute("externalId").eq().anySingleValue()
// Equals filter on nested attribute (groups.value)
supportedFilter attribute("groups").child("value").eq().anySingleValue()
// Equals filter on extension attribute
supportedFilter attribute("urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:employeeNumber").eq().anySingleValue()
Complete search example
objectClass("User") {
search {
scim {
limitations {
supportedFilter attribute("userName").eq().anySingleValue()
supportedFilter attribute("externalId").eq().anySingleValue()
supportedFilter attribute("groups").child("value").eq().anySingleValue()
}
}
}
}
Custom search implementation
If automatic search is not viable (e.g., no search endpoint), implement custom search:
search {
custom {
emptyFilterSupported true
implementation {
// Custom search logic
}
}
}
See Implement custom search for details.