/scim2/Bulk

Allows you to use to add, update, patch and remove users in bulk.

Prerequisite - x-csrf-token

You must get a x-csrf-token and include it in the header of every POST operation.

For more information, see Valid CSRF Token.

POST /api/v1/scim2/Bulk

Updates users in bulk. Supported operations are POST, PUT, PATCH or DELETE.

  • HTTP Headers:

    • Authorization: Bearer <access_token>

    • x-csrf-token: <csrf_token>

    • x-sap-sac-custom-auth: true

  • Parameters: None

  • Request Body: Method (POST, PUT, PATCH or DELETE) and Path (/Users/<ID> or /Groups/<ID>)

    The following example deletes two users:
    {
      "failOnErrors":1,
      "schemas": ["urn:ietf:params:scim:api:messages:2.0:BulkRequest"],
      "Operations": [
           {
               "method": "DELETE",
               "path": "/Users/ce813e33-6130-4e13-90ea-1f3d3ed1d1f6"
           },
           {
               "method": "DELETE",
               "path": "/Users/6f0c4a7f-88eb-478f-9a2d-332ed7c56224"
           }
      ]
    }
    
    Example response from deleting two users:

Response

Example Response

  • 500: Internal server error

  • 403: Forbidden

  • 400: Bad request.

  • 204: OK

Format: application/scim+json (User Schema)

The response should include the user information you provided.

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:BulkResponse"
    ],
    "Operations": [
        {
            "method": "DELETE",
            "bulkId": null,
            "status": "204"
        },
        {
            "method": "DELETE",
            "bulkId": null,
            "status": "204"
        }
    ]
}
The following example creates two users:
{
  "failOnErrors":1,
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:BulkRequest"],
  "Operations": [
       {
           "method": "POST",
           "path": "/Users",
           "bulkId": "bulkId1",
           "data":{
                "schemas": [
                    "urn:sap:params:scim:schemas:extension:sac:2.0:user-custom-parameters",
                    "urn:ietf:params:scim:schemas:core:2.0:User"
                ],
                "userName": "TEST1",
                "name": {
                    "familyName": "Test1",
                    "givenName": "Test1"
                },
                "displayName": "Test1 Test1",
              "emails": [
                    {
                        "value": test1@sap.com
                    }
                ],
                "roles":[
                    {
                        "value": "PROFILE:sap.epm:Admin",
                        "display": "Admin",
                        "primary": true
                    }  
                ],
                "urn:sap:params:scim:schemas:extension:sac:2.0:user-custom-parameters": {
                    "dataAccessLanguage": "en",
                    "systemNotificationsEmailOptIn": false,
                    "numberFormatting": "1,234.56",
                    "idpUserId": test1@sap.com,
                    "timeFormatting": "H:mm:ss",
                    "isConcurrent": false,
                    "dateFormatting": "MMM d, yyyy",
                    "marketingEmailOptIn": false,
                    "cleanUpNotificationsNumberOfDays": 0
                }
            }
       },
       {
           "method": "POST",
           "path": "/Users",
           "bulkId": "bulkId2",
           "data": {
                "schemas": [
                    "urn:sap:params:scim:schemas:extension:sac:2.0:user-custom-parameters",
                    "urn:ietf:params:scim:schemas:core:2.0:User"
                ],
                "userName": "TEST2",
                "name": {
                    "familyName": "Test2",
                    "givenName": "Test2"
                },
                "displayName": "Test2 Test2",
                "emails": [
                    {
                        "value": test2@sap.com
                    }
                ],
                "roles":[
                    {
                        "value": "PROFILE:sap.epm:Admin",
                        "display": "Admin",
                      "primary": true
                    }  
                ],
                "urn:sap:params:scim:schemas:extension:sac:2.0:user-custom-parameters": {
                    "dataAccessLanguage": "en",
                    "systemNotificationsEmailOptIn": false,
                    "numberFormatting": "1,234.56",
                    "idpUserId": test2@sap.com,
                    "timeFormatting": "H:mm:ss",
                    "isConcurrent": false,
                    "dateFormatting": "MMM d, yyyy",
                    "marketingEmailOptIn": false,
                    "cleanUpNotificationsNumberOfDays": 0
                }
            }
       }
  ]
}


Example response from creating two users:

Response

Example Response

  • 500: Internal server error

  • 403: Forbidden

  • 400: Bad request.

  • 201: OK

Format: application/scim+json (User Schema)

The response should include the user information you provided.

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:BulkResponse"
    ],
    "Operations": [
        {
            "method": "POST",
            "bulkId": "bulkId1",
            "location": "/api/v1/scim2/Users/ce813e33-6130-4e13-90ea-1f3d3ed1d1f6",
            "status": "201"
        },
        {
            "method": "POST",
            "bulkId": "bulkId2",
            "location": "/api/v1/scim2/Users/6f0c4a7f-88eb-478f-9a2d-332ed7c56224",
            "status": "201"
        }
    ]
}