AvantGuard - NinjaOne icon

AvantGuard - NinjaOne

AvantGuard - NinjaOne

Actions159

Overview

This node integrates with the AvantGuard NinjaOne API to retrieve reports about user login activity. Specifically, the "Get Last Logged On Users Report" operation fetches data on the most recent users who have logged into devices managed by NinjaOne. This is useful for IT administrators and security teams to monitor user access patterns, detect unusual login behavior, or generate audit logs.

Practical examples include:

  • Generating a report of all users who logged in within a certain timeframe.
  • Filtering login records by device type or other criteria.
  • Paginating through large sets of login data for detailed analysis.

Properties

Name Meaning
Additional Query Parameters Optional parameters to customize the query:
- Df: Device filter (string)
- Cursor: Cursor name for pagination (string)
- Page Size: Limit number of records per page (number, default 1000)

These parameters allow fine-tuning of the API request, such as filtering results by device, controlling pagination via cursor tokens, and limiting the number of returned records per call.

Output

The node outputs JSON data representing the last logged-on users report retrieved from the NinjaOne API. The structure typically includes user details, login timestamps, associated devices, and possibly metadata for pagination (like cursors).

If the API supports binary data (e.g., file exports), the node would handle it accordingly, but based on the provided code and operation, the output is primarily JSON-formatted report data.

Dependencies

  • Requires an API key credential for authenticating with the AvantGuard NinjaOne service.
  • The base URL for the API must be configured in the node credentials.
  • Depends on the @avantguardllc/n8n-openapi-node package for OpenAPI integration.
  • Uses the NinjaOne OpenAPI specification (openapi.json) bundled with the node.

Troubleshooting

  • Common issues:
    • Invalid or missing API credentials will cause authentication failures.
    • Incorrect or unsupported query parameters may result in API errors.
    • Large datasets might require handling pagination properly using the cursor and page size parameters.
  • Error messages:
    • Authentication errors usually indicate invalid API keys or misconfigured credentials.
    • API rate limits or timeouts can occur if too many requests are made in a short period; consider adding delays or reducing page size.
    • If the response is empty or incomplete, verify that filters like device filter (df) are correctly specified.

Links and References

Discussion