Skip to content

Commit 7ae174c

Browse files
authored
Merge pull request #51 from squaredup/work/fw/ninjaone-tests
fix: drop offline_access scope from NinjaOne OAuth, add configValidation
2 parents b4ff16f + c5c4f1f commit 7ae174c

4 files changed

Lines changed: 31 additions & 20 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"steps": [
3+
{
4+
"displayName": "NinjaOne connection",
5+
"dataStream": { "name": "organizations" },
6+
"success": "Successfully connected to NinjaOne",
7+
"error": "Cannot connect to NinjaOne — verify your Region, Client ID, and Client Secret, and ensure the client app is type 'API Services' with Monitoring, Management, and Control scopes enabled.",
8+
"required": true
9+
}
10+
]
11+
}

plugins/NinjaOne/v1/docs/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ To use this data source, you will need to create OAuth2 API credentials in your
44

55
## Create NinjaOne API Credentials
66

7-
1. Log in to your NinjaOne portal
8-
2. Navigate to **Administration** > **API** > **Add Application**
9-
3. Configure the application:
10-
- **Application Name**: Enter a descriptive name (e.g., "SquaredUp Integration")
11-
- **Allowed Grant Types**: Ensure "Client Credentials" is enabled
12-
- **Scopes**: Select the following scopes:
13-
- `monitoring` - Required for device monitoring data
14-
- `management` - Required for management operations
15-
- `control` - Required for control operations
16-
- `offline_access` - Required for refresh tokens
17-
4. Click **Create Application**
18-
5. Copy the **Client ID** and **Client Secret** - you will need these when configuring the plugin in SquaredUp
7+
1. Log in to your NinjaOne portal.
8+
2. Navigate to **Administration** > **Apps** > **API** and click **Add**.
9+
3. When prompted to choose an **Application Platform**, select **API Services**. This is what enables the Client Credentials grant type the plugin uses — **there is no separate "Client Credentials" checkbox to tick on the next screen.**
10+
4. On the **Client app** screen, fill in:
11+
- **Name**: A descriptive name (e.g., "SquaredUp Integration").
12+
- **Redirect URIs**: `https://app.squaredup.com/settings/pluginsoauth2`
13+
- **Scopes**: Tick all three:
14+
- `Monitoring` — required for device monitoring data
15+
- `Management` — required for management operations
16+
- `Control` — required for control operations
17+
- **Allowed grant types**: `Refresh token` is **not** required by the plugin and can be left unticked.
18+
5. Save the application. NinjaOne will then show the **Client ID** and **Client Secret** — copy both, as you'll need them when configuring the plugin in SquaredUp. (The Client Secret is only shown once on creation; if you lose it, use **Generate new secret** to issue a new one.)
1919

2020
## Configure the Plugin in SquaredUp
2121

@@ -77,11 +77,11 @@ This plugin provides the following data streams for monitoring your NinjaOne env
7777

7878
## Troubleshooting
7979

80-
**Authentication Failed**: Ensure your Client ID and Client Secret are correct and that "Client Credentials" is enabled as an allowed grant type in your NinjaOne API application.
80+
**Authentication Failed**: Verify your Client ID and Client Secret are correct. Also check that your NinjaOne client app was created with the **API Services** application platform — this is what makes Client Credentials the active grant type. There is no separate "Client Credentials" checkbox in the client app screen; if you picked a different platform (e.g. Web app), the OAuth token request will fail.
8181

8282
**No Data Returned**: Verify that the selected API Region matches your NinjaOne instance region.
8383

84-
**Insufficient Permissions**: Ensure the API application has all required scopes (`monitoring`, `management`, `control`, `offline_access`).
84+
**Insufficient Permissions**: Ensure the API application has all required scopes (`Monitoring`, `Management`, `Control`).
8585

8686
## Additional Resources
8787

plugins/NinjaOne/v1/metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ninja-one",
33
"displayName": "NinjaOne",
4-
"version": "1.1.9",
4+
"version": "1.1.10",
55
"author": {
66
"name": "SquaredUp Labs",
77
"type": "labs"
@@ -23,7 +23,7 @@
2323
"oauth2ClientSecret": "{{clientSecret}}",
2424
"oauth2TokenUrl": "{{apiBaseUrl}}/oauth/token",
2525
"oauth2ClientSecretLocationDuringAuth": "body",
26-
"oauth2Scope": "monitoring management control offline_access"
26+
"oauth2Scope": "monitoring management control"
2727
}
2828
},
2929
"links": [

plugins/NinjaOne/v1/ui.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@
3535
"validation": {
3636
"required": true
3737
},
38-
"placeholder": "Enter your Client ID"
38+
"placeholder": "Enter a Client ID"
3939
},
4040
{
4141
"type": "password",
4242
"name": "clientSecret",
43-
"label": "Client Secret",
44-
"help": "Enter the Client Secret from your NinjaOne API credentials",
43+
"label": "Client secret",
44+
"help": "Enter the Client secret from your NinjaOne API credentials",
4545
"validation": {
4646
"required": true
4747
},
48-
"placeholder": "Enter your Client Secret"
48+
"placeholder": "Enter a Client secret"
4949
}
5050
]

0 commit comments

Comments
 (0)