Skip to main content

SCIM User examples

Operations

List all

List all users.uses

Active or not. For example after the Soffid installation the admin user already exists.

Request
GET http://<your-domain>/soffid/webservice/scim2/v1/User
HTTP
Response 200 OK
{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ],
    "totalResults": 64,
    "startIndex": 1,
    "resources"Resources": [
        {
            "lastName": "Admin"Pig",
            "profileServer": "null",
            "createdByUser": "Anonymous"hrms",
            "secondaryGroups"fullName": []"Dad Pig",
            "active": true,
            "userName": "1",
            "mailAlias": "",
            "mailServer": "null",
            "firstName": "Dad",
            "createdDate": "2021-02-16 13:38:26",
            "multiSession": true,false,
            "meta": {
                "location": "http://soffid.pat.lab:8080/webservice/scim2/v1/User/1477909",
                "links": {
                    "roleAccounts": "http://soffid.pat.lab:8080/webservice/scim2/v1/RoleAccount?filter=userCode+eq+'1'+and+enabled+eq+true",
                    "groupUsers": "http://soffid.pat.lab:8080/webservice/scim2/v1/GroupUser?filter=user+eq+'1'+and+disabled+eq+false",
                    "accounts": "http://soffid.pat.lab:8080/webservice/scim2/v1/Account?filter=type+eq+U+and+users.user.userName+eq+'1'"
                },
                "resourceType": "User"
            },
            "modifiedByUser": "Anonymous"admin",
            "schemas": [
                "urn:soffid:com.soffid.iam.api.User"
            ],
            "modifiedDate": "2021-05-04 09:24:54",
            "attributes": {},
            "id": 60,1477909,
            "userType": "I",
            "homeServer": "null",
            "primaryGroupDescription": "EnterpriseWorld Administrators"Original",
            "primaryGroup": "admingroup"world"
        },
            "consoleProperties":
        {
            "preferences": {
                    "lang"lastName": "en"
                },
                "language": "en",
                "id": 229,
                "lastLoginDate": "2017-08-25T12:38:50+02:00",
                "userName": "admin",
                "version": "TEST"
            },
            "comments": "Autocreated"SUZY",
            "profileServer": "null",
            "createdByUser": "hrms",
            "fullName": "Suzy SUZY",
            "active": true,
            "fullName": "Admin Admin",
            "userName": "admin"10",
            "mailAlias": "",
            "mailServer": "null",
            "firstName": "Admin"Suzy",
            "createdDate": "2017-08-02T11:22:44+02:00"2021-02-16 13:38:27",
            "phoneNumber"multiSession": "",false,
            "meta": {
                "created": "2017-08-02T11:22:44+02:00",
                "location": "http://<domain>/soffid.pat.lab:8080/webservice/scim2/v1/User/60"1477931",
                "lastModified"links": {
                    "roleAccounts": "2017-08-02T11:22:44+02:00"http://soffid.pat.lab:8080/webservice/scim2/v1/RoleAccount?filter=userCode+eq+'10'+and+enabled+eq+true",
                    "groupUsers": "http://soffid.pat.lab:8080/webservice/scim2/v1/GroupUser?filter=user+eq+'10'+and+disabled+eq+false",
                    "accounts": "http://soffid.pat.lab:8080/webservice/scim2/v1/Account?filter=type+eq+U+and+users.user.userName+eq+'10'"
                },
                "resourceType": "User"
            },
            "modifiedByUser": "admin",
            "schemas": [
                "urn:soffid:com.soffid.iam.api.User"
            ],
            "modifiedDate": "2017-08-02T11:22:44+02:00"2021-05-05 14:11:37",
            "attributes": {},
            "accounts": [
                {
                    "system": "soffid",
                    "name": "admin",
                    "id": 69
                }
            ],1477931,
            "userType": "I"
        }
    ]
}

List by id

List a user by its id (primary key). For example the admin user listed previously.

GET http://<domain>/webservice/scim2/v1/User/60
 
HTTP 200
{
    "lastName": "Admin",
    "createdByUser": "Anonymous",
    "secondaryGroups": [],
    "mailServer": "null",
    "multiSession": true,
    "modifiedByUser": "Anonymous",
    "id": 60,
            "homeServer": "null",
            "primaryGroupDescription": "EnterpriseWorld Administrators"Original",
            "primaryGroup": "admingroup"world"
        },
    "consoleProperties":
        {
            "preferences": {
            "lang"lastName": "en"
        },
        "language": "en",
        "id": 229,
        "lastLoginDate": "2017-08-25T12:38:50+02:00",
        "userName": "admin",
        "version": "TEST"
    },
    "comments": "Autocreated"Rabbit",
            "profileServer": "null",
            "createdByUser": "hrms",
            "fullName": "Ricchard Rabbit",
            "active": true,
            "fullName": "Admin Admin",
    "userName": "admin"11",
            "mailAlias": "",
            "mailServer": "null",
            "firstName": "Admin"Ricchard",
            "createdDate": "2017-08-02T11:22:44+02:00"2021-02-16 13:38:27",
            "phoneNumber"multiSession": "",false,
            "meta": {
        "created": "2017-08-02T11:22:44+02:00",
                "location": "http://<domain>/soffid.pat.lab:8080/webservice/scim2/v1/User/60"1477953",
                "lastModified"links": {
                    "roleAccounts": "2017-08-02T11:22:44+02:00"http://soffid.pat.lab:8080/webservice/scim2/v1/RoleAccount?filter=userCode+eq+'11'+and+enabled+eq+true",
                    "groupUsers": "http://soffid.pat.lab:8080/webservice/scim2/v1/GroupUser?filter=user+eq+'11'+and+disabled+eq+false",
                    "accounts": "http://soffid.pat.lab:8080/webservice/scim2/v1/Account?filter=type+eq+U+and+users.user.userName+eq+'11'"
                },
                "resourceType": "User"
            },
            "modifiedByUser": "admin",
            "schemas": [
                "urn:soffid:com.soffid.iam.api.User"
            ],
            "modifiedDate": "2017-08-02T11:22:44+02:00"2021-02-17 19:06:20",
            "attributes": {},
            "accounts": [
        {
            "system": "soffid",
            "name": "admin",
            "id": 69
        }
    ],1477953,
            "userType": "I",
            "homeServer": "null",
            "primaryGroupDescription": "World Original",
            "primaryGroup": "world"
        },
      .......
    ]
}

List by filter

List all usersroles with a filter expression.

For

It example,is oneallowed canto searchuse activepagination usersand sort the information, for more information visit SCIM Query parameters page.

Request

List all roles with ida greaterfilter than 50 and its user starting with 'a'.expression.

GET http://<your-domain>/soffid/webservice/scim2/v1/User?Role?filter=activename eq true"AD androle"
id gt 50 and userName sw "a" HTTP
Response 200 OK
{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ],
    "totalResults": 1,
    "resources"startIndex": 1,
    "Resources": [
        {
            "lastName"approvalEnd": "Admin"2021-02-04 15:39:05",
            "createdByUser": "Anonymous",
            "secondaryGroups"ownedRoles": [],
            "mailServer"description": "null"AD role",
            "multiSession"granteeGroups": [],
            "informationSystemName": "Operation/Business process/ad",
            "password": false,
            "system": "ad",
            "ownerGroups": [],
            "ownerRoles": [
                {
                    "informationSystem": "Operation/Business process/ad",
                    "ownerRole": 63,
                    "ownerRoleDescription": "SOFFID Administrator",
                    "roleId": 393195,
                    "mandatory": true,
                    "modifiedByUser": "Anonymous",
            "id": 60,
            "homeServer": "null",
            "primaryGroupDescription": "Enterprise Administrators",
            "primaryGroup": "admingroup",
            "consoleProperties": {
                "preferences": {
                    "lang": "en"
                },
                "language": "en",
                "id": 229,
                "lastLoginDate": "2017-08-25T12:38:50+02:00",
                "userName": "admin",
                "version": "TEST"
            },
            "comments": "Autocreated",
            "profileServer": "null",
            "active"enabled": true,
                    "fullName"ownerSystem": "Admin Admin"soffid",
                    "userName"system": "admin",
            "mailAlias": "",
            "firstName": "Admin",
            "createdDate": "2017-08-02T11:22:44+02:00",
            "phoneNumber": ""ad",
                    "meta": {
                        "created"location": "2017-08-02T11:22:44+02:00"http://soffid.pat.lab:8080/webservice/scim2/v1/RoleGrant/1563461",
                        "resourceType": "RoleGrant"
                    },
                    "schemas": [
                        "urn:soffid:com.soffid.iam.api.RoleGrant"
                    ],
                    "roleName": "AD role",
                    "hasDomain": false,
                    "id": 1563461,
                    "ownerRoleName": "SOFFID_ADMIN",
                    "roleDescription": "AD role",
                    "status": "A"
                }
            ],
            "bpmEnabled": true,
            "meta": {
                "location": "http://<domain>/soffid.pat.lab:8080/webservice/scim2/v1/User/60",
                "lastModified": "2017-08-02T11:22:44+02:00"Role/393195",
                "resourceType": "User"Role"
            },
            "modifiedDate"schemas": [
                "urn:soffid:com.soffid.iam.api.Role"
            ],
            "name": "2017-08-02T11:22:44+02:00"AD role",
            "approvalStart": "2021-02-04 15:39:05",
            "attributes": {},
            "accounts": [
                {
                    "system": "soffid",
                    "name": "admin",
                    "id": 69
                }
            ],393195,
            "userType"enableByDefault": "I"false
        }
    ]
}

CreateQuery by id

One may createQuery a user.role Thisby userits willid be(primary usedkey). 

for next examples.

Request
POSTGET http://<your-domain>/soffid/webservice/scim2/v1/UserRole/393195
Put
Response the200 userOK
JSON in the body of the request:
{
    "userName"approvalEnd": "jsmith"2021-02-04 15:39:05",
    "firstName": "John",
    "lastName": "Smith",
    "userType": "I",
    "primaryGroup": "world",
    "homeServer": "null",
    "mailServer": "null",
    "profileServer": "null",
    "active": true
 }
 
HTTP 201
{
    "lastName": "Smith",
    "createdByUser": "admin",
    "secondaryGroups"ownedRoles": [],
    "mailServer"description": "null"AD role",
    "multiSession"granteeGroups": [],
    "informationSystemName": "Operation/Business process/ad",
    "password": false,
    "id": 15245,
    "homeServer"system": "null"ad",
    "primaryGroupDescription"ownerGroups": [],
    "ownerRoles": [
        {
            "informationSystem": "World"Operation/Business process/ad",
            "primaryGroup"ownerRole": 63,
            "ownerRoleDescription": "world"SOFFID Administrator",
            "profileServer"roleId": "null",393195,
            "active"mandatory": true,
            "fullName"enabled": true,
            "ownerSystem": "John Smith"soffid",
            "userName"system": "jsmith",
    "mailAlias": "",
    "firstName": "John",
    "createdDate": "2017-08-25T14:01:40.522+02:00",
    "phoneNumber": ""ad",
            "meta": {
                "created"location": "2017-08-25T14:01:40.522+02:00"http://soffid.pat.lab:8080/webservice/scim2/v1/RoleGrant/1563461",
                "resourceType": "RoleGrant"
            },
            "schemas": [
                "urn:soffid:com.soffid.iam.api.RoleGrant"
            ],
            "roleName": "AD role",
            "hasDomain": false,
            "id": 1563461,
            "ownerRoleName": "SOFFID_ADMIN",
            "roleDescription": "AD role",
            "status": "A"
        }
    ],
    "bpmEnabled": true,
    "meta": {
        "location": "http://<domain>/soffid.pat.lab:8080/webservice/scim2/v1/User/15245",
        "lastModified": "2017-08-25T14:01:40.522+02:00"Role/393195",
        "resourceType": "User"Role"
    },
    "modifiedDate"schemas": [
        "urn:soffid:com.soffid.iam.api.Role"
    ],
    "name": "2017-08-25T14:01:40.522+02:00"AD role",
    "approvalStart": "2021-02-04 15:39:05",
    "attributes": {},
    "accounts"id": 393195,
    "enableByDefault": false
}

Create

To create a role .

Request

POST http://<your-domain>/soffid/webservice/scim2/v1/Role

JSON

{
    "schemas": [
        "urn:soffid:com.soffid.iam.api.Role"
    ],
    "name": "App Billing Role",
    "description": "Role Admin for Billing application",
    "informationSystemName": "Operation/Business 2/App Billing",
    "system": "test",
    "password": false,
    "bpmEnabled": false,
    "enableByDefault": false,
    "granteeGroups": [],
    "userType"ownedRoles": [],
    "ownerGroups": [],
    "ownerRoles": []
}
Response 201 Created
{
    "ownedRoles": [],
    "description": "I"Role Admin for Billing application",
    "granteeGroups": [],
    "informationSystemName": "Operation/Business 2/App Billing",
    "password": false,
    "system": "test",
    "ownerGroups": [],
    "ownerRoles": [],
    "bpmEnabled": false,
    "meta": {
        "location": "http://soffid.pat.lab:8080/webservice/scim2/v1/Role/1976590",
        "resourceType": "Role"
    },
    "schemas": [
        "urn:soffid:com.soffid.iam.api.Role"
    ],
    "name": "App Billing Role",
    "attributes": {},
    "id": 1976590,
    "enableByDefault": false
}

Update partial

Update only of the attributes with changes, only these attributesatrributes will be updated in the user,updated, the rest will maintain the same value.

Request

For example we will update the description and the owner users.

PATCH http://<your-domain>/soffid/webservice/scim2/v1/User/15245Role/1976590
Put

JSON

the
{
    user"schemas": JSON[
        in"urn:soffid:com.soffid.iam.api.Role"
    the],
    body"Operations": of the request:[
        {
            "phoneNumber"op": "666777888"replace",
            "path": "system",
            "value": "soffid"
        }
    HTTP]
}
Response 200 OK
{
    "lastName": "Smith",
    "createdByUser": "admin",
    "secondaryGroups"ownedRoles": [],
    "mailServer"description": "null"Role Admin for Billing application",
    "multiSession"granteeGroups": [],
    "informationSystemName": "Operation/Business 2/App Billing",
    "password": false,
    "modifiedByUser"system": "admin"soffid",
    "id"ownerGroups": 15245,
    "homeServer": "null"[],
    "primaryGroupDescription"ownerRoles": "World"[],
    "primaryGroup"bpmEnabled": "world",
    "profileServer": "null",
    "active": true,
    "fullName": "John Smith",
    "userName": "jsmith",
    "mailAlias": "",
    "firstName": "John",
    "createdDate": "2017-08-25T14:01:40+02:00",
    "phoneNumber": "666777888",false,
    "meta": {
        "created": "2017-08-25T14:01:40+02:00",
        "location": "http://<domain>/soffid.pat.lab:8080/webservice/scim2/v1/User/15245",
        "lastModified": "2017-08-25T14:11:22.957+02:00"Role/1976590",
        "resourceType": "User"Role"
    },
    "modifiedDate"schemas": [
        "urn:soffid:com.soffid.iam.api.Role"
    ],
    "name": "2017-08-25T14:11:22.957+02:00"App Billing Role",
    "attributes": {},
    "accounts"id": [],1976590,
    "userType"enableByDefault": "I"false
}

Update all

This operation replacesreplace all values in the user. For example we will update nationalID.roole.

  • Note that the attribute id is required to confirm that the resource "...User/Role/<id>" is the same that the JSON user.role.
  • Note that all the attributes not included in the request will be cleared in the userrole and their data will be lost.
  • Note that not all the attributes are updatable, for example tag meta, avoid these tags. For more information see Resource data model page.page
Request
PUT http://<your-domain>/soffid/webservice/scim2/v1/User/15245Role/1976590
Put

JSON

the
{
    user"schemas": JSON[
        in"urn:soffid:com.soffid.iam.api.Role"
    the body of the request:
{],
    "id": 15245,1976590,
    "userName"name": "jsmith"App Billing",
    "firstName"description": "John"Role Admin for Billing application",
    "lastName"informationSystemName": "Smith"Operation/Business 2/App Billing",
    "active"system": true,"test",
    "multiSession"password": false,
    "userType"bpmEnabled": false,
    "enableByDefault": false,
    "granteeGroups": [],
    "ownedRoles": [],
    "ownerGroups": [],
    "ownerRoles": []
}
Response 200 OK
{
    "ownedRoles": [],
    "description": "I"Role Admin for Billing application",
    "profileServer"granteeGroups": [],
    "informationSystemName": "null"Operation/Business 2/App Billing",
    "homeServer"password": false,
    "system": "null"test",
    "mailServer"ownerGroups": [],
    "ownerRoles": [],
    "bpmEnabled": false,
    "meta": {
        "location": "null"http://soffid.pat.lab:8080/webservice/scim2/v1/Role/1976590",
        "nationalID"resourceType": "11223344A"Role"
    },
    "phoneNumber"schemas": [
        "urn:soffid:com.soffid.iam.api.Role"
    ],
    "name": "666777888",App "mailAlias": "",
    "primaryGroup": "world",
    "primaryGroupDescription": "World",
    "fullName": "John Smith"Billing",
    "attributes": {},
    "secondaryGroups": [],
    "accounts": []
}
 
HTTP 200
{
    "lastName": "Smith",
    "createdByUser": "admin",
    "secondaryGroups": [],
    "mailServer": "null",
    "nationalID": "11223344A",
    "multiSession": false,
    "modifiedByUser": "admin",
    "id": 15245,1976590,
    "homeServer"enableByDefault": "null",
    "primaryGroupDescription": "World",
    "primaryGroup": "world",
    "profileServer": "null",
    "active": true,
    "fullName": "John Smith",
    "userName": "jsmith",
    "mailAlias": "",
    "firstName": "John",
    "createdDate": "2017-08-25T14:01:40+02:00",
    "phoneNumber": "666777888",
    "meta": {
        "created": "2017-08-25T14:01:40+02:00",
        "location": "http://<domain>/webservice/scim2/v1/User/15245",
        "lastModified": "2017-08-25T15:20:16.943+02:00",
        "resourceType": "User"
    },
    "modifiedDate": "2017-08-25T15:20:16.943+02:00",
    "attributes": {},
    "accounts": [],
    "userType": "I"false
}

Delete

Delete a user and its relations (groups, accounts, attributes, secondary groups, etc).role.

  • Please note that after this deletedelete, action,the youaccount will needhas to createbe created again the user to use it in the next examples.

Request
DELETE http://<domainyour-omain>/soffid/webservice/scim2/v1/User/15245Role/1976590
HTTP
Response 204 No Content
204 No Content