- Article
- 7 minutes to read
This article can help you troubleshoot authentication errors that occur when you use the Remote Desktop Protocol (RDP) connection to connect to an Azure virtual machine (VM).
symptoms
Captures a screenshot of an Azure VM showing the welcome screen and indicating that the operating system is running. However, when you try to connect to the virtual machine using Remote Desktop Connection, you receive one of the following error messages:
- An authentication error has occurred. The local security authority cannot be reached.
- The remote computer that you are trying to connect to requires network level authentication (NLA), but the Windows domain controller cannot be contacted to perform the NLA. If you are an administrator on the remote computer, you can disable NLA using the options on the Remote tab in the System Properties dialog box.
- This computer cannot connect to the remote computer. Try connecting again. If the problem persists, contact the owner of the remote computer or your network administrator.
cause
There are several reasons why NLA can block RDP access to a virtual machine:
- The VM cannot communicate with the domain controller (DC). This issue can prevent an RDP session from accessing a virtual machine using domain credentials. However, you can still log in using local administrator credentials. This problem can occur in the following situations:
- The Active Directory security channel between this virtual machine and the domain controller is broken.
- The VM has an old copy of the account password and the DC has a newer copy.
- The domain controller to which this virtual machine connects is not healthy.
- The encryption level of the VM is higher than that of the client machine.
- The TLS 1.0, 1.1 or 1.2 (server) protocols are disabled on the virtual machine. The virtual machine has been configured to disable logging in with domain credentials and the Local Security Authority (LSA) is misconfigured.
- The virtual machine has been configured to only accept connections from Federal Information Processing Standard (FIPS) compliant algorithms. This is typically done using Active Directory policy. This is a rare setting, but FIPS only applies to remote desktop connections.
Before troubleshooting
Create a backup snapshot
To create a backup snapshot, follow the steps inSnapshot of a hard drive.
Connect to the virtual machine remotely
To connect to the virtual machine remotely, use one of the methods inHow to use remote tools to troubleshoot Azure virtual machines.
Group Policy Customer Service
If the virtual machine is a domain-joined virtual machine, first stop the Group Policy Client service to prevent Active Directory policy changes from being overridden. To do this, run the following command:
REM Disable the member server to get the latest domain GPO after startREG has added "HKLM\SYSTEM\CurrentControlSet\Services\gpsvc" /v Start /t REG_DWORD /d 4 /f
Once the issue is resolved, restore the ability of this VM to communicate with the domain to get the latest GPO for the domain. To do this, run the following commands:
sc config gpsvc start= autosc start gpsvcgpupdate /force
If the change is reverted, it means an Active Directory policy is causing the problem.
alternative solution
As a workaround to connect to the VM and troubleshoot the cause, you can temporarily disable NLA. To disable NLA use the following commands or use theDisable NLA
script onRun the command.
Disable REM Network Level Authentication logging and add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /t REG_DWORD /d 0
Then restart the VM and continue to the troubleshooting section.
After fixing the issue, re-enable NLA by running the following commands and restarting the virtual machine:
REG agregar "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v disabledomaincreds /t REG_DWORD /d 0 /fREG agregar "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /t REG_DWORD / d1/f
Troubleshooting
- Troubleshoot problems with domain-joined virtual machines.
- Troubleshooting standalone VMs.
Troubleshoot domain-joined virtual machines
To solve this problem:
- Make sure the virtual machine can connect to a domain controller.
- Check the health of DC.
monitoring
To test domain controller health, you can use another VM located in the same VNet, subnet and using the same login server.
Connect to the VM that is having the issueKonsolenserie, Remote-CMD oder Remote-PowerShell, according to the steps ofConnect to the virtual machine remotelySection.
Determine the domain controller that the virtual machine is trying to connect to. Run the following command in the console:
set | Locate /i "SESSION LOGIN SERVER"
Test the integrity of the secure channel between the virtual machine and the domain controller. To do this, run the
Test-ComputerSecureChannel
Command in an elevated instance of PowerShell. This command returns True or False and indicates whether the secure channel is active:(Video) Troubleshooting RDP issues on Azure VMTest-ComputerSecureChannel -verbose
If the channel is broken, run the following command to fix it:
Test-ComputerSecureChannel repair
Ensure that the password for the computer account in Active Directory is up to date on both the VM and the DC:
Reset-ComputerMachinePassword -Server "<COMPUTERNAME>" -Credential <DOMAIN CREDENTIAL WITH DOMAIN ADMINISTRATOR LEVEL>
If communication between the domain controller and the VM is good, but the domain controller is not healthy enough to open an RDP session, try restarting the domain controller.
If the above commands do not resolve the domain communication issue, you can rejoin this virtual machine to the domain. To do this, follow these steps:
Create a script named Unjoin.ps1 with the following content, and then implement the script ascustom script extensionno Azure portal:
cmd /c "netdom remove <<MachineName>> /domain:<<DomainName>> /userD:<<DomainAdminHere>> /passwordD:<<PasswordHere>> /reboot:10 /Force"
This script forcibly removes the VM from the domain and restarts the VM 10 seconds later. Next you need to clean up the computer object on the domain side.
After the cleanup is complete, join this virtual machine back to the domain. To do this, create a script called JoinDomain.ps1 with the following content, and then deploy the script as a custom script extension in the Azure portal:
cmd /c "netdom join <<NombreMáquina>> /dominio:<<NombreDominio>> /userD:<<DomainAdminhere>> /passwordD:<<PasswordHere>> /reboot:10"
monitoring
This joins the VM to the domain with the provided credentials.
If the Active Directory channel is healthy, the computer's password is up to date, and the domain controller is working as expected, try the following steps.
If the problem persists, check if domain credentials are disabled. To do this, open an elevated Command Prompt window and run the following command to determine if the VM is configured to disable domain accounts from logging into the VM:
Consult REG "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v disabledomaincreds
If the key is set to 1, it means the server has been configured not to allow domain credentials. Change this key to 0.
Troubleshooting standalone virtual machines
Check the minimum encryption level
In a CMD instance, run the following command to get theMinEncryptionLevelRegistry value:
consult the registry "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v MinEncryptionLevel
Depending on the registry value, do the following:
4 (FIPS): Check connections for FIP-compliant algorithms.
3 (128-bit encryption): Set the severity to 2 by running the following command:
Registrierung agregar "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v MinEncryptionLevel /t REG_DWORD /d 2 /f
2 (highest possible encryption as set by the client): You can try setting the encryption to the minimum value of1Running the following command:
Registrierung agregar "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v MinEncryptionLevel /t REG_DWORD /d 1 /f
Reboot the VM for the registry changes to take effect.
TLS-Version
Depending on the system, RDP uses the TLS 1.0, 1.1 or 1.2 (server) protocol. To see how these logs are configured on the virtual machine, open a CMD instance and run the following commands:
Consult registry "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server" /v Enabledreg Consult "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server" / v Enabledreg consulta "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server" /v Habilitado
If the return values are not all1, it means the protocol is disabled. Run the following commands to enable these logs:
Registrieren Sie "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server" /v Habilitado /t REG_DWORD /d 1 /freg agregar "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server" /v Anpassung /t REG_DWORD /d 1 /freg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server" /v Anpassung /t REG_DWORD /d 1 /f
For other versions of the log, you can run the following commands:
Consult registry "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS x.x\Server" /v EnabledConsult registry "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS x.x\Server" /v Enables
monitoring
Get the SSH/TLS version x.x from the guest OS logs on SCHANNEL errors.
Check the connections for FIP-compatible algorithms
Remote Desktop can be enforced to only use connections with FIP-compliant algorithms. This can be configured with a registry key. To do this, open an elevated Command Prompt window and check the following keys:
HKLM\SYSTEM\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy registry query /v Enabled
When the command returns1, change the registry value to0.
Registry query "HKLM\SYSTEM\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy" /v Enabled /t REG_DWORD /d 0
Check currentMinEncryptionLevelin virtual machine:
consult the registry "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v MinEncryptionLevel
When the command returns4, change the registry value to2
Consult the registry "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v MinEncryptionLevel /t REG_DWORD /d 2
Reboot the VM for the registry changes to take effect.
Next Steps
- SetEncryptionLevel method of the Win32_TSGeneralSetting class
- Configure server authentication and encryption levels
- General configuration of the Win32_TS class
If you have any questions or need help,create a support request, is freightAzure-Community-Support. You can also send product feedback toAzure-Community-Support.
FAQs
How do I fix Remote Desktop authentication error? ›
There are three useful methods to fix the “An authentication error has occurred” error in this post: change the remote desktop settings, change the Group Policy settings and edit the Registry.
How do I connect to Azure VM using RDP? ›- Go to the overview page of the virtual machine that has been enabled with Azure AD login.
- Select Connect to open the Connect to virtual machine pane.
- Select Download RDP File.
- Select Open to open the Remote Desktop Connection client.
- Press Win + R to open the Run command dialog box.
- Type sysdm. ...
- Navigate to the Remote tab.
- Uncheck the Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended) box.
- Press Apply and then press OK.
To resolve the issue, change the remote desktop security on the RD server to RDP Security Layer to allow a secure connection using Remote Desktop Protocol encryption. Below are the steps: Navigate to Start > Administrative Tools > Remote Desktop Services > Remote Desktop Session Host Configuration.
Why won't my remote desktop connection connect? ›If remote desktop can't connect to the remote computer, the reason could be problems with your IP address. If the Windows 11 remote desktop is not working, it may be necessary to add a new IP manually.
Is Azure RDP port 3389 exposed to the Internet? ›RDP port 3389 is exposed to the Internet. This is a security risk and only recommended for testing as hackers constantly scan public cloud IP ranges for open ports. Once they find a port open they attempt attacks using common passwords and known unpatched vulnerabilities.
How do I RDP to Azure VM without public IP? ›Azure Bastion – a jump host PaaS service
You don't need Public IPs to access your VMs over RDP/SSH. Additionally, Azure Bastion provides integrated connectivity using RDP/SSH directly from your browser and the Azure portal experience. You don't need an additional client, agent, or piece of software.
- On the device you want to connect to, select Start and then click the Settings icon on the left.
- Select the System group followed by the Remote Desktop item.
- Use the slider to enable Remote Desktop.
- It is also recommended to keep the PC awake and discoverable to facilitate connections.
Azure Virtual Desktop uses Remote Desktop Protocol (RDP) to provide remote display and input capabilities over network connections. RDP was initially released with Windows NT 4.0 Terminal Server Edition and was continuously evolving with every Microsoft Windows and Windows Server release.
What is the most secure way to connect to Azure VM? ›The recommended way to securely connect to your VMs in an Azure AD DS managed domain is using Azure Bastion, a fully platform-managed PaaS service that you provision inside your virtual network.
Can you use RDP on virtual machine? ›
You can also use RDP to connect to Linux VMs that are running an RDP service such as xrdp. An RDP connection requires the following: An open RDP port (port 3389) on the VM network adapter. Configuration of the VM guest operating system to support remote desktop access.
How do I fix user is not authorized for remote login? ›Users have their password saved in the connection and when they try to connect, it gives them the "User is not authorized for remote login" error message. The fix - delete the saved password in the connection, connect again, re-enter the password, and viola, it connects just fine.
How do I authorize a user for Remote Desktop? ›Right-click on "Computer" and select "Properties". Select "Remote Settings". Select the radio button for "Allow remote connections to this computer". The default for which users can connect to this computer (in addition to the Remote Access Server) is the computer owner or administrator.
How do I fix the connection Cannot proceed because authentication is not enabled and the remote computer requires that authentication be enabled to connect? ›- Go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp.
- Change “SecurityLayer” to 0.
The HyperText Transfer Protocol (HTTP) 401 Unauthorized response status code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource.
How do you troubleshoot ISE failure authentications and authorizations? ›- Overview.
- High-Level Troubleshooting Flow.
- Check the ISE Live Logs.
- Check for Any Failed Authentication Attempts in the Log.
- Check the Live Log for More Information.
- Check for Passed Authentication Entry or the MAC Address in the Log.
- Check the NAD Interface Status or the ISE Detailed Reports.
- Open regedit.exe and navigate to: ...
- There are two registry keys here that need to be cleared: ...
- Expand the Default Key which will contain the most recently used connections. ...
- Select the entries that you want to remove, right click and click delete:
Solution 1.
Press Win + I to open Settings, and then find “Remote Desktop” on the right pane. Step 2. Double click on Remote Desktop and then tick the button to enable the RDP.
Once you have confirmed connection on port 80, navigate to http://portquiz.net:3389/. Note: If you are able to get to the page, port 3389 is open and there may be a separate issue preventing login.
Do you still need to open the RDP port 3389 on the target VMS with Azure Bastion? ›To connect to the Windows VM, you must have the following ports open on your Windows VM: Inbound port: RDP (3389) or. Inbound port: Custom value (you'll then need to specify this custom port when you connect to the VM via Azure Bastion)
How do I test my RDP port 3389? ›
Test the functionality of port 3389 by using Telnet
where "tserv" is the host name of your Terminal Server. If telnet is successful, you simply receive the telnet screen and a cursor. On the Terminal Server, Terminal Server Administration will show a blue computer icon with no other information.
Every Azure VM has RDP or Remote Desktop Protocol by default. In other words, port 3389 is enabled and offers access to any RDP connection from an IP address anywhere across the globe.
How do I allow external access to my Azure VM? ›You can do it via the azure portal, by either going to the virtual machine and then the networking section under settings and clicking “Add Inbound Port Rule” under the correspondent tab.
How do I make my Azure VM accessible from outside? ›Arguably, the preferred way to access Azure VM from outside is the Azure Bastion host PaaS service. This is a relatively newer service from Microsoft that allows users to access internal VMs without using an external IP address on the internal virtual machines.
How do I enable RDP ports? ›- Connect to the Windows Client/Server over RDP. ...
- Navigate to the Remote Desktop Registry (RDP-Tcp) ...
- Change the default RDP port number. ...
- Connect to the windows computer after restarting via RDP and include the new RDP port.
- Confirm listening port for RDP.
- Open Windows Firewall. ...
- With Windows Firewall open click on Advanced Settings. ...
- Click on Inbound Rules in the left pane and then click on New Rule in the right pane.
- Check the Port radio and then click on next.
RDS vs RDP
RDS enables users to connect to Windows machines that support Microsoft's remote desktop protocol (RDP). RDP is not a remote solution in itself but is used to enable communication between remote clients and servers.
The basic difference between RDS and AVD is, RDS is based on a server operating system (OS), AVD comes with a desktop OS that is, multi-user Windows 10. AVD is both platform and infrastructure services (PaaS and Iaas). Here the host is a virtual machine (VM), and the rest of the service is PaaS.
Is virtual desktop same as RDP? ›Typically, windows virtual Desktop (WVD) differs from remote desktop services (RDS) since WVD focuses on providing a central location for users to access various applications hosted by a central server. At the same time, RDS offers a platform where users can access a networked computer from a remote location.
Which authentication method would you recommend for the application on an Azure VM? ›Microsoft recommends passwordless authentication methods such as Windows Hello, FIDO2 security keys, and the Microsoft Authenticator app because they provide the most secure sign-in experience.
How do I access Azure VM without RDP? ›
Another method of connection to azure VM is Bastion. Azure Bastion is a service you deploy that lets you connect to a virtual machine using your browser and the Azure portal.
What are all the ways to connect to the VMs in Azure? ›Connect from Azure portal
Go to the Azure portal to connect to a VM. Search for and select Virtual machines. Select the virtual machine from the list. Select Connect from the left menu.
- Go to the Azure portal to connect to a VM. ...
- Select the virtual machine from the list.
- At the beginning of the virtual machine page, select Connect.
- On the Connect to virtual machine page, select RDP, and then select the appropriate IP address and Port number.
RDP is a secure, interoperable protocol that creates secure connections between clients, servers and virtual machines. RDP works across different Windows OSes and devices and provides strong physical security through remote data storage.
How do I fix an authentication error occurred in remote desktop? ›- Method 1: Change the Remote Desktop Settings.
- Method 2: Change the Group Policy Settings.
- Method 3: Edit the Registry.
- Bottom Line.
- Make sure the credentials are correct. ...
- Update the saved credentials. ...
- Make sure that the account is not locked out. ...
- See if the account has remote access permissions. ...
- Check the firewall. ...
- Verify that the connection is targeting the correct machine.
- Press Win + R to open the Run command dialog box.
- Type sysdm. ...
- Navigate to the Remote tab.
- Uncheck the Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended) box.
- Press Apply and then press OK.
After verifying your Security Group settings, if you unable to connect to your instance over RDP (e.g. using the Get Windows Password' option in EC2) this may indicate that your instance has failed to launch correctly. In this case the simplest fix is to terminate the instance and launch another one.
Why is my RDP not connecting? ›Many remote desktop connectivity problems can be traced to DNS issues. If an admin changed a host's IP address, then clients might not be able to connect to the host until the client's DNS resolver cache expires.
How do I authorize my computer for remote login? ›Right-click on "Computer" and select "Properties". Select "Remote Settings". Select the radio button for "Allow remote connections to this computer". The default for which users can connect to this computer (in addition to the Remote Access Server) is the computer owner or administrator.
How do I authorize a remote desktop connection? ›
- On the device you want to connect to, select Start and then click the Settings icon on the left.
- Select the System group followed by the Remote Desktop item.
- Use the slider to enable Remote Desktop.
- It is also recommended to keep the PC awake and discoverable to facilitate connections.
0x80090308. This error translates to "The token supplied to the function is invalid ".
How do I disable Remote Desktop Network Level Authentication? ›- Right-click on the RDP-Tcp connections to open a Properties window.
- Under the General tab, clear the Allow connections only from computers running Remote Desktop with Network Level Authentication check box.
- In the Azure portal open the Resource groups view, and then click the resource group to use for the deployment.
- Select the new RDSH virtual machine (for example, Contoso-Sh1).
- Click Connect > Open to open the Remote Desktop client.
- If the value of the fDenyTSConnections key is 0, then RDP is enabled.
- If the value of the fDenyTSConnections key is 1, then RDP is disabled.
In most cases this is 3389 - that's the default port used by Remote Desktop connections.
Why does my authentication keep failing? ›If you receive this error message, that means that the username and/or password that you have entered is incorrect. The error message states “Authentication failed!
What is 0x8009030e Kerberos authentication? ›The following error with errorcode 0x8009030e occurred while using Kerberos authentication: A specified logon session does not exist. It may already have been terminated. Possible causes are: -The user name or password specified are invalid.
How do I fix authentication required? ›It usually arises due to the updated version of Google Play, cache issues, sync issues, etc. However, authentication required Google Play Store error can be easily fixed by applying a few methods like restarting the device, uninstalling Google Play updates, and force-stopping Google Play app.