Smart card logon with RSA KSP certificates works with mstsc but fails in RDM using X.509 credential (LSA error, affected by DisableCapiOverrideForRSA)

Smart card logon with RSA KSP certificates works with mstsc but fails in RDM using X.509 credential (LSA error, affected by DisableCapiOverrideForRSA)

avatar

Hi,
I’m seeing an issue with smart card logon when using Remote Desktop Manager.
The same smart card certificates work fine with the native Microsoft RDP client (mstsc.exe).

Environment

  • Remote Desktop Manager: 2025.2.30 & 2025.3.23
  • Client OS: Windows 11 24H2 & 25H2 after 26100.6899/26.200.6899 -> Resolved issues in Windows 11, version 24H2 | Microsoft Learn
  • RDS host OS: Windows Server 2016-2025
  • Auth: on-prem AD domain
  • Smart cards: YubiKey 5 NFC (PIV) and Windows Virtual Smart Card
  • Registry on the client:
  • HKLM\SYSTEM\CurrentControlSet\Control\Lsa\DisableCapiOverrideForRSA
    • 0 → no issue
    • 1 → issue described below occurs
  • Certificates on both Smartcards:
    • RSA 2048, Smart Card Logon + Client Authentication EKUs, UPN in SAN
    • Template configured for Microsoft Smart Card Key Storage Provider
    • certutil -scinfo shows the same key via
    • Microsoft Base Smart Card Crypto Provider and
    • Microsoft Smart Card Key Storage Provider
  • Smart card logon and RDP via mstsc.exe work correctly with these certs (with the reg-key both 0 and 1).


Problem
In RDM I created an X.509 certificate credential:

  • Mode: Link to certificate store
  • Location: Current user / Personal
  • Find type: Thumbprint (of the smart card logon cert)
  • PIN stored in the credential

This credential is used by an RDP (Microsoft Remote Desktop) session with NLA enabled.
Result (only when DisableCapiOverrideForRSA = 1):
The RDP connection is established, but logon fails with:

“An authentication error has occurred. The Local Security Authority cannot be contacted (LSA is not reachable).”

If I:

  • set DisableCapiOverrideForRSA back to 0, or
  • configure the same RDP session in RDM without using the X.509 credential and just rely on normal smart card redirection (like mstsc),

then logon works.

Expected
Using an X.509 credential in RDM should behave the same as mstsc.exe and allow smart card logon with these RSA/KSP-capable certificates (YubiKey and Virtual Smart Card), even when DisableCapiOverrideForRSA is set to 1. After April 2026 the DisableCapiOverrideForRSA Workaround won't be available anymore.

Is this a known limitation of the X.509 credential type with smart cards / KSP, or is there a recommended workaround?
Thanks!

All Comments (10)

avatar

Hello

We're had several reports of this although the reason is not clear at the moment. RDM is just marshalling the smartcard thumbprint to the RDP control, so it shouldn't involve either the CSP or the KSP at our level. We're investigating it and I've linked your post to the ticket so you can be informed once we have an update. In the meantime, the workaround is to set the registry key as written in your post.

Sorry for the inconvenience and thanks for your patience

Kind regards,

Richard Markievicz

avatar

Hello Richard,

Thanks for letting me know! I just wasn't able to find any Bug Report regarding the Issue.

Do you know if the Error only occurs with RSA KSP Certificates or also with ECC Certificates?

If there's anything I can do to help you fix the issue, just let me know.

BR Sebastian

avatar

Hello

I'm not sure if it's a problem with ECC certificates; but I also suspect it won't change anything. In my lab, my setup is broadly the same as yours (RSA KSP certificates on similar infrastructure) but after installed the update on my workstation, I still couldn't reproduce the issue.

I don't doubt the validity of the problem, since we've had multiple reports. It's just hard to understand where the problem is creeping in. From our side, all we do is marshal the certificate thumbprint to a "magic string" that's usable as the "username" for Microsoft's RDP control (which only accepts usernames and passwords, not certificate authentication). So I can't understand how the upstream code (either SSP / Kerberos or the smart card stack) is behaving differently versus a certificate chosen with CredUI.

I'm asking another developer, who is an expert in smart card, to take a look at this and I hope he can do that and give some feedback before the new year.

Thanks for your patience

Kind regards,

Richard Markievicz

avatar

Hello,

The thing I'm suspecting, is that since the certificate is chosen by thumbprint, it chooses the wrong one. For me certutil -scinfo for RSA KSP Certificates gives back both, CSP and KSP in the same Slot, both with the same Thumbprint.
ECC Certificates don't have the CSP Slot since the're KSP-only. That yould at least make it logical for me, that with only a CSP cert in mstsc, i get the same error as with RDM regardless.

If I find time today or tomorrow, I'll try if ECC works and report back.

BR Sebastian

avatar

Hello

Your hypothesis sounds reasonable. If that does turn out to be the case, there may not be much we can do than report the issue to Microsoft and encourage users to reconfigure their smart card certificates. How this works on our side: the MS RDP control only accepts a username and password for authentication, not a certificate. The solution is to call CredMarshalCredential, passing it the SHA1 of the certificate you want to use; which returns a "magic string" encoding the certificate. This "magic string" is set as the username for RDP and, if provided, the smart card PIN is the password field. My assumption is that on the other end, CredSSP or the smart card stack detects the magic string and calls "CredUnmarshalCredential" to get back the hash and identify the certificate. So - our involvement here is minimal.

If you manage to test with an ECC certificate, please let me know if it works.

The other thing that would be interesting is how it behaves if you _don't_ set the PIN on the certificate in RDM. This should still select the certificate, but force CredUI to open to ask for the PIN. I wonder if it's able to "know" to use the KSP in this case.

Please, let me know if something isn't clear or you have any questions

Kind regards,

Richard Markievicz

avatar

Hello Richard,

Sorry this took a bit longer. I tested with the ECC Certificates today, but the Error in RDM is the same (LSA unreachable).

Without setting the PIN on the certificate it selects the correct Certificate an then asks for the PIN, but this always works, no matter the Configuration

DisableCapiOverrideForRSA (obviously) does not change this behavior.

So basically RDM is unable to use KSP Smartcards for RDP with the PIN saved. With DisableCapiOverrideForRSA=0 and RSA KSP Smartcards it only works for mstsc and RDM because RDM is allowed to fallback to CSP.

Kind Regards,
Sebastian

avatar

Hello

Thanks for the investigation and getting back to me! So, for now, it seems that not saving the PIN and entering it manually could be another (albeit inconvenient) workaround.

because RDM is allowed to fallback to CSP


As I've written above, all RDM is doing is marshalling the certificate thumbprint and (optionally) the PIN using the Microsoft API designed for that, at our level we have no knowledge of how the key is stored or any way to select how the key is used. We simply pass the thumbprint to the RDP ActiveX control as a text string.

This is looking more and more like a bug on Microsoft's side. We have a developer investigating this and hope to confirm that, and find if there's another way to workaround this issue.

Thanks again,

Richard Markievicz

avatar

Hello

A quick update here that we didn't forget about this, we are still investigating.

In the meantime the deadline for the registry workaround has been extended by Microsoft to February 2027. I guess lots of vendors are struggling with this.

Thanks and kind regards,

Richard Markievicz

avatar

Hello,

Thanks for letting me know.
So you aim to have the new API workflow implemented before the new deadline?

Thanks
Sebastian

avatar
Hello,

Thanks for letting me know.
So you aim to have the new API workflow implemented before the new deadline?

Thanks
Sebastian


@sebastianbayer

I'm aiming to have some news much sooner than that, but right now it's not clear if this is tied to a specific certificate configuration and/or a bug on the Microsoft side. Our options are quite limited right now because we're simply calling the proper Microsoft API to enable this behaviour, 99% of the workflow is actually outside of RDM (in Windows internals).

I hope to have some news about this soon.

Kind regards,

Richard Markievicz