NinjaOne icon

NinjaOne

Ninja One Public API documentation. <br><br>See also: <br> <a href="https://resources.ninjarmm.com/API/Ninja+RMM+Public+API+v2.0.5+Device+Filter+Syntax.pdf">Device Filter syntax</a><br><a href="https://app.ninjarmm.com/apidocs-beta/core-resources/articles/webhooks/overview">Webhooks</a>

Actions309

Devices → Last logged-on user information

AI-generated

Summary

Retrieve the information about the last logged-on user for a specific device identified by its device ID.

Inputs

  • id (required) — The numeric identifier of the device for which to fetch last logged-on user information.
  • returnAll — Boolean flag to return all paginated results or just a single page (default is false).
  • options — Optional parameters including custom JSON body content (merged with other fields), custom HTTP headers, query-string filters for the request, batching controls (items per batch and interval between batches), debug logging to include request details in the output, pagination configuration with modes (offset, cursor, or URL-based), page sizing, and timeout settings.

Output shape

a single JSON object containing the last logged-on user information for the specified device

When debug option is enabled, the output also includes request details under a debug key. Pagination and 'returnAll' do not typically affect this operation, but options are available if supported by the underlying API.

Examples

Example 1: Fetch last logged-on user for device ID 123

Set 'id' to 123, leave 'returnAll' as false, no additional options.

Links

Discussion