Skip to content

users.Get

Overview

Get the information of one user by specifying the user ID in Server Script. To get multiple users at once, use users.GetList.

Methods

users.Get(userId);

Parameters

Parameter Type Required Description
userId long Yes Specify the user ID to get.

Usage Examples

const user = users.Get(11);
if (user) {
    context.Log(user.LoginId + ', ' + user.Name);
} else {
    context.Log('The user does not exist.');
}

Return Value

Returns the "user object". For the layout of the object, see "Developer's Guide: Server Script: user". If no user exists with the specified ID, null is returned.

{
    "TenantId": 1,
    "UserId": 11,
    "DeptId": 3,
    "LoginId": "yamada",
    "Name": "Taro Yamada",
    "UserCode": "U0011",
    "TenantManager": false,
    "ServiceManager": false,
    "Disabled": false,
    "ClassHash": {
        "ClassA": "test-class-column"
    },
    "NumHash": {
        "NumA": 100
    },
    "DateHash": {
        "DateA": "2026-08-19"
    },
    "DescriptionHash": {
        "DescriptionA": "Supplementary description"
    },
    "CheckHash": {
        "CheckA": true
    }
}

Cautions

This is a method used in "Server Script". It cannot be used in "Script".