A JavaScript bookmarklet that allows you to seamlessly switch users during a PeopleSoft session.
-
You must know the node password for the environment that you want to switch users in.
-
The environment must have Switch User functionality enabled (PeopleTools > Utilities > Administration > PeopleTools Options). The
Enable Switch User
value must be set toAll
orSome
. If the value is set toSome
, then you need to check theAllow Switch User
box on the User Profile (PeopleTools > Security > User Profiles > User Profiles) for the users that you want to switch between.
Add the PS-SwitchToken bookmarklet to your browser’s bookmarks, login to the PeopleSoft web interface (PIA) and click the bookmarklet. Alternatively, you can invoke the JavaScript code in your browser's dev console in a PeopleSoft session.
- Input the node password
- Input the User ID that you want to switch to and click OK
The page will refresh and you will be authenticated as the new user if the script was successful.
tip: If you do not want to input the node password each time, then you can hardcode the password on this line of the code.
Demo:
- This utility is unable to work with certain formats of the PS_TOKEN. If you have an unsupported format, then the script will output
Invalid or unsupported token format
. - If you are taken to the login page with the message
Illegal identity switch has been detected by the System. Please re-login
after invoking the script, then it possible that the user you are logged in as does not haveSwitch User
enabled. - If the new user session does not kick in after invoking the script, then ensure that the User ID is valid and is not locked out.
- If you have a PS_TOKEN cookie in the browser, but receive the message
PS_TOKEN cookie not detected in browser.
, then ensure theHTTPOnly
setting is disabled for the PS_TOKEN cookie under theCookie Rules
tab of the Web Profile.
This utility is merely a JavaScript port of Alexey Tyurin’s TokenChpoken python script. Credit and thanks to Alexey and the ERPScan team for their PS_TOKEN research efforts.
This utility makes use of the following JavaScript libraries: