> 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/chinese-simplified/shen-fen-yu-fang-wen-guan-li-iam/api-wen-dang-scim/yong-hu-api/huo-qu-yong-hu.md).

# 获取用户

### 概述

通过其唯一标识符检索用户。

此端点供 Okta 或 Microsoft Azure Active Directory 等身份提供商用于：

* 验证用户创建
* 获取最新用户状态
* 验证预配

***

### 端点

```bash
GET /Users/{id}
```

***

### 完整 URL

```bash
https://api.ggwp.com/scim/v2/Users/{id}
```

***

### 身份验证

```http
Authorization: Bearer <access_token>
```

***

## 路径参数

<table><thead><tr><th width="143.5">参数</th><th width="148.5">类型</th><th>描述</th></tr></thead><tbody><tr><td>id</td><td>字符串</td><td>用户唯一标识符（scim_id）</td></tr></tbody></table>

***

## 响应

### 成功（200 OK）

```json
{
  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
  "id": "c118d158-c11b-495b-ab88-f57c8ac473c0",
  "userName": "Temp_user_prod",
  "externalId": "ABC1900BE",
  "active": true,
  "name": {
    "givenName": "Temp",
    "familyName": "User"
  },
  "displayName": "Temp User",
  "emails": [
    {
      "value": "temp_user_us@example.com",
      "primary": true
    }
  ],
  "roles": [
    {
      "value": "admin"
    }
  ],
  "meta": {
    "resourceType": "User",
    "location": "https://api.ggwp.com/scim/v2/Users/c118d158-c11b-495b-ab88-f57c8ac473c0",
    "created": "2026-04-01T11:15:22Z",
    "lastModified": "2026-04-01T11:15:22Z"
  }
}
```

***

## 错误响应

### 404 未找到

```json
{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
  "status": "404",
  "detail": "未找到用户"
}
```
