> 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/jp/idoyobiakusesuiam/apidokyumento-scim/scimno.md).

# SCIMの基本

### 概要

SCIM（System for Cross-domain Identity Management）は、ID を管理するための標準化されたスキーマとプロトコルを定義します。各 SCIM リソースには `schemas` フィールド:

#### 例

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

### スキーマ URN

<table><thead><tr><th width="112">リソース</th><th>URN</th></tr></thead><tbody><tr><td>ユーザー</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>エラー</td><td><code>urn:ietf:params:scim:api:messages:2.0:Error</code></td></tr></tbody></table>

### 重要事項

* `schemas` 常に存在していなければなりません
* 無効なスキーマまたは欠落したスキーマは、次を引き起こします `400 不正なリクエスト`

### 共通属性

これらの属性は、SCIM のリクエストとレスポンスで頻繁に使用されます:

<table><thead><tr><th width="128">属性</th><th width="113">型</th><th>説明</th></tr></thead><tbody><tr><td>id</td><td>文字列</td><td>システム生成の一意識別子</td></tr><tr><td>externalId</td><td>文字列</td><td>外部システム（IdP）の ID</td></tr><tr><td>userName</td><td>文字列</td><td>一意のユーザー名</td></tr></tbody></table>

### メタ属性

SCIM のレスポンスにはメタデータが含まれます:

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

### エラー形式

すべてのエラーは標準の SCIM 形式に従います:

```json
{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
  "status": "400",
  "detail": "無効なリクエスト"
}
```

### エラーコード

<table><thead><tr><th width="112">ステータス</th><th>意味</th></tr></thead><tbody><tr><td>400</td><td>不正なリクエスト</td></tr><tr><td>401</td><td>認証されていません</td></tr><tr><td>404</td><td>リソースが見つかりません</td></tr><tr><td>500</td><td>内部サーバーエラー</td></tr></tbody></table>
