Hello Dimitrios,
Thank you for posting question on Microsoft Windows Forum!
Based on the issue description. Well! An instant login failure when invoking a FIDO2 security key (like a YubiKey or a passkey QR code) inside native Microsoft 365 and Teams apps might indicate an underlying authentication broker breaking or being blocked from talking to the client machine's hardware. Because native apps use the Windows Web Account Manager (WAM / Microsoft.AAD.BrokerPlugin.exe) to orchestrate modern auth, an immediate failure usually means the WebAuthn API call hit a hard wall.
If your Server 2022 golden image has been hardened via CIS Benchmarks or standard corporate baselines, WebAuthn redirection over RDP is often explicitly disabled. When blocked, any native application attempting a FIDO2 prompt will fail instantly. The suggestion here is to check is WebAuthn redirection on the session host. You can navigate to this path Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Device and Resource Redirection with the policy “Do not allow WebAuthn redirection”; to allow passkeys/security keys, it should be Disabled or Not configured.
On the other hand, the RDP client initiating the session must request the WebAuthn virtual channel. If users are connecting via standard mstsc.exe or the newer Windows App, the connection configuration needs to explicitly pass this capability. Making sure the .rdp file or your RDS/AVD deployment properties include this string redirectwebauthn:i:1 Also, Ensure the physical endpoint from which the user is connecting supports WebAuthn redirection (Windows 10/11 with up-to-date Remote Desktop clients).
One useful testing you can consider is to try a simple WebAuthn sign-in inside the remote session in an InPrivate browser window. If WebAuthn redirection is working, you should see a Windows Security prompt and be able to complete the security-key / Windows Hello step.
You can consult the following articles for further reference regarding your concerns.
- https://learn.microsoft.com/en-us/microsoft-365-apps/deploy/deploy-microsoft-365-apps-remote-desktop-services
- https://learn.microsoft.com/en-us/azure/virtual-desktop/redirection-configure-webauthn?tabs=intune&pivots=azure-virtual-desktop
Hope the above information is helpful! If it is. Free feel to hit "Accepted" for benefitting others in community having the same issue too.