PeopleSoft SwitchUser Functionality


SwitchUser function allows developers to switch the logged in User ID from one user to another. You can only switch identities if you either have another user's  ID and password or another user's valid authentication token (AuthToken). You May need in integration broker code or guest login in PeopleSoft and you want to perform certain action that guest wont allow.

Get Current User Token:
&MycurrentUser = GenToken();

Switchuser from original to next user
&switchUser = SwitchUser(, , "", "");

switchuser from next user to original
&switchUser = SwitchUser("", "",  &MycurrentUser , "");