SCIM package examples
Overview
The examples below show the URLs and request bodies for the common SCIM operations against Interact. In each URL, replace any sample person ID or group ID with the value for the record you want to change. You get those IDs from the relevant GET request.
Note: These are illustrative payloads. For the full list of endpoints, supported actions and schemas, see the SCIM v2.0 reference.
Get the schema
GET https://{{intranet_url}}/api/v2/scim/v2/Schemas
Get a user
Add your lookup information to the filter:
GET https://{{intranet_url}}/api/v2/scim/v2/Users?filter=userName eq "test.user@yourcompany.com"
Create a user (POST)
POST https://{{intranet_url}}/api/v2/scim/v2/Users
This example contains all values except groups (in the user profile), job end date, all urn:ietf:params:scim:schemas:core:2.0:Group values and all urn:ietf:params:scim:schemas:extension:interactsoftware:2.0:Group values.
{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User",
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
],
"externalId": "testuser1@test.com",
"userName": "testuser1@test.com",
"profileUrl": "https://www.google.com/myprofile",
"active": true,
"preferredLanguage": "en-GB",
"locale": "en-GB",
"timezone": "Eastern Standard Time",
"title": "Customer Operations Agent",
"userType": "Intranet User",
"password": "Interact01!",
"emails": [
{ "primary": true, "type": "work", "value": "testuser1@test.com" },
{ "primary": false, "type": "home", "value": "testuser1home@test.com" }
],
"phoneNumbers": [
{ "type": "mobile", "value": "+14055551212" },
{ "type": "work", "value": "+441619273333" },
{ "type": "home", "value": "+14055553434" }
],
"ims": [
{ "type": "skype", "value": "skype chat" },
{ "type": "chat", "value": "default chat" }
],
"photos": [
{
"value": "https://previews.123rf.com/images/aquir/aquir1311/aquir131100316/23569861-sample-grunge-red-round-stamp.jpg",
"display": "Test User Pic",
"type": "photo",
"primary": true
}
],
"addresses": [
{ "formatted": "1 Main street, New York, NY 00101", "type": "work" }
],
"meta": { "resourceType": "User" },
"name": { "familyName": "Test1", "givenName": "GivenName1" },
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
"department": "Customer Operations",
"manager": { "$ref": "", "displayName": null, "value": "testuser2@test.com" },
"organization": "Sample"
},
"urn:ietf:params:scim:schemas:extension:interactsoftware:2.0:User": {
"jobStartDate": "2020-03-06T01:00:00Z",
"location": "Jersey City",
"loginType": "SAML",
"bio": "This is my bio with special characters // \\ \" \b\f\t\r\n <p> </p> </p> <body bgcolor=?> <a href=\"URL\">clickable text</a> , ! £ #$%^&*()+-_=:;/?,.<>{}[]€ƒ„…†ÿ <p> Test paragraph </p> <h> Header 1 </h>",
"name": { "title": "Dr.", "initials": "Jr." },
"pronouns": "He/His",
"dateOfBirth": "1997-01-03T01:00:00Z",
"linkedInId": "https://www.linkedin.com/in/user1",
"twitterTag": "https://twitter.com/testuser1",
"forcePasswordReset": false,
"instagramTag": "https://instagram.com/testuser1",
"facebookId": "https://facebook.com/testuser1"
},
"urn:ietf:params:scim:schemas:extension:interactsoftwareadditionalfields:2.0:User": {
"division": "Default Division"
}
}
Update a user (PATCH)
Replace 35259 with the person ID of the record you want to change. You get this from the GET request.
PATCH https://{{intranet_url}}/api/v2/scim/v2/Users/35259
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{ "op": "Replace", "path": "locale", "value": "en-US" },
{ "op": "Add", "path": "userType", "value": "Intranet User" }
]
}
Update a user (PATCH) — more complex example
Replace 35259 with the person ID of the record you want to change. You get this from the GET request.
Note: A PATCH to
managerrequires that you pass theidvalue from theGETrequest for the manager.
PATCH https://{{intranet_url}}/api/v2/scim/v2/Users/35259
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{ "op": "Replace", "path": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:manager", "value": "316" },
{ "op": "Replace", "path": "emails[type eq \"work\"].value", "value": "Eric.Smith@test.com" },
{ "op": "Add", "path": "addresses[type eq \"work\"].formatted", "value": "Toonsberry, OH" },
{ "op": "Add", "path": "phoneNumbers[type eq \"work\"].value", "value": "440-555-1212" },
{ "op": "Add", "path": "externalId", "value": "Eric.Smith" },
{ "op": "Add", "path": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:employeeNumber", "value": "1234" },
{ "op": "Replace", "path": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:organization", "value": "JustRocks LLC." },
{ "op": "Replace", "path": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:department", "value": "Marketing" },
{ "op": "Replace", "path": "urn:ietf:params:scim:schemas:extension:interactsoftware:2.0:User:location", "value": "Sunnyville" },
{ "op": "Replace", "path": "urn:ietf:params:scim:schemas:extension:interactsoftware:2.0:User:loginType", "value": "SAML" }
]
}
Replace a user (PUT)
Replace 35259 with the person ID of the record you want to change. You can also omit the person ID and use https://{{intranet_url}}/api/v2/scim/v2/Users.
This example contains all values except groups (in the user profile), job end date, all urn:ietf:params:scim:schemas:core:2.0:Group values and all urn:ietf:params:scim:schemas:extension:interactsoftware:2.0:Group values.
PUT https://{{intranet_url}}/api/v2/scim/v2/Users/35259
{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User",
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
],
"externalId": "testuser1@test.com",
"userName": "testuser1@test.com",
"profileUrl": "https://www.google.com/myprofile",
"active": true,
"preferredLanguage": "en-GB",
"locale": "en-GB",
"timezone": "Eastern Standard Time",
"title": "Customer Operations Agent",
"userType": "Intranet User",
"password": "Interact01!",
"emails": [
{ "primary": true, "type": "work", "value": "testuser1@test.com" },
{ "primary": false, "type": "home", "value": "testuser1home@test.com" }
],
"phoneNumbers": [
{ "type": "mobile", "value": "+14055551212" },
{ "type": "work", "value": "+441619273333" },
{ "type": "home", "value": "+14055553434" }
],
"ims": [
{ "type": "skype", "value": "skype chat" },
{ "type": "chat", "value": "default chat" }
],
"photos": [
{
"value": "https://previews.123rf.com/images/aquir/aquir1311/aquir131100316/23569861-sample-grunge-red-round-stamp.jpg",
"display": "Test User Pic",
"type": "photo",
"primary": true
}
],
"addresses": [
{ "formatted": "1 Main street, New York, NY 00101", "type": "work", "primary": true }
],
"meta": { "resourceType": "User" },
"name": { "familyName": "Test1", "givenName": "GivenName1" },
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
"department": "Customer Operations",
"manager": { "$ref": "Users/275", "displayName": null, "value": "275" },
"organization": "Sample"
},
"urn:ietf:params:scim:schemas:extension:interactsoftware:2.0:User": {
"jobStartDate": "2020-03-06T01:00:00Z",
"location": "Jersey City",
"loginType": "SAML",
"bio": "This is my bio with special characters // \\ \" \b\f\t\r\n <p> </p> </p> <body bgcolor=?> <a href=\"URL\">clickable text</a> , ! £ #$%^&*()+-_=:;/?,.<>{}[]€ƒ„…†ÿ <p> Test paragraph </p> <h> Header 1 </h>",
"name": { "title": "Dr.", "initials": "Jr." },
"pronouns": "He/His",
"dateOfBirth": "1997-01-03T01:00:00Z",
"linkedInId": "https://www.linkedin.com/in/user1",
"twitterTag": "https://twitter.com/testuser1",
"forcePasswordReset": false,
"instagramTag": "https://instagram.com/testuser1",
"facebookId": "https://facebook.com/testuser1"
},
"urn:ietf:params:scim:schemas:extension:interactsoftwareadditionalfields:2.0:User": {
"division": "Default Division"
}
}
Get all groups
GET https://{{intranet_url}}/api/v2/scim/v2/Groups
{
"displayName": "Our Intranet Users",
"id": "5291",
"members": [],
"meta": { "resourceType": "Group", "location": "Groups/5291" },
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group",
"urn:ietf:params:scim:schemas:extension:interactsoftware:2.0:Group"
],
"urn:ietf:params:scim:schemas:extension:interactsoftware:2.0:Group": {
"externalId": "cc0db17f-6602-45f2-8cfc-b4650a9cd508",
"groupType": "group"
}
}
Get a group by ID
GET https://{{intranet_url}}/api/v2/scim/v2/Groups/{{group_id}}
{
"displayName": "Our Intranet Users",
"id": "5291",
"members": [
{ "$ref": "Users/25158", "display": "Sri Nguyen", "type": "User", "value": 25158 },
{ "$ref": "Users/35069", "display": "David Wilson", "type": "User", "value": 35069 },
{ "$ref": "Users/35187", "display": "Test User", "type": "User", "value": 35187 }
],
"meta": { "resourceType": "Group", "location": "Groups/5291" },
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group",
"urn:ietf:params:scim:schemas:extension:interactsoftware:2.0:Group"
],
"urn:ietf:params:scim:schemas:extension:interactsoftware:2.0:Group": {
"externalId": "cc0db17f-6602-45f2-8cfc-b4650a9cd508",
"groupType": "group"
}
}
Create a group with no users (POST)
POST https://{{intranet_url}}/api/v2/scim/v2/Groups
{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group",
"urn:ietf:params:scim:schemas:extension:interactsoftware:2.0:Group"
],
"meta": { "resourceType": "Group" },
"displayName": "TestSCIM-POSTGroup1",
"members": [],
"urn:ietf:params:scim:schemas:extension:interactsoftware:2.0:Group": {
"externalId": "5d471732ad3d5768e67f86859e329d46",
"groupType": "group"
}
}
Create a group with one user (POST)
POST https://{{intranet_url}}/api/v2/scim/v2/Groups
{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group",
"urn:ietf:params:scim:schemas:extension:interactsoftware:2.0:Group"
],
"meta": { "resourceType": "Group" },
"displayName": "TestSCIM-POSTGroup2",
"members": [
{ "$ref": "Users/25158", "display": "Sri Nguyen", "type": "User", "value": "25158" }
],
"urn:ietf:params:scim:schemas:extension:interactsoftware:2.0:Group": {
"externalId": "113581b2fe04e30e623a0fe28e293e02",
"groupType": "group"
}
}
Replace a group with one user (PUT)
PUT https://{{intranet_url}}/api/v2/scim/v2/Groups/{{group_id}}
{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group",
"urn:ietf:params:scim:schemas:extension:interactsoftware:2.0:Group"
],
"meta": { "resourceType": "Group" },
"displayName": "TestSCIM-POSTGroup3",
"members": [
{ "$ref": "Users/35069", "display": "David Wilson", "type": "User", "value": "35069" }
],
"urn:ietf:params:scim:schemas:extension:interactsoftware:2.0:Group": {
"externalId": "113581b2fe04e30e623a0fe28e293e02",
"groupType": "group"
}
}
Add a user to a group (PATCH)
PATCH https://{{intranet_url}}/api/v2/scim/v2/Groups/{{group_id}}
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{
"op": "Add",
"value": {
"members": [
{ "value": "35187", "display": "testuser1" }
]
}
}
]
}
Remove a user from a group (PATCH)
PATCH https://{{intranet_url}}/api/v2/scim/v2/Groups/{{group_id}}
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{ "op": "remove", "path": "members[value eq \"35069\"]" }
]
}
Remove a user from a group (PATCH) — alternative
The UID can be difficult to handle programmatically, so you can also remove users with this format:
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{
"op": "remove",
"path": "members",
"value": [
{ "value": "274", "display": "test.user@okta.local" },
{ "value": "301", "display": "test.user@okta.local" }
]
}
]
}
Delete a group
DELETE https://{{intranet_url}}/api/v2/scim/v2/Groups/{{group_id}}