Rdp connection failed: Message: Account restriction., Last error: 131095

Why do I get the error "Rdp connection failed: Message: Account restriction., Last error: 131095" when executing an automation that accesses a network folder mapped as a network unit?

Issue Description

While executing an automation, the Robot intermittently fails to access a network folder mapped as a network unit. The error thrown is "Rdp connection failed: Message: Account restriction., Last error: 131095" and it is not consistent, with occasional successful operations. It was observed that after accessing the machine via Remote Desktop Protocol (RDP), the issue temporarily resolves.

Resolution

  1. Remove the Robot's service account from the "Protected Users" group:
    • This allows the account to delegate credentials, enabling access to network resources.
  1. Configure the Robot's service account to allow credential delegation:
    • This step ensures that the account can properly authenticate and access external resources like network shares without issues.

Why Accessing via RDP Temporarily Fixed the Issue

When connecting via RDP, the system creates an active session where credentials are cached or session delegation is temporarily enabled. This allows access to network resources during the RDP session. However, once the session is terminated, these credentials are no longer cached, causing the Robot to fail in authenticating the network folder due to the restricted delegation settings.

By modifying the account to permit credential delegation, the Robot can now access network resources without requiring an RDP session.