Why this matters
An organisation operating in a defined set of regions may still receive authentication attempts from anywhere. Stolen credentials can be used from unfamiliar networks and countries, creating unnecessary exposure when there is no legitimate business reason for access from those locations.
This guide implements a deny-by-default geographic policy with approved regions and managed exceptions. Location is a supporting signal, not proof of identity: VPNs and proxies can obscure it, so other authentication and risk controls remain necessary.
What you'll accomplish
Implement location restrictions, manage travel exceptions and investigate sign-in outcomes.
Location-based access controls can reduce the authentication attack surface when an organisation has defined operating regions. There are two distinct designs: block selected locations, or block every location except an explicitly approved set. This guide implements the second, deny-by-default design. Unlike Part 03, the target is all cloud resources, not just authentication registration.
1. Prerequisites and dependency discovery
Ensure Entra ID P1 or equivalent, Conditional Access Administrator permissions, tested emergency access, a business-approved location inventory and sign-in log access. P2 is needed for risk-based controls, not this basic location policy. Review at least 30 days of sign-in history where retained, including non-interactive user activity and infrequent travel. Validate legitimate regions with owners; historical successful access does not establish legitimacy. Inventory VPN, secure web gateway, proxy, virtual desktop and mobile network egress. Determine whether a geographic or corporate IP boundary is actually needed.
2. Create an approved named location
In Entra ID > Conditional Access > Named locations, create a Countries location for approved countries/regions, or an IP ranges location for approved public IPv4/IPv6 CIDRs. Use public egress addresses rather than RFC1918 internal addresses. Review unknown-country handling; avoid treating unknown locations as approved without documented justification. Mark an IP location trusted only after considering the wider effect on identity risk and other controls; marking trusted is not required simply to exclude it from this policy. The evidence does not reveal CA-004's excluded location type or membership.
3. Configure the blocking policy
Open Entra ID > Conditional Access > Policies > New policy.
Configuration captures show a newer Microsoft Entra portal interface, with sensitive details removed. They illustrate the settings, not proof of a successful deployment or a January 2025 capture.
- Name: Location restrictions.

Figure 1. Location restriction policy overview. Open full-size image - Users: include All users; exclude approved emergency access accounts and strictly scoped exceptions. The supplied captures show exclusions but not their identities.

Figure 2. All users included, with specific exclusions. Open full-size image - Target resources: select All resources, including administrative access within Entra's scope. Confirm recovery access before enforcement.

Figure 3. Target resources: All resources. Open full-size image - Network (Conditions > Locations in older UI): Configure Yes; Include Any network or location; Exclude Selected networks and locations; select the approved named location.

Figure 4. Network inclusion: Any network or location. Open full-size image 
Figure 5. Location condition summary showing one excluded location. Open full-size image - Grant: select Block access. No session control required. The policy captures show one excluded location and no additional risk/device/client conditions configured.

Figure 6. Grant control: Block access. Open full-size image - State: start new deployment in Report-only, assess impact and pilot; the supplied configuration shows On.
4. Validate policy logic
| Scenario | Expected result |
|---|---|
| In-scope user inside approved location | This policy not applied |
| In-scope user outside approved location | Blocked when enforced |
| Unknown location outside excluded set | Blocked when enforced |
| Excluded account | Not applied |
| Matching report-only block | Report-only failure |
| Approved location but another policy blocks | Access denied |
Use What If and representative actual sign-ins, including VPN, travelers, guests, IPv4/IPv6 and administrative users. No amount of MFA overrides an applicable block. Location-based CA does not prevent all first-factor password attempts and does not protect applications outside Entra authentication.
5. Manage travel and network dependencies
Document destination, travel period, required resources, owner approval and security review. If a temporary exclusion is necessary, use narrowly scoped and time-limited membership; retain MFA/device and other protections. Do not permanently add a country for one employee. A user exception may exempt access from more locations than intended; test a companion restriction. PIM for Groups may support governed membership subject to licensing.
Public source IP can represent corporate VPN or proxy egress rather than physical location. Review split-tunnel and cloud desktop behavior. For supported real-time CAE location enforcement, Microsoft advises IP-based conditions and covering all IPv4/IPv6 addresses observed by both identity and resource providers. Country-based rules do not offer equivalent immediate enforcement; existing sessions may persist until reevaluation. Validate strict enforcement separately.
6. Monitor location decisions with KQL
Establish a baseline of successful interactive sign-in records by the reported country. This is an IP-derived observation, not proof of the user's physical location or policy eligibility.
SigninLogs
| where TimeGenerated >= ago(30d) and ResultType == "0"
| extend Country = tostring(LocationDetails.countryOrRegion)
| extend Country = iff(isempty(Country), "Unknown", Country)
| summarize Events = count(), UniqueUsers = dcount(UserPrincipalName),
UniqueIPs = dcount(IPAddress), LastSeen = max(TimeGenerated) by Country
| order by Events descFor policy-specific monitoring, replace the policy ID. Both input tables must be connected. The query parses the location and policy fields in each source before combining them because the two documented schemas use different types.
let PolicyId = "<replace-with-policy-guid>";
union
(SigninLogs
| where TimeGenerated >= ago(30d)
| project UserPrincipalName, AppDisplayName, ClientAppUsed,
PolicyArray = todynamic(ConditionalAccessPolicies), Country = tostring(LocationDetails.countryOrRegion), LogType = "Interactive"),
(AADNonInteractiveUserSignInLogs
| where TimeGenerated >= ago(30d)
| project UserPrincipalName, AppDisplayName, ClientAppUsed,
PolicyArray = todynamic(ConditionalAccessPolicies), Country = tostring(parse_json(LocationDetails).countryOrRegion), LogType = "Non-interactive")
| mv-expand Policy = PolicyArray
| where tostring(Policy.id) =~ PolicyId
| summarize Events = count(), AffectedUsers = dcount(UserPrincipalName)
by PolicyResult = tostring(Policy.result), Country, LogType
| order by Events descThis reports policy evaluation by country, not a definitive list of approved geographic locations or proof of a bypass. Inspect the actual named location, exclusions, egress and overall sign-in status. Error 53003 alone does not identify the responsible policy. The query fields and KQL constructs were checked against the linked Microsoft documentation on 30 November 2026. These examples have not been executed against a live workspace. Use a workspace containing the required diagnostic tables, with sufficient retention and appropriate read permissions.
7. Deploy, troubleshoot and roll back
Observe report-only impacts across representative business cycles, obtain approvals, validate emergency access, then enable a pilot before broad rollout. Investigate legitimate blocks by comparing public IP, detected region, location membership and other policies. For users retaining access after a network change, examine token renewal and CAE support. If a critical dependency is disrupted, use approved administrative recovery and return the new rule to Report-only or Off while preserving other protections. Re-test before restoring. Review IP ranges, travel expiry, regional expansion and blocked events regularly.
References
- Block access by location
- Network assignment
- Continuous access evaluation
- SigninLogs table schema
- Conditional Access policy evaluation results
- Non-interactive sign-in table schema
- Kusto union operator and column types
- Non-interactive sign-in example queries
Continue the series
All six Conditional Access guides