Describe the bug
I cannot RDP in my Windows 10 laptop using my AzureAD/Office 365 credentials.
But I can connect to this same laptop using a local account.
And I can connect using the Office 365 credentials to Windows Server 2016/2019 on Azure.
Clone of https://gitlab.com/Remmina/Remmina/-/issues/2116
To Reproduce
xfreerdp /u:me /p:MSpasswordSoLessThan8characters /d:domain.com 192.168.0.15
Expected behavior
RDP in my Windows 10 computer using my AzureAD/Office 365 credentials.
Screenshots
The logs:
[14:40:37:703] [18152:18152] [WARN][com.freerdp.client.common.compatibility] - -d domain.com -> /d:domain.com
[14:40:37:703] [18152:18152] [WARN][com.freerdp.client.common.compatibility] - -p ****** -> /p:******
[14:40:37:703] [18152:18152] [WARN][com.freerdp.client.common.compatibility] - -u me -> /u:me
[14:40:37:703] [18152:18152] [WARN][com.freerdp.client.common.compatibility] - 192.168.0.15 -> /v:192.168.0.15
[14:40:37:703] [18152:18152] [WARN][com.freerdp.client.common.compatibility] -
[14:40:37:703] [18152:18153] [INFO][com.freerdp.core] - freerdp_connect:freerdp_set_last_error_ex resetting error state
[14:40:37:703] [18152:18153] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpdr
[14:40:37:703] [18152:18153] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpsnd
[14:40:37:703] [18152:18153] [INFO][com.freerdp.client.common.cmdline] - loading channelEx cliprdr
[14:40:38:020] [18152:18153] [INFO][com.freerdp.primitives] - primitives autodetect, using optimized
[14:40:38:022] [18152:18153] [INFO][com.freerdp.core] - freerdp_tcp_is_hostname_resolvable:freerdp_set_last_error_ex resetting error state
[14:40:38:022] [18152:18153] [INFO][com.freerdp.core] - freerdp_tcp_connect:freerdp_set_last_error_ex resetting error state
[14:40:39:415] [18152:18153] [WARN][com.freerdp.crypto] - Certificate verification failure 'unable to get local issuer certificate (20)' at stack position 0
[14:40:39:415] [18152:18153] [WARN][com.freerdp.crypto] - CN = T480s14
[14:40:41:119] [18152:18153] [ERROR][com.freerdp.core] - nla_recv_pdu:freerdp_set_last_error_ex ERRCONNECT_LOGON_FAILURE [0x00020014]
[14:40:41:119] [18152:18153] [ERROR][com.freerdp.core.rdp] - rdp_recv_callback: CONNECTION_STATE_NLA - nla_recv_pdu() fail
[14:40:41:119] [18152:18153] [ERROR][com.freerdp.core.transport] - transport_check_fds: transport->ReceiveCallback() - -1
Application details
/buildconfig/log-level:traceDesktop (please complete the following information):
Please try again with the freerdp2 commandline syntax, might be a bug in the legacy parser.
the second thing you can try is /u:[email protected] syntax to provide your credentials, this is handled differently by the server than the /u:user /d:domain synatx
With the freerdp2 syntax:
[09:16:15:332] [7393:7394] [INFO][com.freerdp.core] - freerdp_connect:freerdp_set_last_error_ex resetting error state
[09:16:15:333] [7393:7394] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpdr
[09:16:15:333] [7393:7394] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpsnd
[09:16:15:333] [7393:7394] [INFO][com.freerdp.client.common.cmdline] - loading channelEx cliprdr
[09:16:15:658] [7393:7394] [INFO][com.freerdp.primitives] - primitives autodetect, using optimized
[09:16:15:660] [7393:7394] [INFO][com.freerdp.core] - freerdp_tcp_is_hostname_resolvable:freerdp_set_last_error_ex resetting error state
[09:16:15:660] [7393:7394] [INFO][com.freerdp.core] - freerdp_tcp_connect:freerdp_set_last_error_ex resetting error state
[09:16:17:193] [7393:7394] [WARN][com.freerdp.crypto] - Certificate verification failure 'unable to get local issuer certificate (20)' at stack position 0
[09:16:17:193] [7393:7394] [WARN][com.freerdp.crypto] - CN = T480s14
Password:
[09:16:23:909] [7393:7394] [ERROR][com.freerdp.core] - nla_recv_pdu:freerdp_set_last_error_ex ERRCONNECT_LOGON_FAILURE [0x00020014]
[09:16:23:910] [7393:7394] [ERROR][com.freerdp.core.rdp] - rdp_recv_callback: CONNECTION_STATE_NLA - nla_recv_pdu() fail
[09:16:23:910] [7393:7394] [ERROR][com.freerdp.core.transport] - transport_check_fds: transport->ReceiveCallback() - -1
With the email-like username:
[09:18:11:054] [8120:8121] [INFO][com.freerdp.core] - freerdp_connect:freerdp_set_last_error_ex resetting error state
[09:18:11:054] [8120:8121] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpdr
[09:18:11:054] [8120:8121] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpsnd
[09:18:11:054] [8120:8121] [INFO][com.freerdp.client.common.cmdline] - loading channelEx cliprdr
[09:18:11:375] [8120:8121] [INFO][com.freerdp.primitives] - primitives autodetect, using optimized
[09:18:11:378] [8120:8121] [INFO][com.freerdp.core] - freerdp_tcp_is_hostname_resolvable:freerdp_set_last_error_ex resetting error state
[09:18:11:378] [8120:8121] [INFO][com.freerdp.core] - freerdp_tcp_connect:freerdp_set_last_error_ex resetting error state
[09:18:11:536] [8120:8121] [WARN][com.freerdp.crypto] - Certificate verification failure 'unable to get local issuer certificate (20)' at stack position 0
[09:18:11:536] [8120:8121] [WARN][com.freerdp.crypto] - CN = T480s14
Password:
[09:18:17:822] [8120:8121] [ERROR][com.freerdp.core] - nla_recv_pdu:freerdp_set_last_error_ex ERRCONNECT_LOGON_FAILURE [0x00020014]
[09:18:17:822] [8120:8121] [ERROR][com.freerdp.core.rdp] - rdp_recv_callback: CONNECTION_STATE_NLA - nla_recv_pdu() fail
[09:18:17:822] [8120:8121] [ERROR][com.freerdp.core.transport] - transport_check_fds: transport->ReceiveCallback() - -1
@roukydesbois ok, this looks like this may not be allowed.
If you have something available, can you try with mstsc (the microsoft remote desktop client) to connect?
It that fails too you need to configure your laptop to allow that ;)
I can connect, on the same computer, using a local account (no Office365/AzureAD credentials) - so RDPing must be allowed (I activated it in the Windows settings).
And I have already checked that from the Windows RDP client, I can connect to the Windows 10 using AzureAD/Office365 credentials.
@roukydesbois thing is, if all you tell me is true (you can connect with local account, you can connect with Azure credentials on some different machine) then the only reasonable explanation is you have some config on your laptop preventing that.
On the other hand, if you can connect with mstsc to your laptop with the azure credentials that contradicts that.
Could you try the same with our nightly builds https://github.com/FreeRDP/FreeRDP/wiki/PreBuilds ?
Maybe it is some bug in the distro package you use.
I found https://tech.xenit.se/how-to-rdp-into-a-azure-ad-joined-vm-in-azure/
so, do you use the domain part for your username correctly?
Hello,
Thanks for the link. I'm a bit under the weather work-wise, so I created a local account for now, so that I can work. I'll continue debugging this weekend 馃檪
Hello again!
I'm using daily builds from remmina, and nightly from yours.
I tried the credentials format that you shared, and had no success.
I also stumbled on this: https://docs.microsoft.com/en-us/windows/client-management/connect-to-remote-aadj-pc
It states that both PCs must be joined to the Azure AD, could it be an issue?
@roukydesbois yes, that explains it. Requires kerberos which we currently have no properly working implementation.
I guess I'll stay with my local account for now then :) Thanks for your time!
I had the same problem. What worked for me was:
On laptop that you want to remote desktop to untick Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended).

And then use security mode TLS:
xfreerdp /sec:tls /d:AzureAD /u:UserName /p:Password /v:1.2.3.4
Without /sec:tls it throws ERRCONNECT_LOGON_FAILURE.
Can confirm, solution provided by @rootkiwi works with same kind of setup.
FWIW: Kerberos authentication using MS online identity accounts or pure azure ad accounts require account prefix credentials: account_prefix\user@dnsdomain. This value is used as the user name, and the domain value remains empty.
The prefix for a windows online account is "MicrosoftAccount" and for pure azure ad it is "AzureAD"
This prefix value is used by the OS to select the correct security provider to perform the authentication.
Most helpful comment
I had the same problem. What worked for me was:
On laptop that you want to remote desktop to untick
Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended).And then use security mode TLS:
xfreerdp /sec:tls /d:AzureAD /u:UserName /p:Password /v:1.2.3.4Without
/sec:tlsit throwsERRCONNECT_LOGON_FAILURE.