Can't login to AzureVM with Entra credentials

Pavel yannara Mirochnitchenko 13,486 Reputation points MVP
2026-12-04T14:13:15.2866667+00:00

I can't make Remote Desktop Azure VM login work with Entra credentials and I get the error AADSTS293004: The target identifier in the request SERVER-FQDN was not found in tenant <GUID>. Traditional RDP's error is "The logon attempt failed".

I can login the AzureVM using local credentials but not MS entra.

  • MS entra account is member of VM admintrator login role in the VM (IAM)
  • AzureVM's dsregcmd /status info and ID matches to tenant ID.
  • AzureVM's populates its account to Entra with AADLoginForWindows extention.
  • Login with Azure Bastion results into the same situation. Local credentials works, but not entra.
  • PKU2U auth is enabled
  • IP and DNS FQDN matches fine. The domain is registered to tenant.
  • No MFA, no user-MFA nor Security Defaults are enabled (new Tenant, no CA yet)
  • Event Viewer AAD logs no events on occurense
  • Entra Sign-in logs no clear happenings
  • in AzureVM, if logged in with local account, the Entra account can peform admin releated tasks
  • In my previous tenant with other VMs this worked fine.
Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments

1 answer

Sort by: Newest
  1. Sedat SALMAN 14,705 Reputation points MVP
    2026-12-04T15:06:53.11+00:00

    Hi Pavel,

    AADSTS293004 comes from Entra, not from the VM. With "Use a web account to sign in", Entra looks up the name you typed in mstsc against the hostnames attribute of the VM's device object, and SERVER-FQDN isn't in that list. Without a primary DNS suffix on the VM, the device usually only has its short computer name there, so the FQDN fails even though DNS resolves correctly. Verifying the domain in the tenant doesn't change that list either. That would also fit with the AAD event log on the VM staying empty, since no token ever reaches the VM.

    Two ways around it:

    1. Connect with the short name exactly as the device shows it under Entra ID > Devices. If your client can't resolve that name, add a hosts file entry pointing it to the VM's IP. If this works, you've confirmed the cause.
    2. To keep using the FQDN, sign in to the VM with the local account, open System Properties > Computer Name > Change > More..., enter your domain as the primary DNS suffix and reboot. The Device-Sync task then adds the FQDN to the device's hostnames and mstsc works with the FQDN. If the suffix comes from Group Policy or MDM (the PrimaryDnsSuffix setting), fix or remove it there instead.

    Someone hit the same error on a fresh Windows 11 VM recently, and adding the DNS suffix was what fixed it: https://learn.microsoft.com/en-us/answers/questions/6033902/unable-to-sign-in-to-microsoft-entra-id-joined-win

    For Bastion, retest after the change. If it still fails, make sure you start from the VM's Connect > Bastion page with Microsoft Entra ID selected, since the IP-based Bastion connection doesn't support Entra auth. The Bastion guide below covers the rest.

    Docs:

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.