Trying to really nail down my understanding of service mode/user mode. The docs and forum answers are not clear, or maybe how it works has changed recently.
I understand that in service mode, the Robot Service sits in Session 0. Then, when Orchestrator sends down an unattended job, the Robot Service spins up an Executor to run the job.
My question is: Does it first spin up a User Session too? Does it use the credentials stored in Orchestrator for that particular machine to do that? Does this new User Session run in Session 1? I read other things that said now it doesn’t use stored credentials, but now just uses something called LocalSystem user? Can someone explain how this works exactly, in 2024?
Let me clarify the doubts around how unattended bot uses sessions.
Service Mode (Unattended Automation)
Robot Service in Session 0:
When the UiPath Robot is installed in service mode, it runs as a Windows service under Session 0, which is reserved for services and background processes.
Orchestrator and Job Execution:
The Orchestrator sends an unattended job to the Robot Service.
The Robot Service receives the job and then needs to run this job in a user session where it can interact with the desktop (if needed).
User Session Initialization:
Yes, the Robot Service first spins up a User Session. This is necessary because most automation tasks require interaction with the desktop environment.
To initiate this User Session, the Robot Service uses the credentials stored in Orchestrator for the specific machine/user.
Credentials and Session Details:
Stored Credentials: Orchestrator stores the credentials (username and password) securely, which are used to log in to the machine where the job needs to run.
When a job is triggered, the Robot Service uses these stored credentials to create a new user session.
Session 1: Typically, this new user session runs in Session 1 or another session number other than 0, depending on the session availability on the machine.
Execution in the User Session:
Once the user session is created and logged in, the UiPath Executor runs the automation job within this session.
This allows the robot to interact with applications, simulate clicks, type into fields, and perform other UI interactions.
LocalSystem User vs. Stored Credentials:
The use of the LocalSystem account is typically for attended automation or scenarios where the automation needs to run in the context of the system itself without a specific user context.
For unattended automation, especially when interactions with desktop applications are required, the system still relies on the stored credentials to create and log into a user session with the necessary privileges.
In Summary:
Service Mode (Unattended) involves the Robot Service running in Session 0 and creating new user sessions using credentials stored in Orchestrator.
These user sessions allow the robot to interact with the desktop environment and execute automation tasks as if a human user were performing them.
The process uses the user credentials stored in Orchestrator to log into the machine and run the job in a user session, typically in Session 1 or another available session.
Understanding these details ensures clarity on how UiPath handles unattended automation, especially regarding user sessions and credential management.