Skip to main content

SCIM Account examples

Operations

List all

List all accounts. Disabled or not. For example after the Soffid installation these are the available account.

GET http://<domain>/webservice/scim2/v1/Account
 
HTTP 200
{
    "totalResults": 1,
    "resources": [
        {
            "grantedRoles": [],
            "roles": [
                {
                    "role": 30
                }
            ],
            "description": "Admin Admin",
            "type": "U",
            "ownerGroups": [],
            "inheritNewPermissions": false,
            "disabled": false,
            "id": 60,
            "grantedGroups": [],
            "managerGroups": [],
            "passwordPolicy": "I",
            "managerRoles": [],
            "system": "soffid",
            "ownerRoles": [],
            "meta": {
                "location": "http://<domain>/webservice/scim2/v1/Account/60",
                "resourceType": "Account"
            },
            "name": "admin",
            "managerUsers": [],
            "attributes": {},
            "grantedUsers": []
        }
}

List by id

List an account by its id (primary key). For example the previous account.

GET http://<domain>/webservice/scim2/v1/Account/60
 
HTTP 200
{
    "grantedRoles": [],
    "roles": [
        {
            "role": 30
        }
    ],
    "description": "Admin Admin",
    "type": "U",
    "ownerGroups": [],
    "inheritNewPermissions": false,
    "disabled": false,
    "id": 60,
    "grantedGroups": [],
    "managerGroups": [],
    "passwordPolicy": "I",
    "managerRoles": [],
    "system": "soffid",
    "ownerRoles": [],
    "meta": {
        "location": "http://<domain>/webservice/scim2/v1/Account/60",
        "resourceType": "Account"
    },
    "name": "admin",
    "managerUsers": [],
    "attributes": {},
    "grantedUsers": []
}

List by filter

List all accounts with a filter expression. For example, one can search the account with different operators.

GET http://<domain>/webservice/scim2/v1/Account?filter=id ge 60 and description co "min" and passwordPolicy pr
 
HTTP 200
{
    "totalResults": 1,
    "resources": [
        {
            "grantedRoles": [],
            "roles": [
                {
                    "role": 30
                }
            ],
            "description": "Admin Admin",
            "type": "U",
            "ownerGroups": [],
            "inheritNewPermissions": false,
            "disabled": false,
            "id": 60,
            "grantedGroups": [],
            "managerGroups": [],
            "passwordPolicy": "I",
            "managerRoles": [],
            "system": "soffid",
            "ownerRoles": [],
            "meta": {
                "location": "http://<domain>/webservice/scim2/v1/Account/69"60",
                "resourceType": "Account"
            },
            "name": "admin",
            "managerUsers": [],
            "attributes": {},
            "grantedUsers": []
        }
    ]
}

Create

One can create an account . We will use this account for the following examples.

POST http://<domain>/webservice/scim2/v1/Account
 
Put the user JSON in the body of the request:
{
    "name": "Guest",
    "type": "I",
    "system": "soffid",
    "passwordPolicy": "I",
    "description": "Guest user",
    "inheritNewPermissions": false,
    "disabled": false
}
 
HTTP 201
{
    "grantedRoles": [],
    "roles": [],
    "description": "Guest user",
    "type": "I",
    "ownerGroups": [],
    "inheritNewPermissions": false,
    "disabled": false,
    "id": 15455,
    "grantedGroups": [],
    "managerGroups": [],
    "passwordPolicy": "I",
    "managerRoles": [],
    "system": "soffid",
    "ownerRoles": [],
    "meta": {
        "location": "http://<domain>/webservice/scim2/v1/Account/15455",
        "resourceType": "Account"
    },
    "name": "Guest",
    "managerUsers": [],
    "grantedUsers": [],
    "ownerUsers": []
}

Update partial

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

For example we will update the description.

PATCH http://<domain>/webservice/scim2/v1/Account/15455
 
Put the user JSON in the body of the request:
{
    "description": "Guest user account"
}
 
HTTP 200
{
    "grantedRoles": [],
    "roles": [],
    "description": "Guest user account",
    "type": "I",
    "ownerGroups": [],
    "inheritNewPermissions": false,
    "disabled": false,
    "id": 15455,
    "grantedGroups": [],
    "managerGroups": [],
    "passwordPolicy": "I",
    "managerRoles": [],
    "system": "soffid",
    "ownerRoles": [],
    "meta": {
        "location": "<domain>/webservice/scim2/v1/Account/15455",
        "resourceType": "Account"
    },
    "name": "Guest",
    "managerUsers": [],
    "attributes": {},
    "grantedUsers": [],
    "ownerUsers": []
}

Update all

This operation replace all values in the account. For example we will update the description.

  • Note that the attribute id is required to confirm that the resource "...Account/<id>" is the same that the JSON account.
  • Note that all the attributes not included in the request will be cleared in the account 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
PUT http://<domain>/webservice/scim2/v1/Account/15455
 
Put the user JSON in the body of the request:
{
    "id": 15455,
    "description": "Guest user account all updated",
    "type": "I",
    "inheritNewPermissions": false,
    "disabled": false,
    "passwordPolicy": "I",
    "system": "soffid",
    "name": "Guest"
}
 
HTTP 200
{
    "grantedRoles": [],
    "roles": [],
    "description": "Guest user account all updated",
    "type": "I",
    "ownerGroups": [],
    "inheritNewPermissions": false,
    "disabled": false,
    "id": 15455,
    "grantedGroups": [],
    "managerGroups": [],
    "passwordPolicy": "I",
    "managerRoles": [],
    "system": "soffid",
    "ownerRoles": [],
    "meta": {
        "location": "http://<domain>/webservice/scim2/v1/Account/15455",
        "resourceType": "Account"
    },
    "name": "Guest",
    "managerUsers": [],
    "grantedUsers": [],
    "ownerUsers": []
}

Delete

Delete an account.

  • Please note after this delete, the account has to be created again to use it in the next examples.
DELETE http://<domain>/webservice/scim2/v1/Account/15455
 
HTTP 204

Note: use of roles with domain values

In case of granting roles with domain values, the optional attribute domain value contains the value for that domain. Here is a sample account with permissions for the role SOFFID_OU_DOMAIN and domains D2 and enterprise:

{
            "grantedRoles": [],
            "roles": [
                {
                    "informationSystemName": "SOFFID",
                    "roleName": "SOFFID_OU_MANAGER",
                    "id": 2236442,
                    "roleDescription": "Business unit manager",
                    "domainValue": "D2"
                },
                {
                    "informationSystemName": "SOFFID",
                    "roleName": "SOFFID_OU_MANAGER",
                    "id": 2236447,
                    "roleDescription": "Business unit manager",
                    "domainValue": "enterprise"
                }
            ],
            "description": "faith - faith MUYOYO",
            "type": {
                "value": "U"
            },
            "lastUpdated": "2019-07-16T10:35:01+02:00",
            "ownerGroups": [],
            "inheritNewPermissions": false,
            "disabled": false,
            "id": 1727122,
            "grantedGroups": [],
            "managerGroups": [],
            "passwordPolicy": "I",
            "managerRoles": [],
            "created": "2019-07-16T10:26:16+02:00",
            "system": "soffid",
            "ownerRoles": [],
            "meta": {
                "location": "http://bubu-thinkpad:8080/webservice/scim/Account/1727122",
                "resourceType": "Account"
            },
            "name": "faith",
            "managerUsers": [],
            "attributes": {},
            "grantedUsers": [],
            "ownerUsers": [
                {
                    "lastName": "Smith",
                    "createdByUser": "csv",
                    "mailServer": "null",
                    "nationalID": "",
                    "multiSession": false,
                    "modifiedByUser": "admin",
                    "id": 1727113,
                    "homeServer": "null",
                    "primaryGroupDescription": "Entrprise",
                    "primaryGroup": "enterprise",
                    "comments": "Loaded from CSV file on Mon Aug 05 22:00:00 CEST 2019",
                    "profileServer": "null",
                    "active": true,
                    "fullName": "faith MUYOYO",
                    "userName": "faith",
                    "mailAlias": "",
                    "firstName": "faith",
                    "createdDate": "2019-07-16T10:26:16+02:00",
                    "phoneNumber": "",
                    "modifiedDate": "2019-12-12T17:06:42+01:00",
                    "userType": "I"
                }
            ]
        }