Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
CIS Microsoft Azure Foundations v6.0.0 · 3.1.1

Sign-in to privileged virtual machines should require multifactor authentication

  • Level 2
  • Compute Services

This check looks at whether signing in to Azure virtual machines with Microsoft Entra credentials is protected by a multifactor authentication requirement. The safe setting is a Conditional Access policy that asks for MFA before an identity can log in to a privileged machine.

Why it matters

Administrator access to a virtual machine is one of the most valuable things an attacker can obtain. A password alone can be guessed, phished or reused from another breach. Requiring a second factor means a stolen password is not enough to log in to the machine.

Azure lets you sign in to Windows and Linux machines with Entra ID instead of local accounts. That puts the login under Conditional Access, where you can require MFA for the VM sign-in application.

Source: Microsoft Learn, Sign in to a Windows virtual machine in Azure using Microsoft Entra ID.

How to check it yourself

In the Microsoft Entra admin center, open Protection, then Conditional Access, then Policies. Look for an enabled policy that targets the Azure Windows VM Sign-In (and Linux sign-in) cloud app and grants access only with multifactor authentication.

Read-only PowerShell, using the Microsoft Graph module with permission to read policies, lists the policies and their state:

Connect-MgGraph -Scopes Policy.Read.All
Get-MgIdentityConditionalAccessPolicy |
  Select-Object DisplayName, State,
    @{n='Apps';e={$_.Conditions.Applications.IncludeApplications -join ','}},
    @{n='Grant';e={$_.GrantControls.BuiltInControls -join ','}}

To see who holds a VM login role, run this read-only Azure CLI command:

az role assignment list --all --query "[?contains(roleDefinitionName,'Virtual Machine')].{role:roleDefinitionName,who:principalName,scope:scope}" -o table

How to fix it

Portal: create a new Conditional Access policy. Under users, select the administrators or groups who log in to virtual machines. Under target resources, select the Azure Windows VM Sign-In app. Under grant, choose Require multifactor authentication. Start in Report-only mode and turn the policy on once the results look right.

Script: policies can also be created with Microsoft Graph PowerShell. Review the object in a test tenant, then apply it yourself with your own admin account. ConfigCobra never changes your tenant, it only reads it and suggests the fix.

Keep at least one emergency-access account out of the policy, and test it, so a configuration mistake cannot lock everyone out.

What changes when you fix it

Administrators and users who sign in to virtual machines with Entra ID will be asked for a second factor at each login that the policy covers. Anyone who has not registered an MFA method will be unable to log in until they do.

Scripts, scheduled tasks or service accounts that sign in with Entra credentials cannot answer an MFA prompt and will fail, so move them to a different mechanism such as a managed identity, or exclude them deliberately. Local machine accounts are not affected by the policy.

Included in

BenchmarkCIS IDProfile
CIS Microsoft Azure Foundations v6.0.03.1.1Level 2
CIS Microsoft Azure Compute Services v2.0.020.9Level 2

Check this on your Microsoft Azure

ConfigCobra runs this check with every other control of the CIS Microsoft Azure Benchmarks, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial