This Microsoft Azure and Entra ID blog post will show how to sign in to a Linux VM running in Azure using Entra ID credentials.
By using Entra ID authentication for virtual machines running in Azure, organisations can get more visibility on how identities are being used on VMs.
Azure’s deep integration with Entra allows us to take advantage of the sign-in features and enable them on new VMs.
Enable Entra Sign-in on Linux VM
Create a Ubuntu Linux VM in the Azure portal to enable Entra ID sign-in.
Under the Management tab, select the following.
Enable system-assigned managed identity – True.
Login with Azure AD – True
Go ahead and finish the setup.
To log in to the VM using Entra ID credentials, we need to assign the following security role to the Resource Group where the VM is located.
The role that we will use is Virtual Machine Administrator Login
The above role will make the user local root on the VM.
To assign the role, Open the VM’s Resource Group and click on Access Control (IAM) – Role assignments.
Under roles, select Virtual Machine Administrator Login
Under Members, select to assign User or Group
Login Using Entra ID Creds
To log in to the Linux VM using Entra ID credentials. Install Azure CLI on your local machine.
Login to Azure using the following command
after you log in, use the following command to SSH into the VM using Azure CLI.
az ssh vm -n ubuntuvm -g entraID