SCIM - Example messages

Note: All provided examples of messages are in JSON format.

POST User

Minimal Representation

The following request is the minimal request for creating a user, since username is the only mandatory field.

The response messages shows:

  • Generated ID for the newly created user.

  • Metadata as specified by SCIM.

  • Metadata in metadata-extension as defined by OneWelcome.

  • OneWelcome's user extension, containing state and segment.

  • OneWelcome extensions.

Request

POST : https://<domainURI>/scim/v1/Users

{
"schemas": [
"urn:scim:schemas:core:1.0"
],
"name": {
"familyName": "Gressmann",
"givenName": "Gustav",
"honorificPrefix": "mr"
},
"emails": [
{
"type": "other",
"value": "gustav@gressmann.com",
"primary": true
}
]
}

Response

{
"meta": {
"created": "2018-06-05T15:24:17Z",
"lastModified": "2018-06-05T15:24:17Z",
"version": "W/1484195663",
"location": "https://&lt;domainURI>/scim/v1/Users/193f187d921c49e48d555257b6654b54"
},
"userName": "193f187d921c49e48d555257b6654b54",
"name": {
"familyName": "Gressmann",
"givenName": "Gustav",
"honorificPrefix": "mr",
"formatted": "Gustav Gressmann"
},
"emails": [
{
"type": "other",
"value": "gustav@gressmann.com",
"primary": true
}
],
"id": "193f187d921c49e48d555257b6654b54",
"schemas": [
"urn:scim:schemas:core:1.0",
"urn:scim:schemas:extension:iwelcomeattributemetadata:1.0",

GET User

Search a User by Name

https://<domainURI>/scim/v1/Users?filter=(name.givenName co "Gustav") or (emails co "gustav")

Request GET USER Using Filtering on Custom Attribute

https://<domainURI>/scim/v1/Users?filter=urn:scim:schemas:extension:<customer>:1.0:customerid eq "123456789"

The filtering can be done by using more operators. These operators can be concatenated using AND or OR operators, and this will represent a filter query. In the following table there are represented the supported operators for filtering with the specific description.


GET User Response with OneWelcome Extensions

This example shows:

  • OneWelcome User extension (segment and state).

  • OneWelcome attribute metadata extension and how that references attributes in core schema and references attribute 'segment' in OneWelcome User extension.

Request

GET : https://<domainURI>/scim/v1/Users/{upn}

Response

{
"meta": {
"created": "2018-06-05T15:24:17Z",
"lastModified": "2018-06-05T15:24:17Z",
"version": "W/1484195663",
"location": "https://&lt;domainURI>/scim/v1/Users/193f187d921c49e48d555257b6654b54"
},
"userName": "193f187d921c49e48d555257b6654b54",
"name": {
"familyName": "Gressmann",
"givenName": "Gustav",
"honorificPrefix": "mr",
"formatted": "Gustav Gressmann"
},
"emails": [
{
"type": "other",
"value": "gustav@gressmann.com",
"primary": true
}
],
"id": "193f187d921c49e48d555257b6654b54",
"schemas": [
"urn:scim:schemas:core:1.0",
"urn:scim:schemas:extension:iwelcomeattributemetadata:1.0",

PATCH User

Change User's Password

Request

PATCH : https://<domainURI>/scim/v1/Users/{upn}

{
"schemas": [
"urn:scim:schemas:core:1.0"],
"password": "RFKh48KaHR4"
}

Change User's Password Using bcrypt

Note: This is optional. It needs to be configured, if required.

When a user's password needs to be updated to Ne@am!ros, the hashed value using the bcrypt-algorithm is $2a$10$4pmvJAAZuTW7mmaVuzyDaeIPL77nB/zTsOsy5bE5eYj3XjMlATbBy and that can be provisioned towards OneWelcome using the following PATCH command.

For testing purposes the following site can be used to hash passwords using the bcrypt algorithm: https://www.bcrypt-generator.com.

Request

PATCH : https://<domainURI>/scim/v1/Users/{upn}

{
"schemas": [
"urn:scim:schemas:core:1.0"],
"password": "{bcrypt}$2a$10$4pmvJAAZuTW7mmaVuzyDaeIPL77nB/zTsOsy5bE5eYj3XjMlATbBy"
}

After OneWelcome has successfully processed this request, the user can log in to OneWelcome using his password "Ne@am!ros".

Update Singular Simple Attribute in Custom User Extension

Request

PATCH : https://<domainURI>/scim/v1/Users/{upn}


{
"schemas": [
"urn:scim:schemas:core:1.0",
"urn:scim:schemas:extension:<customer>:1.0"
],
"urn:scim:schemas:extension:<customer>:1.0": {
"myCustomerAttribute": "Other"
}
}

Add Additional Email Addresses

Request

PATCH : https://<domainURI>/scim/v1/Users/{upn}

{
"schemas": ["urn:scim:schemas:core:1.0"],
"emails": [
{
"type": "work",
"primary": false,
"value": "multiwork@example-mail.com"
},
{
"type": "home",
"primary": false,
"value": "multihome@example-mail.com"
}
]
}

Update User's familyName (Singular Complex Attribute)

Request

PATCH : https://<domainURI>/scim/v1/Users/{upn}

{
"schemas": [
"urn:scim:schemas:core:1.0"
],
"name": {
"familyName": "Gressman"
}
}

Add Two User's Addresses

Request

PATCH : https://<domainURI>/scim/v1/Users/{upn}

{
"schemas": ["urn:scim:schemas:core:1.0"],
"addresses": [
{
"streetAddress": "Soesterweg 300E",
"formatted" : "Soesterweg 300E, 3812 BH, Amersfoort",
"primary": true,
"type": "work",
"locality" : "Amersfoort",
"region" : "Utrecht",
"postalCode" : "3812 BH",
"country" : "NL"
},
{
"streetAddress": "Kerkenbos 10-53 D",
"formatted" : "Soesterweg 300E, 6546 BB, Nijmegen",
"primary": false,
"type": "work",
"locality" : "Nijmegen",
"region" : "Gelderland",

Response

{…}

Delete One of the User's Addresses

Request

PATCH : https://<domainURI>/scim/v1/Users/{upn}
{
"schemas": ["urn:scim:schemas:core:1.0"],
"addresses": [
{
"streetAddress": "Kerkenbos 10-53 D",
"formatted" : "Soesterweg 300E, 6546 BB, Nijmegen",
"primary": false,
"type": "work",
"locality" : "Nijmegen",
"region" : "Gelderland",
"postalCode" : "6546 BB",
"country" : "NL",
"operation": "delete"
}
]
}

Response

{
"meta": {
"created": "2018-06-05T15:24:17Z",
"lastModified": "2018-06-05T15:30:27Z",
"version": "W/1820932903",
"location": "https://&lt;domainURI>/scim/v1/Users/193f187d921c49e48d555257b6654b54"
},
"userName": "193f187d921c49e48d555257b6654b54",
"name": {
"familyName": "Gressmann",
"givenName": "Gustav",
"honorificPrefix": "mr",
"formatted": "Gustav Gressmann"
},
"addresses": [
{
"streetAddress": "Soesterweg 300E",
"formatted": "Soesterweg 300E, 3812 BH, Amersfoort",
"primary": true,
"type": "work",
"locality": "Amersfoort",
"region": "Utrecht",

Change One of the User's Addresses (multi-valued complex attribute)

Request

PATCH : https://<domainURI>/scim/v1/Users/{upn}

{
"schemas": ["urn:scim:schemas:core:1.0"],
"addresses": [
{
"streetAddress": "Soesterweg 300E",
"formatted": "Soesterweg 300E, 3812 BH, Amersfoort",
"primary": true,
"type": "work",
"locality": "Amersfoort",
"region": "Utrecht",
"postalCode": "3812 BH",
"country": "NL",
"operation": "delete"
},
{
"streetAddress": "Soesterweg 300E",
"formatted": "Soesterweg 300E, 3812BH, Amersfoort",
"primary": true,
"type": "work",
"locality": "Amersfoort",
"region": "Utrecht",

Response

{
"meta": {
"created": "2018-06-05T15:24:17Z",
"lastModified": "2018-06-05T15:30:27Z",
"version": "W/1820932903",
"location": "https://&lt;domainURI>/scim/v1/Users/193f187d921c49e48d555257b6654b54"
},
"userName": "193f187d921c49e48d555257b6654b54",
"name": {
"familyName": "Gressmann",
"givenName": "Gustav",
"honorificPrefix": "mr",
"formatted": "Gustav Gressmann"
},
"addresses": [
{
"streetAddress": "Soesterweg 300E",
"formatted": "Soesterweg 300E, 3812BH, Amersfoort",
"primary": true,
"type": "work",
"locality": "Amersfoort",
"region": "Utrecht",
"postalCode": "3812BH",

Block a User

Request

PATCH : https://<domainURI>/scim/v1/Users/{upn}/"


{
"schemas": [
"urn:scim:schemas:core:1.0",
"urn:scim:schemas:extension:iwelcome:1.0"
],
"urn:scim:schemas:extension:iwelcome:1.0": {
"blocks":
[ {
"userid": "some service desk user's ID",
"reason": "some_block_reason"
} ]
}
}

Response

PATCH : https://<domainURI>/scim/v1/Users/{upn}/"


{…}

Remove a Block from a User

A user can have one or multiple blocks. The following is an example request that removes a single block.

If no blocks remain, OneWelcome will change the 'state' and 'active' attributes of the user.

Request

PATCH : https://<domainURI>/scim/v1/Users/{upn}/

{
"schemas": [
"urn:scim:schemas:core:1.0",
"urn:scim:schemas:extension:iwelcome:1.0"
],
"urn:scim:schemas:extension:iwelcome:1.0": {
"blocks":
[ {
"userid": "some service desk user's ID",
"reason": "some_block_reason",
"date": "2018-06-05T15:38:06.026Z",
"operation": "delete"
} ]
}
}

Response

{…}


  Last updated