> For the complete documentation index, see [llms.txt](https://docs.ggwp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ggwp.com/identity-and-access-management-iam/api-docs-scim/scim-basics.md).

# SCIM Basics

### Overview

SCIM (System for Cross-domain Identity Management) defines a standardized schema and protocol for managing identities. Each SCIM resource includes a `schemas` field:

#### Example

```json
{
  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"]
}
```

### Schema URNs

<table><thead><tr><th width="112">Resource</th><th>URN</th></tr></thead><tbody><tr><td>User</td><td><code>urn:ietf:params:scim:schemas:core:2.0:User</code></td></tr><tr><td>PatchOp</td><td><code>urn:ietf:params:scim:api:messages:2.0:PatchOp</code></td></tr><tr><td>Error</td><td><code>urn:ietf:params:scim:api:messages:2.0:Error</code></td></tr></tbody></table>

### Important Notes

* `schemas` must always be present
* Invalid or missing schemas will result in a `400 Bad Request`

### Common Attributes

These attributes are frequently used in SCIM requests and responses:

<table><thead><tr><th width="128">Attribute</th><th width="113">Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>Unique system-generated identifier</td></tr><tr><td>externalId</td><td>string</td><td>ID from external system (IdP)</td></tr><tr><td>userName</td><td>string</td><td>Unique username</td></tr></tbody></table>

### Meta Attribute

SCIM responses include metadata:

```json
{
  "meta": {
    "resourceType": "User",
    "created": "2025-01-01T00:00:00Z",
    "lastModified": "2025-01-01T00:00:00Z"
  }
}
```

### Error Format

All errors follow standard SCIM format:

```json
{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
  "status": "400",
  "detail": "Invalid request"
}
```

### Error Codes

<table><thead><tr><th width="112">Status</th><th>Meaning</th></tr></thead><tbody><tr><td>400</td><td>Bad Request</td></tr><tr><td>401</td><td>Unauthorized</td></tr><tr><td>404</td><td>Resource not found</td></tr><tr><td>500</td><td>Internal server error</td></tr></tbody></table>
