post https://api.authing.cn/api/v3/ set-user-departments
设置用户所在部门
Log in to see full request history
Responses
设置用户所在部门
xxxxxxxxxx
23import { ManagementClient } from 'authing-node-sdk';
// 在 Node.js 中引用:
// const { ManagementClient } = require('authing-node-sdk');
const managementClient = new ManagementClient({
accessKeyId: 'AUTHING_USERPOOL_ID',
accessKeySecret: 'AUTHING_USERPOOL_SECRET',
});
(async () => {
const result = await managementClient.setUserDepartments(
{
userId:'6260c6918c34898e48bef79d',
departments: [
{
"departmentId": "6260c6a82aa603592ca63d40",
"isLeader": true,
"isMainDepartment": true
}
]
}
)
})();
Try It!
to start a request and see the response here! Or choose an example: