NinjaOne icon

NinjaOne

Consume NinjaOne API

Actions158

Management → Create Organization

AI-generated

Overview

This node integrates with the NinjaOne API to manage organizations within the system. Specifically, the "Create Organization" operation under the "Management" resource allows users to create a new organization by specifying various details such as name, description, custom attributes, approval modes, tags, locations, and policies.

Common scenarios where this node is beneficial include:

  • Automating the onboarding of new client organizations in an IT management platform.
  • Programmatically setting up organizational structures with predefined templates and policies.
  • Managing device approval workflows by configuring approval modes during organization creation.

Practical example:

  • A managed service provider can use this node to automatically create a new organization for each new customer, copying settings from a template organization, assigning tags, and defining location and policy configurations without manual intervention.

Properties

Name Meaning
Template Organization Id Numeric ID of a model/template organization to copy settings from when creating the new organization.
Name Full name of the organization being created.
Description Textual description providing additional information about the organization.
User Data Custom JSON attributes to attach to the organization for flexible metadata storage.
Node Approval Mode Device approval mode for the organization; options are: AUTOMATIC, MANUAL, REJECT.
Tags JSON array of tags associated with the organization for categorization or filtering.
Fields JSON object representing custom fields related to the organization.
Locations JSON array describing one or more locations associated with the organization, including their tags.
Policies JSON array defining node role policy assignments for the organization.

Output

The node outputs an array of items, each containing a json field with the response data from the NinjaOne API after creating the organization. This typically includes details of the newly created organization such as its ID, name, description, and other configured properties.

No binary data output is produced by this operation.

Dependencies

  • Requires an active NinjaOne API OAuth2 credential configured in n8n for authentication.
  • The node uses the NinjaOne REST API endpoints to perform operations.
  • No additional external dependencies beyond the NinjaOne API and n8n's HTTP request capabilities.

Troubleshooting

  • Missing or invalid API credentials: Ensure that the NinjaOne API OAuth2 credentials are correctly set up and authorized.
  • Invalid JSON input: Properties like userData, tags, fields, locations, and policies expect valid JSON strings. Malformed JSON will cause errors.
  • Template Organization Id not found: If specifying a template organization ID, verify that the ID exists and is accessible.
  • Permission issues: The authenticated user must have permissions to create organizations and assign policies.
  • Error messages from API: The node surfaces error messages returned by the NinjaOne API. Review these messages for specific causes (e.g., validation errors) and adjust inputs accordingly.

Links and References

Discussion