Get User Details

Note: Ensure you have installed the required package to use this SDK method.

Catalyst Authentication provides SDK methods to retrieve the details of the application users. You can obtain the user information of the current user, any user, or all users of the application.

Get Details of Current User

The method getCurrentUser() fetches the details of a user on whose scope the function is getting executed.

The userManagement reference used in the code snippet below is the component instance.

The promise returned here will be resolved to a JSON object.

copy
// get the details of the current user
const currentUser = await userManagement.getCurrentUser();
console.log(currentUser);

Example of Expected Response

copy
{
  "zuid":"1005641433",
  "zaaid":"1005641434",
  "org_id":"1005641434",
  "status":"ACTIVE",
  "is_confirmed":false,
  "email_id":"p.boyle@zylker.com",
  "last_name":"Boyle",
  "created_time":"Aug 12, 2021 12:27 PM",
  "role_details":{
    "role_name":"App User",
    "role_id":"2305000000006024"
  },
  "user_type":"App User",
  "user_id":"2305000000007745",
  "locale":"us|en|Asia/Kolkata",
  "time_zone":"Asia/Kolkata",
  "project_profiles":[]
}

Get User Details Using User ID

You can retrieve the details of a particular user by passing the User ID of the user to the getUserDetails() SDK method. The promise is resolved to a JSON object.

The userManagement reference used in the code snippet below is the component instance.

copy
const userDetails = await userManagement.getUserDetails(1510000000109587);
console.log(userDetails);

Example of Expected Response

A sample response that you will receive for each version is shown below:

copy
{
  "zuid":"1005665160",
  "zaaid":"1005665245",
  "org_id":"1005665245",
  "status":"ACTIVE",
  "is_confirmed":false,
  "email_id":"mikerogers@zylker.com",
  "last_name":"Rogers",
  "created_time":"Aug 17, 2021 04:55 PM",
  "role_details":{
    "role_name":"App User",
    "role_id":"2136000000007748"
  },
  "user_type":"App User",
  "user_id":"2136000000020040",
  "locale":"us|en|Asia/Kolkata",
  "time_zone":"Asia/Kolkata",
  "project_profiles":[]
}

Get Details of All Users

The getAllUsers() SDK method can fetch the details of all the users who are registered with the application.

The promise returned here will be resolved to an array of objects which contains all user details.

copy
const allUserDetails = await userManagement.getAllUsers();
console.log(allUserDetails);

Example of Expected Response

A sample response that you will receive for each version is shown below:

copy
[
  {
    zuid: "1005648252",
    zaaid: "1005648253",
    org_id: "1005648253",
    status: "ACTIVE",
    is_confirmed: false,
    email_id: "p.boyle@zylker.com",
    last_name: "Boyle",
    created_time: "Aug 13, 2021 01:36 PM",
    modified_time: "Aug 13, 2021 01:36 PM",
    invited_time: "Aug 13, 2021 01:36 PM",
    role_details: {
      role_name: "App User",
      role_id: "2136000000007748"
    },
    user_type: "App User",
    user_id: "2136000000007774",
    locale: "us|en|Asia/Kolkata",
    time_zone: "Asia/Kolkata",
    project_profiles: []
  },
  {
    zuid: "1005665160",
    zaaid: "1005665245",
    org_id: "1005665245",
    status: "ACTIVE",
    is_confirmed: false,
    email_id: "rsmith@zylker.com ",
    last_name: "Smith",
    created_time: "Aug 17, 2021 04:55 PM",
    modified_time: "Aug 17, 2021 04:55 PM",
    invited_time: "Aug 17, 2021 04:55 PM",
    role_details: {
      role_name: "App User",
      role_id: "2136000000007748"
    },
    user_type: "App User",
    user_id: "2136000000020040",
    locale: "us|en|Asia/Kolkata",
    time_zone: "Asia/Kolkata",
    project_profiles: []
  }
]

Last Updated 2026-07-02 14:51:41 +0530 IST