Skip to content

Commit ba2da06

Browse files
hilram7github-actions[bot]claude
authored
Add PingCastle KB: Scheduler/Agent 401 Unauthorized Error (#749)
* Add PingCastle KB: scheduler/agent 401 Unauthorized error - Add KB article for scheduler and agent deployment 401 Unauthorized error, with images - Enable KB support for PingCastle in kb_allowlist.json and products.js - Add _category_.json for PingCastle KB sidebar - Add sidebar_position to all 7 PingCastle 3.5 docs to fix KB appearing at top of sidebar * fix(vale): auto-fix substitutions and removals * fix(vale): auto-fix rewrites (AI-assisted) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(dale): auto-fix documentation issues (AI-assisted) --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5ed3887 commit ba2da06

16 files changed

+281
-186
lines changed
11.1 KB
Loading
11.1 KB
Loading
22 KB
Loading
32.5 KB
Loading
38.3 KB
Loading

docs/kb/pingcastle/_category_.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"label": "Knowledge Base",
3+
"position": 999,
4+
"collapsed": true,
5+
"collapsible": true
6+
}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
title: "Scheduler or Agent Deployment Returns 401 Unauthorized Error"
3+
description: "Resolve a 401 Unauthorized error when using the PingCastle scheduler or agent deployment via command line or Swagger."
4+
---
5+
6+
# Scheduler or Agent Deployment Returns 401 Unauthorized Error
7+
8+
## Related Queries
9+
10+
- "Receiving 401 unauthorized error when I launch the scheduler."
11+
- "I have followed the steps to install with the appropriate rights and still get a 401 unauthorized error when trying to use the scheduler."
12+
- "PingCastle agent unable to connect to API."
13+
- "PingCastle swagger endpoint does not work."
14+
15+
## Symptom
16+
17+
> **NOTE:** If you are using the scheduler functionality from the PingCastle web application and your app pool manages the tasks, this article does not apply to your setup.
18+
19+
When attempting to use the scheduler for automation in PingCastle Pro or PingCastle Enterprise, or when sending data via command line or Swagger, you receive a 401 Unauthorized error. This issue has been persistent since the initial setup and has never worked automatically, requiring manual intervention.
20+
21+
Example log entries:
22+
23+
```
24+
Starting the task: Retrieve Settings via API
25+
[17:22:37] API Login OK
26+
Exception: The remote server returned an error: (401) Unauthorized.
27+
Task Retrieve Settings via API completed
28+
29+
Starting the task: Send via API
30+
[17:24:24] API Login OK
31+
domain.local
32+
Exception: The remote server returned an error: (401) Unauthorized.
33+
Task Send via API completed
34+
```
35+
36+
## Cause
37+
38+
This issue occurs due to one or more of the following:
39+
40+
- An incorrect or mismatched API key in the scheduler, command line, or Swagger configuration
41+
- **Anonymous Authentication** not enabled in IIS on the server hosting the PingCastle web application
42+
- In some cases, insufficient permissions for the service account
43+
44+
## Resolution
45+
46+
1. In the PingCastle web application, navigate to **Configuration → Agents** to view the available API keys.
47+
48+
![Configuration menu with Agents option highlighted](0-images/pingcastle-configuration-agents-menu.png)
49+
50+
2. Locate the API key being used and compare it to the key configured in your command line, Swagger endpoint, or scheduler settings. Correct any mismatch.
51+
52+
![Agents page showing API keys, authorization types, and owner](0-images/pingcastle-api-keys-table.png)
53+
54+
3. Open **Task Scheduler** on the server, navigate to **Task Scheduler Library → PingCastle**, and verify that the API key configured in each scheduled task is correct.
55+
56+
4. Open **IIS Manager** on the server hosting the PingCastle Pro or PingCastle Enterprise web application.
57+
58+
5. In the left pane, expand **Sites** and select **PingCastlePro** or **PingCastleEnterprise**.
59+
60+
![IIS Manager with PingCastleEnterprise site selected and Authentication icon visible](0-images/iis-manager-site-selection.png)
61+
62+
6. Double-click **Authentication** in the center pane.
63+
64+
![Authentication settings showing Anonymous Authentication disabled and Windows Authentication enabled](0-images/iis-authentication-settings.png)
65+
66+
7. Right-click **Anonymous Authentication** and select **Enable**.
67+
68+
![Context menu for enabling Anonymous Authentication in IIS](0-images/iis-anonymous-authentication-enable.png)
69+
70+
8. Test the scheduler or agent again to confirm that the 401 Unauthorized error is resolved.
71+
72+
> **NOTE:** Changes to authentication settings in IIS take effect immediately; you do not need to restart IIS. Ensure that the scheduler configuration matches the settings in PingCastle Pro or PingCastle Enterprise. For more information, refer to [API Setup](https://docs.netwrix.com/docs/pingcastle/3_5/proinstall#api-key-and-endpoint).
73+
74+
## Related Links
75+
76+
- [API Setup](https://docs.netwrix.com/docs/pingcastle/3_5/proinstall#api-key-and-endpoint)

docs/pingcastle/3.5/enterpriseinstall.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
sidebar_position: 1
3+
---
14
# PingCastle Enterprise Installation and Configuration
25

36
import Tabs from '@theme/Tabs';
@@ -384,7 +387,7 @@ If you need to import reports larger than 200MB manually, you'll need to adjust
384387
```
385388

386389
:::warning
387-
This setting only affects the client-side validation. Ensure your IIS upload limit (configured above) is set appropriately to handle files of this size.
390+
This setting only affects the client-side validation. Ensure your IIS upload limit (configured earlier) is set appropriately to handle files of this size.
388391
:::
389392

390393
:::note
@@ -1419,7 +1422,7 @@ PingCastle Enterprise can run on any infrastructure that supports ASP.NET Core 8
14191422

14201423
**Windows with IIS (Manual Installation)**
14211424
- [Host ASP.NET Core on Windows with IIS](https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/)
1422-
- Follow the steps outlined above: extract ZIP, create IIS website, disable Default Web Site, configure app pool, and set SQL permissions
1425+
- Follow the steps outlined earlier: extract ZIP, create IIS website, disable Default Web Site, configure app pool, and set SQL permissions
14231426

14241427
**Linux (Limited Support - Manual Installation)**
14251428
- [Host ASP.NET Core on Linux with Nginx](https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx)
@@ -1968,7 +1971,7 @@ Proxy settings rely on the current user proxy configuration, which can be define
19681971
<details>
19691972
<summary>Configuring SAML2 with Okta</summary>
19701973

1971-
Configure PingCastle Enterprise with Okta as your SAML2 identity provider using the steps below.
1974+
Configure PingCastle Enterprise with Okta as your SAML2 identity provider using the following steps.
19721975

19731976
#### Step 1 Access Okta Admin Portal
19741977

@@ -2165,7 +2168,7 @@ If the certificate can't be recognized, an error is displayed:
21652168

21662169
![Certificate Not Recognized](/images/pingcastle/enterpriseinstall/Authentication/cert-not-recognized.webp)
21672170

2168-
Ensure the user account login matches one of the certificate identifiers listed above.
2171+
Ensure the user account login matches one of the certificate identifiers listed earlier.
21692172

21702173
</TabItem>
21712174
</Tabs>
@@ -2256,7 +2259,7 @@ The Email configuration section in appsettings.json supports both providers:
22562259

22572260
The email functionality sends password reset requests and notifications such as weekly reports.
22582261

2259-
For detailed instructions on configuring Modern Authentication with Office 365, see the section below.
2262+
For detailed instructions on configuring Modern Authentication with Office 365, see the following section.
22602263

22612264
### Modern Authentication with Office 365 Using Graph API
22622265

@@ -3194,7 +3197,7 @@ logging is enabled).
31943197
### Connection tests
31953198

31963199
To verify the connection is properly configured, you can sync a domain using
3197-
the button described above.
3200+
the button described earlier.
31983201

31993202
If there is an error, it will be displayed as an exception.
32003203

docs/pingcastle/3.5/enterpriseupgrade.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
sidebar_position: 2
3+
---
14
# PingCastle Enterprise Upgrade Guide
25

36
## Before proceeding to the upgrade
@@ -13,14 +16,14 @@ each page.
1316

1417
**Database backup**
1518

16-
We highly recommend to backup the data before proceeding to an upgrade.
19+
Netwrix highly recommends backing up the data before proceeding with an upgrade.
1720

18-
The data is stored I the database. No data is stored outside of the DB.
21+
The data is stored in the database. No data is stored outside of the DB.
1922

2023
# Software requirements
2124

2225
Before performing the upgrade, the software requirements for the new
23-
version need to be met. The table below lays out the different
26+
version need to be met. The following table lays out the different
2427
requirements for versions.
2528

2629
| Version | Requirement |

0 commit comments

Comments
 (0)