I’ve scheduled a UiPath background process in Orchestrator, but when it’s triggered by the scheduler, it fails to read the configuration file, stating the workbook doesn’t exist. However, the same process runs fine manually through UiPath Studio or Assistant.
The issue seems to be that the process is running under the host identity 'NT AUTHORITY\LOCAL SERVICE' instead of the configured user '{Execution_Target}'. I’m not sure why this mismatch is happening.
Background Processes started from an Attended Robot run in the user’s session (Session 1 ) while the ones started from Unattended Robots run in the Windows Session. (Robot - Background Process Automation)
Reading above I don’t think you can use the normal user file location folders since we aren’t on the user session, but on the windows session. Is the file on a user location? If so , can you move the config file to another location?
Thank you for your input. I moved my configuration file to the C:\Windows\ location, and the process progressed further. However, I encountered a new error when attempting to send an email at the end of the process. The error message reads:
“An error occurred when sending email. Error message - Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80070005 Adgang nægtet. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).”
This appears to be another instance of insufficient permissions, as the process is running under the NT AUTHORITY\LOCAL SERVICE account. I am unsure how to resolve this issue.
According to the documentation you provided, it states: “To use credentials specified in Orchestrator, you need to configure the UIPATH_HEADLESS_WITH_USER system environment variable on the robot machine and set the value to True.”
However, I’m unsure whether enabling this variable as True will impact other foreground processes running on the machine. Could you please clarify this?
That’s probably the solution. I believe it should be fine for the foreground processes, but I’m not 100% sure. Do you have a development environment you can try it out on first? Or a second, less used machine?
I configured UIPATH_HEADLESS_WITH_USER as True. It takes the correct host identity and send out final emails using the configured outlook account. But still we need to keep configuration file inside a folder which relates to session 0.
I experienced that it won’t affect foreground processes.
I’m glad you got a solution. You could consider replacing the config with assets. This also allows you to change settings from the orchestrator directly, which I consider easier to maintain.