- Development Integration
- /
- Standard Web Application
- /
- Node.js
- /
Management Module
- /
Organization Management
- /
- 获取部门直属成员 ID 列表
¶ 获取部门直属成员 ID 列表
Update time: 2025-07-23 07:34:21
通过组织 code、部门 ID,获取部门直属成员 ID 列表。
¶ 请求参数
| 名称 | 类型 | 必填 | 默认值 | 描述 | 示例值 |
|---|---|---|---|---|---|
| organizationCode | string | 是 | - | 组织 code。 | steamory |
| departmentId | string | 是 | - | 部门 ID,根部门传 root。 | root |
| departmentIdType | string | 否 | department_id | 此次调用中使用的部门 ID 的类型。 枚举值:department_id,open_department_id | department_id |
¶ 示例代码
import { ManagementClient } from "@genauth/nodejs";
// 在 Node.js 中引用:
// const { ManagementClient } = require('@genauth/nodejs');
const managementClient = new ManagementClient({
accessKeyId: "GEN_AUTH_USERPOOL_ID",
accessKeySecret: "GEN_AUTH_USERPOOL_SECRET",
});
(async () => {
const result = await managementClient.listDepartmentMemberIds({
organizationCode: "steamory",
departmentId: "root",
departmentIdType: "department_id",
});
})();
¶ 请求响应
类型: UserIdListRespDto
| 名称 | 类型 | 描述 |
|---|---|---|
| statusCode | number | 业务状态码,可以通过此状态码判断操作是否成功,200 表示成功。 |
| message | string | 描述信息 |
| apiCode | number | 细分错误码,可通过此错误码得到具体的错误类型。 |
| data | array | 响应数据 |
示例结果:
{
"statusCode": 200,
"message": "操作成功",
"apiCode": 20001
}
