Join our Newsletter — 33% off our NHI Course

How do you block sign-ins from specific countries with Conditional Access in Microsoft Entra ID?

Block sign-ins from specific countries by using named location rules in Conditional Access and denying access from those locations. Treat country blocking as a coarse control, because VPNs and roaming users can make geolocation unreliable. Validate the rule against travel, outsourced support, and service accounts before enforcing it broadly.

How named locations work in Conditional Access

Country blocking in microsoft entra id is implemented with named locations, then referenced in a Conditional Access policy that denies access from those locations. The policy is only as accurate as the location signal behind it, so the practical question is not just “can we block a country?” but “how reliably does Entra ID see the sign-in as coming from that country?”

A named location can be based on country or region, or on trusted IP ranges. Country-based rules are simpler to operate, but they are blunt by design and can affect legitimate users who travel, use roaming mobile networks, or route through corporate egress points outside the expected geography.

For a policy to behave predictably, align the location rule with the user population and the sign-in path. If your workforce includes remote staff, contractors, external support, or automation that may originate outside the target geography, test those scenarios first rather than assuming the rule will only catch hostile traffic.

Why country blocking is a coarse control

Geolocation is a useful signal, but it is not a strong identity proof. VPNs, proxy services, cloud-hosted jump hosts, and mobile carrier routing can make a sign-in appear to come from a different country than the user actually occupies. That means country blocking is best treated as a coarse reduction in exposure, not as a hard boundary.

It works best when paired with stronger conditions, such as compliant device requirements, phishing-resistant authentication, or tighter session controls. It works least well when used as the only decision point for high-value apps, because a determined user or attacker may still arrive through an allowed path that looks geographically acceptable.

For that reason, country restrictions are most defensible as part of a broader access policy design rather than as a standalone security control. Conditional Access Guide is useful background when you are deciding how location signals fit alongside authentication strength, report-only testing, and exclusions.

How to validate before turning the policy on

Start by testing the named location in report-only mode and confirming that the expected sign-ins are actually being evaluated the way you think they are. Then verify the impact on travel-heavy users, outsourced support, and any service accounts or non-interactive workflows that might sign in from cloud infrastructure or third-party networks.

Also check whether the policy is meant to protect all apps or only a subset. A broad geographic deny rule can become a helpdesk problem if it is applied before you have a clean exclusion strategy for emergency access, break-glass accounts, or legacy administrative workflows that still need to function during an incident.

If your environment has a history of hybrid identity complexity, service principal sprawl, or admin exceptions, review the surrounding Entra ID posture before enforcing geo-deny broadly. Active Directory and Entra ID Hardening Guide is a useful companion when country blocking is being added to an already complex identity estate.

What usually breaks in practice

The most common failure is false confidence. Teams assume a blocked country means blocked access, but the actual control boundary may still be bypassed through VPN exit nodes, unmanaged devices in permitted locations, or accounts that were excluded during rollout and never re-reviewed. Another common issue is overblocking legitimate sign-ins from travelers or offshore support teams.

If you need to understand the attacker side of the problem, the real risk is not that geography fails in isolation, but that an adversary can blend into ordinary remote-access patterns. A blocked country rule can still be valuable, but only if you know which identities and apps are expected to operate across borders and which should never do so.

When the policy is part of a larger Zero Trust design, it should be treated as one signal among several, not the deciding factor on its own. Zero Trust Identity Guide helps frame that decision around continuous verification rather than geography alone.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST Zero Trust (SP 800-207) and NIST SP 800-53 Rev 5 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

Framework Control / Reference Relevance
NIST Zero Trust (SP 800-207) PR.AA-05 — Least Privilege Location-based deny rules support access limitation within Zero Trust
Recommendation — Use location as one access signal, then enforce stronger controls for high-value apps.
NIST SP 800-53 Rev 5 AC-3 — Access Enforcement Conditional Access enforces access decisions based on named locations
IA-2 — Identification and Authentication (Organizational Users) Country blocking only matters after identities are authenticated to Entra ID
IA-5 — Authenticator Management Geo rules may expose account and session misuse that depends on credential handling
Recommendation — Implement policy-based access enforcement for blocked geographies. Require strong authentication before relying on location-based access decisions. Review credential lifecycle and rotate any accounts that could bypass the rule.
ISO/IEC 27001:2022 A.5.15 — Access control Named location policies are an access control measure governing sign-in approval
Recommendation — Define and review location-based access rules as part of access control policy.

Practitioner Guidance

What to verify: Confirm which sign-ins are truly user-driven and which are service, support, or administrative access before you enforce the rule broadly. Geography controls are often wrong at the edges, so the real question is whether a blocked location is an acceptable proxy for risk in your environment.

Decision rule: If the app is high value, use country blocking as a supporting condition, not the primary control. If the app is low risk and user travel is rare, the rule can be a useful coarse filter, but it still needs exception handling and monitoring for false positives.

Practitioner takeaway: Country blocking is effective only when the identity population, access paths, and exception set are well understood; otherwise it becomes a noisy policy that catches travel and infrastructure variation as often as it catches real exposure.