Im getting loads of these service user login issues(1311) in my scheduled jobs

Im getting loads of these service user login issues(1311) in my scheduled jobs

avatar

I periodically am getting schedules failing because of this error, so for a job that runs 6 times a hour, 2 out of 6 will fail with this error:

Error executing job: Failed to login user (1311). System.ComponentModel.Win32Exception (1311): We can't sign you in with this credential because your domain isn't available. Make sure your device is connected to your organization's network and try again. If you previously signed in on this device with another credential, you can sign in with that credential.

Some info around the setup:
2 Node Setup, SQL database backend(is in a 2 node AG as well)
Repo is hosted on a UNC path but added via c:\PSU** as a sys link
PSU runs via a gmsa account
Have multiple other service accounts as variables which then the schedules use for their jobs

ive traced and logged the connection to the DC's all night on multiple nights, but the connection is always there no fluctuation in stability, cant be the credentials since its a GMSA account

Its pretty annoying having to hope for a schedule to run since its important they run reliably, when they need to run.

Can anyone please give me some pointers or support on this? Let me know if i can provide more information!

All Comments (3)

avatar

@lbaxhaku Can you give me a little more context from the log around the error message? If you look in %ProgramData%\PowerShellUniversal\Logs\System, you can find each days log. You should see that error and some info on either side of it. I also think some security logs around when this happens might provide some insight into login failures but I don't have a good set of IDs to filter by.

I'm mostly curious if it's attempting to an interactive or batch login. PSU doesn't do anything too crazy in terms of how it launches these processes. It effectively logs the user in, optionally loads the user profile, sets some environment variables, and then uses the users token to launch the process as that user.

It does it a little differently based on how the user is logging in. Based on the fact that this is a GMSA account, likely a batch login.

Adam Driscoll
PowerShell Expert and Developer at Devolutions

avatar

TimeCreated : 01/06/2026 08:00:01
Id : 4625
Message : An account failed to log on.

Subject:
Security ID: S-1-5-21-1715567821-1078081533-682003330-85068
Account Name: gmsaUniPwshP$
Account Domain: domain
Logon ID: 0x15C73BFC5

Logon Type: 2

Account For Which Logon Failed:
Security ID: S-1-0-0
Account Name: svcswstransfer
Account Domain: -

Failure Information:
Failure Reason: An Error occured during Logon.
Status: 0xC003000C
Sub Status: 0x0

Process Information:
Caller Process ID: 0x898
Caller Process Name: C:\Windows\System32\svchost.exe

Network Information:
Workstation Name: site3server1
Source Network Address: ::1
Source Port: 0

Detailed Authentication Information:
Logon Process: seclogo
Authentication Package: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
Transited Services: -
Package Name (NTLM only): -
Key Length: 0

This event is generated when a logon request fails. It is generated on the computer where access was attempted.

The Subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server
service, or a local process such as Winlogon.exe or Services.exe.

The Logon Type field indicates the kind of logon that was requested. The most common types are 2 (interactive) and 3 (network).

The Process Information fields indicate which account and process on the system requested the logon.

The Network Information fields indicate where a remote logon request originated. Workstation name is not always available and may be left
blank in some cases.

The authentication information fields provide detailed information about this specific logon request.
- Transited services indicate which intermediate services have participated in this logon request.
- Package name indicates which sub-protocol was used among the NTLM protocols.
- Key length indicates the length of the generated session key. This will be 0 if no session key was requested.

TimeCreated : 01/06/2026 08:00:01
Id : 4625
Message : An account failed to log on.

Subject:
Security ID: S-1-5-21-1715567821-1078081533-682003330-85068
Account Name: gmsaUniPwshP$
Account Domain: domain
Logon ID: 0x15C73BFC5

Logon Type: 4

Account For Which Logon Failed:
Security ID: S-1-0-0
Account Name: svcswstransfer
Account Domain: -

Failure Information:
Failure Reason: An Error occured during Logon.
Status: 0xC000005E
Sub Status: 0x0

Process Information:
Caller Process ID: 0x7768
Caller Process Name: C:\Program Files (x86)\Universal\Universal.Server.exe

Network Information:
Workstation Name: site3server1
Source Network Address: -
Source Port: -

Detailed Authentication Information:
Logon Process: Advapi
Authentication Package: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
Transited Services: -
Package Name (NTLM only): -
Key Length: 0

This event is generated when a logon request fails. It is generated on the computer where access was attempted.

The Subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server
service, or a local process such as Winlogon.exe or Services.exe.

The Logon Type field indicates the kind of logon that was requested. The most common types are 2 (interactive) and 3 (network).

The Process Information fields indicate which account and process on the system requested the logon.

The Network Information fields indicate where a remote logon request originated. Workstation name is not always available and may be left
blank in some cases.

The authentication information fields provide detailed information about this specific logon request.
- Transited services indicate which intermediate services have participated in this logon request.
- Package name indicates which sub-protocol was used among the NTLM protocols.
- Key length indicates the length of the generated session key. This will be 0 if no session key was requested.

TimeCreated : 01/06/2026 08:00:01
Id : 4776
Message : The computer attempted to validate the credentials for an account.

Authentication Package: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
Logon Account: svcswstransfer
Source Workstation: site3server1
Error Code: 0xC0000064

The PSU logs dont show anything pointing to a auth problem and the retry shortly after the original scheduled job has failed, also just works

avatar
Account For Which Logon Failed:
Security ID: S-1-0-0
Account Name: svcswstransfer
Account Domain: -


@lbaxhaku

The issue is with the credential variables. They need to be specified with either the down-level format (domain\username) or the UPN format. When the domain is not included, Windows will try to guess the domain but it doesn't always work. That is why the issue occurs intermittently.

Please let us know if this helps.

Closed