how to configure my VM access using AzureAD credential

Sky Yeo 6 Reputation points
2025-12-08T09:43:18.6+00:00

How do i configure my RDP access to my VM server using the AzureAD credential with MFA from current MS login. I tried a couple of times and it fails. The RDP currently only works with local VM user account access.

Thanks

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
{count} votes

1 answer

Sort by: Most helpful
  1. Shubham Sharma 4,075 Reputation points Microsoft External Staff Moderator
    2025-12-08T10:40:06.14+00:00

    Hello Sky Yeo

    Thank you for reaching out to Microsoft Q&A.

    I understand that you are trying to configure RDP access to your Azure VM using Azure AD (Microsoft Entra ID) credentials with MFA

    Below are the Prerequisites: -

    1.) Supported OS:

    • Windows 11 (latest updates)
    • Windows 10 (20H2 or later)
    • Windows Server 2022 with latest updates

    2.) Azure VM Requirements:

    • VM must be Azure AD joined (Microsoft Entra joined).
    • Enable system-assigned managed identity.
    • Install AADLoginForWindows extension on the VM.
    • Ensure outbound access to:
      • https://login.microsoftonline.com
      • https://enterpriseregistration.windows.net
      • https://device.login.microsoftonline.com
      • https://pas.windows.net

    3.) Client Requirements:

    • Device initiating RDP must be Azure AD joined or hybrid joined in the same tenant.
    • Use credentials in the format: AzureAD\******@domain.com

    Enable Azure AD authentication on VM: -

    1. In Azure Portal:
      • Go to VM → Settings → Identity.
      • Enable System-assigned managed identity.
    2. Add AADLoginForWindows extension:

    az`` vm extension set \

      ``--publisher Microsoft.Azure.ActiveDirectory \

      ``--name AADLoginForWindows \

      ``--resource-group <ResourceGroupName> \

      ``--vm-name <VMName>

    3.) Assign RBAC roles: -

    1. Navigate to VM → Access Control (IAM).
    2. Assign one of these roles to the user:
      • Virtual Machine Administrator Login
      • Virtual Machine User Login This is mandatory for RDP sign-in using Azure AD credentials

    4.) Configure Conditional access & MFA: -

    1. If MFA is enforced via Conditional Access:
      • Ensure the Microsoft Azure Windows Virtual Machine Sign-in app is included in the policy.
      • Exclude the VM from MFA if needed for troubleshooting.
    2. For MFA directly on RDP:
      • Use NPS Extension for Azure MFA or RD Gateway to enforce MFA before the RDP session starts.

    For your reference: https://dori-uw-1.kuma-moon.com/en-us/entra/identity/authentication/howto-mfa-nps-extension-rdg

    5.) Connect via RDP: -

    1. Download the RDP file from the Azure portal for your VM.
    2. Open it in Remote Desktop Connection.
    3. Enter username as:

    AzureAD\******@domain.com

    Complete MFA challenge when prompted.

    Note:

    1. Run dsregcmd /status inside VM:
      • Ensure AzureAdJoined : YES.
    2. Clear cached credentials in Windows Credential Manager.
    3. Verify Network Security Group allows TCP 3389 inbound.
    4. Restart VM and client after changes.

    Microsoft docs for your reference: -

    https://dori-uw-1.kuma-moon.com/en-us/entra/identity/devices/howto-vm-sign-in-azure-ad-windows?pivots=identity-extension-hybrid

    https://dori-uw-1.kuma-moon.com/en-us/entra/identity/authentication/howto-mfa-nps-extension-rdg

    https://dori-uw-1.kuma-moon.com/en-us/azure/virtual-machines/windows/connect-rdp

    Please let us know if the above steps help

    Thanks

    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.