The System for Cross-domain Identity Management (SCIM) API provides endpoints to create, read, update, and delete operations on users and groups using the SCIM protocol.

The SCIM protocol is an application-level HTTP-based protocol based on the HTTP [RFC7230] standard. Use this API for provisioning and managing identity data, such as users and groups, on the web and in cross-domain environments, such as enterprise-to-cloud service providers or inter-cloud scenarios.

To access this API, you must activate the SCIM v2 - ServiceNow® Cross-domain Identity Management (com.snc.integration.scim2) plugin.

Resource mapping

The SCIM service has six resources:
  • User (core and extension)
  • Group (core and extension)
  • Company
  • CostCenter
  • Department
  • Location
Most of the attributes in these SCIM resources map to corresponding fields in an existing ServiceNow table. The following tables define these mappings. Attributes that do not correspond to fields in existing ServiceNow tables map to two SCIM-specific tables. For additional information on these tables, see SCIM-specific tables.

The SCIM User resource has both core (schema: urn:ietf:params:scim:schemas:core:2.0:User) and extension (urn:ietf:params:scim:schemas:extension:servicenow:2.0:User) schemas. Most of the User core and extension schema attributes map to the User [sys_user] table.

Table 2. User resource to Sys Scim User [sys_scim_user] table mapping
SCIM attribute name Sys Scim User field name
externalId external_id

The SCIM User extended schema (urn:ietf:params:scim:schemas:extension:servicenow:2.0:User) maps to the User [sys_user] table.

The SCIM Group resource schema (urn:ietf:params:scim:schemas:core:2.0:Group) maps to the Group [sys_user_group] table.

The SCIM Group externalId parameter maps to the Sys Scim Group [sys_scim_group] table.

Table 5. Group resource to Sys Scim Group [sys_scim_group] table mapping
SCIM attribute name Sys Scim Group field name
externalId external_id

The SCIM Group ServiceNow extension schema (urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group) maps to the Group [sys_user_group] table.

Table 6. Group resource to Group [sys_user_group] table mapping
SCIM attribute name Group field name
company.value company.sys_id
company.name company.name

The SCIM Company resource schema (urn:ietf:params:scim:schemas:custom:servicenow:2.0:Company) maps to the Company [core_company] table.

The SCIM CostCenter resource schema (urn:ietf:params:scim:schemas:custom:servicenow:2.0:CostCenter) maps to the Cost Center [cmn_cost_center] table.

The SCIM Department resource schema (urn:ietf:params:scim:schemas:custom:servicenow:2.0:Department) maps to the Department [cmn_department] table.

The SCIM Location resource schema (urn:ietf:params:scim:schemas:custom:servicenow:2.0:Location) maps to the Location [cmn_location] table.

SCIM-specific tables

Two tables, Sys Scim User [sys_scim_user] and Sys Scim Group [sys_scim_group], contain the SCIM attributes that do not map to existing ServiceNow tables. The following define the contents of these tables.

Roles and access control lists

The scim_admin role is required to access the SCIM-specific tables and the private SCIM endpoints and enables access to the User [sys_user] and Group [sys_user_group] tables.

The SCIM service has four ACLs for accessing the Sys Scim User [sys_scim_user] table and the Sys Scim Group [sys_scim_group] table that enable create, delete, read, and write. These ACLs are only mapped to the scim_admin role.

SCIM - DELETE /scim/Groups/{group_id}

Deletes the specified group record from the Group [sys_user_group] table of a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

URL format

Versioned URL: /api/now/{api_version}/scim/Groups/{group_id}

Default URL: /api/now/scim/Groups/{group_id}

Supported request parameters

Table 13. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

group_id Sys_id of the group record to delete.

Data type: String

Table 14. Query parameters
Name Description
None
Table 15. Request body parameters (JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 16. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 17. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Table 18. Status codes
Status code Description
204 No Content. The request was successfully processed.
404 Not found. The requested item wasn't found.

Response body parameters (JSON)

Example: cURL request to delete a group

This example shows how to delete a group record from the Group [sys_user_group] table.

curl "https://instance-servicenow.com/api/now/scim/Groups/a0a9e9fb1b7e3010593876a61a4bcbe0" \
--request DELETE \
--header "Accept:application/scim+json" \

SCIM - GET /scim/Groups

Returns one or more group records from the Group [sys_user_group] table within a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

Note: A query that does not return any matches returns success (HTTP status code 200) with totalResults set to 0.

URL format

Versioned URL: /api/now/{api_version}/scim/Groups

Default URL: /api/now/scim/Groups

Supported request parameters

Table 19. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

Table 21. Request body parameters (JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 22. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 23. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Table 24. Status codes
Status code Description
200 Successful. The request was successfully processed.
400 Bad Request. A bad request type or malformed request was detected.
  • Ensure that both the attributes and excludedAttributes query parameters have not been passed in the request.
  • Ensure that the count parameter is not greater than 500.
  • Ensure that all filter parameters are valid.
401 Unauthorized. The user credentials are incorrect or have not been passed.

Response body parameters (JSON)

Example: cURL request for multiple groups

This example shows how to request multiple groups (four in this case), using the count parameter.

curl "https://instance-sevicenow.com/api/now/scim/Groups?count=4" \
--request GET \
--header "Accept:application/scim+json" \

Response:

{"schemas":
  ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
  "totalResults":44,
  "Resources":[
    {"schemas":
      [
        "urn:ietf:params:scim:schemas:core:2.0:Group"",
        “urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group”,
        “urn:ietf:params:scim:schemas:extension:servicenow:custom:2.0:Group”
      ],
      "id":"019ad92ec7230010393d265c95c260dd",
      "meta":{
        "resourceType":"Group",
        "created":"2020-03-17T11:39:14Z",
        "lastModified":"2020-03-17T11:39:14Z",
        "location":"https://instance-sevicenow.com/api/now/scim/Groups/019ad92ec7230010393d265c95c260dd"
      },
      "displayName":"Analytics Settings Managers"
    },
    {"schemas":
      [
        "urn:ietf:params:scim:schemas:core:2.0:Group"",
        “urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group”,
        “urn:ietf:params:scim:schemas:extension:servicenow:custom:2.0:Group”
      ],
      "id":"0a52d3dcd7011200f2d224837e6103f2",
      "meta":{
        "resourceType":"Group",
        "created":"2021-09-29T16:42:02Z",
        "lastModified":"2021-09-29T16:42:02Z",
        "location":"https://instance-sevicenow.com/api/now/scim/Groups/0a52d3dcd7011200f2d224837e6103f2"
      },
      "displayName":"Application Development",
      "members":[
        {
          "value":"dc6053dcd7011200f2d224837e6103e0",
          "display":"John Doe",
          "$ref": "http://instance-sevicenow.com/api/now/scim/Users/dc6053dcd7011200f2d224837e6103e0"
        },
        {
          "value":"443193dcd7011200f2d224837e61037d",
          "display":"Abel Tutor",
          "$ref": "http://instance-sevicenow.com/api/now/scim/Users/443193dcd7011200f2d224837e61037d"
        }
      ],
      "urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group": {
        "company": {
          "value": "81fd65ecac1d55eb42a426568fc87a63",
          "name": "ACME Japan",
          "$ref": "http://instance-sevicenow.com/api/now/scim/Companies/81fd65ecac1d55eb42a426568fc87a63"
        }
      }
    },
    {"schemas":
      [
        "urn:ietf:params:scim:schemas:core:2.0:Group"",
        “urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group”,
        “urn:ietf:params:scim:schemas:extension:servicenow:custom:2.0:Group”
      ],
      "id":"0c4e7b573b331300ad3cc9bb34efc461",
      "meta":{
        "resourceType":"Group",
        "created":"2021-09-29T05:11:33Z",
        "lastModified":"2021-09-29T05:11:33Z",
        "location":"instance-sevicenow.com/api/now/scim/Groups/0c4e7b573b331300ad3cc9bb34efc461"
      },
      "displayName":"Problem Analyzers",
      "members":[
        {
          "value":"d3dbbf173b331300ad3cc9bb34efc466",
          "display":"Problem Manager",
          "$ref": "http://instance-sevicenow.com/api/now/scim/Users/babb4639b76233004fbc2089ee11a97f"
        },
        {
          "value":"38cb3f173b331300ad3cc9bb34efc4d6",
          "display":"Problem Coordinator B",
          "$ref": "http://instance-sevicenow.com/api/now/scim/Users/cbcc4639b76233004fbc2089ee111047"
        },
        {
          "value":"26fbff173b331300ad3cc9bb34efc4bd",
          "display":"Problem Administrator",
          "$ref": "http://instance-sevicenow.com/api/now/scim/Users/45324639b76232189fbc2089ee11bc34"
        }
      ],
      "urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group": {
        "company": {
          "value": "913465ecac1d569b42a426568fc88af3",
          "name": "ACME London",
          "$ref": "http://instance-sevicenow.com/api/now/scim/Companies/913465ecac1d569b42a426568fc88af3"
        }
      }
    },
    {"schemas":
      [
        "urn:ietf:params:scim:schemas:core:2.0:Group"",
        "urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group",
        "urn:ietf:params:scim:schemas:extension:servicenow:custom:2.0:Group"
      ],
      "id":"0c5e2a7ce4001410f877ce457cda6b98",
      "meta":{
        "resourceType":"Group",
        "created":"2020-04-06T03:47:08Z",
        "lastModified":"2020-07-29T04:02:26Z",
        "location":"instance-sevicenow.com/api/now/scim/Groups/0c5e2a7ce4001410f877ce457cda6b98"
      },
      "displayName":"Business Application Registration Approval Group"
    }
  ],
  "startIndex":1,
  "itemsPerPage":4
}

Example: cURL request for multiple groups using excludedAttributes

This example shows how to request multiple groups (four in this case), using the count parameter and excluding the meta and members fields.

curl "https://instance-sevicenow.com/api/now/scim/Groups?excludedAttributes=meta%2C%20members&count=4" \
--request GET \
--header "Accept:application/scim+json" \

Response:

{"schemas":
  ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
  "totalResults":44,
  "Resources":[
    {"schemas":
      [
        "urn:ietf:params:scim:schemas:core:2.0:Group"",
        “urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group”,
        “urn:ietf:params:scim:schemas:extension:servicenow:custom:2.0:Group”
      ],
      "id":"019ad92ec7230010393d265c95c260dd",
      "displayName":"Analytics Settings Managers",
      "urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group": {
        "company": {
          "value": "913465ecac1d569b42a426568fc88af3",
          "name": "ACME London",
          "$ref": "http://instance-sevicenow.com/api/now/scim/Companies/913465ecac1d569b42a426568fc88af3"
        }
      }
    },
    {"schemas":
      [
        "urn:ietf:params:scim:schemas:core:2.0:Group"",
        “urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group”,
        “urn:ietf:params:scim:schemas:extension:servicenow:custom:2.0:Group”
      ],
      "id":"0a52d3dcd7011200f2d224837e6103f2",
      "displayName":"Application Development"
    },
    {"schemas":
      [
        "urn:ietf:params:scim:schemas:core:2.0:Group"",
        “urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group”,
        “urn:ietf:params:scim:schemas:extension:servicenow:custom:2.0:Group”
      ],
      "id":"0c4e7b573b331300ad3cc9bb34efc461",
      "displayName":"Problem Analyzers"
    },
    {"schemas":
      [
        "urn:ietf:params:scim:schemas:core:2.0:Group"",
        “urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group”,
        “urn:ietf:params:scim:schemas:extension:servicenow:custom:2.0:Group”
      ],
      "id":"0c5e2a7ce4001410f877ce457cda6b98",
      "displayName":"Business Application Registration Approval Group",
      "urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group": {
        "company": {
          "value": "81fd65ecac1d55eb42a426568fc87a63",
          "name": "ACME Japan",
          "$ref": "http://instance-sevicenow.com/api/now/scim/Companies/81fd65ecac1d55eb42a426568fc87a63"
        }
      }
    }
  ],
  "startIndex":1,
  "itemsPerPage":4
}

SCIM - GET /scim/Groups/{group_id}

Returns the specified group record from the Group [sys_user_group] table within a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

URL format

Versioned URL: /api/now/{api_version}/scim/Groups/{group_id}

Default URL: /api/now/scim/Groups/{group_id}

Supported request parameters

Table 25. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

group_id Sys_id of the group record to return.
Table 26. Query parameters
Name Description
attributes Comma-separated list of fields to return in the response. No other fields are returned.

Cannot be used with the excludedAttributes parameter.

Data type: String

Default: Return all fields unless excludedAttributes is specified.

excludedAttributes Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned.

Cannot be used with the attributes parameter.

Data type: String

Default: Do not exclude any fields.

Table 27. Request body parameters (JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 28. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 29. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Table 30. Status codes
Status code Description
200 Successful. The request was successfully processed.
400 Bad Request. A bad request type or malformed request was detected.
  • Ensure that both the attributes and excludedAttributes query parameters have not been passed in the request.
  • Ensure that the count parameter is not greater than 500.
  • Ensure that all filter parameters are valid.
404 Not found. The requested item wasn't found.

Response body parameters (JSON)

Example: cURL request for specific group

This example shows how to retrieve a specific group record.

curl "https://instance-servicenow.com/api/now/scim/Groups/e0140d671bbe3010593876a61a4bcb11" \
--request GET \
--header "Accept:application/scim+json" \

Response:

{"schemas":
  [
    "urn:ietf:params:scim:schemas:core:2.0:Group",
    "urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group",
    "urn:ietf:params:scim:schemas:extension:servicenow:custom:2.0:Group"
  ],
  "id":"e0140d671bbe3010593876a61a4bcb11",
  "externalId":"8ae5dc9e-c7ad-4d3d-a152-35a6b6222b83",
  "meta":{
    "resourceType":"Group",
    "created":"2021-09-30T18:20:43Z",
    "lastModified":"2021-09-30T18:20:43Z",
    "location":"https://instance-servicenow.com/api/now/scim/Groups/e0140d671bbe3010593876a61a4bcb11"},
    "displayName":"HR Group",
    "members":[
      {
        "value":"62826bf03710200044e0bfc8bcbe5df1",
        "display":"Abel Tuter",
        "$ref": "http://instance-servicenow.com/api/now/scim/Users/62826bf03710200044e0bfc8bcbe5df1"
      }
    ], 
    "urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group": {
      "company": {
        "value": "81fd65ecac1d55eb42a426568fc87a63",
        "name": "ACME Japan",
        "$ref": "http://111.111.1.11:8080/api/now/scim/Companies/81fd65ecac1d55eb42a426568fc87a63"
      }
    }
  }
}

SCIM - PATCH /scim/Groups/{group_id}

Enables you to add, update, and delete specified fields in a group record in the Group [sys_user_group] table of a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

For additional information, refer to the Modifying with PATCH section of RFC 7644.

URL format

Versioned URL: /api/now/{api_version}/scim/Groups/{group_id}

Default URL: /api/now/scim/Groups/{group_id}

Supported request parameters

Table 31. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

group_id Sys_id of the group record to update.
Table 32. Query parameters
Name Description
attributes Comma-separated list of fields to return in the response. No other fields are returned.

Cannot be used with the excludedAttributes parameter.

Data type: String

Default: Return all fields unless excludedAttributes is specified.

excludedAttributes Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned.

Cannot be used with the attributes parameter.

Data type: String

Default: Do not exclude any fields.

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 34. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Content-Type Data format of the request body. Supported types: application/json or application/scim+json.

Default: application/json

Table 35. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Response body parameters (JSON)

Example: cURL request

This example shows how to add an external ID to a group record and replace the current list of associated members (users).

curl "https://instance-servicenow.com/api/now/scim/Groups/a92b84f96b073010638c83eece44af4e" \
--request PATCH \
--header "Accept:application/scim+json" \
--header "Content-Type:application/scim+json" \
--data "{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:PatchOp"
  ],
  "Operations": [
    {
      "op": "add",
      "path": "externalId",
      "value": "278fdc2e-a6aa-4140-bd23-9ba4987a2938"
    },
    {
      "op": "replace",
      "path": "members",
      "value": [
        {
          "value": "62826bf03710200044e0bfc8bcbe5df1"
        },
        {
          "value": "a8f98bb0eb32010045e1a5115206fe3a"
        }
      ]
    }
  ]
}"

Response:

{
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:Group",
    "urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group",
    'urn:ietf:params:scim:schemas:extension:servicenow:custom:2.0:Group'
  ],
  "id": "a92b84f96b073010638c83eece44af4e",
  "externalId": "278fdc2e-a6aa-4140-bd23-9ba4987a2938",
  "meta": {
    "resourceType": "Group",
    "created": "2021-10-07T13:58:22Z",
    "lastModified": "2021-10-07T15:48:44Z",
    "location":
      "https://instance-sevicenow/api/now/scim/Groups/a92b84f96b073010638c83eece44af4e"
  },
  "displayName": "HR Team",
  "members": [
    {
      "value": "62826bf03710200044e0bfc8bcbe5df1",
      "display": "Abel Tuter",
      "$ref":
        "https://instance-sevicenow/api/now/scim/Users/62826bf03710200044e0bfc8bcbe5df1"
    },
    {
      "value": "a8f98bb0eb32010045e1a5115206fe3a",
      "display": "Abraham Lincoln",
      "$ref":
        "https://instance-sevicenow/api/now/scim/Users/a8f98bb0eb32010045e1a5115206fe3a"
    }
  ],
  "urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group": {
    "company": {
      "value": "81fd65ecac1d55eb42a426568fc87a63",
      "name": "ACME Japan",
      "$ref": "http://instance-sevicenow/api/now/scim/Companies/81fd65ecac1d55eb42a426568fc87a63"
    }
  }
}

SCIM - POST /scim/Groups

Creates a group record in the Group [sys_user_group] table of a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

You can define the display name of the group, an external ID used to correlate this group to an external system, and add members (users/groups) to the group.

Note: The search and bulk modifications functionality as noted in the RFC7643 specification are not supported by this endpoint.

URL format

Versioned URL: /api/now/{api_version}/scim/Groups

Default URL: /api/now/scim/Groups

Supported request parameters

Table 37. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

Table 38. Query parameters
Name Description
attributes Comma-separated list of fields to return in the response. No other fields are returned.

Cannot be used with the excludedAttributes parameter.

Data type: String

Default: Return all fields unless excludedAttributes is specified.

excludedAttributes Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned.

Cannot be used with the attributes parameter.

Data type: String

Default: Do not exclude any fields.

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 40. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Content-Type Data format of the request body. Supported types: application/json or application/scim+json.

Default: application/json

Table 41. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Response body parameters (JSON)

NameDescription
company Details about the group's company or organization.

Data type: Object

"company": {
  "display": "String",
  "$ref": "String",
  "value": "String"
}
company.display Name of the company.

Data type: String

company.$ref Reference URI of the company.

Format: <host>/Companies/<company sys_id>, such as: http://instance-servicenow.com/api/now/scim/Companies/81fd65ecac1d55eb42a426568fc87a63 .

Data type: String

company.value Sys_id of the associated company.

Data type: String

displayName Human-readable name of the group, such as HR Team.

Data type: String

externalId Unique identifier assigned to the group by the entity provisioning it.

Data type: String

id Sys_id of the group.

Data type: String

meta Metadata pertaining to the group.

Data type: Object

"meta": {
  "created": "String",
  "lastModified": "String",
  "location": String",
  "resourceType": String"
}
meta.created Date and time when the group record was created.

Data type: String

meta.lastModified Date and time when the group record was last modified.

Data type: String

meta.location URI of the group being retrieved.

Data type: String

meta.resourceType SCIM Groups' resource type.

Data type: String

members List of the users and groups associated with the group.
Data type: Array of Objects
"members": [
  {
    "display": "String",
    "value": "String",
    "$ref": "String"
  }
]
members.display Name of the associated group member.

Data type: String

members.value Sys_id of the associated user or group record.

Data type: String

members.$ref URI of the associated group member.

Data type: String

schemas
List of URIs of the SCIM Group schemas used to process the request.
Supported group schemas:
  • urn:ietf:params:scim:schemas:core:2.0:Group - Core schema specified in the Internet Engineering Task Force System for Cross-domain Identity Management: Core Schema document (https://datatracker.ietf.org/doc/html/rfc7643#section-4.2)
  • urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group - ServiceNow extension schema. This schema contains attributes that are present in the Groups [sys_user_group] table in a base ServiceNow system, but are not part of the core schema.
  • urn:ietf:params:scim:schemas:extension:servicenow:custom:2.0:Group” - Custom extension schema. This schema is part of “Group” resourceType in the sys_scim_schema_extension table. If the schema is not active, the schema URN is not returned in the response.

Data type: Array of Strings

Example: cURL request POST a new group and add member

This example creates group51 and adds the user Abel Tutor as a member.

curl "https://instance-servicenow.com/api/now/scim/Groups" \
--request POST \
--header "Accept:application/scim+json" \
--header "Content-Type:application/scim+json" \
--data "{
  \"schemas\": ["urn:ietf:params:scim:schemas:core:2.0:Group",
    “urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group”, 
    “urn:ietf:params:scim:schemas:extension:servicenow:custom:2.0:Group”],
  \"displayName\": \"HR Team\",
  \"externalId\": \"8ae5dc9e-c7ad-4d3d-a152-35a6b6222b83\",
  \"members\": [
    {
      \"value\": \"62826bf03710200044e0bfc8bcbe5df1\",
      \"$ref\": \"Users/62826bf03710200044e0bfc8bcbe5df1\"
    }
  ]
}"

Response:

{"schemas":
  [
    "urn:ietf:params:scim:schemas:core:2.0:Group",
    "urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group",
    'urn:ietf:params:scim:schemas:extension:servicenow:custom:2.0:Group'
  ],
  "id":"e0140d671bbe3010593876a61a4bcb11",
  "externalId":"8ae5dc9e-c7ad-4d3d-a152-35a6b6222b83",
  "meta":{
    "resourceType":"Group",
    "created":"2021-09-30T18:20:43Z",
    "lastModified":"2021-09-30T18:20:43Z",
    "location":"https://instance-servicenow.com/api/now/scim/Groups/e0140d671bbe3010593876a61a4bcb11"},
    "displayName":"HR Team",
    "members":[
      {
        "value":"62826bf03710200044e0bfc8bcbe5df1",
        "display":"Abel Tuter",
        "$ref": "http://instance-servicenow.com/api/now/scim/Users/62826bf03710200044e0bfc8bcbe5df1"
      }
    ],
    "urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group": {
      "company": {
        "value": "81fd65ecac1d55eb42a426568fc87a63",
        "name": "ACME Japan",
        "$ref": http://instance-servicenow.com/api/now/scim/Companies/81fd65ecac1d55eb42a426568fc87a63
      }
    }
  }
}

SCIM - PUT /scim/Groups/{group_id}

Updates the specified group record in the Group [sys_user_group] table of a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

Fields that are omitted in the request are not updated. You can explicitly clear a field by setting its value to null for a single valued field and to an empty array for array type fields such as members.

URL format

Versioned URL: /api/now/{api_version}/scim/Groups/{group_id}

Default URL: /api/now/scim/Groups/{group_id}

Supported request parameters

Table 43. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

group_id Sys_id of the group record to update.
Table 44. Query parameters
Name Description
attributes Comma-separated list of fields to return in the response. No other fields are returned.

Cannot be used with the excludedAttributes parameter.

Data type: String

Default: Return all fields unless excludedAttributes is specified.

excludedAttributes Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned.

Cannot be used with the attributes parameter.

Data type: String

Default: Do not exclude any fields.

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 46. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Content-Type Data format of the request body. Supported types: application/json or application/scim+json.

Default: application/json

Table 47. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Response body parameters (JSON)

Example: cURL request updating group members using PUT

The following example changes the member associated with the group to Abraham Lincoln instead of Abel Tutor and changes the name of the group to HR Team.

curl "https://instance-servicenow.com/api/now/scim/Groups/e0140d671bbe3010593876a61a4bcb11" \
--request PUT \
--header "Accept:application/scim+json" \
--header "Content-Type:application/scim+json" \
--data "{
  \"schemas\": ["urn:ietf:params:scim:schemas:core:2.0:Group",
    “urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group”, 
    “urn:ietf:params:scim:schemas:extension:servicenow:custom:2.0:Group”],
  \"displayName\": \"HR Team\",
  \"externalId\": \"8ae5dc9e-c7ad-4d3d-a152-35a6b6222b83\",
  \"members\": [
    {
      \"value\": \"a8f98bb0eb32010045e1a5115206fe3a\",
      \"$ref\": \"Users\"
    }
  ]
}" 

Response:

{"schemas":
  [
    "urn:ietf:params:scim:schemas:core:2.0:Group",
    "urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group",
    'urn:ietf:params:scim:schemas:extension:servicenow:custom:2.0:Group'
  ],
  "id":"e0140d671bbe3010593876a61a4bcb11",
  "externalId":"8ae5dc9e-c7ad-4d3d-a152-35a6b6222b83",
  "meta":{
    "resourceType":"Group",
    "created":"2021-09-30T18:20:43Z",
    "lastModified":"2021-09-30T21:19:40Z",
    "location":"https://instance-servicenow.com/api/now/scim/Groups/e0140d671bbe3010593876a61a4bcb11"
  },
  "displayName":"HR Team",
  "members":[
    {
      "value":"a8f98bb0eb32010045e1a5115206fe3a",
      "display":"Abraham Lincoln",
      "$ref": "http://instance-servicenow.com/api/now/scim/Users/62826bf03710200044e0bfc8bcbe5df1"
    }
  ],
  "urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group": {
    "company": {
      "value": "81fd65ecac1d55eb42a426568fc87a63",
      "name": "ACME Japan",
      "$ref": "http://192.168.1.25:8080/api/now/scim/Companies/81fd65ecac1d55eb42a426568fc87a63"
    }
  }
}

SCIM - DELETE /scim/Users/{user_id}

Deletes the specified user record from the User [sys_user] table of a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

URL format

Versioned URL: /api/now/{api_version}/scim/Users/{user_id}

Default URL: /api/now/scim/Users/{user_id}

Supported request parameters

Table 49. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

user_id Sys_id of the user record to delete.
Table 50. Query parameters
Name Description
None
Table 51. Request body parameters (JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 52. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 53. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Table 54. Status codes
Status code Description
204 No Content. The request was successfully processed.
404 Not found. The requested item wasn't found.

Response body parameters (JSON)

Example: cURL request

This example shows how to delete a user record from the User [sys_user] table.

curl "https://instance-servicenow.com/api/now/scim/Users/b7c5015f778330102e8cc5179e5a9992" \
--request DELETE \
--header "Accept:application/scim+json"  \

SCIM - GET /scim/Users

Returns one or more user records from the User [sys_user] table within a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

Note: A query that does not return any matches returns success (HTTP status code 200) with totalResults set to 0.

URL format

Versioned URL: /api/now/{api_version}/scim/Users

Default URL: /api/now/scim/Users

Supported request parameters

Table 55. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

Table 57. Request body parameters (XML or JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 58. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 59. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Table 60. Status codes
Status code Description
200 Successful. The request was successfully processed.
400 Bad Request. A bad request type or malformed request was detected.
  • Ensure that both the attributes and excludedAttributes query parameters have not been passed in the request.
  • Ensure that the count parameter is not greater than 500.
  • Ensure that all filter parameters are valid.

Response body parameters (JSON)

Extension parameters returned

Example: cURL request using attributes

The following example shows how to obtain two users starting at the sixth record and only returning the display name.

curl "https://instance-servicenow.com/api/now/scim/Users?attributes=displayName&startIndex=6&count=2" \
--request GET \
--header "Accept:application/scim+json" \

Response:

{"schemas":
  ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
  "totalResults":619,
  "Resources":
    [
      {
        "schemas":
          [
            "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User",
            "urn:ietf:params:scim:schemas:core:2.0:User"
          ],
        "id":"02826bf03710200044e0bfc8bcbe5d6d",
        "displayName":"Sean Bonnet"
      },
      {
        "schemas":
          [
            "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User",
            "urn:ietf:params:scim:schemas:core:2.0:User"
           ],
         "id":"02826bf03710200044e0bfc8bcbe5d76",
         "displayName":"Jacinto Gawron"
      }
    ],
  "startIndex":6,
  "itemsPerPage":2
}

Example: cURL request using a filter

The following example shows how to use the filter parameter to return the first two user records whose given name starts with "a".

curl "https://instance-servicenow.com/api/now/scim/Users?filter=name.givenName%20SW%20%22a%22&count=2" \
--request GET \
--header "Accept:application/scim+json" \

Response:

{"schemas":
  ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
  "totalResults":42,
  "Resources":
    [
      {
        "schemas":
          [
            "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User",
            "urn:ietf:params:scim:schemas:core:2.0:User"
          ],
        "id":"06826bf03710200044e0bfc8bcbe5d8a",
        "meta":
          {
            "resourceType":"User",
            "created":"2012-02-18T03:04:50Z",
            "lastModified":"2021-10-01T14:23:32Z",
            "location":"https://instance-servicenow.com/api/now/scim/Users/06826bf03710200044e0bfc8bcbe5d8a"
          },
          "userName":"allyson.gillispie",
          "name":
            {
              "familyName":"Gillispie",
              "givenName":"Allyson"
            },
          "displayName":"Allyson Gillispie",
          "active":true,
          "emails":
            [
              {
                "value":"allyson.gillispie@example.com",
                "type":"work"
              }
            ],
          "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User":
            {
              "gender":"Female",
              "costCenter":
                {
                  "value":"d9d07bddc0a80a647cf932056ed24652",
                  "name":"Engineering"
                },
              "company":
                {
                  "value":"31bea3d53790200044e0bfc8bcbe5dec",
                  "name":"ACME North America"
                },
              "department":
                {
                  "value":"221f3db5c6112284009f4becd3039cc9",
                  "name":"Development"
                },
              "location":
                {
                  "value":"f9084ba00a0a0b910060ba2ce83f882b",
                  "name":"946 Donax Avenue, Imperial Beach,CA"
                }
            }
         },
      {
        "schemas":
          [
            "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User",
            "urn:ietf:params:scim:schemas:core:2.0:User"
          ],
        "id":"0a826bf03710200044e0bfc8bcbe5d7a"
        "meta":
          {
            "resourceType":"User",
            "created":"2012-02-18T03:04:50Z",
            "lastModified":"2021-10-01T14:23:32Z",
            "location":"https://instance-servicenow.com/api/now/scim/Users/0a826bf03710200044e0bfc8bcbe5d7a"
          },
        "userName":"adela.cervantsz",
        "name":
          {
            "familyName":"Cervantsz",
            "givenName":"Adela"
          },
        "displayName":"Adela Cervantsz",
        "active":true,
        "emails":
          [
            {
              "value":"adela.cervantsz@example.com",
              "type":"work"
            }
          ],
        "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User":
          {
            "gender":"Female",
            "costCenter":
              {
                "value":"91e8bbf43710200044e0bfc8bcbe5daa",
                "name":"Customer Support"
              },
            "company":
              {
                "value":"31bea3d53790200044e0bfc8bcbe5dec",
                "name":"ACME North America"
              },
            "department":
              {
                "value":"5d7f17f03710200044e0bfc8bcbe5d43",
                "name":"Customer Support"
              },
            "location":
              {
                "value":"25ab93750a0a0bb30067bd2ef3d4a5c9",
                "name":"8306 Mills Drive, Miami,FL"
              }
          }
    }
  ],
  "startIndex":1,
  "itemsPerPage":2
}

SCIM - GET /scim/Users/{user_id}

Returns the specified user record from the User [sys_user] table within a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

URL format

Versioned URL: /api/now/{api_version}/scim/Users/{user_id}

Default URL: /api/now/scim/Users/{user_id}

Supported request parameters

Table 61. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

user_id Sys_id of the user record to return.

Data type: String

Table 62. Query parameters
Name Description
attributes Comma-separated list of fields to return in the response. No other fields are returned.

Cannot be used with the excludedAttributes parameter.

Data type: String

Default: Return all fields unless excludedAttributes is specified.

excludedAttributes Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned.

Cannot be used with the attributes parameter.

Data type: String

Default: Do not exclude any fields.

Table 63. Request body parameters (JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 64. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 65. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Table 66. Status codes
Status code Description
200 Successful. The request was successfully processed.
400 Bad Request. A bad request type or malformed request was detected.
  • Ensure that both the attributes and excludedAttributes query parameters have not been passed in the request.
  • Ensure that the count parameter is not greater than 500.
  • Ensure that all filter parameters are valid.
404 Not found. The requested item wasn't found.

Response body parameters (JSON)

Extension parameters returned

Example: cURL request using user sys_id

The following example shows how to obtain a specific user record by passing their sys_id.

curl "https://instance-servicenow.com/api/now/scim/Users/62826bf03710200044e0bfc8bcbe5df1" \
--request GET \
--header "Accept:application/scim+json" \

Response:

{"schemas":
  [
    "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User",
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
    "id":"62826bf03710200044e0bfc8bcbe5df1",
    "meta":
      {
        "resourceType":"User",
        "created":"2012-02-18T03:04:52Z",
        "lastModified":"2021-10-01T14:23:34Z",
        "location":"https://instance-servicenow.com/api/now/scim/Users/62826bf03710200044e0bfc8bcbe5df1"
      },
    "userName":"abel.tuter",
    "name":
      {
        "familyName":"Tuter",
        "givenName":"Abel"
      },
    "displayName":"Abel Tuter",
    "active":true,
    "emails":[
      {
        "value":"abel.tuter@example.com",
        "type":"work"
      }
    ],
    "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User":
      {
        "gender":"Male",
        "costCenter":
          {
            "value":"d9d07bddc0a80a647cf932056ed24652",
            "name":"Engineering"
          },
        "company":
          {
            "value":"227cdfb03710200044e0bfc8bcbe5d6b",
            "name":"ACME South America"
          },
        "department":
          {
            "value":"9a7ed3f03710200044e0bfc8bcbe5db7",
            "name":"Product Management"
           },
        "location":
          {
            "value":"25b3d04b0a0a0bb300176b546c22db27",
            "name":"SHS quadra 5, Bloco E., Brasilia"}
          }
      }

SCIM - PATCH /scim/Users/{user_id}

Enables you to add, replace, and remove specified fields in a user record in the User [sys_user] table of a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

URL format

Versioned URL: /api/now/{api_version}/scim/Users/{user_id}

Default URL: /api/now/scim/Users/{user_id}

Supported request parameters

Table 67. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

user_id Sys_id of the user record to modify.
Table 68. Query parameters
Name Description
attributes Comma-separated list of fields to return in the response. No other fields are returned.

Cannot be used with the excludedAttributes parameter.

Data type: String

Default: Return all fields unless excludedAttributes is specified.

excludedAttributes Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned.

Cannot be used with the attributes parameter.

Data type: String

Default: Do not exclude any fields.

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 70. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Content-Type Data format of the request body. Supported types: application/json or application/scim+json.

Default: application/json

Table 71. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Response body parameters (JSON)

Extension parameters returned

Example: cURL request

The following example shows how to add, remove, and replace values within a user record.

curl -X PATCH \
  https://instance-servicenow.com/api/now/scim/Users/005d500b536073005e0addeeff7b12f4 \
  -d '{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:PatchOp"
  ],
  "Operations": [
    {
      "op" : "remove",
      "path" : "title" 
    },
    {
      "op" : "add",
      "path" : "phoneNumbers",
      "value" : [
        {
          "type" : "work",
          "value" : "9876543210"
        }
      ]
    },
    {
      "op": "replace",
      "value": {
        "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User": {
            "employeeNumber": "13454"
        },
        "name": {
            "familyName": "John",
            "givenName": "Smith"
        }
      }
    }
  ]
}'

Response:

{
  "schemas":[
    "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User",
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "id":"005d500b536073005e0addeeff7b12f4",
  "meta":{
    "resourceType":"User",
    "created":"2019-04-05T21:09:12Z",
    "lastModified":"2021-10-12T18:29:27Z",
    "location":"https://instance-servicenow.com/api/now/scim/Users/005d500b536073005e0addeeff7b12f4"
  },
  "userName":"survey.user",
  "name":{
    "familyName":"John",
    "givenName":"Smith"
  },
  "displayName":"Smith John",
  "active":true,
  "emails":[
    {
      "value":"survey.user@email.com",
      "type":"work"
    }
  ],
  "phoneNumbers":[
    {
      "value":"9876543210",
      "type":"work"
    }
  ],
  "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User":{
    "employeeNumber":"13454"
  }
}

SCIM - POST /scim/Users

Creates a user record in the User [sys_user] table of a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

Note: The search and bulk modifications functionality as noted in the RFC7643 specification are not supported by this endpoint.

URL format

Versioned URL: /api/now/{api_version}/scim/Users

Default URL: /api/now/scim/Users

Supported request parameters

Table 73. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

Table 74. Query parameters
Name Description
attributes Comma-separated list of fields to return in the response. No other fields are returned.

Cannot be used with the excludedAttributes parameter.

Data type: String

Default: Return all fields unless excludedAttributes is specified.

excludedAttributes Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned.

Cannot be used with the attributes parameter.

Data type: String

Default: Do not exclude any fields.

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 76. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Content-Type Data format of the request body. Supported types: application/json or application/scim+json.

Default: application/json

Table 77. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Response body parameters (JSON or XML)

Example: cURL request to POST user

This example shows how to POST the user Jack Sparrow to the User [sys_user] table.

curl -X POST \
  https://instance-servicenow.com/api/now/scim/Users \
  -d '{
    "schemas": [
        "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User",
        "urn:ietf:params:scim:schemas:core:2.0:User"
    ],
    "externalId": "123456",
    "userName": "jack.sparrow",
    "name": {
        "familyName": "Sparrow",
        "givenName": "Jack"
    },
    "title": "Senior Developer",
    "preferredLanguage": "en",
    "timezone": "ET",
    "active": true,
    "emails": [
      {
        "value": "jack.sparrow@abc.com",
        "display": null,
        "type": "work",
        "primary": true
      }
    ],
    "phoneNumbers": [
      {
        "value": "9977553312",
        "type": "mobile",
        "primary": true
      }
    ]
}'

Response

{"schemas":
  [
    "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User",
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "id":"d6287d7b1bbe3010593876a61a4bcbc3",
  "externalId":"123456",
  "meta":{
    "resourceType":"User",
    "created":"2021-10-01T16:46:48Z",
    "lastModified":"2021-10-01T16:46:48Z",
    "location":"https://instance-servicenow.com/api/now/scim/Users/d6287d7b1bbe3010593876a61a4bcbc3"
  },
  "userName":"jack.sparrow",
  "name":{
    "familyName":"Sparrow",
    "givenName":"Jack"
  },
  "displayName":"Jack Sparrow",
  "title":"Senior Developer",
  "preferredLanguage":"en",
  "timezone":"ET",
  "active":true,
  "emails":[
    {
      "value":"jack.sparrow@abc.com",
      "type":"work"
    }
  ],
  "phoneNumbers":[
    {
      "value":"9977553312",
      "type":"mobile"
    }
  ]
}

SCIM - PUT /scim/Users/{user_id}

Updates the specified user record in the User [sys_user] table of a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

URL format

Versioned URL: /api/now/{api_version}/scim/Users/{user_id}

Default URL: /api/now/scim/Users/{user_id}

Supported request parameters

Table 79. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

user_id Sys_id of the user record to update.
Table 80. Query parameters
Name Description
attributes Comma-separated list of fields to return in the response. No other fields are returned.

Cannot be used with the excludedAttributes parameter.

Data type: String

Default: Return all fields unless excludedAttributes is specified.

excludedAttributes Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned.

Cannot be used with the attributes parameter.

Data type: String

Default: Do not exclude any fields.

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 82. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Content-Type Data format of the request body. Supported types: application/json or application/scim+json.

Default: application/json

Table 83. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Response body parameters (JSON)

Extension parameters returned

Example: cURL request to update user information using PUT

This example shows how to update the information of an existing user using the PUT endpoint.

curl -X PUT \
  https://instance-servicenow.com/api/now/scim/Users/cdfef423e0423010f8778ac6d674f5ae \
  -d '{
  "schemas": [
    "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User",
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "externalId": "123457",
  "userName": "john.Doe",
  "name": {
    "familyName": "Doe",
    "givenName": "John"
  },
  "title": "Sir",
  "preferredLanguage": "en",
  "timezone": "ET",
  "active": true,
  "emails": [
    {
      "value": "john.doe@abc.com",
      "display": null,
      "type": "work",
      "primary": true
    }
  ],
  "phoneNumbers": [
    {
      "value": "9977553312",
      "type": "mobile",
      "primary": true
    }
  ],
  "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User": {
    "gender": "Male",
    "employeeNumber" : "13453",
    "location" : {
      "value" : "0002c0a93790200044e0bfc8bcbe5df5"
    },
    "company" : {
      "value" : "81fd65ecac1d55eb42a426568fc87a63"
    },
    "costCenter" : {
      "value" : "7fb1cc99c0a80a6d30c04574d14c0acf"
    },
    "department" : {
      "value":"221db0edc611228401760aec06c9d929"
    }
  }
}'

Response

{
  "schemas": [
    "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User",
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "id": "b7c5015f778330102e8cc5179e5a9992",
  "externalId": "123457",
  "meta": {
    "resourceType": "User",
    "created": "2021-10-12T10:05:32Z",
    "lastModified": "2021-10-12T10:08:04Z",
    "location":
      "http://instance-servicenow.com/api/now/scim/Users/b7c5015f778330102e8cc5179e5a9992"
  },
  "userName": "john.doe",
  "name": {
    "familyName": "Doe",
    "givenName": "John"
  },
  "displayName": "John Doe",
  "title": "Sir",
  "preferredLanguage": "en",
  "timezone": "ET",
  "active": true,
  "emails": [
    {
      "value": "tony.stark@abc.com",
      "type": "work"
    }
  ],
  "phoneNumbers": [
    {
      "value": "9977553312",
      "type": "mobile"
    }
  ],
  "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User": {
    "employeeNumber": "13453",
    "gender": "Male",
    "costCenter": {
      "value": "7fb1cc99c0a80a6d30c04574d14c0acf",
      "name": "Sales",
      "$ref":
       "http://instance-servicenow.com/api/now/scim/CostCenters/7fb1cc99c0a80a6d30c04574d14c0acf"
    },
    "company": {
      "value": "81fd65ecac1d55eb42a426568fc87a63",
      "name": "ACME Japan",
      "$ref":
       "http://instance-servicenow.com/api/now/scim/Companies/81fd65ecac1d55eb42a426568fc87a63"
    },
    "department": {
      "value": "221db0edc611228401760aec06c9d929",
      "name": "Sales",
      "$ref":
        "http://instance-servicenow.com/api/now/scim/Departments/221db0edc611228401760aec06c9d929"
    },
    "manager": {
      "value": "7027fda8773230102e8cc5179e5a99ea",
      "displayName": "Jack Sparrow",
      "$ref":
        "http://instance-servicenow.com/api/now/scim/Users/7027fda8773230102e8cc5179e5a99ea"
    },
    "location": {
      "value": "0002c0a93790200044e0bfc8bcbe5df5",
      "name": "2-10-1 Yurakucho, Chiyoda-ku, Tokyo",
      "$ref":
        "http://instance-servicenow.com/api/now/scim/Locations/0002c0a93790200044e0bfc8bcbe5df5"
    }
  }
}

SCIM - GET /scim/ResourceTypes

Retrieves information about all System for Cross-domain Identity Management (SCIM) resource types supported by the associated ServiceNow instance.

This is a public endpoint and does not require any roles to access.

URL format

Versioned URL: /api/now/{api_version}/scim/ResourceTypes

Default URL: /api/now/scim/ResourceTypes

Supported request parameters

Table 85. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

Table 86. Query parameters
Name Description
None
Table 87. Request body parameters (JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 88. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 89. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Table 90. Status codes
Status code Description
200 Successful. The request was successfully processed.

Response body parameters (JSON)

Example: cURL request

The following example shows how to obtain the SCIM resource types supported by a ServiceNow instance.

curl "https://instance-servicenow.com/api/now/scim/ResourceTypes \
--request GET \
--header "Accept:application/scim+json" \

Response

{
  "schemas":[
    "urn:ietf:params:scim:api:messages:2.0:ListResponse"
  ],
  "totalResults":6,
  "Resources":[
    {
      "schemas":[
        "urn:ietf:params:scim:schemas:core:2.0:ResourceType"
      ],
      "id":"User",
      "name":"User",
      "description":"User Account",
      "endpoint":"/Users",
      "schema":"urn:ietf:params:scim:schemas:core:2.0:User",
      "schemaExtensions":[
        {
          "schema":"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
          "required":false
        },
        {
          "schema":"urn:ietf:params:scim:schemas:extension:servicenow:2.0:User",
          "required":false
        }
      ],
      "meta":{
        "resourceType":"ResourceType",
        "location":"https://instance-servicenow.com/api/now/scim/ResourceTypes/User"
      }
    },
    {
      "schemas":[
        "urn:ietf:params:scim:schemas:core:2.0:ResourceType"
      ],
      "id":"Group",
      "name":"Group",
      "description":"Group",
      "endpoint":"/Groups",
      "schema":"urn:ietf:params:scim:schemas:core:2.0:Group",
      "meta":{
        "resourceType":"ResourceType",
        "location":"https://instance-servicenow.service-now.com/api/now/scim/ResourceTypes/Group"
      }
    },
    {
      "schemas":[
        "urn:ietf:params:scim:schemas:core:2.0:ResourceType"
      ],
      "id":"Company",
      "name":"Company",
      "description":"Company",
      "endpoint":"/Companies",
      "schema":"urn:ietf:params:scim:schemas:custom:servicenow:2.0:Company",
      "meta":{
        "resourceType":"ResourceType",
        "location":"https://instance-servicenow.com/api/now/scim/ResourceTypes/Company"
      }
    },
    {
      "schemas":[
        "urn:ietf:params:scim:schemas:core:2.0:ResourceType"
      ],
      "id":"Department",
      "name":"Department",
      "description":"Department",
      "endpoint":"/Departments",
      "schema":"urn:ietf:params:scim:schemas:custom:servicenow:2.0:Department",
      "meta":{
        "resourceType":"ResourceType",
        "location":"https://instance-servicenow.com/api/now/scim/ResourceTypes/Department"
      }
    },
    {
      "schemas":[
        "urn:ietf:params:scim:schemas:core:2.0:ResourceType"
      ],
      "id":"CostCenter",
      "name":"CostCenter",
      "description":"CostCenter",
      "endpoint":"/CostCenters",
      "schema":"urn:ietf:params:scim:schemas:custom:servicenow:2.0:CostCenter",
      "meta":{
        "resourceType":"ResourceType",
        "location":"https://instance-servicenow.com/api/now/scim/ResourceTypes/CostCenter"
      }
    },
    {
      "schemas":[
        "urn:ietf:params:scim:schemas:core:2.0:ResourceType"
      ],
      "id":"Location",
      "name":"Location",
      "description":"Location",
      "endpoint":"/Locations",
      "schema":"urn:ietf:params:scim:schemas:custom:servicenow:2.0:Location",
      "meta":{
        "resourceType":"ResourceType",
        "location":"https://instance-servicenow.com/api/now/scim/ResourceTypes/Location"
      }
    }
  ],
  "startIndex":1,
  "itemsPerPage":6
}

SCIM - GET /scim/ResourceTypes/{ResourceName}

Retrieves information about the specified System for Cross-domain Identity Management (SCIM) resource type.

This is a public endpoint and does not require any roles to access.

URL format

Versioned URL: /api/now/{api_version}/scim/ResourceTypes/{ResourceName}

Default URL: /api/now/scim/ResourceTypes/{ResourceName}

Supported request parameters

Table 91. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

ResourceName Unique ID of the resource type to retrieve.
Valid values:
  • Company
  • CostCenter
  • Department
  • Group
  • Location
  • User

Data type: String

Table 92. Query parameters
Name Description
None
Table 93. Request body parameters (JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 94. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 95. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Table 96. Status codes
Status code Description
200 Successful. The request was successfully processed.
404 Not found. The requested item wasn't found.

Response body parameters (JSON)

Example: cURL request

The following example shows how to obtain the User SCIM resource type from a ServiceNow instance.

curl "https://instance-servicenow.com/api/now/scim/ResourceTypes/"User" \
--request GET \
--header "Accept:application/scim+json" \

Response

{
  "schemas":[
    "urn:ietf:params:scim:schemas:core:2.0:ResourceType"
  ],
  "id":"User",
  "name":"User",
  "description":"User Account",
  "endpoint":"/Users",
  "schema":"urn:ietf:params:scim:schemas:core:2.0:User",
  "schemaExtensions":[
    {
      "schema":"urn:ietf:params:scim:schemas:extension:servicenow:2.0:User",
      "required":false
    },
    {
      "schema":"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
      "required":false
    }
  ],
  "meta":{
    "resourceType":"ResourceType",
    "location":"https://instance-servicenow.com/api/now/scim/ResourceTypes/User"
  }
}

SCIM - GET /scim/Schemas

Retrieves information about all System for Cross-domain Identity Management (SCIM) resource schemas supported by a ServiceNow instance. These schemas define the attributes available for each resource type.

This is a public endpoint and does not require any roles to access.

URL format

Versioned URL: /api/now/{api_version}/scim/Schemas

Default URL: /api/now/scim/Schemas

Supported request parameters

Table 97. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

Table 98. Query parameters
Name Description
None
Table 99. Request body parameters (JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 100. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 101. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Table 102. Status codes
Status code Description
200 Successful. The request was successfully processed.

Response body parameters (JSON)

Name Description
Standard RFC7643 return results Method returns results in compliance with the RFC7643 standard. For details see Schema Definition in the RFC7643 specification.

Example: cURL request

The following example shows how to obtain the SCIM schemas supported by a ServiceNow instance.

curl "https://instance-servicenow.com/api/now/scim/Schemas \
--request GET \
--header "Accept:application/scim+json" \

Response

{
  "schemas":[
    "urn:ietf:params:scim:api:messages:2.0:ListResponse"
  ],
  "totalResults":8,
  "Resources":[
    {
      "schemas":[
        "urn:ietf:params:scim:schemas:core:2.0:Schema"
      ],
      "id":"urn:ietf:params:scim:schemas:core:2.0:User",
      "name":"User",
      "description":"User Account",
      "attributes":[
        {
          "name":"active",
          "type":"boolean",
          "multiValued":false,
          "description":"A Boolean value indicating the User's administrative status.",
          "required":false,
          "caseExact":true,
          "mutability":"readWrite",
          "returned":"default",
          "uniqueness":"none"
        },
        {
          "name":"addresses",
          "type":"complex",
          "subAttributes":[
            {
              "name":"country",
              "type":"string",
              "multiValued":false,
              "description":"The country name component.",
              "required":false,
              "caseExact":false,
              "mutability":"readWrite",
              "returned":"default",
              "uniqueness":"none"
            },
            {
              "name":"formatted",
              "type":"string",
              "multiValued":false,
              "description":"The full mailing address, formatted for display or use with a mailing label. This attribute MAY contain newlines.",
              "required":false,
              "caseExact":false,
              "mutability":"readWrite",
              "returned":"default",
              "uniqueness":"none"
            },
            {
              "name":"locality",
              "type":"string",
              "multiValued":false,
              "description":"The city or locality component.",
              "required":false,
              "caseExact":false,
              "mutability":"readWrite",
              "returned":"default",
              "uniqueness":"none"
            },
            {
              "name":"postalCode",
              "type":"string",
              "multiValued":false,
              "description":"The zipcode or postal code component.",
              "required":false,
              "caseExact":false,
              "mutability":"readWrite",
              "returned":"default",
              "uniqueness":"none"
            },
            {
              "name":"primary",
              "type":"boolean",
              "multiValued":false,
              "description":"A Boolean value indicating the 'primary' or 
                preferred attribute value for this attribute, e.g., the preferred address. 
                The primary attribute value 'true' MUST appear no more than once.",
              "required":false,
              "caseExact":true,
              "mutability":"readWrite",
              "returned":"default",
              "uniqueness":"none"
            },
            {
              "name":"region",
              "type":"string",
              "multiValued":false,
              "description":"The state or region component.",
              "required":false,
              "caseExact":false,
              "mutability":"readWrite",
              "returned":"default",
              "uniqueness":"none"
            },
            {
              "name":"streetAddress",
              "type":"string",
              "multiValued":false,
              "description":"The full street address component, which may include house number, 
                street name, PO BOX, and multi-line extended street address information. This 
                attribute MAY contain newlines.",
              "required":false,
              "caseExact":false,
              "mutability":"readWrite",
              "returned":"default",
              "uniqueness":"none"
            },
            {
              "name":"type",
              "type":"string",
              "multiValued":false,
              "description":"A label indicating the attribute's function; e.g., 'work' or 'home'.",
              "required":false,
              "canonicalValues":["other","work","home"],
              "caseExact":false,
              "mutability":"readWrite",
              "returned":"default",
              "uniqueness":"none"
            }
          ],
          "multiValued":true,
          "description":"Physical mailing addresses for this User.",
          "required":false,
          "caseExact":true,
          "mutability":"readWrite",
          "returned":"default",
          "uniqueness":"none"
        },
.
.
.
      {
        "schemas":[
          "urn:ietf:params:scim:schemas:core:2.0:Schema"
        ],
        "id":"urn:ietf:params:scim:schemas:custom:servicenow:2.0:Department",
        "name":"Department",
        "description":"Department",
        "attributes":[
          {
            "name":"name",
            "type":"string",
            "multiValued":false,
            "description":"The name of the department.",
            "required":false,
            "caseExact":false,
            "mutability":"readOnly",
            "returned":"default",
            "uniqueness":"none"
          }
        ],
        "meta":{
          "resourceType":"Schema",
          "location":"https://instance-servicenow.com/api/now/scim/Schemas/urn:ietf:params:scim:schemas:custom:servicenow:2.0:Department"
        }
      },
      {
        "schemas":[
          "urn:ietf:params:scim:schemas:core:2.0:Schema"
        ],
        "id":"urn:ietf:params:scim:schemas:custom:servicenow:2.0:CostCenter",
        "name":"CostCenter",
        "description":"CostCenter",
        "attributes":[
          {
            "name":"name",
            "type":"string",
            "multiValued":false,
            "description":"The name of the cost center.",
            "required":false,
            "caseExact":false,
            "mutability":"readOnly",
            "returned":"default",
            "uniqueness":"none"
          }
        ],
        "meta":
          {
            "resourceType":"Schema",
            "location":"https://instance.servicenow.com/api/now/scim/Schemas/urn:ietf:params:scim:schemas:custom:servicenow:2.0:CostCenter"
         }
        },
        {
          "schemas":[
            "urn:ietf:params:scim:schemas:core:2.0:Schema"
          ],
        "id":"urn:ietf:params:scim:schemas:custom:servicenow:2.0:Location",
        "name":"Location",
        "description":"Location",
        "attributes":[
          {
            "name":"name",
            "type":"string",
            "multiValued":false,
            "description":"The location name.",
            "required":false,
            "caseExact":false,
            "mutability":"readOnly",
            "returned":"default",
            "uniqueness":"none"
          }
        ],
        "meta":{
          "resourceType":"Schema",
          "location":"https://instance.servicenow.com/api/now/scim/Schemas/urn:ietf:params:scim:schemas:custom:servicenow:2.0:Location"
        }
      }
    ],
    "startIndex":1,
  "itemsPerPage":8
}

SCIM - GET /scim/Schemas/{SchemaName}

Retrieves information about the specified System for Cross-domain Identity Management (SCIM) resource schemas supported by a ServiceNow instance. These schemas define the attributes available for each resource type.

This is a public endpoint and does not require any roles to access.

URL format

Versioned URL: /api/now/{api_version}/scim/Schemas/{SchemaName}

Default URL: /api/now/scim/Schemas/{SchemaName}

Supported request parameters

Table 103. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

SchemaName URI of the resource schema to return.
Valid values:
  • urn:ietf:params:scim:schemas:core:2.0:User
  • urn:ietf:params:scim:schemas:extension: enterprise:2.0:User
  • urn:ietf:params:scim:schemas:extension: servicenow:2.0:User
  • urn:ietf:params:scim:schemas:core:2.0:Group
  • urn:ietf:params:scim:schemas:custom: servicenow:2.0:Company
  • urn:ietf:params:scim:schemas:custom: servicenow:2.0:Department
  • urn:ietf:params:scim:schemas:custom: servicenow:2.0:CostCenter
  • urn:ietf:params:scim:schemas:custom: servicenow:2.0:Location

Data type: String

Table 104. Query parameters
Name Description
None
Table 105. Request body parameters (JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 106. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 107. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Table 108. Status codes
Status code Description
200 Successful. The request was successfully processed.
404 Not found. The requested item wasn't found.

Response body parameters (JSON)

Name Description
Standard RFC7643 return results Method returns results in compliance with the RFC7643 standard. For details see Schema Definition in the RFC7643 specification.

Example: cURL request

The following example shows how to obtain the core Group SCIM schema from a ServiceNow instance.

curl "https://instance-servicenow.com/api/now/scim/Schemas/"urn:ietf:params:scim:schemas:core:2.0:Group" \
--request GET \
--header "Accept:application/scim+json" \

Response

{
  "schemas":[
    "urn:ietf:params:scim:schemas:core:2.0:Schema"
  ],
  "id":"urn:ietf:params:scim:schemas:core:2.0:Group",
  "name":"Group",
  "description":"Group",
  "attributes":[
    {
      "name":"displayName",
      "type":"string",
      "multiValued":false,
      "description":"A human-readable name for the Group.",
      "required":true,
      "caseExact":false,
      "mutability":"readWrite",
      "returned":"default",
      "uniqueness":"none"
    },
    {
      "name":"members",
      "type":"complex",
      "subAttributes":[
        {
          "name":"display",
          "type":"string",
          "multiValued":false,
          "description":"A human readable name, primarily used for display purposes.",
          "required":false,
          "caseExact":false,
          "mutability":"immutable",
          "returned":"default",
          "uniqueness":"none"
        },
        {
          "name":"value",
          "type":"string",
          "multiValued":false,
          "description":"The identifier of a group member.",
          "required":true,
          "caseExact":false,
          "mutability":"immutable",
          "returned":"default",
          "uniqueness":"none"
        },
        {
          "name":"$ref",
          "type":"reference",
          "multiValued":false,
          "description":"The URI of the member resource.",
          "required":false,
          "caseExact":true,
          "mutability":"immutable",
          "returned":"default",
          "uniqueness":"none",
          "referenceTypes":["Group","User"]
        }
      ],
      "multiValued":true,
      "description":"A list of members of the Group.",
      "required":false,
      "caseExact":true,
      "mutability":"readWrite",
      "returned":"default",
      "uniqueness":"none"
    }
  ],
  "meta":{
    "resourceType":"Schema",
    "location":"https://instance-servicenow.com/api/now/scim/Schemas/urn:ietf:params:scim:schemas:core:2.0:Group"
  }
}

SCIM - GET /scim/ServiceProviderConfig

Returns the configuration metadata to use to obtain information about the service capabilities, configurations, schemas, and resource types for the System for Cross-domain Identity Management (SCIM) endpoints available within a ServiceNow instance.

This is a public endpoint and does not require any roles to access.

URL format

Versioned URL: /api/now/{api_version}/scim/ServiceProviderConfig

Default URL: /api/now/scim/ServiceProviderConfig

Supported request parameters

Table 109. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

Table 110. Query parameters
Name Description
None
Table 111. Request body parameters (JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 112. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 113. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Table 114. Status codes
Status code Description
200 Successful. The request was successfully processed.

Response body parameters (JSON)

Name Description
Standard RFC7643 return results Method returns results in compliance with the RFC7643 standard. For details see Service Provider Configuration Schema in the RFC7643 specification.

Example: cURL request

The following example shows how to obtain the SCIM configuration metadata for a ServiceNow instance.

curl "https://instance-servicenow.com/api/now/scim/ServiceProviderConfig \
--request GET \
--header "Accept:application/scim+json" \

Response

{
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig"
  ],
  "patch": {
    "supported": true
  },
  "bulk": {
    "supported": false,
    "maxOperations": 0,
    "maxPayloadSize": 1000000
  },
  "filter": {
    "supported": true,
    "maxResults": 500
  },
  "changePassword": {
    "supported": false
  },
  "sort": {
    "supported": false
  },
  "etag": {
    "supported": false
  },
  "authenticationSchemes": [
    {
      "name": "OAuth 2.0 Bearer Token",
      "description": "The OAuth 2.0 Bearer Token Authentication scheme. OAuth
        enables clients to access protected resources by obtaining an access token, which is
        defined in RFC 6750 as \"a string representing an access authorization issued to the
        client\", rather than using the resource owner's credentials directly.",
      "specUri": "http://tools.ietf.org/html/rfc6750",
      "type": "oauthbearertoken",
      "primary": true
    }
  ]
}

SCIM - GET /scim/Companies

Returns one or more company records from the Company [core_company] table within a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

Note: A query that does not return any matches returns success (HTTP status code 200) with totalResults set to 0.

URL format

Versioned URL: /api/now/{api_version}/scim/Companies

Default URL: /api/now/scim/Companies

Supported request parameters

Table 115. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

Table 117. Request body parameters (JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 118. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 119. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Table 120. Status codes
Status code Description
200 Successful. The request was successfully processed.
400 Bad Request. A bad request type or malformed request was detected.
  • Ensure that both the attributes and excludedAttributes query parameters have not been passed in the request.
  • Ensure that the count parameter is not greater than 500.
  • Ensure that all filter parameters are valid.
401 Unauthorized. The user credentials are incorrect or have not been passed.

Response body parameters (JSON)

Example: cURL request

This example shows how to retrieve the first two company records.

curl "https://instance-servicenow.com/api/now/scim/Companies?count=2" \
--request GET \
--header "Accept:application/scim+json" \

Response:

{
  "schemas":[
    "urn:ietf:params:scim:api:messages:2.0:ListResponse"
  ],
  "totalResults":182,
  "Resources":[
    {
      "schemas":[
        "urn:ietf:params:scim:schemas:custom:servicenow:2.0:Company"
      ],
      "id":"0c43af40c6112275011a4bd4c0143fbf",
      "meta":{
        "resourceType":"Company",
        "created":"2005-05-24T01:14:19Z",
        "lastModified":"2013-05-06T23:44:48Z",
        "location":"https://instance-servicenow.com/api/now/scim/Companies/0c43af40c6112275011a4bd4c0143fbf"
      },
      "name":"ABC Company"
    },
    {
      "schemas":[
        "urn:ietf:params:scim:schemas:custom:servicenow:2.0:Company"
      ],
      "id":"0c43b088c6112275011a4bd46a4e6cc4",
      "meta":{
        "resourceType":"Company",
        "created":"2005-05-24T01:14:19Z",
        "lastModified":"2013-06-05T17:53:26Z",
        "location":"https://instance-servicenow.com/api/now/scim/Companies/0c43b088c6112275011a4bd46a4e6cc4"
      },
      "name":"Acme Co"
    }
  ],
  "startIndex":1,
  "itemsPerPage":2
}

SCIM - GET /scim/Companies/{company_id}

Returns the specified company record from the Company [core_company] table within a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

URL format

Versioned URL: /api/now/{api_version}/scim/Companies/{company_id}

Default URL: /api/now/scim/Groups/{company_id}

Supported request parameters

Table 121. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

company_id Sys_id of the company record to return.

Data type: String

Table 122. Query parameters
Name Description
attributes Comma-separated list of fields to return in the response. No other fields are returned.

Cannot be used with the excludedAttributes parameter.

Data type: String

Default: Return all fields unless excludedAttributes is specified.

excludedAttributes Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned.

Cannot be used with the attributes parameter.

Data type: String

Default: Do not exclude any fields.

Table 123. Request body parameters (JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 124. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 125. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Response body parameters (JSON)

Example: cURL request

This example shows how to retrieve a specific company record.

curl "https://instance-servicenow.com/api/now/scim/Companies/0c43af40c6112275011a4bd4c0143fbf" \
--request GET \
--header "Accept:application/scim+json" \

Response

{
  "schemas":[
    "urn:ietf:params:scim:schemas:custom:servicenow:2.0:Company"
  ],
  "id":"0c43af40c6112275011a4bd4c0143fbf",
  "meta":{
    "resourceType":"Company",
    "created":"2005-05-24T01:14:19Z",
    "lastModified":"2013-05-06T23:44:48Z",
    "location":"https://instance-servicenow.com/api/now/scim/Companies/0c43af40c6112275011a4bd4c0143fbf"
  },
  "name":"ABC Company"
}

SCIM - GET /scim/CostCenters

Returns one or more cost center records from the Cost Center [cmn_cost_center] table within a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

Note: A query that does not return any matches returns success (HTTP status code 200) with totalResults set to 0.

URL format

Versioned URL: /api/now/{api_version}/scim/CostCenters

Default URL: /api/now/scim/CostCenters

Supported request parameters

Table 127. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

Table 129. Request body parameters (SON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 130. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 131. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Table 132. Status codes
Status code Description
200 Successful. The request was successfully processed.
400 Bad Request. A bad request type or malformed request was detected.
  • Ensure that both the attributes and excludedAttributes query parameters have not been passed in the request.
  • Ensure that the count parameter is not greater than 500.
  • Ensure that all filter parameters are valid.
401 Unauthorized. The user credentials are incorrect or have not been passed.

Response body parameters (JSON)

Example: cURL request

This example shows how to retrieve the first two cost center records.

curl "https://instance-servicenow.com/api/now/scim/CostCenters?count=2" \
--request GET \
--header "Accept:application/scim+json" \

Response

{
  "schemas":[
    "urn:ietf:params:scim:api:messages:2.0:ListResponse"
  ],
  "totalResults":8,
  "Resources":[
    {
      "schemas":[
        "urn:ietf:params:scim:schemas:custom:servicenow:2.0:CostCenter"
      ],
      "id":"7fb1cc99c0a80a6d30c04574d14c0acf",
      "meta":{
        "resourceType":"CostCenter",
        "created":"2012-01-19T21:02:39Z",
        "lastModified":"2012-02-25T23:06:36Z",
        "location":"https://instance-servicenow.com/api/now/scim/CostCenters/7fb1cc99c0a80a6d30c04574d14c0acf"
      },
      "name":"Sales"
    },
    {
      "schemas":[
        "urn:ietf:params:scim:schemas:custom:servicenow:2.0:CostCenter"
      ],
      "id":"91e8bbf43710200044e0bfc8bcbe5daa",
      "meta":{
        "resourceType":"CostCenter",
        "created":"2012-02-18T04:40:24Z",
        "lastModified":"2012-02-25T23:05:58Z",
        "location":"https://instance-servicenow.com/api/now/scim/CostCenters/91e8bbf43710200044e0bfc8bcbe5daa"
      },
      "name":"Customer Support"
    }
  ],
  "startIndex":1,
  "itemsPerPage":2
}

SCIM - GET /scim/CostCenters/{cost_center_id}

Returns the specified cost center record from the Cost Center [cmn_cost_center] table within a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

Note: A query that does not return any matches returns success (HTTP status code 200) with totalResults set to 0.

URL format

Versioned URL: /api/now/{api_version}/scim/CostCenters/{cost_center_id}

Default URL: /api/now/scim/CoostCenters/{cost_center_id}

Supported request parameters

Table 133. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

cost_center_id Sys_id of the cost center record to return.

Data type: String

Table 134. Query parameters
Name Description
attributes Comma-separated list of fields to return in the response. No other fields are returned.

Cannot be used with the excludedAttributes parameter.

Data type: String

Default: Return all fields unless excludedAttributes is specified.

excludedAttributes Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned.

Cannot be used with the attributes parameter.

Data type: String

Default: Do not exclude any fields.

Table 135. Request body parameters (JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 136. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 137. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Response body parameters (JSON)

Example: cURL request

This example shows how to retrieve a specific cost center record.

curl "https://instance-servicenow.com/api/now/scim/CostCenters/7fb1cc99c0a80a6d30c04574d14c0acf" \
--request GET \
--header "Accept:application/scim+json" \

Response

{
  "schemas":[
    "urn:ietf:params:scim:schemas:custom:servicenow:2.0:CostCenter"
  ],
  "id":"7fb1cc99c0a80a6d30c04574d14c0acf",
  "meta":{
    "resourceType":"CostCenter",
    "created":"2012-01-19T21:02:39Z",
    "lastModified":"2012-02-25T23:06:36Z",
    "location":"https://instance-servicenow.com/api/now/scim/CostCenters/7fb1cc99c0a80a6d30c04574d14c0acf"
  },
  "name":"Sales"
}

SCIM - GET /scim/Departments

Returns one or more department records from the Department [cmn_department] table within a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

Note: A query that does not return any matches returns success (HTTP status code 200) with totalResults set to 0.

URL format

Versioned URL: /api/now/{api_version}/scim/Departments

Default URL: /api/now/scim/Departments

Supported request parameters

Table 139. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

Table 141. Request body parameters (JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 142. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 143. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Table 144. Status codes
Status code Description
200 Successful. The request was successfully processed.
400 Bad Request. A bad request type or malformed request was detected.
  • Ensure that both the attributes and excludedAttributes query parameters have not been passed in the request.
  • Ensure that the count parameter is not greater than 500.
  • Ensure that all filter parameters are valid.
401 Unauthorized. The user credentials are incorrect or have not been passed.

Response body parameters (JSON)

Example: cURL request

This example shows how to retrieve the first two department records.

curl "https://instance-servicenow.com/api/now/scim/Departments?count=2" \
--request GET \
--header "Accept:application/scim+json" \

Response

{
  "schemas":[
    "urn:ietf:params:scim:api:messages:2.0:ListResponse"
  ],
  "totalResults":7,
  "Resources":[
    {
      "schemas":[
        "urn:ietf:params:scim:schemas:custom:servicenow:2.0:Department"
      ],
      "id":"221db0edc611228401760aec06c9d929",
      "meta":{
        "resourceType":"Department",
        "created":"2006-01-31T20:18:24Z",
        "lastModified":"2012-02-18T07:01:40Z",
        "location":"https://instance-servicenow.com/api/now/scim/Departments/221db0edc611228401760aec06c9d929"
      },
      "name":"Sales"
    },
    {
      "schemas":[
        "urn:ietf:params:scim:schemas:custom:servicenow:2.0:Department"
      ],
      "id":"221f3db5c6112284009f4becd3039cc9",
      "meta":{
        "resourceType":"Department",
        "created":"2008-03-20T20:20:06Z",
        "lastModified":"2012-02-18T07:01:22Z",
        "location":"https://instance-servicenow.com/api/now/scim/Departments/221f3db5c6112284009f4becd3039cc9"
      },
      "name":"Development"
    }
  ],
  "startIndex":1,
  "itemsPerPage":2
}

SCIM - GET /scim/Departments/{deparment_id}

Returns the specified department record from the Department [cmn_department] table within a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

URL format

Versioned URL: /api/now/{api_version}/scim/Departments/{department_id}

Default URL: /api/now/scim/Departments/{department_id}

Supported request parameters

Table 145. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

department_id Sys_id of the department record to return.

Data type: String

Table 146. Query parameters
Name Description
attributes Comma-separated list of fields to return in the response. No other fields are returned.

Cannot be used with the excludedAttributes parameter.

Data type: String

Default: Return all fields unless excludedAttributes is specified.

excludedAttributes Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned.

Cannot be used with the attributes parameter.

Data type: String

Default: Do not exclude any fields.

Table 147. Request body parameters (JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 148. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 149. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Response body parameters (JSON)

Example: cURL request

This example shows how to retrieve a specific department record.

curl "https://instance-servicenow.com/api/now/scim/Departments/221db0edc611228401760aec06c9d929" \
--request GET \
--header "Accept:application/scim+json" \

Response:

{
  "schemas":[
    "urn:ietf:params:scim:schemas:custom:servicenow:2.0:Department"
  ],
  "id":"221db0edc611228401760aec06c9d929",
  "meta":{
    "resourceType":"Department",
    "created":"2006-01-31T20:18:24Z",
    "lastModified":"2012-02-18T07:01:40Z",
    "location":"https://instance-servicenow.com/api/now/scim/Departments/221db0edc611228401760aec06c9d929"
  },
  "name":"Sales"
}

SCIM - GET /scim/Locations

Returns one or more location records from the Location [cmn_location] table within a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

Note: A query that does not return any matches returns success (HTTP status code 200) with totalResults set to 0.

URL format

Versioned URL: /api/now/{api_version}/scim/Locations

Default URL: /api/now/scim/Locations

Supported request parameters

Table 151. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

Table 153. Request body parameters (JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 154. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 155. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Table 156. Status codes
Status code Description
200 Successful. The request was successfully processed.
400 Bad Request. A bad request type or malformed request was detected.
  • Ensure that both the attributes and excludedAttributes query parameters have not been passed in the request.
  • Ensure that the count parameter is not greater than 500.
  • Ensure that all filter parameters are valid.
401 Unauthorized. The user credentials are incorrect or have not been passed.

Response body parameters (JSON)

Example: cURL request

This example shows how to retrieve a the first two company records.

curl "https://instance-servicenow.com/api/now/scim/Locations?count=2" \
--request GET \
--header "Accept:application/scim+json" \

Response

{
  "schemas":[
    "urn:ietf:params:scim:api:messages:2.0:ListResponse"
  ],
  "totalResults":426,
  "Resources":[
    {
      "schemas":["urn:ietf:params:scim:schemas:custom:servicenow:2.0:Location"],
      "id":"0002c0a93790200044e0bfc8bcbe5df5",
      "meta":{
        "resourceType":"Location",
        "created":"2012-02-19T18:39:00Z",
        "lastModified":"2012-02-19T18:39:00Z",
        "location":"https://instance-servicenow.com/api/now/scim/Locations/0002c0a93790200044e0bfc8bcbe5df5"
      },
      "name":"2-10-1 Yurakucho, Chiyoda-ku, Tokyo"
    },
    {
      "schemas":["urn:ietf:params:scim:schemas:custom:servicenow:2.0:Location"],
      "id":"0594ed7437d0200044e0bfc8bcbe5df0",
      "meta":{
        "resourceType":"Location",
        "created":"2012-02-17T17:54:15Z",
        "lastModified":"2021-08-31T14:13:11Z",
        "location":"https://instance-servicenow.com/api/now/scim/Locations/0594ed7437d0200044e0bfc8bcbe5df0"
      },
      "name":"Colombia"
    }
  ],
  "startIndex":1,
  "itemsPerPage":2
}

SCIM - GET /scim/Locations/{location_id}

Returns the specified location record from the Location [cmn_location] table within a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.

URL format

Versioned URL: /api/now/{api_version}/scim/Locations/{location_id}

Default URL: /api/now/scim/Locations/{location_id}

Supported request parameters

Table 157. Path parameters
Name Description
api_version Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.

Data type: String

location_id Sys_id of the location record to return.

Data type: String

Table 158. Query parameters
Name Description
attributes Comma-separated list of fields to return in the response. No other fields are returned.

Cannot be used with the excludedAttributes parameter.

Data type: String

Default: Return all fields unless excludedAttributes is specified.

excludedAttributes Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned.

Cannot be used with the attributes parameter.

Data type: String

Default: Do not exclude any fields.

Table 159. Request body parameters (JSON)
Name Description
None

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 160. Request headers
Header Description
Accept Data format of the response body. Supported types: application/json or application/scim+json.

Default: application/json

Table 161. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Response body parameters (JSON)

Example: cURL request

This example shows how to retrieve a specific location record.

curl "https://instance-servicenow.com/api/now/scim/Locations/0c43af40c6112275011a4bd4c0143fbf" \
--request GET \
--header "Accept:application/scim+json" \

Response

{
  "schemas":["urn:ietf:params:scim:schemas:custom:servicenow:2.0:Location"],
  "id":"0594ed7437d0200044e0bfc8bcbe5df0",
  "meta":{
    "resourceType":"Location",
    "created":"2012-02-17T17:54:15Z",
    "lastModified":"2021-08-31T14:13:11Z",
    "location":"https://instance-servicenow.com/api/now/scim/Locations/0594ed7437d0200044e0bfc8bcbe5df0"
  },
  "name":"Colombia"
}