Skip to content
  • There are no suggestions because the search field is empty.

How do I import Security Center vulnerabilities into NinjaOne using the API?

You can import Security Center vulnerabilities into NinjaOne by building a scheduled job. The job exports open vulnerabilities through the Platform API and uploads them to a scan group in the NinjaOne Vulnerability Importer. NinjaOne then matches each row to a managed device by device name and CVE ID, so each device shows its CVEs in NinjaOne.

This article covers what you need, how to set up both sides and what to watch out for. NinjaOne isn't one of the ready-made integrations. It's a custom integration that you build, run and maintain yourself on top of the Platform API. Holm Security doesn't provide a script for it.

How this differs from ticketing integrations

Ticketing integrations such as Jira are built into Security Center. They create remediation tickets and keep ticket status in sync between both systems.

The NinjaOne setup works differently:

  • It's a one-way push of vulnerability data from Security Center to NinjaOne
  • It doesn't create tickets
  • It doesn't sync status back to Security Center

For the built-in ticketing setup, see:
How do I integrate with Jira?

Requirements

Make sure you have:

  • A primary superuser or superuser account in Security Center. Only these users can manage API settings.
  • A NinjaOne administrator who can create API apps and set up the Vulnerability Importer.
  • A place to run a scheduled script, for example an Azure Automation runbook or a scheduled task. It needs outbound access to both the Security Center API and your NinjaOne instance.
  • Your Security Center API endpoint URL and your regional NinjaOne instance, for example eu.ninjarmm.com.

This article describes Security Center in the cloud.

Step 1: Create a read-only API token

  1. Log in to Security Center.
  2. Click the menu icon at the top right.
  3. Click API.
  4. Click Enable Access through the API.
  5. Click Create API token.
  6. Set a name for your token, for example NinjaOne import.
  7. Set permission to Read. The export only reads data, so you don't need Read + Write.
  8. Set the Access areas to cover the assets you want to send to NinjaOne.
  9. Click Create Token.
  10. Copy the token from the API tokens list and store it securely.

Step 2: Find your API endpoint URL

  1. In Security Center, click the menu icon at the top right.
  2. Click API.
  3. Note the endpoint URL shown in this section. Always use this URL, since it matches your region.

The same section links to the API documentation, which lists every endpoint, request and response format.

Step 3: Create a NinjaOne API app

  1. In NinjaOne, go to Administration > Apps > API.
  2. Click Add.
  3. Select the platform API Services (machine-to-machine).
  4. Set the grant type to Client credentials.
  5. Select the scopes Monitoring and Management.
  6. Leave the redirect URI blank. Machine-to-machine apps don't use it.
  7. Save the app and store the client ID and client secret securely.

For details on NinjaOne API apps, see NinjaOne's own documentation.

Step 4: Create the scan group in NinjaOne

You have to create the scan group and do the first import in the NinjaOne interface. The NinjaOne API can't create a scan group or its column mapping.

  1. In NinjaOne, go to Administration > Apps > Installed > Vulnerability Importer > Scan groups.
  2. Click Create and pick a vendor.
  3. Upload a CSV file manually, for example a small export with one row per CVE.
  4. Map the columns so NinjaOne knows which column holds the device name and which holds the CVE.
  5. Save the scan group and note its numeric ID.

Every later upload through the API reuses this stored mapping. Use the same column names in every export. Here's an example mapping:

NinjaOne field CSV column
Device ID Name
CVE ID CVE

Step 5: Export open vulnerabilities from Security Center

Your script calls the Platform API with your token and builds a CSV with one row per CVE. Device Agent assets and network assets use separate endpoints, so you need to query both.

  • Device Agent assets: List your devices, then fetch the vulnerabilities for each device. The results can include fixed and historical findings, so remove anything that isn't open.
  • Network assets: List your network assets, then fetch the detailed vulnerability list for each asset. Skip findings with a closed status, such as fixed or accepted.

For each open finding, write one row per CVE with the device name and the CVE ID. You can add more columns, such as severity, CVSS score or title, but NinjaOne only needs the device name and the CVE. Skip informational findings that have no CVE, since NinjaOne can't match them.

Step 6: Upload the CSV to the scan group

  1. Get an OAuth access token from your NinjaOne instance with the client credentials from step 3 and the scopes monitoring and management.
  2. Send the CSV file to the NinjaOne endpoint POST /api/v2/vulnerability/scan-groups/{id}/upload, with the scan group ID from step 4.
  3. Send the file as a multipart form field named csv.

Use the numeric scan group ID rather than looking the group up by name. When NinjaOne lists scan groups, the label isn't returned in the name field, so a name lookup can fail without an error.

Step 7: Schedule the job

  1. Add the script to your scheduler, for example as a PowerShell runbook in Azure Automation.
  2. Give it access to the API token, client ID and client secret from a secure store.
  3. Set it to run on a regular schedule, for example daily.
  4. Time each run after your scheduled assessments finish, so NinjaOne gets the latest results.

Step 8: Check the import in NinjaOne

  1. In NinjaOne, open the scan group under Administration > Apps > Installed > Vulnerability Importer > Scan groups.
  2. Check the file name, the import time and the number of records processed.
  3. Open a few managed devices and confirm that their CVEs show up.

You can also check the status through the NinjaOne API with GET /api/v2/vulnerability/scan-groups/{id}. Wait until the status is no longer IN_PROGRESS.

Things to consider

Device names must match

NinjaOne matches rows to devices by name. If the device name in Security Center differs from the one in NinjaOne, those vulnerabilities won't attach to a device. For network assets, the hostname comes from the detection methods used during the assessment. Authenticated assessments give the most accurate hostnames.

To learn how Security Center determines hostnames, see:
How are hostnames and IP addresses determined in network scans?

Store credentials securely

Never put the API token or the NinjaOne client secret in the script itself. Use a secure store instead, such as encrypted Azure Automation variables or Azure Key Vault.

Handle paging & rate limits

The Platform API returns results in pages. Follow each page until you have all results. If the API returns HTTP 429, wait and retry the request.

Choose which severities to send

Decide which severities belong in NinjaOne. Sending only Low and higher keeps out informational results, which usually have no CVE anyway.

Related articles