NinjaOne icon

NinjaOne

Interact with the NinjaOne API

Overview

The node integrates with the NinjaOne API to retrieve information about devices managed within the NinjaOne platform. Specifically, the "Get Last Logged On User" operation for the "Device" resource fetches details about the most recent user who logged into a specified device.

This node is useful in IT management and support scenarios where understanding user activity on devices is important. For example, helpdesk technicians can quickly identify which user last accessed a device when troubleshooting issues or auditing device usage.

Practical examples:

  • Automatically retrieving the last logged-on user of a device before running remote commands.
  • Generating reports on device usage by user.
  • Triggering workflows based on user activity on specific devices.

Properties

Name Meaning
Device ID ID of the device to query. This is a required string input specifying which device's last logged-on user information to retrieve.

Output

The node outputs JSON data containing details about the last user who logged onto the specified device. The exact structure depends on the NinjaOne API response but typically includes user identifiers, usernames, timestamps, and possibly additional metadata related to the login event.

No binary data output is indicated for this operation.

Dependencies

  • Requires an active connection to the NinjaOne API.
  • Needs an API authentication token configured in n8n credentials (an OAuth2 API key credential).
  • The base URL defaults to https://api.ninjaone.com unless overridden in credentials.

Troubleshooting

  • Missing or invalid Device ID: Ensure the Device ID property is provided and correctly references an existing device in NinjaOne.
  • Authentication errors: Verify that the API authentication token is valid and has sufficient permissions to access device information.
  • API connectivity issues: Check network connectivity and NinjaOne service status.
  • Unexpected API responses: Confirm that the NinjaOne API version matches what the node expects; changes in the API could affect output structure.

Links and References

Discussion