Library

Guides Quick Fixes Scripts Find a Guide

Tools

Error Decoder Assessment Baselines Free Tools Service status What's Changed

More

AI Certifications For MSPs Recommended Gear Field Kit FAQ About Contact Get Assessment

Named Locations and Blocking Countries in Conditional Access

EntraReady Guides · Practical Microsoft 365 & Entra ID
Last reviewed:
Last verified against Microsoft Learn:

Most small and mid-size tenants only ever sign in from a handful of countries, yet password spray and phishing traffic comes from everywhere. Named locations let Conditional Access tell your office networks apart from the rest of the internet and block countries you never do business in. This guide sets up both, report-only first.

Before you start

Step by step

  1. Add your office IP ranges. Go to Entra ID > Conditional Access > Named locations, choose an IP ranges location, name it, add your public ranges and optionally Mark as trusted location (Create a named location (opens in a new tab)). Use the public address your network uses to reach the internet, not internal addresses like 10.x (IP ranges (opens in a new tab)). IPv6 must be in CIDR notation (IP ranges (opens in a new tab)).
  2. Create a blocked-countries location. Choose a Countries location, add the countries to block, and decide whether to Include unknown countries/regions for IP addresses that don’t map to a country (Countries (opens in a new tab), Unknown countries (opens in a new tab)). Keep Determine location by IP address unless you have a specific reason for GPS.
  3. Create the block policy. In Conditional Access > Policies > New policy: include All users and exclude your break-glass accounts; target All resources; under Network set Configure to Yes and include Selected networks and locations with your blocked location; set Grant to Block access; and set Enable policy to Report-only (Create the policy (opens in a new tab)).
  4. Watch report-only. Review the Conditional Access tab in sign-in logs for at least the period your testing checklist calls for, then switch the policy to On (Create the policy (opens in a new tab)).
  5. Use trusted locations carefully. A policy can target All trusted networks and locations or exclude them (Trusted networks (opens in a new tab)), and sign-ins from trusted locations also improve ID Protection’s risk calculation (Trusted locations (opens in a new tab)). Don’t use a trusted location to skip MFA for everyone in the office.

Gotchas

Check it worked

Roll back

Set the policy back to Report-only or Off. A deleted policy or named location can be restored within the 30-day soft-delete period (Restore deleted locations (opens in a new tab)). A location marked as trusted can’t be deleted until you remove the trusted flag (Trusted locations (opens in a new tab)).

Related on EntraReady: Conditional Access baseline, AADSTS53003 (blocked by Conditional Access), Common mistakes, and Break-glass accounts.

Sources (Microsoft Learn): Conditional Access: Network assignment (opens in a new tab), Block access by location (opens in a new tab).

← All Guides

Is this still accurate?

Spotted something outdated or wrong on this page? Tell us in a sentence. The page address is sent with it.

Reports go to the EntraReady inbox. Please don’t include passwords or tenant secrets.