REST API: PASWS006E The session token is missing, invalid or expired.
61
Created On 11/10/26 11:02 AM - Last Modified 11/10/26 15:53 PM
Symptom
When making REST API calls to CyberArk, there are error messages similar to:
PASWS006E The session token is missing, invalid or expired.
How can this error be resolved?
Environment
12.2;12.6;13.0;13.2;14.0 Privileged Access Manager (PAM, self-hosted) Cyber-Ark API/SDK Cyber-Ark API/SDK REST API
Cause
This is caused by subsequent API calls to a load balancer VIP which redirects the call to a different PVWA IIS server than the original call which generated the initial session token.
Resolution
During the API user logon, ensure that the ConcurrentSessions parameter is set to true. See documentation:
https://docs.cyberark.com/PAS/latest/en/Content/SDK/CyberArk%20Authentication%20-%20Logon_v10.htm?tocpath=Developer%7CREST%20APIs%7CAuthentication%7CLogon%7C_____1#Bodyparameters
A workaround in some environments is to use the PVWA IIS server's FQDN in the API call.
Another option is to configure the load balancer to ensure that API calls go to a single specific PVWA IIS server.
https://docs.cyberark.com/PAS/latest/en/Content/SDK/CyberArk%20Authentication%20-%20Logon_v10.htm?tocpath=Developer%7CREST%20APIs%7CAuthentication%7CLogon%7C_____1#Bodyparameters
A workaround in some environments is to use the PVWA IIS server's FQDN in the API call.
Another option is to configure the load balancer to ensure that API calls go to a single specific PVWA IIS server.