---
sourceDocument: Australia API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/de-DE/api-reference

 Release :

    - australia

ft:locale :

    - de-DE

ft:publication_title :

    - Australia API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# System for Cross-domain Identity Management (SCIM) API

# System for Cross-domain Identity Management (SCIM) API {#ariaid-title1}

* Freigeben Version: Australia
* 
* Aktualisiert 12. März 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 116 Minuten Lesedauer

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](https://datatracker.ietf.org/doc/html/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

{#scim-api__ul_xp5_mjv_hrb}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](https://servicenow-prod.fluidtopics.net/GodwdyePbyyabxdIXRpocw#scim-api "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 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.  
{#scim-api__table_tdp_3ch_mrb__entry__2}

| SCIM attribute name | User field name |
|-|-|
| active | active |
| addresses.country | country |
| addresses.default.country | country |
| addresses.home.country | country |
| addresses.locality | city |
| addresses.default.locality | city |
| addresses.home.locality | city |
| addresses.postalCode | zip |
| addresses.default.postalCode | zip |
| addresses.home.postalCode | zip |
| addresses.region | state |
| addresses.default.region | state |
| addresses.home.region | state |
| addresses.streetAddress | street |
| addresses.default.streetAddress | street |
| addresses.home.streetAddress | street |
| displayName | name |
| emails.value | email |
| emails.default.value | email |
| emails.work.value | email |
| id | sys_id |
| meta.created | sys_created_on |
| meta.lastModified | sys_updated_on |
| name.familyName | last_name |
| name.givenName | first_name |
| name.honorificPrefix | introduction |
| name.middleName | middle_name |
| phoneNumbers.value | phone |
| phoneNumbers.home.value | home_phone |
| phoneNumbers.mobile.value | mobile_phone |
| phoneNumbers.work.value | phone |
| preferredLanguage | preferred_language |
| timezone | time_zone |
| title | title |
| userName | user_name |
[Tabelle : 1. User resource to User \[sys_user\] table mapping]

{#scim-api__table_tdp_3ch_mrb}  
{#scim-api__table_a32_jch_mrb__entry__2}

| SCIM attribute name | Sys Scim User field name |
|-|-|
| externalId | external_id |
[Tabelle : 2. User resource to Sys Scim User \[sys_scim_user\] table mapping]

{#scim-api__table_a32_jch_mrb}

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

| SCIM attribute name | User field name |
|-|-|
| company.name | company.name |
| company.value | company.sys_id |
| costCenter.name | cost_center.name |
| costCenter.value | cost_center.sys_id |
| department.name | department.name |
| department.value | department.sys_id |
| employeeNumber | employee_number |
| gender | gender |
| location.name | location.name |
| location.value | location.sys_id |
| manager.displayName | manager.name |
| manager.value | manager.sys_id |
[Tabelle : 3. User extended resource to User \[sys_user\] table mapping]

{#scim-api__table_uvm_jch_mrb}

The SCIM Group resource schema (urn:ietf:params:scim:schemas:core:2.0:Group) maps to the Group
\[sys_user_group\] table.  
{#scim-api__table_typ_gkv_hrb__entry__2}

| SCIM attribute name | Group field name |
|-|-|
| displayName | name |
| id | sys_id |
| meta.created | sys_created_on |
| meta.lastModified | sys_updated_on |
[Tabelle : 4. Group resource to Group \[sys_user_group\] table mapping]

{#scim-api__table_typ_gkv_hrb}

The SCIM Group externalId parameter maps to the Sys Scim Group \[sys_scim_group\] table.  
{#scim-api__table_h54_kch_mrb__entry__2}

| SCIM attribute name | Sys Scim Group field name |
|-|-|
| externalId | external_id |
[Tabelle : 5. Group resource to Sys Scim Group \[sys_scim_group\] table mapping]

{#scim-api__table_h54_kch_mrb}

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

| SCIM attribute name | Group field name |
|-|-|
| company.value | company.sys_id |
| company.name | company.name |
[Tabelle : 6. Group resource to Group \[sys_user_group\] table mapping]

{#scim-api__table_ugn_1rn_ftb}

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

| SCIM attribute name | Company field name |
|-|-|
| id | sys_id |
| meta.created | sys_created_on |
| meta.lastModified | sys_updated_on |
| name | name |
[Tabelle : 7. Company resource to Company \[core_company\] table mapping]

{#scim-api__table_wpv_kch_mrb}

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

| SCIM attribute name | Cost Center field name |
|-|-|
| id | sys_id |
| meta.created | sys_created_on |
| meta.lastModified | sys_updated_on |
| name | name |
[Tabelle : 8. CostCenter resource to Cost Center \[cmn_cost_center\] table mapping]

{#scim-api__table_kxj_lch_mrb}

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

| SCIM attribute name | Department field name |
|-|-|
| id | sys_id |
| meta.created | sys_created_on |
| meta.lastModified | sys_updated_on |
| name | name |
[Tabelle : 9. Department resource to Department \[cmn_department\] table mapping]

{#scim-api__table_lks_lch_mrb}

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

| SCIM attribute name | Location field name |
|-|-|
| id | sys_id |
| meta.created | sys_created_on |
| meta.lastModified | sys_updated_on |
| name | name |
[Tabelle : 10. Location resource to Location \[cmn_location\] table mapping]

{#scim-api__table_snf_mch_mrb}

## SCIM-specific tables {#scim-api__SCIM_specific_tables-SCIM-table}

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.  
{#scim-api__table_w2h_nch_mrb__entry__2}

| Field name | Description |
|-|-|
| Created | Date and time that the associated record was created. Data type: String Maximum length: 40 |
| Created by | Name of the entity that created the record. Data type: String Maximum length: 40 |
| External ID | External ID used by the entity that created this user record to reference the user in their system. Data type: String Maximum length: 255 |
| Sys ID | Unique identifier for the record within a ServiceNow instance. Data type: String Maximum length: 32 |
| Updated | Date and time that the associated record was last updated. Data type: String Maximum length: 40 |
| Updated by | Name of the entity that last updated the associated record. Data type: String Maximum length: 40 |
| Updates | Number of times that the record has been updated. Data type: Number (Integer) Maximum length: 40 |
| User | Reference to the user associated with this record Reference: User \[sys_user\] table Maximum length: 32 |
| User type | Type of user record. This value is used to identify the organization to user relationship. This can be any value, but typical values might include: * Contractor * Employee * External * Intern * Temp * Unknown {#scim-api__ul_kdr_nwz_nrb} Data type: String Maximum length: 40 |
[Tabelle : 11. Sys Scim User \[sys_scim_user\] table]

{#scim-api__table_w2h_nch_mrb}  
{#scim-api__table_mpt_nch_mrb__entry__2}

| Field name | Description |
|-|-|
| Created | Date and time that the associated record was created. Data type: String Maximum length: 40 |
| Created by | Name of the entity that created the record. Data type: String Maximum length: 40 |
| External ID | External ID used by the entity that created this group record to reference the group in their system. Data type: String Maximum length: 255 |
| Group | Reference to the group associated with this record. Reference: Group \[sys_user_group\] table Maximum length: 32 |
| Sys ID | Unique identifier for the record within a ServiceNow instance. Data type: String Maximum length: 32 |
| Updated | Date and time that the associated record was last updated. Data type: String Maximum length: 40 |
| Updated by | Name of the entity that last updated the associated record. Data type: String Maximum length: 40 |
| Updates | Number of times that the record has been updated. Data type: Number (Integer) Maximum length: 40 |
[Tabelle : 12. Sys Scim Group \[sys_scim_group\] table]

{#scim-api__table_mpt_nch_mrb}

## 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} {#ariaid-title2}

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}  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-DELETE-Groups-group_id__entry__2}{#scim-DELETE-Groups-group_id__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. 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: Group \[sys_user_group\] |
[Tabelle : 13. Path parameters]

{#scim-DELETE-Groups-group_id__entry__8}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 14. Query parameters]

{#scim-DELETE-Groups-group_id__entry__12}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 15. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-DELETE-Groups-group_id__entry__16}{#scim-DELETE-Groups-group_id__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 16. Request headers]

{#scim-DELETE-Groups-group_id__entry__20}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 17. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-DELETE-Groups-group_id__entry__24}{#scim-DELETE-Groups-group_id__entry-200-status-code}{#scim-DELETE-Groups-group_id__entry-404-status-code}

| Status code | Description |
|-|-|
| 204 | No Content. The request was successfully processed. |
| 404 | Not found. The requested item wasn't found. |
[Tabelle : 18. Status codes]

### Response body parameters (JSON)

{#scim-DELETE-Groups-group_id__entry__30}{#scim-DELETE-Groups-group_id__errors-SCIM-entry}{#scim-DELETE-Groups-group_id__errors_details-SCIM-entry}{#scim-DELETE-Groups-group_id__errors_scimType-SCIM-entry}{#scim-DELETE-Groups-group_id__errors_schemas-SCIM-entry}{#scim-DELETE-Groups-group_id__errors_status-SCIM-entry}

| Name | Description |
|-|-|
| errors | Response that describes any errors that may have occurred during processing the request. Data type: Object "errors": { "details": "String", "schemas": "String", "scimType": "String", "status": "String" } |
| errors.detail | Detailed error message on why the request failed. Data type: String |
| errors.scimType | SCIM error detail keyword. Data type: String |
| errors.schemas | URI of the SCIM Schemas used to process the error response. Data type: Array of Strings |
| errors.status | HTTP status code for the error response. Data type: String |
[ ]

### 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 {#ariaid-title3}

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.
Hinweis:  
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  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-GET-Groups__entry__2}{#scim-GET-Groups__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Tabelle : 19. Path parameters]

{#scim-GET-Groups__entry__6}{#scim-GET-Groups__attributes-SCIM-entry}{#scim-GET-Groups__count-SCIM-entry}{#scim-GET-Groups__excludedAttributes-SCIM-entry}{#scim-GET-Groups__filter-SCIM-ph}{#scim-GET-Groups__group_sortBy-SCIM-entry}{#scim-GET-Groups__sortOrder-SCIM-entry}{#scim-GET-Groups__group_startIndex-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't be used with the excludedAttributes parameter. Data type: String Default: Return all fields unless excludedAttributes is specified. |
| count | Number of records to return. A negative value is interpreted as zero. Data type: Number Maximum: 500 - A value greater than this results in a bad request error. Default: 10 |
| excludedAttributes | Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
| filter | Filter expression to apply to the return results. Field filters are expressed as `<field_name> <operator> <"value">`. Refer to [RFC7644](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2) for a list of the valid operators. Hinweis: The `NOT` operator is not supported by this method. For example, to filter for all groups whose name starts with "HR", enter `displayName SW "HR"`. To specify more than one field filter, concatenate the filters using the `AND` operand. For example, to filter for all groups whose name starts with "HR" and were last modified before October 3, 2021, enter `displayName SW "HR" AND meta.lastModified lt "2021-10-33T00:00:00Z"`. Use dot-walking to specify nested attributes. Only the following SCIM group fields are available for use in filters: * displayName * externalId: Only supports `EQ` operator. * id * meta.created * meta.lastModified {#scim-GET-Groups__ul_szc_2cc_grb} Data type: String Default: No filtering |
| sortBy | Must be specified with the sortOrder parameter. Field by which to sort the return results. Sorting is case-insensitive. You can only use those parameters available for filtering for the sortBy parameter, except that externalId is not allowed. For values that are null: * sorted by ascending: Null values are sorted to the top. * sorted by descending: Null values are sorted to the bottom. {#scim-GET-Groups__ul_xsb_zmm_hrb} Data type: String Default: No sort |
| sortOrder | Must be specified with the sortBy parameter. Order in which the sortBy parameter is applied to the return results. Valid values: * ascending * descending {#scim-GET-Groups__ul_mmn_zrc_grb} Data type: String Default: ascending |
| startIndex | One-based index into the table at which to start retrieving records. For example, if you set this parameter to 100, and the count parameter to 20, the endpoint returns records 100 through 119. Hinweis: Any value that is set to less than one is interpreted as one. Data type: String Default: 1 |
[Tabelle : 20. Query parameters]

{#scim-GET-Groups__entry__22}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 21. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Groups__entry__26}{#scim-GET-Groups__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 22. Request headers]

{#scim-GET-Groups__entry__30}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 23. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Groups__entry__34}{#scim-GET-Groups__entry-200-status-code}{#scim-GET-Groups__status_400-SCIM-entry}{#scim-GET-Groups__entry-401-status-code}

| 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. {#scim-GET-Groups__ul_vn1_gvz_nrb} |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
[Tabelle : 24. Status codes]

### Response body parameters (JSON)

{#scim-GET-Groups__entry__42}{#scim-GET-Groups__itemsPerPage-SCIM-entry}{#scim-GET-Groups__totalResults-SCIM-entry}

| Name | Description |
|-|-|
| itemsPerPage | Number of records returned in the return results. Data type: Number |
| Resources | List of group records. Data type: Array of Objects "Resources": [ { "company": {Object}, "displayName": "String", "externalId": "String", "id": "String", "meta": [Array] } ] |
| Resources.company | Details about the group's company or organization. Data type: Object "company": { "display": "String", "$ref": "String", "value": "String" } |
| Resources.company.display | Name of the company. Data type: String |
| Resources.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 |
| Resources.company.value | Sys_id of the associated company. Data type: String |
| Resources.displayName | Human-readable name of the group, such as HR Team. Data type: String |
| Resources.externalId | Unique identifier assigned to the group by the entity provisioning it. Data type: String |
| Resources.id | Sys_id of the group. Data type: String |
| Resources.meta | Metadata pertaining to the group. Data type: Object "meta": { "created": "String", "lastModified": "String", "location": String", "resourceType": String" } |
| Resources.meta.created | Date and time when the group record was created. Data type: String |
| Resources.meta.lastModified | Date and time when the group record was last modified. Data type: String |
| Resources.meta.location | URI of the group being retrieved. Data type: String |
| Resources.meta.resourceType | SCIM Groups' resource type. Data type: String |
| Resources.members | List of the users and groups associated with the group. Data type: Array of Objects "members": [ { "display": "String", "value": "String", "$ref": "String" } ] |
| Resources.members.display | Name of the associated group member. Data type: String |
| Resources.members.value | Sys_id of the associated user or group record. Data type: String |
| Resources.members.$ref | URI of the associated group member. Data type: String |
| Resources.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. {#scim-GET-Groups__ul_ckx_x3t_2tb} Data type: Array of Strings |
| schemas | List of URIs of the SCIM List Response schemas used to process the request. Data type: Array |
| startIndex | One-based index into the Group \[sys_user_group\] table at which the endpoint started retrieving records. Data type: Number |
| totalResults | Total number of records that match the request. Data type: Number |
[ ]

### 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
    }

### 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} {#ariaid-title4}

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}  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-GET-Groups-group_id__entry__2}{#scim-GET-Groups-group_id__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. 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. |
[Tabelle : 25. Path parameters]

{#scim-GET-Groups-group_id__entry__8}{#scim-GET-Groups-group_id__attributes-SCIM-entry}{#scim-GET-Groups-group_id__excludedAttributes-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't 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. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
[Tabelle : 26. Query parameters]

{#scim-GET-Groups-group_id__entry__14}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 27. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Groups-group_id__entry__18}{#scim-GET-Groups-group_id__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 28. Request headers]

{#scim-GET-Groups-group_id__entry__22}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 29. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Groups-group_id__entry__26}{#scim-GET-Groups-group_id__entry-200-status-code}{#scim-GET-Groups-group_id__status_400-SCIM-entry}{#scim-GET-Groups-group_id__entry-404-status-code}

| 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. {#scim-GET-Groups-group_id__ul_vn1_gvz_nrb} |
| 404 | Not found. The requested item wasn't found. |
[Tabelle : 30. Status codes]

### Response body parameters (JSON)

{#scim-GET-Groups-group_id__id_uwk_c5c_grb__entry__2}{#scim-GET-Groups-group_id__group_company-SCIM-entry}{#scim-GET-Groups-group_id__group_company_display-SCIM-entry}{#scim-GET-Groups-group_id__group_company_ref-SCIM-entry}{#scim-GET-Groups-group_id__group_company_value-SCIM-entry}{#scim-GET-Groups-group_id__group_displayName-SCIM-entry}{#scim-GET-Groups-group_id__group_externalId-SCIM-entry}{#scim-GET-Groups-group_id__group_id-SCIM-entry}{#scim-GET-Groups-group_id__group_meta-SCIM-entry}{#scim-GET-Groups-group_id__group_meta_created-SCIM-entry}{#scim-GET-Groups-group_id__group_meta_lastModified-SCIM-entry}{#scim-GET-Groups-group_id__group_meta_location-SCIM-entry}{#scim-GET-Groups-group_id__group_meta_resourceType-SCIM-entry}{#scim-GET-Groups-group_id__group_members-SCIM-entry}{#scim-GET-Groups-group_id__group_members_display-SCIM-entry}{#scim-GET-Groups-group_id__group_members_value-SCIM-entry}{#scim-GET-Groups-group_id__group_members_ref-SCIM-entry}{#scim-GET-Groups-group_id__group_schemas-SCIM-entry}

| Name | Description |
|-|-|
| 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. {#scim-GET-Groups-group_id__ul_ckx_x3t_2tb} Data type: Array of Strings |
[ ]

{#scim-GET-Groups-group_id__id_uwk_c5c_grb}  

### 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} {#ariaid-title5}

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](https://datatracker.ietf.org/doc/html/rfc7644#section-3.5.2) 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

{#scim-PATCH-Groups-group_id__entry__2}{#scim-PATCH-Groups-group_id__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. 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. Data type: String Table: Group \[sys_user_group\] |
[Tabelle : 31. Path parameters]

{#scim-PATCH-Groups-group_id__entry__8}{#scim-PATCH-Groups-group_id__attributes-SCIM-entry}{#scim-PATCH-Groups-group_id__excludedAttributes-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't 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. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
[Tabelle : 32. Query parameters]

{#scim-PATCH-Groups-group_id__entry__14}{#scim-PATCH-Groups-group_id__group_schemas-SCIM-entry}

| Name | Description |
|-|-|
| Operations | Required. List of operation objects to patch the specified Group record with. Data type: Array of Objects "Operations": [ { "op": "String", "path": "String", "value": Any } ] |
| Operations.op | Required. Operation to perform. Valid values: * add: Add the specified field and value to the Group record. * remove: Remove the value from the specified field. Replaced with data type "null". * replace: Replace the value of the specified field. Data type: String |
| Operations.path | Required for `remove` operations, optional for others. Name/path of the field to modify. The path parameter can have one of the following formats: * A direct field, such as `displayName` * In case of complex array, a pointer to a specific element with a filter, such as: `emails[type eq "work"]` {#scim-PATCH-Groups-group_id__ul_zpv_ls5_frb} { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:PatchOp" ], "Operations": [ { "op": "add", "path": "displayName", "value": "HR Group" }, { "op": "replace", "path": "members[value eq \"sysid1\"]", "value": { "value": "sysid2" } } ] } Data type: String Default: Considers the field to be a resource. |
| Operations.value | Value of the field specified in the Operations.path parameter. The format of this parameter depends on the data-type of the associated field. For example, if updating a simple string, such as the title, the value field is expressed as a string. "Operations": [ { "op": "add", "path": "displayName", "value": "HR Group" } ] You can also declare simple string values without a path parameters, such as: "Operations": [ { "op": "add", "value": { "displayName": "HR Group" } } ] The following shows how to add a member to the group: { "op": "add", "value": { "members": { "value": "62826bf03710200044e0bfc8bcbe5df1", } } } If the field being updated is not in the base-schema, you must enclose the name-value pair in an object that specifies the URN of the associated schema. "value": { "<schema_urn>": { "<field_name>": "<new_value>" }, } For example: "value": { "urn:ietf:params:scim:schemas:extension:servicenow:2.0:Group": { "groupNumber": "13454" }, } Data type: Any |
| Operations.value.type | Name of the field to update. Data type: String |
| Operations.value.value | Value to update the field with. Data type: String |
| schemas | Required. SCIM Schema URI of the Patch Operation: "urn:ietf:params:scim:api:messages:2.0:PatchOp" Data type: String |
[Tabelle : 33. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-PATCH-Groups-group_id__entry__30}{#scim-PATCH-Groups-group_id__Accept-SCIM-entry}{#scim-PATCH-Groups-group_id__Content_Type-SCIM-entry}

| 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 |
[Tabelle : 34. Request headers]

{#scim-PATCH-Groups-group_id__entry__36}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 35. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-PATCH-Groups-group_id__entry__40}{#scim-PATCH-Groups-group_id__entry-200-status-code}{#scim-PATCH-Groups-group_id__entry-404-status-code}{#scim-PATCH-Groups-group_id__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 204 | Successful. No Content (Applicable only for SCIM Group Patch API) - This 204 status is dependent on the state of the SCIM UI property, `Enable Group Patch API response with No Content`, and is subject to the attribute parameter passed as per RFC: <https://www.rfc-editor.org/rfc/rfc7644#page-35>. Default property value: false The `Enable Group Patch API response with No Content` property can be used to get additional response execution performance gains if the client does not plan to consume any response resources. |
| 400 | Bad Request. A bad request type or malformed request was detected. * Check for invalid values: * Malformed request body. * Required field is not provided or empty. * Invalid user or group sys_id is provided. * Check if a read-only or immutable field is trying to be modified. * Ensure that both the attributes and excludedAttributes query parameters have not been passed in the request or that the request does not exceed the maximum number of members. {#scim-PATCH-Groups-group_id__status_400_extended-SCIM-entry} |
| 404 | Not found. The requested item wasn't found. |
| 409 | Group already exists. The displayName parameter must be unique. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Tabelle : 36. Status codes]

### Response body parameters (JSON)

{#scim-PATCH-Groups-group_id__entry__54}{#scim-PATCH-Groups-group_id__group_company-SCIM-entry}{#scim-PATCH-Groups-group_id__group_company_display-SCIM-entry}{#scim-PATCH-Groups-group_id__group_company_ref-SCIM-entry}{#scim-PATCH-Groups-group_id__group_company_value-SCIM-entry}{#scim-PATCH-Groups-group_id__group_displayName-SCIM-entry}{#scim-PATCH-Groups-group_id__group_externalId-SCIM-entry}{#scim-PATCH-Groups-group_id__errors-SCIM-entry}{#scim-PATCH-Groups-group_id__errors_details-SCIM-entry}{#scim-PATCH-Groups-group_id__errors_scimType-SCIM-entry}{#scim-PATCH-Groups-group_id__errors_schemas-SCIM-entry}{#scim-PATCH-Groups-group_id__errors_status-SCIM-entry}{#scim-PATCH-Groups-group_id__d3194e865}{#scim-PATCH-Groups-group_id__d3194e877}{#scim-PATCH-Groups-group_id__group_id-SCIM-entry}{#scim-PATCH-Groups-group_id__group_members-SCIM-entry}{#scim-PATCH-Groups-group_id__group_members_display-SCIM-entry}{#scim-PATCH-Groups-group_id__group_members_value-SCIM-entry}{#scim-PATCH-Groups-group_id__group_members_ref-SCIM-entry}{#scim-PATCH-Groups-group_id__group_meta-SCIM-entry}{#scim-PATCH-Groups-group_id__group_meta_created-SCIM-entry}{#scim-PATCH-Groups-group_id__group_meta_lastModified-SCIM-entry}{#scim-PATCH-Groups-group_id__group_meta_location-SCIM-entry}{#scim-PATCH-Groups-group_id__group_meta_resourceType-SCIM-entry}{#scim-PATCH-Groups-group_id__d3194e1003}

| Name | Description |
|-|-|
| 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 |
| errors | Response that describes any errors that may have occurred during processing the request. Data type: Object "errors": { "details": "String", "schemas": "String", "scimType": "String", "status": "String" } |
| errors.detail | Detailed error message on why the request failed. Data type: String |
| errors.scimType | SCIM error detail keyword. Data type: String |
| errors.schemas | URI of the SCIM Schemas used to process the error response. Data type: Array of Strings |
| errors.status | HTTP status code for the error response. 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 |
| 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 |
| 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 |
| 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. {#scim-PATCH-Groups-group_id__ul_ckx_x3t_2tb} Data type: Array of Strings |
[ ]

### 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 {#ariaid-title6}

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.  
Hinweis:  
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  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-POST-Groups__entry__2}{#scim-POST-Groups__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Tabelle : 37. Path parameters]

{#scim-POST-Groups__entry__6}{#scim-POST-Groups__attributes-SCIM-entry}{#scim-POST-Groups__excludedAttributes-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't 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. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
[Tabelle : 38. Query parameters]

{#scim-POST-Groups__entry__12}{#scim-POST-Groups__group_company-SCIM-entry}{#scim-POST-Groups__group_company_display-SCIM-entry}{#scim-POST-Groups__group_company_ref-SCIM-entry}{#scim-POST-Groups__group_company_value-SCIM-entry}{#scim-POST-Groups__group_request_displayName-SCIM-entry}{#scim-POST-Groups__group_externalId-SCIM-entry}{#scim-POST-Groups__group_request_schema-SCIM-entry}

| Name | Description |
|-|-|
| 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 | Required. 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 |
| members | List of users or other groups to associate with the group. Data type: Array of Objects "members:" [ { "value": "String" } ] Maximum size: 100 - You can modify this maximum size by updating the system property com.snc.interation.scim2.max.member.count. |
| members.value | Sys_id of the associated user or group record. Data type: String |
| schemas | Required. 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. {#scim-POST-Groups__ul_ckx_x3t_2tb} Data type: Array of Strings |
[Tabelle : 39. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-POST-Groups__entry__32}{#scim-POST-Groups__Accept-SCIM-entry}{#scim-POST-Groups__Content_Type-SCIM-entry}

| 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 |
[Tabelle : 40. Request headers]

{#scim-POST-Groups__entry__38}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 41. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-POST-Groups__entry__42}{#scim-POST-Groups__status_409-SCIM-entry}{#scim-POST-Groups__entry-500-status-code}

| Status code | Description |
|-|-|
| 201 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. * Check for invalid values: * Malformed request body. * Required field is not provided or empty. * Invalid user or group sys_id is provided. * Check if a read-only or immutable field is trying to be modified. * Ensure that both the attributes and excludedAttributes query parameters have not been passed in the request or that the request does not exceed the maximum number of members. {#scim-POST-Groups__status_400_extended-SCIM-entry} |
| 409 | Group already exists. The displayName parameter must be unique. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Tabelle : 42. Status codes]

### Response body parameters (JSON)

{#scim-POST-Groups__id_uwk_c5c_grb__entry__2}{#scim-POST-Groups__d3194e811}{#scim-POST-Groups__d3194e824}{#scim-POST-Groups__d3194e835}{#scim-POST-Groups__d3194e854}{#scim-POST-Groups__group_displayName-SCIM-entry}{#scim-POST-Groups__d3194e877}{#scim-POST-Groups__group_id-SCIM-entry}{#scim-POST-Groups__group_meta-SCIM-entry}{#scim-POST-Groups__group_meta_created-SCIM-entry}{#scim-POST-Groups__group_meta_lastModified-SCIM-entry}{#scim-POST-Groups__group_meta_location-SCIM-entry}{#scim-POST-Groups__group_meta_resourceType-SCIM-entry}{#scim-POST-Groups__group_members-SCIM-entry}{#scim-POST-Groups__group_members_display-SCIM-entry}{#scim-POST-Groups__group_members_value-SCIM-entry}{#scim-POST-Groups__group_members_ref-SCIM-entry}{#scim-POST-Groups__group_schemas-SCIM-entry}

| Name | Description |
|-|-|
| 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. {#scim-POST-Groups__d3194e1008} Data type: Array of Strings |
[ ]

{#scim-POST-Groups__id_uwk_c5c_grb}  

### 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} {#ariaid-title7}

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}  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-PUT-Groups-group_id__entry__2}{#scim-PUT-Groups-group_id__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. 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. Data type: String Table: Group \[sys_user_group\] |
[Tabelle : 43. Path parameters]

{#scim-PUT-Groups-group_id__entry__8}{#scim-PUT-Groups-group_id__attributes-SCIM-entry}{#scim-PUT-Groups-group_id__excludedAttributes-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't 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. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
[Tabelle : 44. Query parameters]

{#scim-PUT-Groups-group_id__entry__14}{#scim-PUT-Groups-group_id__group_company-SCIM-entry}{#scim-PUT-Groups-group_id__group_company_display-SCIM-entry}{#scim-PUT-Groups-group_id__group_company_ref-SCIM-entry}{#scim-PUT-Groups-group_id__group_company_value-SCIM-entry}{#scim-PUT-Groups-group_id__group_displayName-SCIM-entry}{#scim-PUT-Groups-group_id__group_externalId-SCIM-entry}{#scim-PUT-Groups-group_id__group_request_schema-SCIM-entry}

| Name | Description |
|-|-|
| 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 |
| members | List of users to replace the current list of members with. Data type: Array of Objects "members:" [ { "value": "String" } ] Maximum size: 100 - You can modify this maximum size by updating the system property com.snc.interation.scim2.max.member.count. |
| members.value | Sys_id of the associated user or group record. Data type: String |
| schemas | Required. 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. {#scim-PUT-Groups-group_id__ul_ckx_x3t_2tb} Data type: Array of Strings |
[Tabelle : 45. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-PUT-Groups-group_id__entry__34}{#scim-PUT-Groups-group_id__Accept-SCIM-entry}{#scim-PUT-Groups-group_id__Content_Type-SCIM-entry}

| 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 |
[Tabelle : 46. Request headers]

{#scim-PUT-Groups-group_id__entry__40}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 47. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-PUT-Groups-group_id__entry__44}{#scim-PUT-Groups-group_id__entry-200-status-code}{#scim-PUT-Groups-group_id__entry-404-status-code}{#scim-PUT-Groups-group_id__status_409-SCIM-entry}{#scim-PUT-Groups-group_id__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. * Check for invalid values: * Malformed request body. * Required field is not provided or empty. * Invalid user or group sys_id is provided. * Check if a read-only or immutable field is trying to be modified. * Ensure that both the attributes and excludedAttributes query parameters have not been passed in the request or that the request does not exceed the maximum number of members. {#scim-PUT-Groups-group_id__status_400_extended-SCIM-entry} |
| 404 | Not found. The requested item wasn't found. |
| 409 | Group already exists. The displayName parameter must be unique. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Tabelle : 48. Status codes]

### Response body parameters (JSON)

{#scim-PUT-Groups-group_id__entry__56}{#scim-PUT-Groups-group_id__d3194e811}{#scim-PUT-Groups-group_id__d3194e824}{#scim-PUT-Groups-group_id__d3194e835}{#scim-PUT-Groups-group_id__d3194e854}{#scim-PUT-Groups-group_id__d3194e865}{#scim-PUT-Groups-group_id__errors-SCIM-entry}{#scim-PUT-Groups-group_id__errors_details-SCIM-entry}{#scim-PUT-Groups-group_id__errors_scimType-SCIM-entry}{#scim-PUT-Groups-group_id__errors_schemas-SCIM-entry}{#scim-PUT-Groups-group_id__errors_status-SCIM-entry}{#scim-PUT-Groups-group_id__d3194e877}{#scim-PUT-Groups-group_id__group_id-SCIM-entry}{#scim-PUT-Groups-group_id__group_members-SCIM-entry}{#scim-PUT-Groups-group_id__group_members_display-SCIM-entry}{#scim-PUT-Groups-group_id__group_members_value-SCIM-entry}{#scim-PUT-Groups-group_id__group_members_ref-SCIM-entry}{#scim-PUT-Groups-group_id__group_meta-SCIM-entry}{#scim-PUT-Groups-group_id__group_meta_created-SCIM-entry}{#scim-PUT-Groups-group_id__group_meta_lastModified-SCIM-entry}{#scim-PUT-Groups-group_id__group_meta_location-SCIM-entry}{#scim-PUT-Groups-group_id__group_meta_resourceType-SCIM-entry}{#scim-PUT-Groups-group_id__group_schemas-SCIM-entry}

| Name | Description |
|-|-|
| 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 |
| errors | Response that describes any errors that may have occurred during processing the request. Data type: Object "errors": { "details": "String", "schemas": "String", "scimType": "String", "status": "String" } |
| errors.detail | Detailed error message on why the request failed. Data type: String |
| errors.scimType | SCIM error detail keyword. Data type: String |
| errors.schemas | URI of the SCIM Schemas used to process the error response. Data type: Array of Strings |
| errors.status | HTTP status code for the error response. 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 |
| 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 |
| 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 |
| 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. {#scim-PUT-Groups-group_id__d3194e1008} Data type: Array of Strings |
[ ]

### 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} {#ariaid-title8}

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}  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-DELETE-Users-user_id__entry__2}{#scim-DELETE-Users-user_id__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. 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. Data type: String Table: User \[sys_user\] |
[Tabelle : 49. Path parameters]

{#scim-DELETE-Users-user_id__entry__8}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 50. Query parameters]

{#scim-DELETE-Users-user_id__entry__12}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 51. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-DELETE-Users-user_id__entry__16}{#scim-DELETE-Users-user_id__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 52. Request headers]

{#scim-DELETE-Users-user_id__entry__20}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 53. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-DELETE-Users-user_id__entry__24}{#scim-DELETE-Users-user_id__entry-200-status-code}{#scim-DELETE-Users-user_id__entry-404-status-code}

| Status code | Description |
|-|-|
| 204 | No Content. The request was successfully processed. |
| 404 | Not found. The requested item wasn't found. |
[Tabelle : 54. Status codes]

### Response body parameters (JSON)

{#scim-DELETE-Users-user_id__entry__30}{#scim-DELETE-Users-user_id__errors-SCIM-entry}{#scim-DELETE-Users-user_id__errors_details-SCIM-entry}{#scim-DELETE-Users-user_id__errors_scimType-SCIM-entry}{#scim-DELETE-Users-user_id__errors_schemas-SCIM-entry}{#scim-DELETE-Users-user_id__errors_status-SCIM-entry}

| Name | Description |
|-|-|
| errors | Response that describes any errors that may have occurred during processing the request. Data type: Object "errors": { "details": "String", "schemas": "String", "scimType": "String", "status": "String" } |
| errors.detail | Detailed error message on why the request failed. Data type: String |
| errors.scimType | SCIM error detail keyword. Data type: String |
| errors.schemas | URI of the SCIM Schemas used to process the error response. Data type: Array of Strings |
| errors.status | HTTP status code for the error response. Data type: String |
[ ]

### 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 {#ariaid-title9}

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.
Hinweis:  
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  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-GET-Users__entry__2}{#scim-GET-Users__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Tabelle : 55. Path parameters]

{#scim-GET-Users__entry__6}{#scim-GET-Users__attributes-SCIM-entry}{#scim-GET-Users__count-SCIM-entry}{#scim-GET-Users__excludedAttributes-SCIM-entry}{#scim-GET-Users__user_filter-SCIM-entry}{#scim-GET-Users__user_sortBy-SCIM-entry}{#scim-GET-Users__sortOrder-SCIM-entry}{#scim-GET-Users__user_startIndex-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't be used with the excludedAttributes parameter. Data type: String Default: Return all fields unless excludedAttributes is specified. |
| count | Number of records to return. A negative value is interpreted as zero. Data type: Number Maximum: 500 - A value greater than this results in a bad request error. Default: 10 |
| excludedAttributes | Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
| filter | Filter expression to apply to the return results. Field filters are expressed as `<field_name> <operator> <"value">`. Refer to [RFC7644](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2) for a list of the valid operators. Hinweis: The `NOT` operator is not supported. For example, to filter for all users whose name starts with "Jo", enter `userName SW "jo"` (case-insensitive). To specify more than one field filter, concatenate the filters using the `AND` operand. For example, to filter for all users whose name starts with "Jo" and whose last name contains "smi", enter `userName SW "john" AND name.familyName CO "smi"`. Use dot-walking to specify nested attributes. Only the following SCIM user fields are available for use in filters and some, as noted, only support fixed format: * active * addresses - Fixed format only, such as: * \[type eq "home" and streetAddress eq "xxxx"\] * \[type eq "home" and locality eq "xxxx"\] * \[type eq "home" and region eq "xxxx"\] * \[type eq "home" and postalCode eq "xxxx"\] * \[type eq "home" and country eq "xxxx"\] {#scim-GET-Users__ul_img_kgm_hrb} * displayName * emails - Fixed format only, such as: \[type eq "work" and value eq "emailValue"\] * externalId - Only `EQ` operator is supported. * id * meta.created * meta.lastModified * name.familyName * name.givenName * name.middleName * preferredLanguage * phoneNumbers - Fixed format only, such as: * \[type eq "work" and value eq "xxxx"\] * \[type eq "mobile" and value eq "xxxx"\] * \[type eq "home" and value eq "xxxx"\] {#scim-GET-Users__ul_yg1_cgm_hrb} * timezone * title * userName * urn:ietf:params:scim:schemas:extension:servicenow:2.0:User:employeeNumber * urn:ietf:params:scim:schemas:extension:servicenow:2.0:User:gender * urn:ietf:params:scim:schemas:extension:servicenow:2.0:User:department.name * urn:ietf:params:scim:schemas:extension:servicenow:2.0:User:department.value * urn:ietf:params:scim:schemas:extension:servicenow:2.0:User:manager.displayName * urn:ietf:params:scim:schemas:extension:servicenow:2.0:User:manager.value * urn:ietf:params:scim:schemas:extension:servicenow:2.0:User:costCenter.name * urn:ietf:params:scim:schemas:extension:servicenow:2.0:User:costCenter.value * urn:ietf:params:scim:schemas:extension:servicenow:2.0:User:company.name * urn:ietf:params:scim:schemas:extension:servicenow:2.0:User:company.value * urn:ietf:params:scim:schemas:extension:servicenow:2.0:User:location.name * urn:ietf:params:scim:schemas:extension:servicenow:2.0:User:location.value {#scim-GET-Users__ul_w3k_bcc_grb} Data type: String Default: No filtering |
| sortBy | Must be specified with the sortOrder parameter. Field by which to sort the return results. Sorting is case-insensitive. You can only use the parameters available for filtering for the sortBy parameter, with the exception of externalId, which is not allowed. Also, only the following dot-walked parameters are supported: * addressess - Only the following values are allowed: * addresses.streetAddress - Maps to home street address. * addresses.home.streetAddress * addresses.locality - Maps to home locality. * addresses.home.locality * addresses.region - Maps to home region. * addresses.home.region * addresses.postalCode - Maps to home postal code. * addresses.home.postalCode * addresses.country - Maps to home country. * addresses.home.country {#scim-GET-Users__ul_g32_5lm_hrb} * emails - Only the following values are allowed: * emails.value - Maps to the email type work. * emails.work.value {#scim-GET-Users__ul_dnq_wjm_hrb} * phoneNumbers - Only the following values are allowed: * phoneNumbers.value - Maps to the phone number type work. * phoneNumbers.home.value * phoneNumbers.mobile.value * phoneNumbers.work.value {#scim-GET-Users__ul_gtf_fkm_hrb} {#scim-GET-Users__ul_emm_33m_hrb} For values that are null: * sorted by ascending - Null values are sorted to the top. * sorted by descending - Null values are sorted to the bottom. {#scim-GET-Users__ul_ts1_lhm_hrb} Data type: String Default: No sort performed |
| sortOrder | Must be specified with the sortBy parameter. Order in which the sortBy parameter is applied to the return results. Valid values: * ascending * descending {#scim-GET-Users__ul_mmn_zrc_grb} Data type: String Default: ascending |
| startIndex | One-based index into the User \[sys_user\] table at which to start retrieving records. For example, if you set this parameter to 100, and the count parameter to 20, the endpoint returns records 100 through 119. Hinweis: Any value that is set to less than one is interpreted as one. Not valid with the id path parameter. Data type: String Default: 1 |
[Tabelle : 56. Query parameters]

{#scim-GET-Users__entry__22}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 57. Request body parameters (XML or JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Users__entry__26}{#scim-GET-Users__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 58. Request headers]

{#scim-GET-Users__entry__30}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 59. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Users__entry__34}{#scim-GET-Users__entry-200-status-code}{#scim-GET-Users__status_400-SCIM-entry}

| 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. {#scim-GET-Users__ul_vn1_gvz_nrb} |
[Tabelle : 60. Status codes]

### Response body parameters (JSON)

{#scim-GET-Users__entry__40}{#scim-GET-Users__itemsPerPage-SCIM-entry}{#scim-GET-Users__user_userName-SCIM-ph}{#scim-GET-Users__user_schemas-SCIM-entry}{#scim-GET-Users__totalResults-SCIM-entry}

| Name | Description |
|-|-|
| itemsPerPage | Number of records returned in the return results. Data type: Number |
| Resources | List of user records. Data type: Array of Objects "Resources": [ { "active": Boolean, "addresses": {Object}, "displayName": "String", "emails": [Array], "externalId": "String", "groups": [Array], "id": "String", "meta": {Object}, "name": {Object}, "phoneNumbers": [Array], "preferredLanguage": "String", "schemas": [Array], "timezone": "String", "title": "String", "userName": "String", "userType": "String" } ] |
| Resources.active | Flag that indicates whether the associated user is active within the ServiceNow instance. Possible values: * true: User is active. * false: User is inactive. {#scim-GET-Users__ul_glm_qkj_grb} Data type: Boolean |
| Resources.adresses | Details of the user's current mailing address. Data type: Object "addresses": { "country": "String", "locality": "String", "postalCode": "String", "region": "String", "streetAddress": "String", "type": "String" } |
| Resources.addresses.country | Country name. Data type: String |
| Resources.addresses.locality | City or locality name. Data type: String |
| Resources.addresses.postalCode | Zip or postal code. Data type: String |
| Resources.addresses.region | State or region. Data type: String |
| Resources.addresses.streetAddress | Full street address. This can include the house number, street name, PO Box, and multi-line extended street address information. Data type: String |
| Resources.addresses.type | Type of address. Currently only supports home. Data type: String |
| Resources.displayName | User display name. This value is auto-generated by concatenating the name fields. Data type: String |
| Resources.emails | List of email accounts associated with the user. Data type: Array of Objects "emails:" [ { "type": "String", "value": "String" } ] |
| Resources.emails.type | User email type. Currently only supports type of "work". Data type: String |
| Resources.emails.value | User's email address. This is a unique key for the associated user. Data type: String |
| Resources.externalId | Unique identifier assigned to the user by the entity provisioning it. Data type: String |
| Resources.groups | List of groups to which the user belongs, either through direct membership, nested groups, or dynamically calculated. Data type: Array of Objects "groups": [ { "display": "String", "type": "String", "value": "String", "$ref": "String" } ] |
| Resources.groups.display | Name of the associated group. Data type: String |
| Resources.groups.type | Type of group association, such as direct or indirect. Data type: String |
| Resources.groups.value | Sys_id of an associated group record. Data type: String |
| Resources.groups.ref | URI of the associated group. Data type: String |
| Resources.id | Sys_id of the associated User record. Data type: String |
| Resources.meta | Metadata pertaining to the user. Data type: Object "meta": { "created": "String", "lastModified": "String", "location": String", "resourceType": String" } |
| Resources.meta.created | Date and time when the user record was created. Data type: String |
| Resources.meta.lastModified | Date and time when the user record was last modified. Data type: String |
| Resources.meta.location | URI of the user being retrieved. Data type: String |
| Resources.meta.resourceType | SCIM Users' resource type. Data type: String |
| Resources.name | User's name information. Data type: Object "name": { "familyName": "String", "givenName": "String", "honorificPrefix": "String", "middleName": "String" } |
| Resources.name.familyName | User's family or last name. Data type: String |
| Resources.name.givenName | User's given or first name. Data type: String |
| Resources.name.honorificPrefix | User's honorific name or title, such as Dr., Bishop, or Baron. Data type: String |
| Resources.name.middle | User's middle name. Data type: String |
| Resources.phoneNumbers | List of phone numbers associated with the user. Data type: Array of Objects "phoneNumbers": [ { "type": "String", "value": "String" } ] |
| Resources.phoneNumbers.type | Type of phone number. Possible values: * home * mobile * work {#scim-GET-Users__ul_idb_brj_grb} Data type: String |
| Resources.phoneNumbers.value | User's phone number. Data type: String |
| Resources.preferredLanguage | User's preferred spoken and written language. Data type: String |
| Resources.schemas | List of URIs of the SCIM User schemas used to process the request. Data type: Array of Strings |
| Resources.timezone | User's time zone. Data type: String |
| Resources.title | User's title, such as CEO or President. Data type: String |
| Resources.userName | Unique user name for the associated user. Data type: String |
| Resources.userType | User type. This value is used to identify the organization to user relationship. This can be any value, but typical values might include: * Contractor * Employee * Intern * Temp * External * Unknown {#scim-GET-Users__ul_kdr_nwz_nrb} Data type: String |
| schemas | List of URIs of the SCIM ListResponse schemas used to process the request. Data type: Array of Strings |
| startIndex | One-based index into the User \[sys_user\] table at which the records were returned. Data type: String |
| totalResults | Total number of records that match the request. Data type: Number |
[ ]

### Extension parameters returned {#scim-GET-Users__section_vb2_yny_jlb}

{#scim-GET-Users__id_hmw_fjk_grb__entry__2}{#scim-GET-Users__user_company-SCIM-entry}{#scim-GET-Users__user_company_display-SCIM-entry}{#scim-GET-Users__user_company_value-SCIM-ph}{#scim-GET-Users__user_company_ref-SCIM-entry}{#scim-GET-Users__user_costCenter-SCIM-entry}{#scim-GET-Users__user_costCenter_display-SCIM-entry}{#scim-GET-Users__user_costCenter_value-SCIM-ph}{#scim-GET-Users__user_costCenter_ref-SCIM-entry}{#scim-GET-Users__user_department-SCIM-entry}{#scim-GET-Users__user_department_display-SCIM-entry}{#scim-GET-Users__user_department_value-SCIM-ph}{#scim-GET-Users__user_department_ref-SCIM-entry}{#scim-GET-Users__user_employeeNumber-SCIM-entry}{#scim-GET-Users__user_gender-SCIM-entry}{#scim-GET-Users__user_location-SCIM-entry}{#scim-GET-Users__user_location_display-SCIM-entry}{#scim-GET-Users__user_location_value-SCIM-ph}{#scim-GET-Users__user_location_ref-SCIM-entry}{#scim-GET-Users__user_manager-SCIM-entry}{#scim-GET-Users__user_manager_display-SCIM-entry}{#scim-GET-Users__user_manager_value-SCIM-ph}{#scim-GET-Users__user_manager_ref-SCIM-entry}

| Name | Description |
|-|-|
| company | Details about the user's associated company. Data type: Object "company": { "display": "String", "value": "String", "$ref": "String" } |
| company.display | Name of the company. Data type: String |
| company.value | Sys_id of the company record. Data type: String |
| company.$ref | Reference URI for the company. Data type: String |
| costCenter | Details about the user's associated cost center. Data type: Object "costCenter": { "display": "String", "value": "String", "$ref": "String" } |
| costCenter.display | Name of the cost center. Data type: String |
| costCenter.value | Sys_id of the cost center record. Data type: String |
| costCenter.$ref | Reference URI for the cost center. Data type: String |
| department | Details about the user's associated department. Data type: Object "department": { "display": "String", "value": "String", "$ref": "String" } |
| department.display | Name of the department. Data type: String |
| department.value | Sys_id of the department record. Data type: String |
| department.$ref | Reference URI for the department. Data type: String |
| employeeNumber | Numeric or alphanumeric employee number. Data type: String |
| gender | Gender of the user, such as male or female. Data type: String |
| location | Details about the user's associated location. Data type: Object "location": { "display": "String", "value": "String", "$ref": "String" } |
| location.display | Name of the location. Data type: String |
| location.value | Sys_id of the location record. Data type: String |
| location.$ref | Reference URI for the location. Data type: String |
| manager | Details about the user's associated manager. Data type: Object "manager": { "display": "String", "value": "String", "$ref": "String" } |
| manager.display | Name of the manager. Data type: String |
| manager.value | Sys_id of the manager record. Data type: String |
| manager.$ref | Reference URI for the manager. Data type: String |
[ ]

{#scim-GET-Users__id_hmw_fjk_grb}  

### cURL request using attributes {#scim-GET-Users__example_kkl_rjj_grb}

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
    }

### cURL request using a filter {#scim-GET-Users__example_lkl_rjj_grb}

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} {#ariaid-title10}

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}  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-GET-Users-user_id__entry__2}{#scim-GET-Users-user_id__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. 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: User \[sys_user\] |
[Tabelle : 61. Path parameters]

{#scim-GET-Users-user_id__entry__8}{#scim-GET-Users-user_id__attributes-SCIM-entry}{#scim-GET-Users-user_id__excludedAttributes-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't 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. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
[Tabelle : 62. Query parameters]

{#scim-GET-Users-user_id__entry__14}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 63. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Users-user_id__entry__18}{#scim-GET-Users-user_id__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 64. Request headers]

{#scim-GET-Users-user_id__entry__22}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 65. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Users-user_id__entry__26}{#scim-GET-Users-user_id__entry-200-status-code}{#scim-GET-Users-user_id__status_400-SCIM-entry}{#scim-GET-Users-user_id__entry-404-status-code}

| 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. {#scim-GET-Users-user_id__ul_vn1_gvz_nrb} |
| 404 | Not found. The requested item wasn't found. |
[Tabelle : 66. Status codes]

### Response body parameters (JSON)

{#scim-GET-Users-user_id__id_x11_hyj_grb__entry__2}{#scim-GET-Users-user_id__user_active-SCIM-entry}{#scim-GET-Users-user_id__user_addresses-SCIM-entry}{#scim-GET-Users-user_id__user_addresses_country-SCIM-entry}{#scim-GET-Users-user_id__user_addresses_locality-SCIM-entry}{#scim-GET-Users-user_id__user_addresses_postalCode-SCIM-entry}{#scim-GET-Users-user_id__user_addresses_region-SCIM-entry}{#scim-GET-Users-user_id__user_addresses_streetAddress-SCIM-entry}{#scim-GET-Users-user_id__user_addresses_type-SCIM-entry}{#scim-GET-Users-user_id__user_displayName-SCIM-entry}{#scim-GET-Users-user_id__user_emails-SCIM-entry}{#scim-GET-Users-user_id__user_emails_type-SCIM-entry}{#scim-GET-Users-user_id__user_emails_value-SCIM-entry}{#scim-GET-Users-user_id__user_emails_externalId-SCIM-entry}{#scim-GET-Users-user_id__user_groups-SCIM-entry}{#scim-GET-Users-user_id__user_groups_display-SCIM-entry}{#scim-GET-Users-user_id__user_groups_type-SCIM-entry}{#scim-GET-Users-user_id__user_groups_value-SCIM-entry}{#scim-GET-Users-user_id__user_groups_ref-SCIM-entry}{#scim-GET-Users-user_id__user_id-SCIM-entry}{#scim-GET-Users-user_id__user_meta-SCIM-entry}{#scim-GET-Users-user_id__user_meta_created-SCIM-entry}{#scim-GET-Users-user_id__user_meta_lastModified-SCIM-entry}{#scim-GET-Users-user_id__user_meta_location-SCIM-entry}{#scim-GET-Users-user_id__user_meta_resourceType-SCIM-entry}{#scim-GET-Users-user_id__user_name-SCIM-entry}{#scim-GET-Users-user_id__user_name_familyName-SCIM-entry}{#scim-GET-Users-user_id__user_name_givenName-SCIM-entry}{#scim-GET-Users-user_id__user_name_honorificPrefix-SCIM-entry}{#scim-GET-Users-user_id__user_name_middle-SCIM-entry}{#scim-GET-Users-user_id__user_phoneNumbers-SCIM-entry}{#scim-GET-Users-user_id__user_phoneNumbers_type-SCIM-entry}{#scim-GET-Users-user_id__user_phoneNumbers_value-SCIM-entry}{#scim-GET-Users-user_id__user_preferredLanguage-SCIM-entry}{#scim-GET-Users-user_id__user_schemas-SCIM-entry}{#scim-GET-Users-user_id__user_timezone-SCIM-entry}{#scim-GET-Users-user_id__user_title-SCIM-entry}{#scim-GET-Users-user_id__user_userName-SCIM-ph}{#scim-GET-Users-user_id__user_userType-SCIM-entry}

| Name | Description |
|-|-|
| active | Flag that indicates whether the associated user is active within the ServiceNow instance. Possible values: * true: User is active. * false: User is inactive. {#scim-GET-Users-user_id__ul_glm_qkj_grb} Data type: Boolean |
| addresses | Details of the user's current mailing address. Data type: Object "addresses": { "country": "String", "locality": "String", "postalCode": "String", "region": "String", "streetAddress": "String", "type": "String" } |
| addresses.country | Country name. Data type: String |
| addresses.locality | City or locality name. Data type: String |
| addresses.postalCode | Zip or postal code. Data type: String |
| addresses.region | State or region. Data type: String |
| addresses.streetAddress | Full street address. This can include the house number, street name, PO Box, and multi-line extended street address information. Data type: String |
| addresses.type | Type of address. Currently only supports home. Data type: String |
| displayName | User display name. This value is auto-generated by concatenating the name fields. Data type: String |
| emails | List of email accounts associated with the user. Data type: Array of Objects "emails:" [ { "type": "String", "value": "String" } ] |
| emails.type | User email type. Currently only supports type of "work". Data type: String |
| emails.value | User's email address. This is a unique key for the associated user. Data type: String |
| externalId | Unique identifier assigned to the user by the entity provisioning it. Data type: String |
| groups | List of groups to which the user belongs, either through direct membership, nested groups, or dynamically calculated. Data type: Array of Objects "groups": [ { "display": "String", "type": "String", "value": "String", "$ref": "String" } ] |
| groups.display | Name of the associated group. Data type: String |
| groups.type | Type of group association, such as direct or indirect. Data type: String |
| groups.value | Sys_id of an associated group record. Data type: String |
| groups.$ref | URI of the associated group. Data type: String |
| id | Sys_id of the associated User record. Data type: String |
| meta | Metadata pertaining to the user. Data type: Object "meta": { "created": "String", "lastModified": "String", "location": String", "resourceType": String" } |
| meta.created | Date and time when the user record was created. Data type: String |
| meta.lastModified | Date and time when the user record was last modified. Data type: String |
| meta.location | URI of the user being retrieved. Data type: String |
| meta.resourceType | SCIM Users' resource type. Data type: String |
| name | User's name information. Data type: Object "name": { "familyName": "String", "givenName": "String", "honorificPrefix": "String", "middleName": "String" } |
| name.familyName | User's family or last name. Data type: String |
| name.givenName | User's given or first name. Data type: String |
| name.honorificPrefix | User's honorific name or title, such as Dr., Bishop, or Baron. Data type: String |
| name.middle | User's middle name. Data type: String |
| phoneNumbers | List of phone numbers associated with the user. Data type: Array of Objects "phoneNumbers": [ { "type": "String", "value": "String" } ] |
| phoneNumbers.type | Type of phone number. Possible values: * home * mobile * work {#scim-GET-Users-user_id__ul_idb_brj_grb} Data type: String |
| phoneNumbers.value | User's phone number. Data type: String |
| preferredLanguage | User's preferred spoken and written language. Data type: String |
| schemas | List of URIs of the SCIM User schemas used to process the request. Data type: Array of Strings |
| timezone | User's time zone. Data type: String |
| title | User's title, such as CEO or President. Data type: String |
| userName | Unique user name for the associated user. Data type: String |
| userType | User type. This value is used to identify the organization to user relationship. This can be any value, but typical values might include: * Contractor * Employee * Intern * Temp * External * Unknown {#scim-GET-Users-user_id__ul_kdr_nwz_nrb} Data type: String |
[ ]

{#scim-GET-Users-user_id__id_x11_hyj_grb}

### Extension parameters returned {#scim-GET-Users-user_id__section_vb2_yny_jlb}

{#scim-GET-Users-user_id__id_hmw_fjk_grb__entry__2}{#scim-GET-Users-user_id__user_company-SCIM-entry}{#scim-GET-Users-user_id__user_company_display-SCIM-entry}{#scim-GET-Users-user_id__user_company_value-SCIM-ph}{#scim-GET-Users-user_id__user_company_ref-SCIM-entry}{#scim-GET-Users-user_id__user_costCenter-SCIM-entry}{#scim-GET-Users-user_id__user_costCenter_display-SCIM-entry}{#scim-GET-Users-user_id__user_costCenter_value-SCIM-ph}{#scim-GET-Users-user_id__user_costCenter_ref-SCIM-entry}{#scim-GET-Users-user_id__user_department-SCIM-entry}{#scim-GET-Users-user_id__user_department_display-SCIM-entry}{#scim-GET-Users-user_id__user_department_value-SCIM-ph}{#scim-GET-Users-user_id__user_department_ref-SCIM-entry}{#scim-GET-Users-user_id__user_employeeNumber-SCIM-entry}{#scim-GET-Users-user_id__user_gender-SCIM-entry}{#scim-GET-Users-user_id__user_location-SCIM-entry}{#scim-GET-Users-user_id__user_location_display-SCIM-entry}{#scim-GET-Users-user_id__user_location_value-SCIM-ph}{#scim-GET-Users-user_id__user_location_ref-SCIM-entry}{#scim-GET-Users-user_id__user_manager-SCIM-entry}{#scim-GET-Users-user_id__user_manager_display-SCIM-entry}{#scim-GET-Users-user_id__user_manager_value-SCIM-ph}{#scim-GET-Users-user_id__user_manager_ref-SCIM-entry}

| Name | Description |
|-|-|
| company | Details about the user's associated company. Data type: Object "company": { "display": "String", "value": "String", "$ref": "String" } |
| company.display | Name of the company. Data type: String |
| company.value | Sys_id of the company record. Data type: String |
| company.$ref | Reference URI for the company. Data type: String |
| costCenter | Details about the user's associated cost center. Data type: Object "costCenter": { "display": "String", "value": "String", "$ref": "String" } |
| costCenter.display | Name of the cost center. Data type: String |
| costCenter.value | Sys_id of the cost center record. Data type: String |
| costCenter.$ref | Reference URI for the cost center. Data type: String |
| department | Details about the user's associated department. Data type: Object "department": { "display": "String", "value": "String", "$ref": "String" } |
| department.display | Name of the department. Data type: String |
| department.value | Sys_id of the department record. Data type: String |
| department.$ref | Reference URI for the department. Data type: String |
| employeeNumber | Numeric or alphanumeric employee number. Data type: String |
| gender | Gender of the user, such as male or female. Data type: String |
| location | Details about the user's associated location. Data type: Object "location": { "display": "String", "value": "String", "$ref": "String" } |
| location.display | Name of the location. Data type: String |
| location.value | Sys_id of the location record. Data type: String |
| location.$ref | Reference URI for the location. Data type: String |
| manager | Details about the user's associated manager. Data type: Object "manager": { "display": "String", "value": "String", "$ref": "String" } |
| manager.display | Name of the manager. Data type: String |
| manager.value | Sys_id of the manager record. Data type: String |
| manager.$ref | Reference URI for the manager. Data type: String |
[ ]

{#scim-GET-Users-user_id__id_hmw_fjk_grb}  

### 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} {#ariaid-title11}

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}  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-PATCH-Users-user_id__entry__2}{#scim-PATCH-Users-user_id__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. 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. Data type: String Table: User \[sys_user\] |
[Tabelle : 67. Path parameters]

{#scim-PATCH-Users-user_id__entry__8}{#scim-PATCH-Users-user_id__attributes-SCIM-entry}{#scim-PATCH-Users-user_id__excludedAttributes-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't 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. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
[Tabelle : 68. Query parameters]

{#scim-PATCH-Users-user_id__entry__14}

| Name | Description |
|-|-|
| Operations | Required. List of operation objects to patch the specified user record with. Data type: Array "Operations": [ { "op": "String", "path": "String", "value": Any } ] |
| Operations.op | Required. Operation to perform. Valid values: * add: Add the specified field and value to the user record. * remove: Remove the value from the specified field. * replace: Replace the value of the specified field. {#scim-PATCH-Users-user_id__ul_zcf_ydv_frb} Data type: String |
| Operations.path | Required for `remove` operations. Name/path of the field to modify. The path parameter can have one of the following formats: * A direct field, such as `title` * A nested fields, such as `name.givenName` * In case of complex array, it can point to a specific element with a filter, such as: `emails[type eq "work"]` {#scim-PATCH-Users-user_id__ul_zpv_ls5_frb} { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:PatchOp" ], "Operations": [ { "op": "add", "path": "title", "value": "xyz" }, { "op": "replace", "path": "name.givenName", "value": "Jennifer" }, { "op": "replace", "path": "emails[type eq \"work\"]", "value": "xyz@test.com" } ] } Data type: String Default: Considers the field to be a user resource. |
| Operations.value | Value of the field specified in the Operations.path parameter. The format of this parameter depends on the data-type of the associated field. For example, if updating a simple string, such as the title, the value field is expressed as a string. "Operations": [ { "op": "add", "path": "title", "value": "xyz" } ] You can also declare simple string values without using value or path parameters, such as: "Operations": [ { "op": "add", "title": "xyz" } ] However, when updating a phone number, which is an array that contains objects that define additional fields to add to the user record and their associated values, the value field is expressed as an array of objects. "Operations": [ { "op": "add", "path": "phoneNumbers", "value": [ { "type": "work", "value": "9876543210" }, { "type": "home", "value": "9876783216" } ] } ] When specifying attribute nodes, the entry can include the nesting as follows: { "op": "replace", "value": { "name": { "familyName": "Jones", "givenName": "Jennifer" } } } Or you can specify the nesting in the Operations.path: { "op": "replace", "path": "name.givenName", "value": "Jennifer" } If the field being updated is not in the base-schema, you must enclose the name-value pair in an object that specifies the URN of the associated schema. "value": { "<schema_urn>": { "<field_name>": "<new_value>" }, } For example: "value": { "urn:ietf:params:scim:schemas:extension:servicenow:2.0:User": { "employeeNumber": "13454" }, } Data type: Any |
| Operations.value.type | Name of the field to update. Data type: String |
| Operations.value.value | Value to update the field with. Data type: String |
| schemas | Required. SCIM Schema URI of Patch Operation `urn:ietf:params:scim:api:messages:2.0:PatchOp`. Data type: String |
[Tabelle : 69. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-PATCH-Users-user_id__entry__30}{#scim-PATCH-Users-user_id__Accept-SCIM-entry}{#scim-PATCH-Users-user_id__Content_Type-SCIM-entry}

| 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 |
[Tabelle : 70. Request headers]

{#scim-PATCH-Users-user_id__entry__36}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 71. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-PATCH-Users-user_id__entry__40}{#scim-PATCH-Users-user_id__entry-200-status-code}{#scim-PATCH-Users-user_id__entry-404-status-code}{#scim-PATCH-Users-user_id__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. * Check for invalid values: * Malformed request body. * Required field is not provided or empty. * Invalid user or group sys_id is provided. {#scim-PATCH-Users-user_id__ul_dwt_rtd_grb} * Check if a read-only or immutable field is trying to be modified. * Ensure that both the attributes and excludedAttributes query parameters have not been passed in the request or that the request does not exceed the maximum number of members. {#scim-PATCH-Users-user_id__ul_ypm_ptd_grb} |
| 404 | Not found. The requested item wasn't found. |
| 409 | User already exists. The userName parameter must be unique. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Tabelle : 72. Status codes]

### Response body parameters (JSON)

{#scim-PATCH-Users-user_id__table_mjy_k1l_grb__entry__2}{#scim-PATCH-Users-user_id__user_active-SCIM-entry}{#scim-PATCH-Users-user_id__user_addresses-SCIM-entry}{#scim-PATCH-Users-user_id__user_addresses_country-SCIM-entry}{#scim-PATCH-Users-user_id__user_addresses_locality-SCIM-entry}{#scim-PATCH-Users-user_id__user_addresses_postalCode-SCIM-entry}{#scim-PATCH-Users-user_id__user_addresses_region-SCIM-entry}{#scim-PATCH-Users-user_id__user_addresses_streetAddress-SCIM-entry}{#scim-PATCH-Users-user_id__user_addresses_type-SCIM-entry}{#scim-PATCH-Users-user_id__user_displayName-SCIM-entry}{#scim-PATCH-Users-user_id__user_emails-SCIM-entry}{#scim-PATCH-Users-user_id__user_emails_type-SCIM-entry}{#scim-PATCH-Users-user_id__user_emails_value-SCIM-entry}{#scim-PATCH-Users-user_id__errors-SCIM-entry}{#scim-PATCH-Users-user_id__errors_details-SCIM-entry}{#scim-PATCH-Users-user_id__errors_scimType-SCIM-entry}{#scim-PATCH-Users-user_id__errors_schemas-SCIM-entry}{#scim-PATCH-Users-user_id__errors_status-SCIM-entry}{#scim-PATCH-Users-user_id__user_emails_externalId-SCIM-entry}{#scim-PATCH-Users-user_id__user_groups-SCIM-entry}{#scim-PATCH-Users-user_id__user_groups_display-SCIM-entry}{#scim-PATCH-Users-user_id__user_groups_type-SCIM-entry}{#scim-PATCH-Users-user_id__user_groups_value-SCIM-entry}{#scim-PATCH-Users-user_id__user_groups_ref-SCIM-entry}{#scim-PATCH-Users-user_id__user_id-SCIM-entry}{#scim-PATCH-Users-user_id__user_meta-SCIM-entry}{#scim-PATCH-Users-user_id__user_meta_created-SCIM-entry}{#scim-PATCH-Users-user_id__user_meta_lastModified-SCIM-entry}{#scim-PATCH-Users-user_id__user_meta_location-SCIM-entry}{#scim-PATCH-Users-user_id__user_meta_resourceType-SCIM-entry}{#scim-PATCH-Users-user_id__user_name-SCIM-entry}{#scim-PATCH-Users-user_id__user_name_familyName-SCIM-entry}{#scim-PATCH-Users-user_id__user_name_givenName-SCIM-entry}{#scim-PATCH-Users-user_id__user_name_honorificPrefix-SCIM-entry}{#scim-PATCH-Users-user_id__user_name_middle-SCIM-entry}{#scim-PATCH-Users-user_id__user_phoneNumbers-SCIM-entry}{#scim-PATCH-Users-user_id__user_phoneNumbers_type-SCIM-entry}{#scim-PATCH-Users-user_id__user_phoneNumbers_value-SCIM-entry}{#scim-PATCH-Users-user_id__user_preferredLanguage-SCIM-entry}{#scim-PATCH-Users-user_id__user_schemas-SCIM-entry}{#scim-PATCH-Users-user_id__user_timezone-SCIM-entry}{#scim-PATCH-Users-user_id__user_title-SCIM-entry}{#scim-PATCH-Users-user_id__user_userName-SCIM-ph}{#scim-PATCH-Users-user_id__user_userType-SCIM-entry}

| Name | Description |
|-|-|
| active | Flag that indicates whether the associated user is active within the ServiceNow instance. Possible values: * true: User is active. * false: User is inactive. {#scim-PATCH-Users-user_id__ul_glm_qkj_grb} Data type: Boolean |
| addresses | Details of the user's current mailing address. Data type: Object "addresses": { "country": "String", "locality": "String", "postalCode": "String", "region": "String", "streetAddress": "String", "type": "String" } |
| addresses.country | Country name. Data type: String |
| addresses.locality | City or locality name. Data type: String |
| addresses.postalCode | Zip or postal code. Data type: String |
| addresses.region | State or region. Data type: String |
| addresses.streetAddress | Full street address. This can include the house number, street name, PO Box, and multi-line extended street address information. Data type: String |
| addresses.type | Type of address. Currently only supports home. Data type: String |
| displayName | User display name. This value is auto-generated by concatenating the name fields. Data type: String |
| emails | List of email accounts associated with the user. Data type: Array of Objects "emails:" [ { "type": "String", "value": "String" } ] |
| emails.type | User email type. Currently only supports type of "work". Data type: String |
| emails.value | User's email address. This is a unique key for the associated user. Data type: String |
| errors | Response that describes any errors that may have occurred during processing the request. Data type: Object "errors": { "details": "String", "schemas": "String", "scimType": "String", "status": "String" } |
| errors.detail | Detailed error message on why the request failed. Data type: String |
| errors.scimType | SCIM error detail keyword. Data type: String |
| errors.schemas | URI of the SCIM Schemas used to process the error response. Data type: Array of Strings |
| errors.status | HTTP status code for the error response. Data type: String |
| externalId | Unique identifier assigned to the user by the entity provisioning it. Data type: String |
| groups | List of groups to which the user belongs, either through direct membership, nested groups, or dynamically calculated. Data type: Array of Objects "groups": [ { "display": "String", "type": "String", "value": "String", "$ref": "String" } ] |
| groups.display | Name of the associated group. Data type: String |
| groups.type | Type of group association, such as direct or indirect. Data type: String |
| groups.value | Sys_id of an associated group record. Data type: String |
| groups.$ref | URI of the associated group. Data type: String |
| id | Sys_id of the associated User record. Data type: String |
| meta | Metadata pertaining to the user. Data type: Object "meta": { "created": "String", "lastModified": "String", "location": String", "resourceType": String" } |
| meta.created | Date and time when the user record was created. Data type: String |
| meta.lastModified | Date and time when the user record was last modified. Data type: String |
| meta.location | URI of the user being retrieved. Data type: String |
| meta.resourceType | SCIM Users' resource type. Data type: String |
| name | User's name information. Data type: Object "name": { "familyName": "String", "givenName": "String", "honorificPrefix": "String", "middleName": "String" } |
| name.familyName | User's family or last name. Data type: String |
| name.givenName | User's given or first name. Data type: String |
| name.honorificPrefix | User's honorific name or title, such as Dr., Bishop, or Baron. Data type: String |
| name.middle | User's middle name. Data type: String |
| phoneNumbers | List of phone numbers associated with the user. Data type: Array of Objects "phoneNumbers": [ { "type": "String", "value": "String" } ] |
| phoneNumbers.type | Type of phone number. Possible values: * home * mobile * work {#scim-PATCH-Users-user_id__ul_idb_brj_grb} Data type: String |
| phoneNumbers.value | User's phone number. Data type: String |
| preferredLanguage | User's preferred spoken and written language. Data type: String |
| schemas | List of URIs of the SCIM User schemas used to process the request. Data type: Array of Strings |
| timezone | User's time zone. Data type: String |
| title | User's title, such as CEO or President. Data type: String |
| userName | Unique user name for the associated user. Data type: String |
| userType | User type. This value is used to identify the organization to user relationship. This can be any value, but typical values might include: * Contractor * Employee * Intern * Temp * External * Unknown {#scim-PATCH-Users-user_id__ul_kdr_nwz_nrb} Data type: String |
[ ]

{#scim-PATCH-Users-user_id__table_mjy_k1l_grb}

### Extension parameters returned {#scim-PATCH-Users-user_id__section_vb2_yny_jlb}

{#scim-PATCH-Users-user_id__id_hmw_fjk_grb__entry__2}{#scim-PATCH-Users-user_id__user_company-SCIM-entry}{#scim-PATCH-Users-user_id__user_company_display-SCIM-entry}{#scim-PATCH-Users-user_id__user_company_value-SCIM-ph}{#scim-PATCH-Users-user_id__user_company_ref-SCIM-entry}{#scim-PATCH-Users-user_id__user_costCenter-SCIM-entry}{#scim-PATCH-Users-user_id__user_costCenter_display-SCIM-entry}{#scim-PATCH-Users-user_id__user_costCenter_value-SCIM-ph}{#scim-PATCH-Users-user_id__user_costCenter_ref-SCIM-entry}{#scim-PATCH-Users-user_id__user_department-SCIM-entry}{#scim-PATCH-Users-user_id__user_department_display-SCIM-entry}{#scim-PATCH-Users-user_id__user_department_value-SCIM-ph}{#scim-PATCH-Users-user_id__user_department_ref-SCIM-entry}{#scim-PATCH-Users-user_id__user_employeeNumber-SCIM-entry}{#scim-PATCH-Users-user_id__user_gender-SCIM-entry}{#scim-PATCH-Users-user_id__user_location-SCIM-entry}{#scim-PATCH-Users-user_id__user_location_display-SCIM-entry}{#scim-PATCH-Users-user_id__user_location_value-SCIM-ph}{#scim-PATCH-Users-user_id__user_location_ref-SCIM-entry}{#scim-PATCH-Users-user_id__user_manager-SCIM-entry}{#scim-PATCH-Users-user_id__user_manager_display-SCIM-entry}{#scim-PATCH-Users-user_id__user_manager_value-SCIM-ph}{#scim-PATCH-Users-user_id__user_manager_ref-SCIM-entry}

| Name | Description |
|-|-|
| company | Details about the user's associated company. Data type: Object "company": { "display": "String", "value": "String", "$ref": "String" } |
| company.display | Name of the company. Data type: String |
| company.value | Sys_id of the company record. Data type: String |
| company.$ref | Reference URI for the company. Data type: String |
| costCenter | Details about the user's associated cost center. Data type: Object "costCenter": { "display": "String", "value": "String", "$ref": "String" } |
| costCenter.display | Name of the cost center. Data type: String |
| costCenter.value | Sys_id of the cost center record. Data type: String |
| costCenter.$ref | Reference URI for the cost center. Data type: String |
| department | Details about the user's associated department. Data type: Object "department": { "display": "String", "value": "String", "$ref": "String" } |
| department.display | Name of the department. Data type: String |
| department.value | Sys_id of the department record. Data type: String |
| department.$ref | Reference URI for the department. Data type: String |
| employeeNumber | Numeric or alphanumeric employee number. Data type: String |
| gender | Gender of the user, such as male or female. Data type: String |
| location | Details about the user's associated location. Data type: Object "location": { "display": "String", "value": "String", "$ref": "String" } |
| location.display | Name of the location. Data type: String |
| location.value | Sys_id of the location record. Data type: String |
| location.$ref | Reference URI for the location. Data type: String |
| manager | Details about the user's associated manager. Data type: Object "manager": { "display": "String", "value": "String", "$ref": "String" } |
| manager.display | Name of the manager. Data type: String |
| manager.value | Sys_id of the manager record. Data type: String |
| manager.$ref | Reference URI for the manager. Data type: String |
[ ]

{#scim-PATCH-Users-user_id__id_hmw_fjk_grb}  

### 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 {#ariaid-title12}

Creates a user record in the User \[sys_user\] table of a ServiceNow instance using the System for Cross-domain Identity Management (SCIM) protocol.
Hinweis:  
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  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-POST-Users__entry__2}{#scim-POST-Users__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Tabelle : 73. Path parameters]

{#scim-POST-Users__entry__6}{#scim-POST-Users__attributes-SCIM-entry}{#scim-POST-Users__excludedAttributes-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't 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. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
[Tabelle : 74. Query parameters]

{#scim-POST-Users__entry__12}{#scim-POST-Users__user_active-SCIM-entry}{#scim-POST-Users__user_addresses-SCIM-entry}{#scim-POST-Users__user_addresses_country-SCIM-entry}{#scim-POST-Users__user_addresses_locality-SCIM-entry}{#scim-POST-Users__user_addresses_postalCode-SCIM-entry}{#scim-POST-Users__user_addresses_region-SCIM-entry}{#scim-POST-Users__user_addresses_streetAddress-SCIM-entry}{#scim-POST-Users__user_addresses_type-SCIM-entry}{#scim-POST-Users__user_displayName-SCIM-entry}{#scim-POST-Users__user_emails-SCIM-entry}{#scim-POST-Users__user_emails_type-SCIM-entry}{#scim-POST-Users__user_emails_value-SCIM-entry}{#scim-POST-Users__user_emails_externalId-SCIM-entry}{#scim-POST-Users__user_name-SCIM-entry}{#scim-POST-Users__user_name_familyName-SCIM-entry}{#scim-POST-Users__user_name_givenName-SCIM-entry}{#scim-POST-Users__user_name_honorificPrefix-SCIM-entry}{#scim-POST-Users__user_name_middle-SCIM-entry}{#scim-POST-Users__user_phoneNumbers-SCIM-entry}{#scim-POST-Users__user_phoneNumbers_type-SCIM-entry}{#scim-POST-Users__user_phoneNumbers_value-SCIM-entry}{#scim-POST-Users__user_preferredLanguage-SCIM-entry}{#scim-POST-Users__user_timezone-SCIM-entry}{#scim-POST-Users__user_title-SCIM-entry}{#scim-POST-Users__user_userType-SCIM-entry}{#scim-POST-Users__user_employeeNumber-SCIM-entry}{#scim-POST-Users__user_gender-SCIM-entry}

| Name | Description |
|-|-|
| active | Flag that indicates whether the associated user is active within the ServiceNow instance. Possible values: * true: User is active. * false: User is inactive. {#scim-POST-Users__ul_glm_qkj_grb} Data type: Boolean |
| addresses | Details of the user's current mailing address. Data type: Object "addresses": { "country": "String", "locality": "String", "postalCode": "String", "region": "String", "streetAddress": "String", "type": "String" } |
| addresses.country | Country name. Data type: String |
| addresses.locality | City or locality name. Data type: String |
| addresses.postalCode | Zip or postal code. Data type: String |
| addresses.region | State or region. Data type: String |
| addresses.streetAddress | Full street address. This can include the house number, street name, PO Box, and multi-line extended street address information. Data type: String |
| addresses.type | Type of address. Currently only supports home. Data type: String |
| displayName | User display name. This value is auto-generated by concatenating the name fields. Data type: String |
| emails | List of email accounts associated with the user. Data type: Array of Objects "emails:" [ { "type": "String", "value": "String" } ] |
| emails.type | User email type. Currently only supports type of "work". Data type: String |
| emails.value | User's email address. This is a unique key for the associated user. Data type: String |
| externalId | Unique identifier assigned to the user by the entity provisioning it. Data type: String |
| name | User's name information. Data type: Object "name": { "familyName": "String", "givenName": "String", "honorificPrefix": "String", "middleName": "String" } |
| name.familyName | User's family or last name. Data type: String |
| name.givenName | User's given or first name. Data type: String |
| name.honorificPrefix | User's honorific name or title, such as Dr., Bishop, or Baron. Data type: String |
| name.middle | User's middle name. Data type: String |
| phoneNumbers | List of phone numbers associated with the user. Data type: Array of Objects "phoneNumbers": [ { "type": "String", "value": "String" } ] |
| phoneNumbers.type | Type of phone number. Possible values: * home * mobile * work {#scim-POST-Users__ul_idb_brj_grb} Data type: String |
| phoneNumbers.value | User's phone number. Data type: String |
| preferredLanguage | User's preferred spoken and written language. Data type: String |
| timezone | User's time zone. Data type: String |
| title | User's title, such as CEO or President. Data type: String |
| userName | Required. Unique user name for the associated user. Data type: String |
| userType | User type. This value is used to identify the organization to user relationship. This can be any value, but typical values might include: * Contractor * Employee * Intern * Temp * External * Unknown {#scim-POST-Users__ul_kdr_nwz_nrb} Data type: String |
| Extended Schema |   |
| company | Details about the user's associated company. Data type: Object "company": { "value": "String" } |
| company.value | Required if company is included in post. Sys_id of the company record. Data type: String |
| costCenter | Details about the user's associated cost center. Data type: Object "costCenter": { "value": "String" } |
| costCenter.value | Required if costCenter is included in post. Sys_id of the cost center record. Data type: String |
| department | Details about the user's associated department. Data type: Object "department": { "value": "String" } |
| department.value | Required if department is included in post. Sys_id of the department record. Data type: String |
| employeeNumber | Numeric or alphanumeric employee number. Data type: String |
| gender | Gender of the user, such as male or female. Data type: String |
| location | Details about the user's associated location. Data type: Object "location": { "value": "String" } |
| location.value | Required if location is included in post. Sys_id of the location record. Data type: String |
| manager | Details about the user's associated manager. Data type: Object "manager": { "value": "String" } |
| manager.value | Required if manager is included in post. Sys_id of the manager record. Data type: String |
[Tabelle : 75. Request body parameters (XML or JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-POST-Users__entry__92}{#scim-POST-Users__Accept-SCIM-entry}{#scim-POST-Users__Content_Type-SCIM-entry}

| 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 |
[Tabelle : 76. Request headers]

{#scim-POST-Users__entry__98}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 77. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-POST-Users__entry__102}{#scim-POST-Users__entry-400-status-code}{#scim-POST-Users__entry-500-status-code}

| Status code | Description |
|-|-|
| 201 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 409 | User already exists. The userName parameter must be unique. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Tabelle : 78. Status codes]

### Response body parameters (JSON or XML)

{#scim-POST-Users__entry__112}{#scim-POST-Users__d3194e1061}{#scim-POST-Users__d3194e1085}{#scim-POST-Users__d3194e1098}{#scim-POST-Users__d3194e1109}{#scim-POST-Users__d3194e1120}{#scim-POST-Users__d3194e1132}{#scim-POST-Users__d3194e1143}{#scim-POST-Users__d3194e1154}{#scim-POST-Users__d3194e1168}{#scim-POST-Users__d3194e1182}{#scim-POST-Users__d3194e1195}{#scim-POST-Users__d3194e1207}{#scim-POST-Users__errors-SCIM-entry}{#scim-POST-Users__errors_details-SCIM-entry}{#scim-POST-Users__errors_scimType-SCIM-entry}{#scim-POST-Users__errors_schemas-SCIM-entry}{#scim-POST-Users__errors_status-SCIM-entry}{#scim-POST-Users__d3194e1218}{#scim-POST-Users__user_groups-SCIM-entry}{#scim-POST-Users__user_groups_display-SCIM-entry}{#scim-POST-Users__user_groups_type-SCIM-entry}{#scim-POST-Users__user_groups_value-SCIM-entry}{#scim-POST-Users__user_groups_ref-SCIM-entry}{#scim-POST-Users__user_id-SCIM-entry}{#scim-POST-Users__user_meta-SCIM-entry}{#scim-POST-Users__user_meta_created-SCIM-entry}{#scim-POST-Users__user_meta_lastModified-SCIM-entry}{#scim-POST-Users__user_meta_location-SCIM-entry}{#scim-POST-Users__user_meta_resourceType-SCIM-entry}{#scim-POST-Users__d3194e1356}{#scim-POST-Users__d3194e1369}{#scim-POST-Users__d3194e1380}{#scim-POST-Users__d3194e1391}{#scim-POST-Users__d3194e1402}{#scim-POST-Users__d3194e1414}{#scim-POST-Users__d3194e1427}{#scim-POST-Users__d3194e1451}{#scim-POST-Users__d3194e1462}{#scim-POST-Users__user_schemas-SCIM-entry}{#scim-POST-Users__d3194e1484}{#scim-POST-Users__d3194e1496}{#scim-POST-Users__user_userName-SCIM-ph}{#scim-POST-Users__d3194e1520}

| Name | Description |
|-|-|
| active | Flag that indicates whether the associated user is active within the ServiceNow instance. Possible values: * true: User is active. * false: User is inactive. {#scim-POST-Users__d3194e1068} Data type: Boolean |
| addresses | Details of the user's current mailing address. Data type: Object "addresses": { "country": "String", "locality": "String", "postalCode": "String", "region": "String", "streetAddress": "String", "type": "String" } |
| addresses.country | Country name. Data type: String |
| addresses.locality | City or locality name. Data type: String |
| addresses.postalCode | Zip or postal code. Data type: String |
| addresses.region | State or region. Data type: String |
| addresses.streetAddress | Full street address. This can include the house number, street name, PO Box, and multi-line extended street address information. Data type: String |
| addresses.type | Type of address. Currently only supports home. Data type: String |
| displayName | User display name. This value is auto-generated by concatenating the name fields. Data type: String |
| emails | List of email accounts associated with the user. Data type: Array of Objects "emails:" [ { "type": "String", "value": "String" } ] |
| emails.type | User email type. Currently only supports type of "work". Data type: String |
| emails.value | User's email address. This is a unique key for the associated user. Data type: String |
| errors | Response that describes any errors that may have occurred during processing the request. Data type: Object "errors": { "details": "String", "schemas": "String", "scimType": "String", "status": "String" } |
| errors.detail | Detailed error message on why the request failed. Data type: String |
| errors.scimType | SCIM error detail keyword. Data type: String |
| errors.schemas | URI of the SCIM Schemas used to process the error response. Data type: Array of Strings |
| errors.status | HTTP status code for the error response. Data type: String |
| externalId | Unique identifier assigned to the user by the entity provisioning it. Data type: String |
| groups | List of groups to which the user belongs, either through direct membership, nested groups, or dynamically calculated. Data type: Array of Objects "groups": [ { "display": "String", "type": "String", "value": "String", "$ref": "String" } ] |
| groups.display | Name of the associated group. Data type: String |
| groups.type | Type of group association, such as direct or indirect. Data type: String |
| groups.value | Sys_id of an associated group record. Data type: String |
| groups.$ref | URI of the associated group. Data type: String |
| id | Sys_id of the associated User record. Data type: String |
| meta | Metadata pertaining to the user. Data type: Object "meta": { "created": "String", "lastModified": "String", "location": String", "resourceType": String" } |
| meta.created | Date and time when the user record was created. Data type: String |
| meta.lastModified | Date and time when the user record was last modified. Data type: String |
| meta.location | URI of the user being retrieved. Data type: String |
| meta.resourceType | SCIM Users' resource type. Data type: String |
| name | User's name information. Data type: Object "name": { "familyName": "String", "givenName": "String", "honorificPrefix": "String", "middleName": "String" } |
| name.familyName | User's family or last name. Data type: String |
| name.givenName | User's given or first name. Data type: String |
| name.honorificPrefix | User's honorific name or title, such as Dr., Bishop, or Baron. Data type: String |
| name.middle | User's middle name. Data type: String |
| phoneNumbers | List of phone numbers associated with the user. Data type: Array of Objects "phoneNumbers": [ { "type": "String", "value": "String" } ] |
| phoneNumbers.type | Type of phone number. Possible values: * home * mobile * work {#scim-POST-Users__d3194e1431} Data type: String |
| phoneNumbers.value | User's phone number. Data type: String |
| preferredLanguage | User's preferred spoken and written language. Data type: String |
| schemas | List of URIs of the SCIM User schemas used to process the request. Data type: Array of Strings |
| timezone | User's time zone. Data type: String |
| title | User's title, such as CEO or President. Data type: String |
| userName | Unique user name for the associated user. Data type: String |
| userType | User type. This value is used to identify the organization to user relationship. This can be any value, but typical values might include: * Contractor * Employee * Intern * Temp * External * Unknown {#scim-POST-Users__d3194e1524} Data type: String |
[ ]

### 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} {#ariaid-title13}

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}  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-PUT-Users-user_id__entry__2}{#scim-PUT-Users-user_id__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. 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. Data type: String Table: User \[sys_user\] |
[Tabelle : 79. Path parameters]

{#scim-PUT-Users-user_id__entry__8}{#scim-PUT-Users-user_id__attributes-SCIM-entry}{#scim-PUT-Users-user_id__excludedAttributes-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't 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. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
[Tabelle : 80. Query parameters]

{#scim-PUT-Users-user_id__entry__14}{#scim-PUT-Users-user_id__user_active-SCIM-entry}{#scim-PUT-Users-user_id__user_addresses-SCIM-entry}{#scim-PUT-Users-user_id__user_addresses_country-SCIM-entry}{#scim-PUT-Users-user_id__user_addresses_locality-SCIM-entry}{#scim-PUT-Users-user_id__user_addresses_postalCode-SCIM-entry}{#scim-PUT-Users-user_id__user_addresses_region-SCIM-entry}{#scim-PUT-Users-user_id__user_addresses_streetAddress-SCIM-entry}{#scim-PUT-Users-user_id__user_addresses_type-SCIM-entry}{#scim-PUT-Users-user_id__user_displayName-SCIM-entry}{#scim-PUT-Users-user_id__user_emails-SCIM-entry}{#scim-PUT-Users-user_id__user_emails_type-SCIM-entry}{#scim-PUT-Users-user_id__user_emails_value-SCIM-entry}{#scim-PUT-Users-user_id__user_emails_externalId-SCIM-entry}{#scim-PUT-Users-user_id__user_name-SCIM-entry}{#scim-PUT-Users-user_id__user_name_familyName-SCIM-entry}{#scim-PUT-Users-user_id__user_name_givenName-SCIM-entry}{#scim-PUT-Users-user_id__user_name_honorificPrefix-SCIM-entry}{#scim-PUT-Users-user_id__user_name_middle-SCIM-entry}{#scim-PUT-Users-user_id__user_phoneNumbers-SCIM-entry}{#scim-PUT-Users-user_id__user_phoneNumbers_type-SCIM-entry}{#scim-PUT-Users-user_id__user_phoneNumbers_value-SCIM-entry}{#scim-PUT-Users-user_id__user_preferredLanguage-SCIM-entry}{#scim-PUT-Users-user_id__user_timezone-SCIM-entry}{#scim-PUT-Users-user_id__user_title-SCIM-entry}{#scim-PUT-Users-user_id__user_userType-SCIM-entry}{#scim-PUT-Users-user_id__user_employeeNumber-SCIM-entry}{#scim-PUT-Users-user_id__user_gender-SCIM-entry}

| Name | Description |
|-|-|
| active | Flag that indicates whether the associated user is active within the ServiceNow instance. Possible values: * true: User is active. * false: User is inactive. {#scim-PUT-Users-user_id__ul_glm_qkj_grb} Data type: Boolean |
| addresses | Details of the user's current mailing address. Data type: Object "addresses": { "country": "String", "locality": "String", "postalCode": "String", "region": "String", "streetAddress": "String", "type": "String" } |
| addresses.country | Country name. Data type: String |
| addresses.locality | City or locality name. Data type: String |
| addresses.postalCode | Zip or postal code. Data type: String |
| addresses.region | State or region. Data type: String |
| addresses.streetAddress | Full street address. This can include the house number, street name, PO Box, and multi-line extended street address information. Data type: String |
| addresses.type | Type of address. Currently only supports home. Data type: String |
| displayName | User display name. This value is auto-generated by concatenating the name fields. Data type: String |
| emails | List of email accounts associated with the user. Data type: Array of Objects "emails:" [ { "type": "String", "value": "String" } ] |
| emails.type | User email type. Currently only supports type of "work". Data type: String |
| emails.value | User's email address. This is a unique key for the associated user. Data type: String |
| externalId | Unique identifier assigned to the user by the entity provisioning it. Data type: String |
| name | User's name information. Data type: Object "name": { "familyName": "String", "givenName": "String", "honorificPrefix": "String", "middleName": "String" } |
| name.familyName | User's family or last name. Data type: String |
| name.givenName | User's given or first name. Data type: String |
| name.honorificPrefix | User's honorific name or title, such as Dr., Bishop, or Baron. Data type: String |
| name.middle | User's middle name. Data type: String |
| phoneNumbers | List of phone numbers associated with the user. Data type: Array of Objects "phoneNumbers": [ { "type": "String", "value": "String" } ] |
| phoneNumbers.type | Type of phone number. Possible values: * home * mobile * work {#scim-PUT-Users-user_id__ul_idb_brj_grb} Data type: String |
| phoneNumbers.value | User's phone number. Data type: String |
| preferredLanguage | User's preferred spoken and written language. Data type: String |
| timezone | User's time zone. Data type: String |
| title | User's title, such as CEO or President. Data type: String |
| userName | Required. Unique user name for the associated user. Data type: String |
| userType | User type. This value is used to identify the organization to user relationship. This can be any value, but typical values might include: * Contractor * Employee * Intern * Temp * External * Unknown {#scim-PUT-Users-user_id__ul_kdr_nwz_nrb} Data type: String |
| Extended Schema |   |
| company | Details about the user's associated company. Data type: Object "company": { "value": "String" } |
| company.value | Required if company is included in post. Sys_id of the company record. Data type: String |
| costCenter | Details about the user's associated cost center. Data type: Object "costCenter": { "value": "String" } |
| costCenter.value | Required if costCenter is included in post. Sys_id of the cost center record. Data type: String |
| department | Details about the user's associated department. Data type: Object "department": { "value": "String" } |
| department.value | Required if department is included in post. Sys_id of the department record. Data type: String |
| employeeNumber | Numeric or alphanumeric employee number. Data type: String |
| gender | Gender of the user, such as male or female. Data type: String |
| location | Details about the user's associated location. Data type: Object "location": { "value": "String" } |
| location.value | Required if location is included in post. Sys_id of the location record. Data type: String |
| manager | Details about the user's associated manager. Data type: Object "manager": { "value": "String" } |
| manager.value | Required if manager is included in post. Sys_id of the manager record. Data type: String |
[Tabelle : 81. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-PUT-Users-user_id__entry__94}{#scim-PUT-Users-user_id__Accept-SCIM-entry}{#scim-PUT-Users-user_id__Content_Type-SCIM-entry}

| 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 |
[Tabelle : 82. Request headers]

{#scim-PUT-Users-user_id__entry__100}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 83. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-PUT-Users-user_id__entry__104}{#scim-PUT-Users-user_id__entry-200-status-code}{#scim-PUT-Users-user_id__entry-404-status-code}{#scim-PUT-Users-user_id__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 404 | Not found. The requested item wasn't found. |
| 409 | User already exists. The userName parameter must be unique. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Tabelle : 84. Status codes]

### Response body parameters (JSON)

{#scim-PUT-Users-user_id__table_mjy_k1l_grb__entry__2}{#scim-PUT-Users-user_id__d3194e1061}{#scim-PUT-Users-user_id__d3194e1085}{#scim-PUT-Users-user_id__d3194e1098}{#scim-PUT-Users-user_id__d3194e1109}{#scim-PUT-Users-user_id__d3194e1120}{#scim-PUT-Users-user_id__d3194e1132}{#scim-PUT-Users-user_id__d3194e1143}{#scim-PUT-Users-user_id__d3194e1154}{#scim-PUT-Users-user_id__d3194e1168}{#scim-PUT-Users-user_id__d3194e1182}{#scim-PUT-Users-user_id__d3194e1195}{#scim-PUT-Users-user_id__d3194e1207}{#scim-PUT-Users-user_id__errors-SCIM-entry}{#scim-PUT-Users-user_id__errors_details-SCIM-entry}{#scim-PUT-Users-user_id__errors_scimType-SCIM-entry}{#scim-PUT-Users-user_id__errors_schemas-SCIM-entry}{#scim-PUT-Users-user_id__errors_status-SCIM-entry}{#scim-PUT-Users-user_id__d3194e1218}{#scim-PUT-Users-user_id__user_groups-SCIM-entry}{#scim-PUT-Users-user_id__user_groups_display-SCIM-entry}{#scim-PUT-Users-user_id__user_groups_type-SCIM-entry}{#scim-PUT-Users-user_id__user_groups_value-SCIM-entry}{#scim-PUT-Users-user_id__user_groups_ref-SCIM-entry}{#scim-PUT-Users-user_id__user_id-SCIM-entry}{#scim-PUT-Users-user_id__user_meta-SCIM-entry}{#scim-PUT-Users-user_id__user_meta_created-SCIM-entry}{#scim-PUT-Users-user_id__user_meta_lastModified-SCIM-entry}{#scim-PUT-Users-user_id__user_meta_location-SCIM-entry}{#scim-PUT-Users-user_id__user_meta_resourceType-SCIM-entry}{#scim-PUT-Users-user_id__d3194e1356}{#scim-PUT-Users-user_id__d3194e1369}{#scim-PUT-Users-user_id__d3194e1380}{#scim-PUT-Users-user_id__d3194e1391}{#scim-PUT-Users-user_id__d3194e1402}{#scim-PUT-Users-user_id__d3194e1414}{#scim-PUT-Users-user_id__d3194e1427}{#scim-PUT-Users-user_id__d3194e1451}{#scim-PUT-Users-user_id__d3194e1462}{#scim-PUT-Users-user_id__user_schemas-SCIM-entry}{#scim-PUT-Users-user_id__d3194e1484}{#scim-PUT-Users-user_id__d3194e1496}{#scim-PUT-Users-user_id__user_userName-SCIM-ph}{#scim-PUT-Users-user_id__d3194e1520}

| Name | Description |
|-|-|
| active | Flag that indicates whether the associated user is active within the ServiceNow instance. Possible values: * true: User is active. * false: User is inactive. {#scim-PUT-Users-user_id__d3194e1068} Data type: Boolean |
| addresses | Details of the user's current mailing address. Data type: Object "addresses": { "country": "String", "locality": "String", "postalCode": "String", "region": "String", "streetAddress": "String", "type": "String" } |
| addresses.country | Country name. Data type: String |
| addresses.locality | City or locality name. Data type: String |
| addresses.postalCode | Zip or postal code. Data type: String |
| addresses.region | State or region. Data type: String |
| addresses.streetAddress | Full street address. This can include the house number, street name, PO Box, and multi-line extended street address information. Data type: String |
| addresses.type | Type of address. Currently only supports home. Data type: String |
| displayName | User display name. This value is auto-generated by concatenating the name fields. Data type: String |
| emails | List of email accounts associated with the user. Data type: Array of Objects "emails:" [ { "type": "String", "value": "String" } ] |
| emails.type | User email type. Currently only supports type of "work". Data type: String |
| emails.value | User's email address. This is a unique key for the associated user. Data type: String |
| errors | Response that describes any errors that may have occurred during processing the request. Data type: Object "errors": { "details": "String", "schemas": "String", "scimType": "String", "status": "String" } |
| errors.detail | Detailed error message on why the request failed. Data type: String |
| errors.scimType | SCIM error detail keyword. Data type: String |
| errors.schemas | URI of the SCIM Schemas used to process the error response. Data type: Array of Strings |
| errors.status | HTTP status code for the error response. Data type: String |
| externalId | Unique identifier assigned to the user by the entity provisioning it. Data type: String |
| groups | List of groups to which the user belongs, either through direct membership, nested groups, or dynamically calculated. Data type: Array of Objects "groups": [ { "display": "String", "type": "String", "value": "String", "$ref": "String" } ] |
| groups.display | Name of the associated group. Data type: String |
| groups.type | Type of group association, such as direct or indirect. Data type: String |
| groups.value | Sys_id of an associated group record. Data type: String |
| groups.$ref | URI of the associated group. Data type: String |
| id | Sys_id of the associated User record. Data type: String |
| meta | Metadata pertaining to the user. Data type: Object "meta": { "created": "String", "lastModified": "String", "location": String", "resourceType": String" } |
| meta.created | Date and time when the user record was created. Data type: String |
| meta.lastModified | Date and time when the user record was last modified. Data type: String |
| meta.location | URI of the user being retrieved. Data type: String |
| meta.resourceType | SCIM Users' resource type. Data type: String |
| name | User's name information. Data type: Object "name": { "familyName": "String", "givenName": "String", "honorificPrefix": "String", "middleName": "String" } |
| name.familyName | User's family or last name. Data type: String |
| name.givenName | User's given or first name. Data type: String |
| name.honorificPrefix | User's honorific name or title, such as Dr., Bishop, or Baron. Data type: String |
| name.middle | User's middle name. Data type: String |
| phoneNumbers | List of phone numbers associated with the user. Data type: Array of Objects "phoneNumbers": [ { "type": "String", "value": "String" } ] |
| phoneNumbers.type | Type of phone number. Possible values: * home * mobile * work {#scim-PUT-Users-user_id__d3194e1431} Data type: String |
| phoneNumbers.value | User's phone number. Data type: String |
| preferredLanguage | User's preferred spoken and written language. Data type: String |
| schemas | List of URIs of the SCIM User schemas used to process the request. Data type: Array of Strings |
| timezone | User's time zone. Data type: String |
| title | User's title, such as CEO or President. Data type: String |
| userName | Unique user name for the associated user. Data type: String |
| userType | User type. This value is used to identify the organization to user relationship. This can be any value, but typical values might include: * Contractor * Employee * Intern * Temp * External * Unknown {#scim-PUT-Users-user_id__d3194e1524} Data type: String |
[ ]

{#scim-PUT-Users-user_id__table_mjy_k1l_grb}

### Extension parameters returned {#scim-PUT-Users-user_id__section_vb2_yny_jlb}

{#scim-PUT-Users-user_id__id_hmw_fjk_grb__entry__2}{#scim-PUT-Users-user_id__user_company-SCIM-entry}{#scim-PUT-Users-user_id__user_company_display-SCIM-entry}{#scim-PUT-Users-user_id__user_company_value-SCIM-ph}{#scim-PUT-Users-user_id__user_company_ref-SCIM-entry}{#scim-PUT-Users-user_id__user_costCenter-SCIM-entry}{#scim-PUT-Users-user_id__user_costCenter_display-SCIM-entry}{#scim-PUT-Users-user_id__user_costCenter_value-SCIM-ph}{#scim-PUT-Users-user_id__user_costCenter_ref-SCIM-entry}{#scim-PUT-Users-user_id__user_department-SCIM-entry}{#scim-PUT-Users-user_id__user_department_display-SCIM-entry}{#scim-PUT-Users-user_id__user_department_value-SCIM-ph}{#scim-PUT-Users-user_id__user_department_ref-SCIM-entry}{#scim-PUT-Users-user_id__d3194e1725}{#scim-PUT-Users-user_id__d3194e1736}{#scim-PUT-Users-user_id__user_location-SCIM-entry}{#scim-PUT-Users-user_id__user_location_display-SCIM-entry}{#scim-PUT-Users-user_id__user_location_value-SCIM-ph}{#scim-PUT-Users-user_id__user_location_ref-SCIM-entry}{#scim-PUT-Users-user_id__user_manager-SCIM-entry}{#scim-PUT-Users-user_id__user_manager_display-SCIM-entry}{#scim-PUT-Users-user_id__user_manager_value-SCIM-ph}{#scim-PUT-Users-user_id__user_manager_ref-SCIM-entry}

| Name | Description |
|-|-|
| company | Details about the user's associated company. Data type: Object "company": { "display": "String", "value": "String", "$ref": "String" } |
| company.display | Name of the company. Data type: String |
| company.value | Sys_id of the company record. Data type: String |
| company.$ref | Reference URI for the company. Data type: String |
| costCenter | Details about the user's associated cost center. Data type: Object "costCenter": { "display": "String", "value": "String", "$ref": "String" } |
| costCenter.display | Name of the cost center. Data type: String |
| costCenter.value | Sys_id of the cost center record. Data type: String |
| costCenter.$ref | Reference URI for the cost center. Data type: String |
| department | Details about the user's associated department. Data type: Object "department": { "display": "String", "value": "String", "$ref": "String" } |
| department.display | Name of the department. Data type: String |
| department.value | Sys_id of the department record. Data type: String |
| department.$ref | Reference URI for the department. Data type: String |
| employeeNumber | Numeric or alphanumeric employee number. Data type: String |
| gender | Gender of the user, such as male or female. Data type: String |
| location | Details about the user's associated location. Data type: Object "location": { "display": "String", "value": "String", "$ref": "String" } |
| location.display | Name of the location. Data type: String |
| location.value | Sys_id of the location record. Data type: String |
| location.$ref | Reference URI for the location. Data type: String |
| manager | Details about the user's associated manager. Data type: Object "manager": { "display": "String", "value": "String", "$ref": "String" } |
| manager.display | Name of the manager. Data type: String |
| manager.value | Sys_id of the manager record. Data type: String |
| manager.$ref | Reference URI for the manager. Data type: String |
[ ]

{#scim-PUT-Users-user_id__id_hmw_fjk_grb}  

### 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 {#ariaid-title14}

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  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-GET-ResourceTypes__entry__2}{#scim-GET-ResourceTypes__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Tabelle : 85. Path parameters]

{#scim-GET-ResourceTypes__entry__6}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 86. Query parameters]

{#scim-GET-ResourceTypes__entry__10}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 87. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-ResourceTypes__entry__14}{#scim-GET-ResourceTypes__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 88. Request headers]

{#scim-GET-ResourceTypes__entry__18}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 89. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-ResourceTypes__entry__22}{#scim-GET-ResourceTypes__entry-200-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
[Tabelle : 90. Status codes]

### Response body parameters (JSON)

{#scim-GET-ResourceTypes__id_avz_rp3_3rb__entry__2}{#scim-GET-ResourceTypes__itemsPerPage-SCIM-entry}{#scim-GET-ResourceTypes__description-SCIM-entry}{#scim-GET-ResourceTypes__endpoint-SCIM-entry}{#scim-GET-ResourceTypes__id-SCIM-entry}{#scim-GET-ResourceTypes__meta-SCIM-entry}{#scim-GET-ResourceTypes__meta_location-SCIM-entry}{#scim-GET-ResourceTypes__meta_resourceType-SCIM-entry}{#scim-GET-ResourceTypes__name-SCIM-entry}{#scim-GET-ResourceTypes__schema-SCIM-entry}{#scim-GET-ResourceTypes__schemas-SCIM-entry}{#scim-GET-ResourceTypes__schemaExtensions-SCIM-entry}{#scim-GET-ResourceTypes__schemaExtensions_required-SCIM-entry}{#scim-GET-ResourceTypes__schemaExtensions_schema-SCIM-entry}{#scim-GET-ResourceTypes__schemas2-SCIM-entry}{#scim-GET-ResourceTypes__startIndex-SCIM-entry}{#scim-GET-ResourceTypes__totalResults-SCIM-entry}

| Name | Description |
|-|-|
| itemsPerPage | Number of records returned in the return results. Data type: Number |
| Resources | List of available resource types. Data type: Array of Objects "Resources": [ { "description": "String", "endpoint": "String", "id": "String", "meta": {Object}, "name": "String", "schema": "String" "schemas": [Array], "schemaExtensions": [Array] } ] |
| Resources.description | Brief description of the resource type. Data type: String |
| Resources.endpoint | Name of the HTTP-addressable endpoint relative to the Base URL of the service provider, for example "Users". Data type: String |
| Resources.id | Unique identifier for the resource. Use this attribute when calling GET /scim/ResourceType/{resource_id} endpoint. Data type: String |
| Resources.meta | Information that further describes the associated resource. Data type: Object "metadata": { "location": "String", "resourceType": "String" } |
| Resources.meta.location | URI of the associated resource type on the associated ServiceNow instance. Data type: String |
| Resources.meta.resourceType | Always "ResourceType". Data type: String |
| Resources.name | Name of the resource type, such as User or Group. Data type: String |
| Resources.schema | Resource type's primary/base schema URI. For example: `"urn:ietf:params:scim:schemas:core:2.0:User"`. Data type: String |
| Resources.schemas | Schema used to process the `/ResourceType` request. For example: `"urn:ietf:params:scim:schemas:core:2.0:ResourceType"`. Data type: String |
| Resources.schemaExtensions | List of schema extensions that apply to the associated resource type. For example: `"urn:ietf:params:scim:schemas:extension: servicenow:2.0:User"`. Data type: Array of Object "schemaExtensions": { "required": Boolean, "schema": "String" } |
| Resources.schemaExtensions.required | Flag that indicates whether the schema extension is required for the resource type. Possible values: * true: A resource of this type must include this schema extension and also include any attributes declared as required in this schema extension. * false: A resource of this type may omit this schema extension. {#scim-GET-ResourceTypes__ul_nng_2p3_3rb} Data type: Boolean |
| Resources.schemaExtensions.schema | URI of an extended schema. For example: `"urn:ietf:params:scim:schemas:extension:servicenow: 2.0:User"`. Data type: String |
| schemas | Schema used to process the list response to the request. For example: `"urn:ietf:params:scim:api:messages:2.0:ListResponse"` Data type: String |
| startIndex | One-based index into the Resource table at which records were retrieved. Data type: String |
| totalResults | Total number of records that match the request. Data type: Number |
[ ]

{#scim-GET-ResourceTypes__id_avz_rp3_3rb}  

### 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} {#ariaid-title15}

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}  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-GET-ResourceTypes-ResourceName__entry__2}{#scim-GET-ResourceTypes-ResourceName__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. 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 {#scim-GET-ResourceTypes-ResourceName__ul_vml_qr3_3rb} Data type: String |
[Tabelle : 91. Path parameters]

{#scim-GET-ResourceTypes-ResourceName__entry__8}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 92. Query parameters]

{#scim-GET-ResourceTypes-ResourceName__entry__12}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 93. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-ResourceTypes-ResourceName__entry__16}{#scim-GET-ResourceTypes-ResourceName__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 94. Request headers]

{#scim-GET-ResourceTypes-ResourceName__entry__20}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 95. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-ResourceTypes-ResourceName__entry__24}{#scim-GET-ResourceTypes-ResourceName__entry-200-status-code}{#scim-GET-ResourceTypes-ResourceName__entry-404-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 404 | Not found. The requested item wasn't found. |
[Tabelle : 96. Status codes]

### Response body parameters (JSON)

{#scim-GET-ResourceTypes-ResourceName__id_avz_rp3_3rb__entry__2}

| Name | Description |
|-|-|
| description | Brief description of the resource type. Data type: String |
| endpoint | Name of the HTTP-addressable endpoint relative to the Base URL of the service provider, for example "Companies". Data type: String |
| id | Unique identifier for the resource. Use this attribute when calling GET /scim/ResourceType/{resource_id} endpoint. Data type: String |
| meta | Information that further describes the associated resource. Data type: Object "metadata": { "location": "String", "resourceType": "String" } |
| meta.location | URI of the associated resource type on the associated ServiceNow instance. Data type: String |
| meta.resourceType | Always "ResourceType". Data type: String |
| name | Name of the resource type, such as User or Group. Data type: String |
| schema | Resource type's primary/base schema URI. For example: `"urn:ietf:params:scim:schemas:core:2.0:User"`. Data type: String |
| schemas | Schema used to process the `/ResourceType` request. For example: `"urn:ietf:params:scim:schemas:core:2.0:ResourceType"`. Data type: String |
| schemaExtensions | List of schema extensions that apply to the associated resource type. For example: `"urn:ietf:params:scim:schemas:extension: servicenow:2.0:User"`. Data type: Array of Object "schemaExtensions": { "required": Boolean, "schema": "String" } |
| schemaExtensions.required | Flag that indicates whether the schema extension is required for the resource type. Possible values: * true: A resource of this type must include this schema extension and also include any attributes declared as required in this schema extension. * false: A resource of this type may omit this schema extension. {#scim-GET-ResourceTypes-ResourceName__ul_nng_2p3_3rb} Data type: Boolean |
| schemaExtensions.schema | URI of an extended schema. For example: `"urn:ietf:params:scim:schemas:extension:servicenow: 2.0:User"`. Data type: String |
| schemas | Schema used to process the list response to the request. For example: `"urn:ietf:params:scim:api:messages:2.0:ListResponse"` Data type: String |
[ ]

{#scim-GET-ResourceTypes-ResourceName__id_avz_rp3_3rb}  

### 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 {#ariaid-title16}

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  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-GET-Schemas__entry__2}{#scim-GET-Schemas__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Tabelle : 97. Path parameters]

{#scim-GET-Schemas__entry__6}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 98. Query parameters]

{#scim-GET-Schemas__entry__10}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 99. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Schemas__entry__14}{#scim-GET-Schemas__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 100. Request headers]

{#scim-GET-Schemas__entry__18}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 101. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Schemas__entry__22}{#scim-GET-Schemas__entry-200-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
[Tabelle : 102. Status codes]

### Response body parameters (JSON)

{#scim-GET-Schemas__entry__26}

| Name | Description |
|-|-|
| Standard RFC7643 return results | Method returns results in compliance with the RFC7643 standard. For details see [Schema Definition](https://datatracker.ietf.org/doc/html/rfc7643#section-7) in the RFC7643 specification. |
[ ]

### 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} {#ariaid-title17}

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}  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-GET-Schemas-SchemaName__entry__2}{#scim-GET-Schemas-SchemaName__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. 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 |
[Tabelle : 103. Path parameters]

{#scim-GET-Schemas-SchemaName__entry__8}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 104. Query parameters]

{#scim-GET-Schemas-SchemaName__entry__12}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 105. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Schemas-SchemaName__entry__16}{#scim-GET-Schemas-SchemaName__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 106. Request headers]

{#scim-GET-Schemas-SchemaName__entry__20}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 107. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Schemas-SchemaName__entry__24}{#scim-GET-Schemas-SchemaName__entry-200-status-code}{#scim-GET-Schemas-SchemaName__entry-404-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 404 | Not found. The requested item wasn't found. |
[Tabelle : 108. Status codes]

### Response body parameters (JSON)

{#scim-GET-Schemas-SchemaName__entry__30}

| Name | Description |
|-|-|
| Standard RFC7643 return results | Method returns results in compliance with the RFC7643 standard. For details see [Schema Definition](https://datatracker.ietf.org/doc/html/rfc7643#section-7) in the RFC7643 specification. |
[ ]

### 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 {#ariaid-title18}

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  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-GET-ServiceProviderConfig__entry__2}{#scim-GET-ServiceProviderConfig__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Tabelle : 109. Path parameters]

{#scim-GET-ServiceProviderConfig__entry__6}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 110. Query parameters]

{#scim-GET-ServiceProviderConfig__entry__10}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 111. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-ServiceProviderConfig__entry__14}{#scim-GET-ServiceProviderConfig__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 112. Request headers]

{#scim-GET-ServiceProviderConfig__entry__18}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 113. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-ServiceProviderConfig__entry__22}{#scim-GET-ServiceProviderConfig__entry-200-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
[Tabelle : 114. Status codes]

### Response body parameters (JSON)

{#scim-GET-ServiceProviderConfig__entry__26}

| Name | Description |
|-|-|
| Standard RFC7643 return results | Method returns results in compliance with the RFC7643 standard. For details see [Service Provider Configuration Schema](https://datatracker.ietf.org/doc/html/rfc7643#section-5) in the RFC7643 specification. |
[ ]

### 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 {#ariaid-title19}

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.
Hinweis:  
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  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-GET-Companies__entry__2}{#scim-GET-Companies__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Tabelle : 115. Path parameters]

{#scim-GET-Companies__entry__6}{#scim-GET-Companies__attributes-SCIM-entry}{#scim-GET-Companies__count-SCIM-entry}{#scim-GET-Companies__excludedAttributes-SCIM-entry}{#scim-GET-Companies__group_sortBy-SCIM-entry}{#scim-GET-Companies__sortOrder-SCIM-entry}{#scim-GET-Companies__group_startIndex-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't be used with the excludedAttributes parameter. Data type: String Default: Return all fields unless excludedAttributes is specified. |
| count | Number of records to return. A negative value is interpreted as zero. Data type: Number Maximum: 500 - A value greater than this results in a bad request error. Default: 10 |
| excludedAttributes | Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
| filter | Filter expression to apply to the return results. Field filters are expressed as `<field_name> <operator> <"value">`. Refer to [RFC7644](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2) for a list of the valid operators. Hinweis: The `NOT` operator is not supported by this method. For example, to filter for all companies whose name starts with "Acme", enter `displayName SW "Acme"`. To specify more than one field filter, concatenate the filters using the `AND` operand. For example, to filter for all companies whose name starts with "Acme" and were last modified before October 3, 2021, enter `displayName SW "Acme" AND meta.lastModified lt "2021-10-03T00:00:00Z"`. Use dot-walking to specify nested attributes. Data type: String Default: No filtering |
| sortBy | Must be specified with the sortOrder parameter. Field by which to sort the return results. Sorting is case-insensitive. You can only use those parameters available for filtering for the sortBy parameter, except that externalId is not allowed. For values that are null: * sorted by ascending: Null values are sorted to the top. * sorted by descending: Null values are sorted to the bottom. {#scim-GET-Companies__ul_xsb_zmm_hrb} Data type: String Default: No sort |
| sortOrder | Must be specified with the sortBy parameter. Order in which the sortBy parameter is applied to the return results. Valid values: * ascending * descending {#scim-GET-Companies__ul_mmn_zrc_grb} Data type: String Default: ascending |
| startIndex | One-based index into the table at which to start retrieving records. For example, if you set this parameter to 100, and the count parameter to 20, the endpoint returns records 100 through 119. Hinweis: Any value that is set to less than one is interpreted as one. Data type: String Default: 1 |
[Tabelle : 116. Query parameters]

{#scim-GET-Companies__entry__22}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 117. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Companies__entry__26}{#scim-GET-Companies__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 118. Request headers]

{#scim-GET-Companies__entry__30}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 119. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Companies__entry__34}{#scim-GET-Companies__entry-200-status-code}{#scim-GET-Companies__status_400-SCIM-entry}{#scim-GET-Companies__entry-401-status-code}

| 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. {#scim-GET-Companies__ul_vn1_gvz_nrb} |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
[Tabelle : 120. Status codes]

### Response body parameters (JSON)

{#scim-GET-Companies__id_uwg_55q_3rb__entry__2}{#scim-GET-Companies__itemsPerPage-SCIM-entry}{#scim-GET-Companies__totalResults-SCIM-entry}

| Name | Description |
|-|-|
| itemsPerPage | Number of records returned in the return results. Data type: Number |
| Resources | List of returned cost center records. Data type: Object "Resources": { "id": "String", "meta": {Object}, "name": "String", "schemas": "String" } |
| Resources.id | Sys_id of the company record. Data type: String |
| Resources.meta | Information pertaining to the company record. Data type: Object "meta": { "created": "String", "lastModified": "String", "location": "String", "resourcType": "String" } |
| Resources.meta.created | Date and time the associated company record was created. Data type: String |
| Resources.meta.lastModified | Date and time the associated company record was last modified. Data type: String |
| Resources.meta.location | URI of the associated company record. Data type: String |
| Resources.meta.resourceType | SCIM resource type; always Company. Data type: String |
| Resources.name | Company name. Data type: String |
| Resources.schemas | Schema used when processing the request. Data type: String |
| schemas | Schema used to process the list response to the request. For example: `"urn:ietf:params:scim:api:messages:2.0:ListResponse"` Data type: String |
| startIndex | One-based index into the Company \[core_company\] table at which the records were returned. Data type: String |
| totalResults | Total number of records that match the request. Data type: Number |
[ ]

{#scim-GET-Companies__id_uwg_55q_3rb}  

### 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} {#ariaid-title20}

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.
<br />

### URL format

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

Default URL:
/api/now/scim/Groups/{company_id}  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-GET-Companies-company_id__entry__2}{#scim-GET-Companies-company_id__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. 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 |
[Tabelle : 121. Path parameters]

{#scim-GET-Companies-company_id__entry__8}{#scim-GET-Companies-company_id__attributes-SCIM-entry}{#scim-GET-Companies-company_id__excludedAttributes-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't 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. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
[Tabelle : 122. Query parameters]

{#scim-GET-Companies-company_id__entry__14}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 123. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Companies-company_id__entry__18}{#scim-GET-Companies-company_id__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 124. Request headers]

{#scim-GET-Companies-company_id__entry__22}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 125. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Companies-company_id__entry__26}{#scim-GET-Companies-company_id__entry-200-status-code}{#scim-GET-Companies-company_id__status_400-SCIM-entry}{#scim-GET-Companies-company_id__entry-401-status-code}{#scim-GET-Companies-company_id__entry-404-status-code}

| 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. {#scim-GET-Companies-company_id__ul_vn1_gvz_nrb} |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 404 | Not found. The requested item wasn't found. |
[Tabelle : 126. Status codes]

### Response body parameters (JSON)

{#scim-GET-Companies-company_id__id_mvt_mbq_3rb__entry__2}{#scim-GET-Companies-company_id__id-company-SCIM-entry}{#scim-GET-Companies-company_id__meta-company-SCIM-entry}{#scim-GET-Companies-company_id__meta_created-company-SCIM-entry}{#scim-GET-Companies-company_id__meta_lastModified-company-SCIM-entry}{#scim-GET-Companies-company_id__meta_location-company-SCIM-entry}{#scim-GET-Companies-company_id__meta_resourceType-company-SCIM-entry}{#scim-GET-Companies-company_id__name-company-SCIM-entry}{#scim-GET-Companies-company_id__schemas-company-SCIM-entry}

| Name | Description |
|-|-|
| id | Sys_id of the company record. Data type: String |
| meta | Information pertaining to the company record. Data type: Object "meta": { "created": "String", "lastModified": "String", "location": "String", "resourcType": "String" } |
| meta.created | Date and time the associated company record was created. Data type: String |
| meta.lastModified | Date and time the associated company record was last modified. Data type: String |
| meta.location | URI of the associated company record. Data type: String |
| meta.resourceType | SCIM resource type; always Company. Data type: String |
| name | Company name. Data type: String |
| schemas | Schema used when processing the request. Data type: String |
[ ]

{#scim-GET-Companies-company_id__id_mvt_mbq_3rb}  

### 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 {#ariaid-title21}

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.
Hinweis:  
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  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-GET-CostCenters__entry__2}{#scim-GET-CostCenters__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Tabelle : 127. Path parameters]

{#scim-GET-CostCenters__entry__6}{#scim-GET-CostCenters__attributes-SCIM-entry}{#scim-GET-CostCenters__count-SCIM-entry}{#scim-GET-CostCenters__excludedAttributes-SCIM-entry}{#scim-GET-CostCenters__group_sortBy-SCIM-entry}{#scim-GET-CostCenters__sortOrder-SCIM-entry}{#scim-GET-CostCenters__group_startIndex-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't be used with the excludedAttributes parameter. Data type: String Default: Return all fields unless excludedAttributes is specified. |
| count | Number of records to return. A negative value is interpreted as zero. Data type: Number Maximum: 500 - A value greater than this results in a bad request error. Default: 10 |
| excludedAttributes | Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
| filter | Filter expression to apply to the return results. Field filters are expressed as `<field_name> <operator> <"value">`. Refer to [RFC7644](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2) for a list of the valid operators. Hinweis: The `NOT` operator is not supported by this method. For example, to filter for all cost center whose name starts with "HR", enter `displayName SW "HR"`. To specify more than one field filter, concatenate the filters using the `AND` operand. For example, to filter for all cost center whose name starts with "HR" and were last modified before October 3, 2021, enter `displayName SW "HR" AND meta.lastModified lt "2021-10-03T00:00:00Z"`. Use dot-walking to specify nested attributes. Data type: String Default: No filtering |
| sortBy | Must be specified with the sortOrder parameter. Field by which to sort the return results. Sorting is case-insensitive. You can only use those parameters available for filtering for the sortBy parameter, except that externalId is not allowed. For values that are null: * sorted by ascending: Null values are sorted to the top. * sorted by descending: Null values are sorted to the bottom. {#scim-GET-CostCenters__ul_xsb_zmm_hrb} Data type: String Default: No sort |
| sortOrder | Must be specified with the sortBy parameter. Order in which the sortBy parameter is applied to the return results. Valid values: * ascending * descending {#scim-GET-CostCenters__ul_mmn_zrc_grb} Data type: String Default: ascending |
| startIndex | One-based index into the table at which to start retrieving records. For example, if you set this parameter to 100, and the count parameter to 20, the endpoint returns records 100 through 119. Hinweis: Any value that is set to less than one is interpreted as one. Data type: String Default: 1 |
[Tabelle : 128. Query parameters]

{#scim-GET-CostCenters__entry__22}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 129. Request body parameters (SON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-CostCenters__entry__26}{#scim-GET-CostCenters__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 130. Request headers]

{#scim-GET-CostCenters__entry__30}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 131. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-CostCenters__entry__34}{#scim-GET-CostCenters__entry-200-status-code}{#scim-GET-CostCenters__status_400-SCIM-entry}{#scim-GET-CostCenters__entry-401-status-code}

| 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. {#scim-GET-CostCenters__ul_vn1_gvz_nrb} |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
[Tabelle : 132. Status codes]

### Response body parameters (JSON)

{#scim-GET-CostCenters__id_tld_hxq_3rb__entry__2}{#scim-GET-CostCenters__itemsPerPage-SCIM-entry}{#scim-GET-CostCenters__totalResults-SCIM-entry}

| Name | Description |
|-|-|
| itemsPerPage | Number of records returned in the return results. Data type: Number |
| Resources | List of returned cost center records. Data type: Object "Resources": { "id": "String", "meta": {Object}, "name": "String", "schemas": "String" } |
| Resources.id | Sys_id of the cost center record. Data type: String |
| Resources.meta | Information pertaining to the cost center record. Data type: Object "meta": { "created": "String", "lastModified": "String", "location": "String", "resourcType": "String" } |
| Resources.meta.created | Date and time the associated cost center record was created. Data type: String |
| Resources.meta.lastModified | Date and time the associated cost center record was last modified. Data type: String |
| Resources.meta.location | URI of the associated cost center record. Data type: String |
| Resources.meta.resourceType | SCIM resource type; always CostCenter. Data type: String |
| Resources.name | Cost center name. Data type: String |
| Resources.schemas | Schema used when processing the request. Data type: String |
| schemas | Schema used to process the list response to the request. For example: `"urn:ietf:params:scim:api:messages:2.0:ListResponse"` Data type: String |
| startIndex | One-based index into the Cost Center \[cmn_cost_center\] table at which the records were returned. Data type: String |
| totalResults | Total number of records that match the request. Data type: Number |
[ ]

{#scim-GET-CostCenters__id_tld_hxq_3rb}  

### 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} {#ariaid-title22}

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.
Hinweis:  
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}  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-GET-CostCenters-cost_center_id__entry__2}{#scim-GET-CostCenters-cost_center_id__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. 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 |
[Tabelle : 133. Path parameters]

{#scim-GET-CostCenters-cost_center_id__entry__8}{#scim-GET-CostCenters-cost_center_id__attributes-SCIM-entry}{#scim-GET-CostCenters-cost_center_id__excludedAttributes-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't 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. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
[Tabelle : 134. Query parameters]

{#scim-GET-CostCenters-cost_center_id__entry__14}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 135. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-CostCenters-cost_center_id__entry__18}{#scim-GET-CostCenters-cost_center_id__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 136. Request headers]

{#scim-GET-CostCenters-cost_center_id__entry__22}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 137. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-CostCenters-cost_center_id__entry__26}{#scim-GET-CostCenters-cost_center_id__entry-200-status-code}{#scim-GET-CostCenters-cost_center_id__status_400-SCIM-entry}{#scim-GET-CostCenters-cost_center_id__entry-401-status-code}{#scim-GET-CostCenters-cost_center_id__entry-404-status-code}

| 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. {#scim-GET-CostCenters-cost_center_id__ul_vn1_gvz_nrb} |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 404 | Not found. The requested item wasn't found. |
[Tabelle : 138. Status codes]

### Response body parameters (JSON)

{#scim-GET-CostCenters-cost_center_id__id_tld_hxq_3rb__entry__2}{#scim-GET-CostCenters-cost_center_id__id-costcenter-SCIM-entry}{#scim-GET-CostCenters-cost_center_id__meta-costcenter-SCIM-entry}{#scim-GET-CostCenters-cost_center_id__meta_created-costcenter-SCIM-entry}{#scim-GET-CostCenters-cost_center_id__meta_lastModified-costcenter-SCIM-entry}{#scim-GET-CostCenters-cost_center_id__meta_location-costcenter-SCIM-entry}{#scim-GET-CostCenters-cost_center_id__meta_resourceType-costcenter-SCIM-entry}{#scim-GET-CostCenters-cost_center_id__name-costcenter-SCIM-entry}{#scim-GET-CostCenters-cost_center_id__schemas-costcenter-SCIM-entry}

| Name | Description |
|-|-|
| id | Sys_id of the cost center record. Data type: String |
| meta | Information pertaining to the cost center record. Data type: Object "meta": { "created": "String", "lastModified": "String", "location": "String", "resourcType": "String" } |
| meta.created | Date and time the associated cost center record was created. Data type: String |
| meta.lastModified | Date and time the associated cost center record was last modified. Data type: String |
| meta.location | URI of the associated cost center record. Data type: String |
| meta.resourceType | SCIM resource type; always CostCenter. Data type: String |
| name | Cost center name. Data type: String |
| schemas | Schema used when processing the request. Data type: String |
[ ]

{#scim-GET-CostCenters-cost_center_id__id_tld_hxq_3rb}  

### 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 {#ariaid-title23}

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.
Hinweis:  
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  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-GET-Departments__entry__2}{#scim-GET-Departments__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Tabelle : 139. Path parameters]

{#scim-GET-Departments__entry__6}{#scim-GET-Departments__attributes-SCIM-entry}{#scim-GET-Departments__count-SCIM-entry}{#scim-GET-Departments__excludedAttributes-SCIM-entry}{#scim-GET-Departments__group_sortBy-SCIM-entry}{#scim-GET-Departments__sortOrder-SCIM-entry}{#scim-GET-Departments__group_startIndex-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't be used with the excludedAttributes parameter. Data type: String Default: Return all fields unless excludedAttributes is specified. |
| count | Number of records to return. A negative value is interpreted as zero. Data type: Number Maximum: 500 - A value greater than this results in a bad request error. Default: 10 |
| excludedAttributes | Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
| filter | Filter expression to apply to the return results. Field filters are expressed as `<field_name> <operator> <"value">`. Refer to [RFC7644](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2) for a list of the valid operators. Hinweis: The `NOT` operator is not supported by this method. For example, to filter for all departments whose name starts with "Engineer", enter `displayName SW "Engineer"`. To specify more than one field filter, concatenate the filters using the `AND` operand. For example, to filter for all departments whose name starts with "Engineer" and were last modified before October 3, 2021, enter `displayName SW "Engineer" AND meta.lastModified lt "2021-10-03T00:00:00Z"`. Use dot-walking to specify nested attributes. Data type: String Default: No filtering |
| sortBy | Must be specified with the sortOrder parameter. Field by which to sort the return results. Sorting is case-insensitive. You can only use those parameters available for filtering for the sortBy parameter, except that externalId is not allowed. For values that are null: * sorted by ascending: Null values are sorted to the top. * sorted by descending: Null values are sorted to the bottom. {#scim-GET-Departments__ul_xsb_zmm_hrb} Data type: String Default: No sort |
| sortOrder | Must be specified with the sortBy parameter. Order in which the sortBy parameter is applied to the return results. Valid values: * ascending * descending {#scim-GET-Departments__ul_mmn_zrc_grb} Data type: String Default: ascending |
| startIndex | One-based index into the table at which to start retrieving records. For example, if you set this parameter to 100, and the count parameter to 20, the endpoint returns records 100 through 119. Hinweis: Any value that is set to less than one is interpreted as one. Data type: String Default: 1 |
[Tabelle : 140. Query parameters]

{#scim-GET-Departments__entry__22}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 141. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Departments__entry__26}{#scim-GET-Departments__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 142. Request headers]

{#scim-GET-Departments__entry__30}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 143. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Departments__entry__34}{#scim-GET-Departments__entry-200-status-code}{#scim-GET-Departments__status_400-SCIM-entry}{#scim-GET-Departments__entry-401-status-code}

| 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. {#scim-GET-Departments__ul_vn1_gvz_nrb} |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
[Tabelle : 144. Status codes]

### Response body parameters (JSON)

{#scim-GET-Departments__id_sqc_3br_3rb__entry__2}{#scim-GET-Departments__itemsPerPage-SCIM-entry}{#scim-GET-Departments__totalResults-SCIM-entry}

| Name | Description |
|-|-|
| itemsPerPage | Number of records returned in the return results. Data type: Number |
| Resources | List of returned department records. Data type: Object "Resources": { "id": "String", "meta": {Object}, "name": "String", "schemas": "String" } |
| Resources.id | Sys_id of the department record. Data type: String |
| Resources.meta | Information pertaining to the department record. Data type: Object "meta": { "created": "String", "lastModified": "String", "location": "String", "resourcType": "String" } |
| Resources.meta.created | Date and time the associated department record was created. Data type: String |
| Resources.meta.lastModified | Date and time the associated department record was last modified. Data type: String |
| Resources.meta.location | URI of the associated department record. Data type: String |
| Resources.meta.resourceType | SCIM resource type; always Department. Data type: String |
| Resources.name | Department name. Data type: String |
| Resources.schemas |   |
| schemas |   |
| startIndex | One-based index into the Department \[cmn_department\] table at which the records were returned. Data type: String |
| totalResults | Total number of records that match the request. Data type: Number |
[ ]

{#scim-GET-Departments__id_sqc_3br_3rb}  

### 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} {#ariaid-title24}

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}  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-GET-Departments-department_id__entry__2}{#scim-GET-Departments-department_id__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. 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 |
[Tabelle : 145. Path parameters]

{#scim-GET-Departments-department_id__entry__8}{#scim-GET-Departments-department_id__attributes-SCIM-entry}{#scim-GET-Departments-department_id__excludedAttributes-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't 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. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
[Tabelle : 146. Query parameters]

{#scim-GET-Departments-department_id__entry__14}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 147. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Departments-department_id__entry__18}{#scim-GET-Departments-department_id__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 148. Request headers]

{#scim-GET-Departments-department_id__entry__22}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 149. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Departments-department_id__entry__26}{#scim-GET-Departments-department_id__entry-200-status-code}{#scim-GET-Departments-department_id__status_400-SCIM-entry}{#scim-GET-Departments-department_id__entry-401-status-code}{#scim-GET-Departments-department_id__entry-404-status-code}

| 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. {#scim-GET-Departments-department_id__ul_vn1_gvz_nrb} |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 404 | Not found. The requested item wasn't found. |
[Tabelle : 150. Status codes]

### Response body parameters (JSON)

{#scim-GET-Departments-department_id__id_g3b_jdr_3rb__entry__2}{#scim-GET-Departments-department_id__id-dept-SCIM-entry}{#scim-GET-Departments-department_id__meta-dept-SCIM-entry}{#scim-GET-Departments-department_id__meta_created-dept-SCIM-entry}{#scim-GET-Departments-department_id__meta_lastModified-dept-SCIM-entry}{#scim-GET-Departments-department_id__meta_location-dept-SCIM-entry}{#scim-GET-Departments-department_id__meta_resourceType-dept-SCIM-entry}{#scim-GET-Departments-department_id__name-dept-SCIM-entry}{#scim-GET-Departments-department_id__schemas-dept-SCIM-entry}

| Name | Description |
|-|-|
| id | Sys_id of the department record. Data type: String |
| meta | Information pertaining to the department record. Data type: Object "meta": { "created": "String", "lastModified": "String", "location": "String", "resourcType": "String" } |
| meta.created | Date and time the associated department record was created. Data type: String |
| meta.lastModified | Date and time the associated department record was last modified. Data type: String |
| meta.location | URI of the associated department record. Data type: String |
| meta.resourceType | SCIM resource type; always Department. Data type: String |
| name | Department name. Data type: String |
| schemas | Schema used when processing the request. Data type: String |
[ ]

{#scim-GET-Departments-department_id__id_g3b_jdr_3rb}  

### 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 {#ariaid-title25}

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.
Hinweis:  
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  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-GET-Locations__entry__2}{#scim-GET-Locations__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Tabelle : 151. Path parameters]

{#scim-GET-Locations__entry__6}{#scim-GET-Locations__attributes-SCIM-entry}{#scim-GET-Locations__count-SCIM-entry}{#scim-GET-Locations__excludedAttributes-SCIM-entry}{#scim-GET-Locations__group_sortBy-SCIM-entry}{#scim-GET-Locations__sortOrder-SCIM-entry}{#scim-GET-Locations__group_startIndex-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't be used with the excludedAttributes parameter. Data type: String Default: Return all fields unless excludedAttributes is specified. |
| count | Number of records to return. A negative value is interpreted as zero. Data type: Number Maximum: 500 - A value greater than this results in a bad request error. Default: 10 |
| excludedAttributes | Comma-separated list of fields to exclude from the records returned in the response. All other fields are returned. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
| filter | Filter expression to apply to the return results. Field filters are expressed as `<field_name> <operator> <"value">`. Refer to [RFC7644](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2) for a list of the valid operators. Hinweis: The `NOT` operator is not supported by this method. For example, to filter for all locations whose name starts with "Ch", enter `displayName SW "Ch"`. To specify more than one field filter, concatenate the filters using the `AND` operand. For example, to filter for all locations whose name starts with "Ch" and were last modified before October 3, 2021, enter `displayName SW "Ch" AND meta.lastModified lt "2021-10-03T00:00:00Z"`. Use dot-walking to specify nested attributes. Data type: String Default: No filtering |
| sortBy | Must be specified with the sortOrder parameter. Field by which to sort the return results. Sorting is case-insensitive. You can only use those parameters available for filtering for the sortBy parameter, except that externalId is not allowed. For values that are null: * sorted by ascending: Null values are sorted to the top. * sorted by descending: Null values are sorted to the bottom. {#scim-GET-Locations__ul_xsb_zmm_hrb} Data type: String Default: No sort |
| sortOrder | Must be specified with the sortBy parameter. Order in which the sortBy parameter is applied to the return results. Valid values: * ascending * descending {#scim-GET-Locations__ul_mmn_zrc_grb} Data type: String Default: ascending |
| startIndex | One-based index into the table at which to start retrieving records. For example, if you set this parameter to 100, and the count parameter to 20, the endpoint returns records 100 through 119. Hinweis: Any value that is set to less than one is interpreted as one. Data type: String Default: 1 |
[Tabelle : 152. Query parameters]

{#scim-GET-Locations__entry__22}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 153. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Locations__entry__26}{#scim-GET-Locations__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 154. Request headers]

{#scim-GET-Locations__entry__30}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 155. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Locations__entry__34}{#scim-GET-Locations__entry-200-status-code}{#scim-GET-Locations__status_400-SCIM-entry}{#scim-GET-Locations__entry-401-status-code}

| 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. {#scim-GET-Locations__ul_vn1_gvz_nrb} |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
[Tabelle : 156. Status codes]

### Response body parameters (JSON)

{#scim-GET-Locations__id_qt1_xfr_3rb__entry__2}{#scim-GET-Locations__itemsPerPage-SCIM-entry}{#scim-GET-Locations__totalResults-SCIM-entry}

| Name | Description |
|-|-|
| itemsPerPage | Number of records returned in the return results. Data type: Number |
| Resources | List of returned location records. Data type: Object "Resources": { "id": "String", "meta": {Object}, "name": "String", "schemas": "String" } |
| Resources.id | Sys_id of the location record. Data type: String |
| Resources.meta | Information pertaining to the location record. Data type: Object "meta": { "created": "String", "lastModified": "String", "location": "String", "resourceType": "String" } |
| Resources.meta.created | Date and time the associated location record was created. Data type: String |
| Resources.meta.lastModified | Date and time the associated location record was last modified. Data type: String |
| Resources.meta.location | URI of the associated location record. Data type: String |
| Resources.meta.resourceType | SCIM resource type; always Location. Data type: String |
| Resources.name | Location name. Data type: String |
| Resources.schemas | Schema used when processing the request. Data type: String |
| schemas | Schema used to process the list response to the request. For example: `"urn:ietf:params:scim:api:messages:2.0:ListResponse"` Data type: String |
| startIndex | One-based index into the Location \[cmn_location\] table at which the records were returned. Data type: String |
| totalResults | Total number of records that match the request. Data type: Number |
[ ]

{#scim-GET-Locations__id_qt1_xfr_3rb}  

### 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} {#ariaid-title26}

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}  
Hinweis:  
Available versions are specified in the [REST API Explorer](https://servicenow-prod.fluidtopics.net/urJGeqQ4zU~Vfw53IpWUIw "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://servicenow-prod.fluidtopics.net/eAgQ546WEOagLzEOTr_eqQ "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#scim-GET-Locations-location_id__entry__2}{#scim-GET-Locations-location_id__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. 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 |
[Tabelle : 157. Path parameters]

{#scim-GET-Locations-location_id__entry__8}{#scim-GET-Locations-location_id__attributes-SCIM-entry}{#scim-GET-Locations-location_id__excludedAttributes-SCIM-entry}

| Name | Description |
|-|-|
| attributes | Comma-separated list of fields to return in the response. No other fields are returned. Can't 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. Can't be used with the attributes parameter. Data type: String Default: Do not exclude any fields. |
[Tabelle : 158. Query parameters]

{#scim-GET-Locations-location_id__entry__14}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 159. Request body parameters (JSON)]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Locations-location_id__entry__18}{#scim-GET-Locations-location_id__Accept-SCIM-entry}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/scim+json. Default: application/json |
[Tabelle : 160. Request headers]

{#scim-GET-Locations-location_id__entry__22}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 161. Response headers]

### 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](https://servicenow-prod.fluidtopics.net/8lFZRln4AVFM64buP1Dvmg "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#scim-GET-Locations-location_id__entry__26}{#scim-GET-Locations-location_id__entry-200-status-code}{#scim-GET-Locations-location_id__status_400-SCIM-entry}{#scim-GET-Locations-location_id__entry-401-status-code}{#scim-GET-Locations-location_id__entry-404-status-code}

| 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. {#scim-GET-Locations-location_id__ul_vn1_gvz_nrb} |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 404 | Not found. The requested item wasn't found. |
[Tabelle : 162. Status codes]

### Response body parameters (JSON)

{#scim-GET-Locations-location_id__id_s2d_33r_3rb__entry__2}{#scim-GET-Locations-location_id__id-location-SCIM-entry}{#scim-GET-Locations-location_id__meta-location-SCIM-entry}{#scim-GET-Locations-location_id__meta_created-location-SCIM-entry}{#scim-GET-Locations-location_id__meta_lastModified-location-SCIM-entry}{#scim-GET-Locations-location_id__meta_location-location-SCIM-entry}{#scim-GET-Locations-location_id__meta_resourceType-location-SCIM-entry}{#scim-GET-Locations-location_id__name-location-SCIM-entry}{#scim-GET-Locations-location_id__schemas-location-SCIM-entry}

| Name | Description |
|-|-|
| id | Sys_id of the location record. Data type: String |
| meta | Information pertaining to the location record. Data type: Object "meta": { "created": "String", "lastModified": "String", "location": "String", "resourceType": "String" } |
| meta.created | Date and time the associated location record was created. Data type: String |
| meta.lastModified | Date and time the associated location record was last modified. Data type: String |
| meta.location | URI of the associated location record. Data type: String |
| meta.resourceType | SCIM resource type; always Location. Data type: String |
| name | Location name. Data type: String |
| schemas | Schema used when processing the request. Data type: String |
[ ]

{#scim-GET-Locations-location_id__id_s2d_33r_3rb}  

### 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"
    }


