When searching for users, you can create a search query based on the SCIM protocol.
Each expression in the following form: [SEARCH_FIELD] [OPERATOR] "[SEARCH_VALUE]". For example, this searches for a user named John: [NAME_FIELD] eq "John", where [NAME_FIELD] depends on the user schema you're using (see Searchable fields). You can combine search expressions using and/or operators and grouping with brackets.
Searchable fields depend on the APIs you're using: Users APIs or User-SCIM APIs as they expose the user resource with different fields.
When searching for a date, provide it in the ISO 1806 format: YYYY-MM-DDThh:mm:ss.sss±ZZ:zz. For example, 2023-04-22T05:52:49.703+00:00.
You can search for users using any of the following fields:
external_account_id- (string) user's unique app-level identifier in your systemexternal_user_id- (string) user's unique tenant-level identifier in your systememail- (string) user's primary email addressphone_number- (string) user's primary phone numbersecondary_emails- (array of strings) user's secondary email addressessecondary_phone_numbers- (array of strings) user's secondary phone numberslast_auth- (date) date the user last authenticated in the ISO 1806 formatcreated_at- (number) date user record was createdupdated_at- (number) date user record was updatedstatus- (string) user's statusbirthday- (date) user's birthday as YYYY-MM-DDname.first_name- (string) user's first namename.middle_name- (string) user's middle namename.last_name- (string) user's last namecustom_app_data.*- any nestedcustom_app_datafields
You can search for users using any field supported by SCIM-compatible user schema exposed by Mosaic.
Search expressions may include any of the following operators:
eq- equalge- greater equalgt- greater thanle- less equallt- less thanne- not equalpr- presentsw- starts withand- andor- or
Specify search criteria using the search query parameter of the GET /users request. For example:
name.first_name eq "John"searches for user named John(address.country eq "USA")and(email sw "sales")returns users who are located in the US and whose promary email address starts with sales
Make sure to URL-encode the search query expression.
Specify search criteria using the filter query parameter of the GET /scim/users request or the filter object sent a part of the POST /scim/users/.search request. See Manage users with SCIM for details.
For example:
name.givenName eq "John"searches for a user named John(preferredLanguage eq "en")or(addresses.country eq "USA")returns users with English as their preferred language and also users located in the US