Connect to Azure Virtual Machine using Azure Active Directory Account
Deploy your favorite VM that Supports login using Azure Active Directory credentials, selecting the option Login with Azure AD, and then Enable system assigned managed identity will be selected automatically.
In the IAM of the Virtual Machine (or Resource Group, Subscription, and finally Management Group), add one of the options:
- Virtual Machine Administrator Login
- Virtual Machine User Login
against the user you would like to use to log in.
Download an RDP file that can connect to the VM
Edit the downloaded file using notepad, adding two lines:
So the whole file should look like this:
prompt for credentials:i:1
Disable NLA (Network Level Authentication) on the VM using the Run command:
- Restart the VM.
Double-click on the file and connect to the VM using Azure Active Directory credentials; please add AzureAD\ before the username.
You should see the following screen to enter the credentials:
If you see the message:
The Sign-in method you’re trying to use isn’t allowed. For more info, contact your network administrator.
You must relax the Conditional Access methods by adding Azure Windows VM Sign-In to the excluded apps.