0Pricing
Cloud & IT Cert Prep · Lesson

Multi-Factor Authentication and Conditional Access

Strengthen login security by enforcing MFA and configure conditional access policies that grant or block access based on user, device, and location signals.

Multi-Factor Authentication and Conditional Access is a free Cloud & IT Cert Prep lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cloud & IT Cert Prep learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Why Passwords Alone Are Not Enough

Stolen credentials are the leading cause of cloud security breaches. A password alone can be phished, guessed through brute force, or leaked from a third-party breach. Multi-Factor Authentication (MFA) requires a second verification factor that an attacker is unlikely to possess even after obtaining a password — dramatically reducing the risk of unauthorised access to your Azure environment.

MFA Verification Methods

Entra ID supports multiple MFA verification factors. The most secure and recommended option is the Microsoft Authenticator app, which provides number matching and push notifications. Other options include a FIDO2 security key (hardware token), a software OATH token, SMS text message, or a voice call. SMS and voice are considered lower security and should be used only as fallbacks.

Enabling MFA for Users

MFA in Entra ID can be enforced through three mechanisms. Security defaults is the free, one-click option that enforces MFA for all users but without customisation. Per-user MFA (legacy) enables MFA on specific user accounts. The recommended modern approach is Conditional Access policies (Entra ID P1/P2), which enforce MFA only when specified risk conditions are met, reducing user friction for low-risk sign-ins.

# Enable Security Defaults (enforces MFA for all users)
# Done in Azure portal: Entra ID > Properties > Manage Security Defaults
# OR via Microsoft Graph API:
PATCH https://graph.microsoft.com/v1.0/policies/identitySecurityDefaultsEnforcementPolicy
{
  'isEnabled': true
}

What Is Conditional Access?

Conditional Access (Entra ID P1) is an if-then policy engine: if a user (or group) tries to access a resource under certain conditions, then grant access, block access, or require additional controls like MFA or a compliant device. Conditions can include user identity, device compliance, IP location, application being accessed, and Entra ID Identity Protection risk score.

Conditional Access Policy Structure

A Conditional Access policy has two parts: Assignments (who and what the policy applies to) and Access Controls (what happens when the policy triggers). Assignments define the Users/groups, the Cloud apps being accessed, and the Conditions (location, device platform, sign-in risk). Access Controls define whether to Grant (optionally requiring MFA, compliant device, or approved app) or Block access entirely.

// Conditional Access policy concept (simplified)
{
  'displayName': 'Require MFA for Azure portal',
  'state': 'enabled',
  'conditions': {
    'users': { 'includeGroups': ['all-staff'] },
    'applications': { 'includeApplications': ['797f4846-ba00-4fd7-ba43-dac1f8f63013'] }
  },
  'grantControls': {
    'operator': 'OR',
    'builtInControls': ['mfa']
  }
}

Named Locations and IP Ranges

Conditional Access named locations let you define trusted IP ranges (such as your corporate office network) or countries. A common policy pattern is: require MFA when a user signs in from outside a trusted named location, but allow pass-through when signing in from a known office IP. This reduces friction for on-site employees while strengthening security for remote or travelling users.

Device Compliance as a Control

Conditional Access can require that the accessing device is compliant (meets Intune device compliance policies) or is a hybrid Azure AD joined corporate device. This ensures that even if credentials are valid, sign-ins from personal or unmanaged devices are blocked or required to satisfy additional controls. Device-based controls are a key pillar of a Zero Trust security model.

Sign-In Risk and Identity Protection

Entra ID Identity Protection (P2) uses machine learning to evaluate every sign-in and assign a risk score: low, medium, or high. Risk factors include impossible travel (signing in from two countries within minutes), anonymous IP, leaked credentials, and password spray detection. Conditional Access policies can trigger on risk level — for example, requiring MFA for medium risk and blocking access for high risk automatically.

Report-Only Mode for Testing

Before enforcing a Conditional Access policy, you can set it to Report-Only mode. In this mode the policy evaluates against all sign-ins and records what would have happened (granted, blocked, or MFA required), but does not actually enforce the controls. This lets you validate the policy's impact on your users before enabling it, preventing unexpected lockouts from poorly scoped conditions.

The What If Tool

The What If tool in the Conditional Access blade lets you simulate a sign-in scenario — specifying a user, application, IP address, device platform, and risk level — and see which policies would apply and what the combined outcome would be. This is invaluable for troubleshooting access issues and validating that your policy set produces the expected outcome for given users and conditions.

Break-Glass Accounts

Every organisation should maintain at least two break-glass emergency access accounts that are excluded from all Conditional Access policies, including MFA requirements. These accounts are used only if the MFA infrastructure fails or all administrators are locked out. Break-glass credentials should be stored in a physical safe, use long random passwords, have no MFA registered, and be audited heavily for any usage.

Quick Check

Test your understanding of Microsoft Azure Fundamentals (AZ-900) concepts from this lesson.

Lesson Recap

In this lesson you learned: MFA requires a second factor beyond a password, dramatically reducing credential theft risk, Conditional Access policies apply grant or block controls based on user, app, location, and risk conditions, and Identity Protection uses ML-based risk scoring to trigger automatic access controls. Next up we explore Single Sign-On and External Identities in Entra ID.

Frequently asked questions

Is the “Multi-Factor Authentication and Conditional Access” lesson free?

Yes — the full text of “Multi-Factor Authentication and Conditional Access” is free to read here on the web, and the Cloud & IT Cert Prep course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cloud & IT Cert Prep course, upgrade to CoddyKit PRO.

What will I learn in “Multi-Factor Authentication and Conditional Access”?

Strengthen login security by enforcing MFA and configure conditional access policies that grant or block access based on user, device, and location signals. You practise Cloud & IT Cert Prep with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cloud & IT Cert Prep?

No prior experience is required. Cloud & IT Cert Prep on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Multi-Factor Authentication and Conditional Access” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cloud & IT Cert Prep lesson?

Yes. Every Cloud & IT Cert Prep lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. What Is Microsoft Entra ID?
  2. Users, Groups, and Role Assignments
  3. Multi-Factor Authentication and Conditional Access
  4. Single Sign-On and External Identities
← Back to Cloud & IT Cert Prep