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

Organization → List users

AI-generated

Summary

Retrieve a list of end users associated with a specific organization by its ID, with options to return all results or a single page and to include user role information.

Inputs

  • id (required) — The numeric ID of the organization for which to list users.
  • returnAll — Whether to return all users or only a single page of results. When false, only one page is returned without pagination parameters.
  • additionalFields.includeRoles — Boolean flag to include user role information in the results.
  • options.customBody — Optional JSON object to include arbitrary request body fields, overriding other field values if keys conflict.
  • options.customHeaders — Optional array of HTTP headers to add to the API request.
  • options.queryFilters — Optional query-string filters to refine the API request.
  • options.batching — Settings to control batching of multiple input items into separate requests with delays between batches.
  • options.debug — When true, includes detailed request information in the output for debugging.
  • options.pagination — Settings to configure pagination mode and parameters such as offset or cursor handling, page size, and limits.
  • options.timeout — Timeout in milliseconds to wait for a server response before aborting the request.

Output shape

a list/array of end user objects associated with the specified organization

The exact structure of each user object depends on the API response and whether 'includeRoles' is enabled. When 'returnAll' is true, this operation will paginate through all pages according to the pagination settings, otherwise a single page is returned. Debug information is included in output if enabled.

Examples

Example 1: List all users in organization with ID 123, including their roles, returning all pages.

Set 'id' to 123, 'returnAll' to true, 'includeRoles' to true.

Example 2: Retrieve just the first page of users for organization 456 without roles.

Set 'id' to 456, 'returnAll' to false, 'includeRoles' to false.

Links

Discussion