RDS client disconnected codes and reasons

This article provides a script to get information about client-side Microsoft® Windows® Remote Desktop Services (RDS)
and Remote Desktop Protocol (RDP) connection issues and describes the most up-to-date disconnect codes and reasons.

Note: Some of the disconnect codes that the script returns are extended codes. If you cannot find the disconnect code in the
following Disconnect reasons table, see the following Extended reasons table.

When you troubleshoot client-side connections, be aware that depending on configurations, such as security level and encryption,
the client might attempt a connection multiple times and disconnect before making the final connection.

Script

The following PowerShell® script queries COM MSTscAx with a decimal disconnect code ID. If the script finds the code, it
returns the description.

Script:    # PowerShell script to return description of rds client disconnect codes in decimal format (not hex)
Param(
    [parameter(Position=0,Mandatory=$true,HelpMessage="Enter the disconnect reason code in decimal from client side rds trace")]
    [string] $disconnectReason,
    [string] $extendedReason = 0
)
$mstsc = New-Object -ComObject MSTscAx.MsTscAx

write-host "description: $($mstsc.GetErrorDescription($disconnectReason,$extendedReason))"

Note: If you get the "an internal error has occurred" message, the script could not find the disconnect code, and the return
description is not valid.

Example

The following event log entry example shows event ID 1026 of an RDP client session-disconnected event. Event code 263 means no error.

Log Name:      Microsoft-Windows-TerminalServices-RDPClient/Operational
Source:        Microsoft-Windows-TerminalServices-ClientActiveXCore
Date:          6/24/2020 7:26:58 PM
Event ID:      1026
Task Category: Connection Sequence
Level:         Information
Keywords:     
User:          client-machine\Arnold
Computer:      client-machine
Description:
RDP ClientActiveX has been disconnected (Reason= 263)
Event Xml:
<Event xmlns="https://schemas.microsoft.com/win/2004/08/events/event Jump ">
  <System>
    <Provider Name="Microsoft-Windows-TerminalServices-ClientActiveXCore" Guid="{28AA95BB-D444-4719-A36F-40462168127E}" />
    <EventID>1026</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>101</Task>
    <Opcode>11</Opcode>
    <Keywords>0x4000000000000000</Keywords>
    <TimeCreated SystemTime="2017-05-03T11:40:58.058887000Z" />
    <EventRecordID>61070</EventRecordID>
    <Correlation ActivityID="{3371E543-77B1-41BA-8835-674829620000}" />
    <Execution ProcessID="14296" ThreadID="15212" />
    <Channel>Microsoft-Windows-TerminalServices-RDPClient/Operational</Channel>
    <Computer>client-machine</Computer>
    <Security UserID="" />
  </System>
  <EventData>
    <Data Name="Name">Disconnect Reason</Data>
    <Data Name="Value">263</Data>
    <Data Name="CustomLevel">Info</Data>
  </EventData>
</Event>

Disconnect reasons

The following table shows the disconnect codes and reasons:

CodeReason
0No error.
1User-initiated client disconnect.
2User-initiated client logoff.
3Your Remote Desktop Services session has ended, possibly for one of the following reasons: The administrator has ended the session. An error occurred while the connection was being established. A network problem occurred. For help solving the problem, see "Remote Desktop" in Help and Support.
260Remote Desktop can't find the computer "". This might mean that "" does not belong to the specified network. Verify the computer name and domain that you are trying to connect to.
262This computer can't connect to the remote computer. Your computer does not have enough virtual memory available. Close your other programs, and then try connecting again. If the problem continues, contact your network administrator or technical support.
264This computer can't connect to the remote computer. The two computers couldn't connect in the amount of time allotted. Try connecting again. If the problem continues, contact your network administrator or technical support.
266The smart card service is not running. Please start the smart card service and try again.
516Remote Desktop can't connect to the remote computer for one of these reasons: 1) Remote access to the server is not enabled 2) The remote computer is turned off 3) The remote computer is not available on the network Make sure the remote computer is turned on and connected to the network, and that remote access is enabled.
522A smart card reader was not detected. Please attach a smart card reader and try again.
772This computer can't connect to the remote computer. The connection was lost due to a network error. Try connecting again. If the problem continues, contact your network administrator or technical support.
778There is no card inserted in the smart card reader. Please insert your smart card and try again.
1030Because of a security error, the client could not connect to the remote computer. Verify that you are logged on to the network, and then try connecting again.
1032The specified computer name contains invalid characters. Please verify the name and try again.
1034An error has occurred in the smart card subsystem. Please contact your helpdesk about this error.
1796This computer can't connect to the remote computer. Try connecting again. If the problem continues, contact the owner of the remote computer or your network administrator.
1800Your computer could not connect to another console session on the remote computer because you already have a console session in progress.
2056The remote computer disconnected the session because of an error in the licensing protocol. Please try connecting to the remote computer again or contact your server administrator.
2308Your Remote Desktop Services session has ended. The connection to the remote computer was lost, possibly due to network connectivity problems. Try connecting to the remote computer again. If the problem continues, contact your network administrator or technical support.
2311The connection has been terminated because an unexpected server authentication certificate was received from the remote computer. Try connecting again. If the problem continues, contact the owner of the remote computer or your network administrator.
2312A licensing error occurred while the client was attempting to connect (Licensing timed out). Please try connecting to the remote computer again.
2567The specified username does not exist. Verify the username and try logging in again. If the problem continues, contact your system administrator or technical support.
2820This computer can't connect to the remote computer. An error occurred that prevented the connection. Try connecting again. If the problem continues, contact the owner of the remote computer or your network administrator.
2822Because of an error in data encryption, this session will end. Please try connecting to the remote computer again.
2823The user account is currently disabled and cannot be used. For assistance, contact your system administrator or technical support.
2825The remote computer requires Network Level Authentication, which your computer does not support. For assistance, contact your system administrator or technical support.
3079A user account restriction (for example, a time-of-day restriction) is preventing you from logging on. For assistance, contact your system administrator or technical support.
3080The remote session was disconnected because of a decompression failure at the client side. Please try connecting to the remote computer again.
3335As a security precaution, the user account has been locked because there were too many logon attempts or password change attempts. Wait a while before trying again, or contact your system administrator or technical support.
3337The security policy of your computer requires you to type a password on the Windows Security dialog box. However, the remote computer you want to connect to cannot recognize credentials supplied using the Windows Security dialog box. For assistance, contact your system administrator or technical support.
3590The client can't connect because it doesn't support FIPS encryption level. Please lower the server side required security level Policy, or contact your network administrator for assistance.
3591This user account has expired. For assistance, contact your system administrator or technical support.
3592Failed to reconnect to your remote session. Please try to connect again.
3593The remote PC doesn't support Restricted Administration mode.
3847This user account's password has expired. The password must change in order to logon. Please update the password or contact your system administrator or technical support.
3848A connection will not be made because credentials may not be sent to the remote computer. For assistance, contact your system administrator.
4103The system administrator has restricted the times during which you may log in. Try logging in later. If the problem continues, contact your system administrator or technical support.
4104The remote session was disconnected because your computer is running low on video resources. Close your other programs, and then try connecting again. If the problem continues, contact your network administrator or technical support.
4359The system administrator has limited the computers you can log on with. Try logging on at a different computer. If the problem continues, contact your system administrator or technical support.
4615You must change your password before logging on the first time. Please update your password or contact your system administrator or technical support.
4871The system administrator has restricted the types of logon (network or interactive) that you may use. For assistance, contact your system administrator or technical support.
5127The Kerberos sub-protocol User2User is required. For assistance, contact your system administrator or technical support.
6919Remote Desktop cannot connect to the remote computer because the authentication certificate received from the remote computer is expired or invalid. In some cases, this error might also be caused by a large time discrepancy between the client and server computers.
7431Remote Desktop cannot verify the identity of the remote computer because there is a time or date difference between your computer and the remote computer. Make sure your computer's clock is set to the correct time, and then try connecting again. If the problem occurs again, contact your network administrator or the owner of the remote computer.
8711Your computer can't connect to the remote computer because your smart card is locked out. Contact your network administrator about unlocking your smart card or resetting your PIN.
9479Could not auto-reconnect to your applications,please re-launch your applications.
9732Client and server versions do not match. Please upgrade your client software and then try connecting again.
33554433Failed to reconnect to the remote program. Please restart the remote program.
33554434The remote computer does not support RemoteApp. For assistance, contact your system administrator.
50331649Your computer can't connect to the remote computer because the username or password is not valid. Type a valid user name and password.
50331650Your computer can't connect to the remote computer because it can't verify the certificate revocation list. Contact your network administrator for assistance.
50331651Your computer can't connect to the remote computer due to one of the following reasons: 1) The requested Remote Desktop Gateway server address and the server SSL certificate subject name do not match. 2) The certificate is expired or revoked. 3) The certificate root authority does not trust the certificate. Contact your network administrator for assistance.
50331652Your computer can't connect to the remote computer because the SSL certificate was revoked by the certification authority. Contact your network administrator for assistance.
50331653This computer can't verify the identity of the RD Gateway "". It's not safe to connect to servers that can't be identified. Contact your network administrator for assistance.
50331654Your computer can't connect to the remote computer because the Remote Desktop Gateway server address requested and the certificate subject name do not match. Contact your network administrator for assistance.
50331655Your computer can't connect to the remote computer because the Remote Desktop Gateway server's certificate has expired or has been revoked. Contact your network administrator for assistance.
50331656Your computer can't connect to the remote computer because an error occurred on the remote computer that you want to connect to. Contact your network administrator for assistance.
50331657An error occurred while sending data to the Remote Desktop Gateway server. The server is temporarily unavailable or a network connection is down. Try again later, or contact your network administrator for assistance.
50331658An error occurred while receiving data from the Remote Desktop Gateway server. Either the server is temporarily unavailable or a network connection is down. Try again later, or contact your network administrator for assistance.
50331659Your computer can't connect to the remote computer because an alternate logon method is required. Contact your network administrator for assistance.
50331660Your computer can't connect to the remote computer because the Remote Desktop Gateway server address is unreachable or incorrect. Type a valid Remote Desktop Gateway server address.
50331661Your computer can't connect to the remote computer because the Remote Desktop Gateway server is temporarily unavailable. Try reconnecting later or contact your network administrator for assistance.
50331662Your computer can't connect to the remote computer because the Remote Desktop Services client component is missing or is an incorrect version. Verify that setup was completed successfully, and then try reconnecting later.
50331663Your computer can't connect to the remote computer because the Remote Desktop Gateway server is running low on server resources and is temporarily unavailable. Try reconnecting later or contact your network administrator for assistance.
50331664Your computer can't connect to the remote computer because an incorrect version of rpcrt4.dll has been detected. Verify that all components for Remote Desktop Gateway client were installed correctly.
50331665Your computer can't connect to the remote computer because no smart card service is installed. Install a smart card service and then try again, or contact your network administrator for assistance.
50331666Your computer can't stay connected to the remote computer because the smart card has been removed. Try again using a valid smart card, or contact your network administrator for assistance.
50331667Your computer can't connect to the remote computer because no smart card is available. Try again using a smart card.
50331668Your computer can't stay connected to the remote computer because the smart card has been removed. Reinsert the smart card and then try again.
50331669Your computer can't connect to the remote computer because the user name or password is not valid. Please type a valid user name and password.
50331671Your computer can't connect to the remote computer because a security package error occurred in the transport layer. Retry the connection or contact your network administrator for assistance.
50331672The Remote Desktop Gateway server has ended the connection. Try reconnecting later or contact your network administrator for assistance.
50331673The Remote Desktop Gateway server administrator has ended the connection. Try reconnecting later or contact your network administrator for assistance.
50331674Your computer can't connect to the remote computer due to one of the following reasons: 1) Your credentials (the combination of user name, domain, and password) were incorrect. 2) Your smart card was not recognized.
50331675Remote Desktop can't connect to the remote computer "" for one of these reasons: 1) Your user account is not listed in the RD Gateway's permission list 2) You might have specified the remote computer in NetBIOS format (for example, computer1), but the RD Gateway is expecting an FQDN or IP address format (for example, computer1.fabrikam.com or 157.60.0.1). Contact your network administrator for assistance.
50331676Remote Desktop can't connect to the remote computer "" for one of these reasons: 1) Your user account is not authorized to access the RD Gateway "" 2) Your computer is not authorized to access the RD Gateway "" 3) You are using an incompatible authentication method (for example, the RD Gateway might be expecting a smart card but you provided a password) Contact your network administrator for assistance.
50331679Your computer can't connect to the remote computer because your network administrator has restricted access to this RD Gateway server. Contact your network administrator for assistance.
50331680Your computer can't connect to the remote computer because the web proxy server requires authentication. To allow unauthenticated traffic to an RD Gateway server through your web proxy server, contact your network administrator.
50331681Your computer can't connect to the remote computer because your password has expired or you must change the password. Please change the password or contact your network administrator or technical support for assistance.
50331682Your computer can't connect to the remote computer because the Remote Desktop Gateway server reached its maximum allowed connections. Try reconnecting later or contact your network administrator for assistance.
50331683Your computer can't connect to the remote computer because the Remote Desktop Gateway server does not support the request. Contact your network administrator for assistance.
50331684Your computer can't connect to the remote computer because the client does not support one of the Remote Desktop Gateway's capabilities. Contact your network administrator for assistance.
50331685Your computer can't connect to the remote computer because the Remote Desktop Gateway server and this computer are incompatible. Contact your network administrator for assistance.
50331686Your computer can't connect to the remote computer because the credentials used are not valid. Insert a valid smart card and type a PIN or password, and then try connecting again.
50331687Your computer can't connect to the remote computer because your computer or device did not pass the Network Access Protection requirements set by your network administrator. Contact your network administrator for assistance.
50331688Your computer can't connect to the remote computer because no certificate was configured to use at the Remote Desktop Gateway server. Contact your network administrator for assistance.
50331689Your computer can't connect to the remote computer because the RD Gateway server that you are trying to connect to is not allowed by your computer administrator. If you are the administrator, add this Remote Desktop Gateway server name to the trusted Remote Desktop Gateway server list on your computer and then try connecting again.
50331690Your computer can't connect to the remote computer because your computer or device did not meet the Network Access Protection requirements set by your network administrator, for one of the following reasons: 1) The Remote Desktop Gateway server name and the server's public key certificate subject name do not match. 2) The certificate has expired or has been revoked. 3) The certificate root authority does not trust the certificate. 4) The certificate key extension does not support encryption. 5) Your computer cannot verify the certificate revocation list. Contact your network administrator for assistance.
50331691Your computer can't connect to the remote computer because a user name and password are required to authenticate to the Remote Desktop Gateway server instead of smart card credentials.
50331692Your computer can't connect to the remote computer because smart card credentials are required to authenticate to the Remote Desktop Gateway server instead of a user name and password.
50331693Your computer can't connect to the remote computer because no smart card reader is detected. Connect a smart card reader and then try again, or contact your network administrator for assistance.
50331695Your computer can't connect to the remote computer because authentication to the firewall failed due to missing firewall credentials. To resolve the issue, go to the firewall website that your network administrator recommends, and then try the connection again, or contact your network administrator for assistance.
50331696Your computer can't connect to the remote computer because authentication to the firewall failed due to invalid firewall credentials. To resolve the issue, go to the firewall website that your network administrator recommends, and then try the connection again, or contact your network administrator for assistance.
50331698Your Remote Desktop Services session ended because the remote computer didn't receive any input from you.
50331699The connection has been disconnected because the session timeout limit was reached.
50331700Your computer can't connect to the remote computer because an invalid cookie was sent to the Remote Desktop Gateway server. Contact your network administrator for assistance.
50331701Your computer can't connect to the remote computer because the cookie was rejected by the Remote Desktop Gateway server. Contact your network administrator for assistance.
50331703Your computer can't connect to the remote computer because the Remote Desktop Gateway server is expecting an authentication method different from the one attempted. Contact your network administrator for assistance.
50331704The RD Gateway connection ended because periodic user authentication failed. Try reconnecting with a correct user name and password. If the reconnection fails, contact your network administrator for further assistance.
50331705The RD Gateway connection ended because periodic user authorization failed. Try reconnecting with a correct user name and password. If the reconnection fails, contact your network administrator for further assistance.
50331707Your computer can't connect to the remote computer because the Remote Desktop Gateway and the remote computer are unable to exchange policies. This could happen due to one of the following reasons: 1. The remote computer is not capable of exchanging policies with the Remote Desktop Gateway. 2. The remote computer's configuration does not permit a new connection. 3. The connection between the Remote Desktop Gateway and the remote computer ended. Contact your network administrator for assistance.
50331708Your computer can't connect to the remote computer, possibly because the smart card is not valid, the smart card certificate was not found in the certificate store, or the Certificate Propagation service is not running. Contact your network administrator for assistance.
50331709To use this program or computer, first log on to the following website: .
50331710To use this program or computer, you must first log on to an authentication website. Contact your network administrator for assistance.
50331711Your session has ended. To continue using the program or computer, first log on to the following website: .
50331712Your session has ended. To continue using the program or computer, you must first log on to an authentication website. Contact your network administrator for assistance.
50331713The RD Gateway connection ended because periodic user authorization failed. Your computer or device didn't pass the Network Access Protection (NAP) requirements set by your network administrator. Contact your network administrator for assistance.
50331714Your computer can't connect to the remote computer because the size of the cookie exceeded the supported size. Contact your network administrator for assistance.
50331716Your computer can't connect to the remote computer using the specified forward proxy configuration. Contact your network administrator for assistance.
50331717This computer cannot connect to the remote resource because you do not have permission to this resource. Contact your network administrator for assistance.
50331718There are currently no resources available to connect to. Retry the connection or contact your network administrator.
50331719An error occurred while Remote Desktop Connection was accessing this resource. Retry the connection or contact your system administrator.
50331721Your Remote Desktop Client needs to be updated to the newest version. Contact your system administrator for help installing the update, and then try again.
50331722Your network configuration doesn't allow the necessary HTTPS ports. Contact your network administrator for help allowing those ports or disabling the web proxy, and then try connecting again.
50331723We're setting up more resources, and it might take a few minutes. Please try again later.
50331724The user name you entered does not match the user name used to subscribe to your applications. If you wish to sign in as a different user please choose Sign Out from the Home menu.
50331725Looks like there are too many users trying out the Azure RemoteApp service at the moment. Please wait a few minutes and then try again.
50331726Maximum user limit has been reached. Please contact your administrator for further assistance.
50331727Your trial period for Azure RemoteApp has expired. Ask your admin or tech support for help.
50331728You no longer have access to Azure RemoteApp. Ask your admin or tech support for help.

Extended reasons

The following table shows the extended codes and reasons:

CodeReason
0No error.
1Extended Reason: Your Remote Desktop Services session has ended. Your network administrator might have ended the connection. Try connecting again, or contact technical support for assistance.
2Extended Reason: Your Remote Desktop Services session has ended. You have logged off the remote computer. Your network administrator or another user might have ended your session. Try connecting again, or contact technical support for assistance.
3Extended Reason: Your Remote Desktop Services session ended because the remote computer didn't receive any input from you.
4Extended Reason: The remote session ended because the total login time limit was reached. This limit is set by the server administrator or by network policies.
5Extended Reason: Your Remote Desktop Services session has ended. Another user connected to the remote computer, so your connection was lost. Try connecting again, or contact your network administrator or technical support group.
6Extended Reason: The connection was disconnected because the remote computer is low on memory.
7Extended Reason: This computer can't connect to the remote computer. Try connecting again. If the problem continues, contact the owner of the remote computer or your network administrator.
8Extended Reason: The client could not establish a connection to the remote computer. The most likely causes for this error are: 1) Remote connections might not be enabled at the remote computer. 2) The maximum number of connections was exceeded at the remote computer. 3) A network error occurred while establishing a connection. 4) The remote computer might not support the required FIPS security level. Please lower the client side required security level Policy, or contact your network administrator for assistance.
9Extended Reason: The connection was denied because the user account is not authorized for remote login.
256Extended Reason: The remote session was disconnected because there was an internal error in the remote computer's licensing protocol.
257Extended Reason: The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license. Please contact the server administrator.
258Extended Reason: The remote session was disconnected because there are no Remote Desktop client access licenses available for this computer. Please contact the server administrator.
259Extended Reason: The remote session was disconnected because the remote computer received an invalid licensing message from this computer.
260Extended Reason: The remote session was disconnected because the Remote Desktop client access license stored on this computer has been modified.
261Extended Reason: The remote session was disconnected because the Remote Desktop client access license stored on this computer is in an invalid format.
262Extended Reason: The remote session was disconnected because there were network problems during the licensing protocol. Please try connecting to the remote computer again.
263Extended Reason: The remote session was disconnected because the client prematurely ended the licensing protocol.
264Extended Reason: The remote session was disconnected because a licensing message was incorrectly encrypted.
265Extended Reason: The remote session was disconnected because the local computer's client access license could not be upgraded or renewed. Please contact the server administrator.
266Extended Reason: The remote session was disconnected because the remote computer is not licensed to accept remote connections. Please contact the server administrator.
267Extended Reason: The remote session was disconnected because license store creation failed with access denied. Please run the remote desktop client with elevated privileges.
1024Extended Reason: Remote Desktop Connection could not find the destination computer. This can happen if the computer name is incorrect or the computer is not yet registered with RD Connection Broker. Try connecting again, or contact your network administrator.
1026Extended Reason: An error occurred while Remote Desktop Connection was loading the destination computer. Try connecting again, or contact your network administrator.
1028Extended Reason: An error occurred while Remote Desktop Connection was redirecting to the destination computer. Try connecting again, or contact your network administrator.
1029Extended Reason: Couldn't connect to the remote computer (there was a problem setting up the virtual machine). Try connecting again, or contact your network administrator for help.
1030Extended Reason: An error occurred while Remote Desktop Connection was starting the virtual machine. Try connecting again, or contact your network administrator.
1031Extended Reason: Windows can't find the IP address of the destination virtual machine. This can happen if the virtual machine doesn't have Hyper-V enlightenments and the name of the virtual machine doesn't match the computer name in Windows. Contact your network administrator for assistance.
1032Extended Reason: There are no available computers in the pool. Try connecting again, or contact your network administrator.
1033Extended Reason: Connection processing has been canceled. Try connecting again, or contact your network administrator.
1040Extended Reason: Your computer can't connect to the remote computer because the Connection Broker couldn't validate the settings specified in your RDP file. Contact your network administrator for assistance.
1041Extended Reason: A timeout error occurred while Remote Desktop Connection was starting the virtual machine. Try connecting again, or contact your network administrator.
1042Extended Reason: A session monitoring error occurred while Remote Desktop Connection was starting the virtual machine. Try connecting again, or contact your network administrator.
4339Extended Reason: The remote computer does not support RemoteApp. For assistance, contact your system administrator.
4498Extended Reason: The remote session was disconnected because of a decryption error at the server. Please try connecting to the remote computer again.