Skip to main content

How to set up your NinjaOne Integration

Learn how to integrate NinjaOne with your usecure platform.

J
Written by Justin Sandahl

This guide walks you through configuring the NinjaOne integration between your NinjaOne instance and the usecure platform.

Note: NinjaOne uses OAuth 2.0 for authentication. The integration uses the Authorization Code grant type, which provides full API access and user-context operations required for ticketing.


Part 1: NinjaOne Configuration

Step 1: Log in to NinjaOne Admin Console

  1. Navigate to your NinjaOne instance (e.g., https://app.ninjarmm.com)

  2. Log in with administrator credentials

  3. Go to Administration (gear icon in the sidebar)

Step 2: Navigate to Apps

  1. Under Administration, select Apps

  2. You’ll see a list of existing API applications

  3. Click + Add to create a new application

Step 3: Create API Application

Fill in the following settings:

Field

Value

Application Platform

Select API Services (machine-to-machine)

Application Name

Enter a descriptive name (e.g., “usecure Integration”)

Redirect URIs

Enter your callback URL (see below)

Scopes

Select all of the options Monitoring Management and Control

Allowed Grant Types

Select all of the options Authorization Code Client Credentials and Refresh Token

Redirect URL Examples:

  • Local Development: http://localhost:7448/auth/ninjaone/callback

  • https://psa-api.eu.usecure.io/auth/ninjaone/callback (Currently all other regions)

  • [https://psa-api.us.usecure.io/auth](<https://psa-api.us.usecure.io/auth>)/ninjaone/callback (US region)

Note 1: The integration requires full scope in order for creation requests to work (ie. creating tickets)

Note 2: For the grant types, we’re really only using Authorization Code and Refresh Token, however NinjaOne requires providing a clientSecret as part of these token requests and the only way to generate one initially is if we also select Client Credentials this will open a pop-up that will allow you a one time chance to note it.

Step 4: Note Your Client ID

After saving the application, note the following:

  • Client ID - Displayed on the application details page

  • Client secret - Displayed one-time in the pop-up after creating a new api app

Step 5: Note Your Regional Base URL

NinjaOne has regional instances. Note your correct base URL:

Region

Base URL

US

https://app.ninjarmm.com

EU

https://eu.ninjarmm.com

Canada

https://ca.ninjarmm.com

Oceania

https://oc.ninjarmm.com


Part 2: usecure Platform Configuration

Step 1: Navigate to PSA Tools Settings

  1. Log in to the usecure platform

  2. Go to NFR Settings (or your applicable settings page)

  3. Select PSA Tools from the menu

Step 2: Enable and Configure PSA Integration

On the Configuration tab:

  1. Toggle Enable PSA Tools to ON

  2. Select NinjaOne from the PSA Type dropdown

  3. Fill in the following fields:

Field

Value

Base URL

Your NinjaOne regional URL (e.g., https://app.ninjarmm.com)

Client ID

The Client ID from your NinjaOne application

Client Secret

The Client secret from your NinjaOne application

Click Save to store your configuration

Step 3: Complete OAuth Authorization

For the Authorization Code flow, you need to complete a one-time authorization:

  1. Click the Authenticate button that should have appeared after adding your Ninja credentials to the usecure platform

  2. A new browser tab should be opened automatically directing you to the NinjaOne authentication page

Note: you may be taken to a Ninja login page first if you don’t have an active logged in session already, you will need to do this first in order to be directed to the authentication page.

3. Authorize the application to access your NinjaOne data

4. You’ll be redirected back to the callback URL with tokens stored automatically showing a success message, you can close this tab.

Note: This should only need to be done on first setup, the system will handle automatic token refreshes, you can however always come in an manually authenticate (if you’ve revoked, or changed any of the credentials then this will be necessary)

Step 4: Configure Event Settings

Navigate to the Event Settings tab to configure which events trigger ticket creation.

  1. Enable Phishing Failure Events - Toggle to enable/disable

  2. Ticket Type - Configure the ticket type for security alerts

  3. Priority Mapping - Map alert severities to NinjaOne priorities

Step 5: Configure Customer Sync

Navigate to the Customer Sync tab to map usecure customers to NinjaOne organizations.

  1. Include my company in the customer sync - Toggle if you want to include your own company

  2. For each customer listed, enter the corresponding NinjaOne Organization ID

Finding NinjaOne Organization IDs

To find an organization’s ID in NinjaOne:

  1. Navigate to Organizations in the NinjaOne dashboard

  2. Select the organization you want to map

3. Look in the browser url - the number following /customer/ is the ID of the organisation.

Alternatively, use the NinjaOne API:

curl -X GET "https://app.ninjarmm.com/v2/organizations" \

-H "Authorization: Bearer${ACCESS_TOKEN}"

Troubleshooting

Common Issues

Issue

Solution

401 Unauthorized

Token expired or invalid. Check if refresh token flow is working. Re-authorize if needed.

403 Forbidden

Insufficient scopes. Verify the application has monitoring, ticketing, and offline_access scopes.

Invalid redirect_uri

The redirect URI must exactly match what’s configured in NinjaOne (including trailing slashes).

Token exchange failed

Check that client ID is correct. Verify the authorization code hasn’t expired (codes are short-lived).

Organization not found

Verify the Organization ID mapping is correct in customer sync settings.

Refresh token not present

Ensure offline_access scope was requested during initial authorization.

Re-authorizing the Integration

If tokens become invalid and cannot be refreshed:

  1. Re-initiate the OAuth flow by visiting the authorization URL

  2. Complete authorization in NinjaOne

API Reference

NinjaOne OAuth Endpoints

Endpoint

Purpose

GET /oauth/authorize

Initiate authorization code flow

POST /ws/oauth/token

Exchange code for tokens / refresh tokens

usecure Auth Endpoints

Endpoint

Purpose

GET /auth/ninjaone/callback

OAuth callback handler


Additional Resources

Did this answer your question?