CPM/SRS - winRc=87: 'The parameter is incorrect.'
Symptom
When CPM/SRS tries to manage a Windows account, a winRc=87 error is returned. Depending on which log is viewed, the error may look like the below:
- .Debug.Log:
- Task [logon] failed with error [87]
- .log:
- Error in logon to user <domain>\<username> on domain <address>(\\<address>).(winRc=87) The parameter is incorrect.
- pm.log:
- Error in logon to user <domain>\<username> on domain <address>(\\<address>).(winRc=87) The parameter is incorrect.
Environment
Privileged Access Manager (PAM, self-hosted);Privilege Cloud Central Policy Manager (CPM);Secrets Rotation Service (SRS)
CPM/SRS
Windows Target
Cause
This error is usually caused by a leading or trailing white space character (ASCII 32) added to the address and/or username parameter of the account object.
winRc stands for Windows Return Code. Windows Return Codes are generated by Windows systems. The return code shown in the CPM/SRS logs and PVWA UI is from the target Windows machine and not from CPM/SRS.
winRc=87 Error Definition:
ERROR_INVALID_PARAMETER
87 (0x57)
The parameter is incorrect.
Resolution
To resolve this error, the extra white space character must be removed. The character can be most easily discovered by looking at the relevant parameter in a text editor. For example, referencing the sample logs listed above, an extra white space character exists in front of the address parameter.
Resources:
How does CPM Manage Windows Accounts Passwords
Windows System Error Codes
Windows Network Management Error Codes
Windows Routing and Remote Access Error Codes
Windows Sockets Error Codes