SCIM 2.0 User Management API
The SCIM 2.0 User Management API (version 1.0.0).
Download the OpenAPI definition (YAML)
Security schemes
OAuth2: oauth2
authorizationCode flow, token URL https://localhost:9443/oauth/token, authorization URL https://localhost:9443/oauth/authorize
3 scopes
| Scope | Description |
|---|---|
read | Grants read access |
write | Grants write access |
admin | Grants read and write access to administrative information |
Users Endpoint
Filter users
GET /Users
This API returns users according to the filter, sort and pagination parameters. Pagination is not supported across user stores and LDAP multi-attribute group filtering. However, filtering is supported across multiple user stores. By default, duplicate user entries in the SCIM2 users response are persisted. To remove the duplicate user entries, add the following configuration to the deployment.toml file. </br> </br>
** Note
According to the SCIM specification, the totalResutls attribute should return total number of results returned by the list or query operation. But due to the limitation of the LDAP user store, when we use the pagination paramters, we cannot get total number of users in the database. So, we are returning the total number of users per page as the totalResults. This is only applicable for the LDAP user store. The JDBC user store is working according to the specification.
[scim2] remove_duplicate_users_in_users_response = true
Scope(Permission) required:internal_org_user_mgt_list
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
attributes | query | string | SCIM defined attributes parameter. | |
excludedAttributes | query | string | SCIM defined excludedAttribute parameter. | |
filter | query | string | Filter expression for filtering. Supported filters are ‘Ew’, ‘Eq’, ‘Co’, ‘Sw’, ‘Ne’, ‘and’. | |
startIndex | query | integer (int32) | The 1-based index of the first query result | |
count | query | integer (int32) | Specifies the desired maximum number of query results per page. | |
domain | query | string | The name of the user store where filtering needs to be applied. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Valid users are found | UserObjectListResponseObject |
401 | Unauthorized | ErrorUnauthorized |
403 | Forbidden | ErrorForbidden |
Create user
POST /Users
This API creates a user and returns the user details along with the user's unique ID.
You can create a user in two ways:
- Set a password for the user: Include the
passwordparameter in the request body to set an initial password for the user. - Invite the user to set their own password: Set the
askPasswordparameter totruein theurn:scim:wso2:schemaextension. An email will be sent to the user with instructions to set their password and confirm their account.
Scope(Permission) required:internal_org_user_mgt_create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
attributes | query | string | SCIM defined attributes parameter. | |
excludedAttributes | query | string | SCIM defined excludedAttribute parameter. |
Request body: application/scim+json
Schema: one of: UserObject, UserObjectPassInvite
Responses
| Code | Description | Schema |
|---|---|---|
201 | User is created. | UserResponseObject |
400 | Invalid Input | ErrorInvalidInput |
401 | Unauthorized | ErrorUnauthorized |
403 | Forbidden | ErrorForbidden |
409 | User attribute value already exists | ErrorUserConflict |
500 | Internal Server Error | ErrorInternalServerError |
Search users
POST /Users/.search
This API returns users according to the filter, sort and pagination parameters.
Scope(Permission) required:internal_org_user_mgt_list
Request body: application/scim+json
Schema: UserSearchRequestObject
Responses
| Code | Description | Schema |
|---|---|---|
200 | Valid users are found | UserObjectListResponseObject |
401 | Unauthorized | ErrorUnauthorized |
403 | Forbidden | ErrorForbidden |
Get user by ID
GET /Users/{id}
Return user details if a user found.
Scope(Permission) required:internal_org_user_mgt_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Unique ID of the resource type. |
attributes | query | string | SCIM defined attributes parameter. | |
excludedAttributes | query | string | SCIM defined excludedAttribute parameter. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Valid user is found | UserResponseObject |
401 | Unauthorized | ErrorUnauthorized |
403 | Forbidden | ErrorForbidden |
Update user - PUT
PUT /Users/{id}
This API updates user details and returns the updated user details using a PUT operation.
Scope(Permission) required:internal_org_user_mgt_update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Unique ID of the resource type. |
attributes | query | string | SCIM defined attributes parameter. | |
excludedAttributes | query | string | SCIM defined excludedAttribute parameter. |
Request body: application/scim+json
Schema: UserUpdateObject
9 properties
| Name | Type | Required | Description |
|---|---|---|---|
schemas | object | ||
name | object | ||
name.givenName | string | ||
name.familyName | string | ||
userName | string | ||
emails | array of object | ||
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User | object | ||
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User.employeeNumber | string | ||
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User.manager | object |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Valid user is found | UserResponseObject |
400 | Invalid Input | ErrorInvalidInput |
401 | Unauthorized | ErrorUnauthorized |
403 | Forbidden | ErrorForbidden |
409 | User attribute value already exists | ErrorUserConflict |
Delete user by ID
DEL /Users/{id}
This API deletes a user using the user's unique ID.
Scope(Permission) required:internal_org_user_mgt_delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Unique ID of the resource type. |
Responses
| Code | Description | Schema |
|---|---|---|
204 | User is deleted | |
401 | Unauthorized | ErrorUnauthorized |
403 | Forbidden | ErrorForbidden |
Update user - PATCH
PATCH /Users/{id}
This API updates user details and returns the updated user details using a PATCH operation.
Scope(Permission) required:internal_org_user_mgt_update
Supported Operations: add, replace, remove
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Unique id of the resource type. |
attributes | query | string | SCIM defined attributes parameter. | |
excludedAttributes | query | string | SCIM defined excludedAttribute parameter. |
Request body: application/scim+json
Schema: PatchOpperationInput
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
schemas | array of object | ||
Operations | array of OperationMeItem |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Valid user is found | UserResponseObject |
400 | Invalid Input | ErrorInvalidInput |
401 | Unauthorized | ErrorUnauthorized |
403 | Forbidden | ErrorForbidden |
409 | User attribute value already exists | ErrorUserConflict |
Schemas
UserObject
Type: object
10 properties
| Name | Type | Required | Description |
|---|---|---|---|
schemas | object | ||
name | object | ||
name.givenName | string | The | |
name.familyName | string | The | |
userName | string | The | |
password | string | Yes | Use this parameter to set a password for the user account. The user will be able to reset this password later. When setting the password, be sure to follow the password-validation rules configured for your organization. |
emails | array of object | Currently, the first email of the array (without a specified type) is treated as the primary email and assigning a type to this email is not supported. | |
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User | object | ||
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User.employeeNumber | string | ||
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User.manager | object |
UserObjectPassInvite
Type: object
10 properties
| Name | Type | Required | Description |
|---|---|---|---|
schemas | object | ||
name | object | ||
name.givenName | string | The | |
name.familyName | string | The | |
userName | string | The | |
emails | array of object | Currently, the first email (without a specified type) is treated as the primary email and assigning a type to this email is not supported. | |
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User | object | ||
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User.manager | object | ||
urn:scim:wso2:schema | object | ||
urn:scim:wso2:schema.askPassword | boolean | If this parameter is set to |
UserResponseObject
Type: object
16 properties
| Name | Type | Required | Description |
|---|---|---|---|
meta | object | Yes | |
meta.created | string | ||
meta.location | string | ||
meta.lastModified | string | ||
meta.resourceType | string | ||
schemas | object | ||
username | string | ||
id | string | ||
name | object | ||
name.givenName | string | ||
name.familyName | string | ||
emails | array of object | ||
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User | object | ||
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User.employeeNumber | string | ||
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User.manager | object | ||
roles | object |
UserUpdateObject
Type: object
9 properties
| Name | Type | Required | Description |
|---|---|---|---|
schemas | object | ||
name | object | ||
name.givenName | string | ||
name.familyName | string | ||
userName | string | ||
emails | array of object | ||
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User | object | ||
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User.employeeNumber | string | ||
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User.manager | object |
PatchOpperationInput
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
schemas | array of object | ||
Operations | array of OperationMeItem |
OperationMeItem
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
op | string | Allowed values: | |
value | object | ||
value.nickName | string |
UserObjectListResponseObject
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
totalResults | integer | ||
startIndex | integer | ||
itemsPerPage | integer | ||
schemas | object | ||
Resources | array of UserResponseObject |
UserSearchRequestObject
Type: object
ErrorInvalidInput
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
status | string | Yes | |
schemas | string | ||
scimType | string | ||
detail | string | Yes |
ErrorUnauthorized
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
status | string | Yes | |
schemas | string | ||
scimType | string |
ErrorForbidden
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
status | string | Yes | |
schemas | string | ||
scimType | string |
ErrorInternalServerError
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
status | string | Yes | |
schemas | string | ||
detail | string | Yes |
ErrorUserConflict
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
status | string | Yes | |
schemas | array of any | ||
detail | string | Yes |
Was this page helpful?