Login to Windows virtual machine in Azure using Azure AD account

AB123 351 Reputation points
2023-09-06T07:51:17.1433333+00:00

Hi all,

How do I go about enabling "Log in with Azure AD" after creating the Azure VM?

Please help!

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,316 questions
Azure Bastion
Azure Bastion
An Azure service that provides private and fully managed Remote Desktop Protocol (RDP) and Secure Shell (SSH) access to virtual machines.
243 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,957 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Tushar Kumar 3,226 Reputation points MVP
    2023-09-06T08:03:30.02+00:00

    Hi AB123,

    Thank you for asking your question.

    You can follow the below link to enable Azure AD authentication for windows VM.

    https://learn.microsoft.com/en-us/azure/active-directory/devices/howto-vm-sign-in-azure-ad-windows

    If you already have a VM created run the following command in Cloud Shell:

    az vm extension set \
        --publisher Microsoft.Azure.ActiveDirectory \
        --name AADLoginForWindows \
        --resource-group myResourceGroup \
        --vm-name myVM
    

    In Virtual machine IAM :

    Assign the user with Virtual machine user login or Virtual machine Administrator login.

    Try taking RDP with using your using Username in following format :

    • AzureAD\tom@xyz.com

    If you are using Conditional access you need to exepmt Azure windows login.

    Please "Accept as answer" if this helps

    1 person found this answer helpful.

  2. brokercl 0 Reputation points
    2024-05-08T00:02:52.71+00:00

    which is the VM login?

    0 comments No comments