Background process Unattended - WindowsIntegrated credentials


I’ve created a background process.
Everything works except “Send Exchange Mail Message” which throws a 401, I’ve set this to use WindowsIntegrated AuthenticationType (I know I can set this to UsernameAndPassword, but I want this to work as another process will have to do an sql query with similar auth).

I’ve set the environment variable “UIPATH_HEADLESS_WITH_USER” to “True”
Per the instructions here Background Process Automation

Am I reading the documentation wrong?

Orchestrator: 2021.10.1

It works fine running the process from the uipath assistant.

@sven.wullum1 Is your bot running with the user name and password or the local service as username ?

HI @sven.wullum1

Check like this once if you are trying to run as unattended


What do you mean?

In the Orchestrator or in services.msc?

Just check in the Orchestrator jobs table - username column

The job is started like this:

And the result:

As you can see the host identity is set to Local Service, even though I’ve set a specific user to run the process.

From UiPath Support

Send Exchange Mail Message not working with “WindowsIntegrated” authentication type.


The “WindowsIntegrated” authentication only works for Exchange Online (Office 365).

For Exchange On-Premise you will need to configure the “Logon” section and add the “Domain”, “User”, “Password/SecurePassword”.

More info here:

When you are in attended mode, the activity has a fallback to use the current authenticated user, but it won’t work in unattended.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.