User simulation
Introduction to user simulation
User simulation can be a powerful tool for testing the access control or debug an issue with a specific user. Only users with Main administrator or Simulator rights are allowed to simulate other users.
When simulating a user, the user interface is started using the rights and user preferences of that user to provide the exact same view of the application.
Simulator rights are granted in the IAM menu Authorization > Users > tab Administrators > tab Simulator.
You can simulate a user in three ways:
- in IAM.
- in Indicium.
- via Indicium's API.
User simulation in IAM
main administrator simulatorWhen a user with Simulator rights logs on to the application, a button is displayed next to the password field.
The log on dialog is skipped if Windows authentication is used. Hold the Ctrl key when logging on to force the dialog to be shown.
-
To simulate a user, enter your own credentials and then click the button to reveal the user simulation input field.
-
Enter the name of the user you want to simulate and click OK.
The user interface will now load the rights and user preferences of that user.
User simulation in Indicium
main administrator simulatorWith Indicium, you can simulate a user if you are a main administrator or a simulation administrator.
With these rights, an extra link is available on the root page of Indicium:
-
Click on the link User simulation.
User simulation link in Indicium's root page
-
Select the user you want to simulate from the dropdown list and click on Simulate.
Select a user
-
Now, use your application with the role set of the selected user.
Indicium shows which user is being simulated:
The user that is being simulated
-
When you are ready with the simulation, click on the Stop simulation button.
During a simulation, Indicium's root page also shows which user is being simulated:
The user that is being simulated is displayed on Indicium's root page
User simulation via the API
main administrator simulatorTo simulate a user via Indicium's API, use the following call. It will return the user you are simulating. If you are not simulating, it will
return the status code NoContent
.
GET account/api/usersimulation
The next call will start the simulation for the selected user and return the status code Ok
when the simulation succeeds. If not, you will receive a badRequest
with the error message.
PATCH account/api/usersimulation
Request body:
{
"simulated_user": "{username you want to simulate}"
}
To stop the user simulation, send the following command:
DELETE account/api/usersimulation
Retrieve the user who originally logged in
main administrator simulator Universal GUI Windows GUIOn SQL Server, you can retrieve the user who initially logged in using the tsf_original_login
session variable:
select SESSION_CONTEXT(N'tsf_original_login')