Configuring Named Locations
Earn 25 points (50 with Pro) in two steps
- ① Read through the lesson — each section gets a ✓ as you scroll through it.
- ② When every section has a ✓, tap Complete lesson.
0 of 11 read · keep scrolling
✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro
Configuring Named Locations in Microsoft Entra ID
Introduction: Understanding Identity Perimeters
In the modern landscape of cloud computing, the traditional "castle and moat" security model—where everything inside the corporate network is trusted and everything outside is suspicious—has become obsolete. As organizations adopt remote work, mobile devices, and software-as-a-service (SaaS) applications, the identity of the user has become the new security perimeter. However, identity alone is not enough. To create a truly resilient security posture, we must consider the context in which an identity attempts to access resources.
Named Locations in Microsoft Entra ID (formerly Azure Active Directory) provide a fundamental mechanism for defining these contexts. By labeling specific IP ranges, countries, or regions as "known" or "trusted," administrators can create granular policies that adjust security requirements based on where a request originates. This is the cornerstone of Conditional Access; it allows you to demand stricter authentication methods (like multi-factor authentication) for users traveling abroad while allowing simplified access for employees working from a secure corporate office.
Understanding how to configure and manage these locations is not just a checkbox exercise for compliance; it is a vital skill for reducing the attack surface of your organization. This lesson will guide you through the technical implementation of Named Locations, the logic behind their integration with Conditional Access, and the best practices for maintaining a secure identity environment.
Not read yet
What are Named Locations?
At its core, a Named Location is a logical grouping of network properties that Microsoft Entra ID uses to evaluate access requests. When a user logs in, the service inspects the source IP address of the request. If that IP address matches a definition you have created in your Named Locations, the system marks that request with a specific label.
There are two primary types of Named Locations in Entra ID:
- IP-based Locations: These are defined by specific public IPv4 or IPv6 address ranges (CIDR blocks). They are typically used to represent your corporate offices, branch locations, or specific VPN head-ends.
- Country-based Locations: These are defined by geo-location data associated with IP addresses. While less precise than specific IP ranges, they are incredibly useful for blocking access from entire regions where your organization has no business presence.
Why Context Matters
Imagine a user account is compromised. If an attacker in a different country attempts to sign in, and you have configured a Conditional Access policy that blocks access from countries where you do not operate, the attack is stopped immediately. Conversely, if an employee is working from the office, you might choose to bypass multi-factor authentication (MFA) to improve user experience, knowing that the physical security of the building provides an additional layer of protection.
Callout: Named Locations vs. Trusted IPs It is important to distinguish between "Named Locations" and the legacy "Trusted IPs" setting in the MFA service. While Trusted IPs were once the standard for identifying office networks, they have been deprecated in favor of Named Locations. Named Locations are more flexible, support IPv6, and integrate directly into the Conditional Access engine, providing a unified management experience for all authentication signals.
Not read yet
Configuring IP-Based Named Locations
IP-based locations are the most common implementation. They allow you to define the exact boundaries of your physical network.
Step-by-Step: Adding an IP Named Location
- Sign in to the Microsoft Entra admin center using an account with at least a Conditional Access Administrator role.
- Navigate to Protection > Conditional Access > Named locations.
- Click on + IP ranges location.
- Provide a Name that is descriptive (e.g., "London HQ - Primary Office").
- Enter the IP ranges in CIDR notation (e.g.,
192.168.1.0/24). - Check the box labeled Mark as trusted location if this network is managed by your organization and considered secure.
- Click Create.
Best Practices for IP Ranges
When defining your IP ranges, ensure you are using the public-facing IP addresses of your network, not the internal private addresses. If you have a large organization with many branch offices, keep a well-documented spreadsheet of your public IP ranges to avoid configuration drift.
Tip: Public vs. Private IPs Remember that the Entra ID service sees the request coming from your ISP's public IP address, not your internal workstation IP. If you use a NAT (Network Address Translation) device, ensure you are using the egress IP address of that device in your Named Location definitions.
Not read yet
Configuring Country-Based Named Locations
Country-based locations allow you to categorize access by geographical origin. This is particularly effective for "geo-fencing" your applications.
How Geo-Location Works
Microsoft Entra ID uses a third-party mapping service that correlates IP addresses with physical locations. Because IP addresses are dynamic and can be reallocated, this method is not 100% accurate, but it is highly effective for broad security policies.
Step-by-Step: Adding a Country Named Location
- Navigate to Protection > Conditional Access > Named locations.
- Click on + Countries location.
- Provide a Name (e.g., "Region - Blocked Countries").
- Select the countries from the list. You can select entire continents or specific nations.
- Decide whether you want to Include unknown areas. This is crucial because some IP addresses do not map correctly to a specific country. If you are creating a "Block" policy, you may want to include unknown areas to be safe, but be careful not to lock out legitimate users.
- Click Create.
Not read yet
Integrating Named Locations with Conditional Access
Defining a location does nothing on its own. To enforce security, you must use these locations within a Conditional Access policy.
The Logic of Conditional Access
Conditional Access follows a simple "If-Then" logic:
- Assignments (The "If"): Who is the user? What app are they accessing? What is the risk level? Where are they located?
- Access Controls (The "Then"): Block access, Grant access, or Require MFA/Password change.
Scenario: Restricting Access to Sensitive Data
Suppose you want to ensure that access to your Human Resources application is only possible from your corporate office.
- Create a new Conditional Access Policy.
- Under Users, select the group of users who need access to HR data.
- Under Target resources, select the specific application (e.g., "Workday" or "HR Portal").
- Under Conditions > Locations, select Include and choose your "Corporate Office" Named Location.
- Under Access Controls, select Grant and ensure access is allowed.
- Crucial Step: In the Locations condition, you must ensure that everything outside of your corporate office is implicitly blocked by a separate policy or by setting the "Grant" control to "Block" for all other locations.
Warning: The "Lockout" Risk Always test your policies in "Report-only" mode before enforcing them. If you create a policy that blocks access based on location and you incorrectly define your IP ranges, you could inadvertently lock your entire organization out of the portal, including the administrators. Use the Conditional Access "What If" tool to simulate the policy before enabling it.
Not read yet
Comparison of Location Types
| Feature | IP-Based Locations | Country-Based Locations |
|---|---|---|
| Precision | High (Exact CIDR) | Moderate (IP Mapping) |
| Use Case | Trusted office networks | Geo-fencing/Risk reduction |
| Maintenance | High (Requires IP tracking) | Low (Managed by Microsoft) |
| Reliability | Very High | Variable (VPNs/Proxies bypass) |
Common Pitfalls and How to Avoid Them
1. The VPN Problem
Many organizations use VPNs to allow remote workers to access internal resources. If a user connects to a corporate VPN, their traffic might be routed through your corporate data center, meaning the request will appear to come from your corporate IP range. While this makes the user "trusted" by your location policy, it may bypass other security checks. Ensure your VPN infrastructure is secure and that you are not accidentally granting "trusted" status to remote users who have not passed secondary authentication.
2. Ignoring IPv6
Many administrators focus exclusively on IPv4. However, modern traffic often utilizes IPv6. If you only define IPv4 ranges, a user coming from an IPv6 connection will not be recognized as being in your "Trusted" location, leading to unexpected MFA prompts. Always check your network infrastructure to see if IPv6 is active and include those ranges if necessary.
3. Relying on Location as the Sole Security Factor
Location is a signal, not a guarantee. An attacker can use a proxy server or a VPN to make it appear as if they are connecting from your corporate office. Never rely solely on Named Locations for security. Always combine location-based policies with other signals, such as device compliance (Intune) or user risk (Entra ID Protection).
4. Lack of Documentation
IP addresses change, ISPs reconfigure their networks, and offices move. If you do not keep a clear record of why a specific IP range is marked as "Trusted," you will eventually run into a situation where an old, insecure network is still permitted to bypass MFA. Conduct a quarterly audit of your Named Locations to remove stale entries.
Not read yet
Practical Examples and Implementation Scenarios
Scenario A: The "Traveler" Policy
You have a sales team that frequently travels internationally. You want to ensure that when they are abroad, they are forced to use MFA, but when they are in their home country, they can use a simpler authentication flow.
- Policy 1: Require MFA for all users, but exclude the "Home Country" Named Location.
- Policy 2: Require MFA for all users, including those in the "Home Country" who are flagged as "High Risk."
This layered approach ensures that even if a user is "trusted" by location, their behavior is still monitored for suspicious activity.
Scenario B: Blocking Malicious Regions
If your organization only conducts business in North America, you can create a policy that blocks all sign-in attempts from countries in other regions.
- Create a Named Location called "Allowed Countries" and select only the countries where you operate.
- Create a Conditional Access policy.
- Set the Locations condition to "Any location" and Exclude the "Allowed Countries" location.
- Set the Access Control to "Block access."
This effectively creates a "Deny-by-Default" posture for the rest of the world.
Not read yet
Advanced Management: Using PowerShell
For large organizations with hundreds of branch offices, manually entering IP ranges in the UI is inefficient. You can manage Named Locations using the Microsoft Graph PowerShell SDK.
Code Example: Creating a Named Location
First, ensure you have the Microsoft.Graph module installed and connected.
# Define the parameters for the new location
$params = @{
"@odata.type" = "#microsoft.graph.ipNamedLocation"
displayName = "New York Branch Office"
isTrusted = $true
ipRanges = @(
@{
"@odata.type" = "#microsoft.graph.iPv4CidrRange"
cidrAddress = "192.0.2.0/24"
}
)
}
# Create the location
New-MgIdentityConditionalAccessNamedLocation -BodyParameter $params
Explanation of the Script
@odata.type: This specifies the object type. For IPs, we use#microsoft.graph.ipNamedLocation.isTrusted: Setting this to$trueallows you to use this location for MFA bypass policies.ipRanges: This is an array, meaning you can add multiple CIDR blocks to a single Named Location object, which is helpful if your office uses multiple subnets.
Note: Always verify your changes after running scripts. Use
Get-MgIdentityConditionalAccessNamedLocationto list all current locations and confirm that the new object appears with the correct properties.
Not read yet
Best Practices Summary
- Use Descriptive Names: Avoid generic names like "Office1." Use "London_HQ_Main" or "Branch_Berlin_VPN" to make auditing easier.
- Leverage Report-Only Mode: Before moving a policy to "On," always use the report-only mode to see how many users would have been blocked or prompted for MFA.
- Keep it Lean: Do not create a Named Location for every single minor subnet if they can be aggregated into a larger range. This reduces the administrative overhead.
- Audit Regularly: Schedule a review every 90 days to ensure that the IP addresses in your list are still valid and owned by your organization.
- Combine Signals: As mentioned, location is just one part of the puzzle. Always layer it with device status, user risk, and sign-in risk signals.
Troubleshooting Common Issues
"Why am I being prompted for MFA even though I'm in the office?"
- Check the Sign-in Logs: Go to Entra ID > Monitoring > Sign-in logs. Find the failed or prompted sign-in event.
- Examine the "Location" tab: See what IP address Entra ID recorded for that session.
- Compare to Named Locations: Check if that specific IP address is actually covered by one of your defined Named Locations. Often, the issue is that the user's traffic is exiting through a different ISP gateway than the one you defined.
- Check for IPv6: If the recorded IP is an IPv6 address, ensure you have added that address range to your Named Location.
"I created a block policy but users are still getting in."
- Policy Order: Conditional Access policies are processed in order. If you have a policy that grants access before your block policy, the block policy will never be evaluated. Check the policy priority in the Conditional Access blade.
- Exclusions: Check if the user is part of a group that you excluded from the policy.
- Session Persistence: If a user was already signed in before you enabled the policy, their session might still be active. Policies usually apply to new sign-in attempts.
Not read yet
Frequently Asked Questions (FAQ)
Q: Can I use Named Locations for things other than Conditional Access? A: Currently, Named Locations are primarily designed for Conditional Access. However, they are also used by Entra ID Protection to identify "Impossible Travel" scenarios. If a user signs in from two different locations in a short time, and one of those is a "Trusted" location, the system can use that information to refine its risk calculation.
Q: Does a Named Location apply to guest users? A: Yes. Conditional Access policies apply to all identities in your tenant, including B2B guest users. If you have a policy that restricts access based on location, that policy will also apply to guests attempting to access your resources.
Q: What is the maximum number of Named Locations I can have? A: There is a limit to the number of Named Locations and the number of IP ranges you can define. While the limit is quite high (hundreds of locations), you should strive to keep your configuration clean and organized. If you have thousands of IP ranges, you may need to reconsider your network architecture or aggregate them into larger CIDR blocks.
Q: Should I block all countries except my own? A: While this is a common security practice, it can be disruptive. If your employees travel frequently, or if you use third-party services that utilize globally distributed servers, you might inadvertently block legitimate traffic. Start with a "Report-only" policy to see what would be blocked before moving to active enforcement.
Not read yet
Key Takeaways
- Identity is the Perimeter: In the cloud-first world, location is a vital piece of context that defines how an identity should be treated.
- Define Locations Carefully: Use IP-based locations for specific, controlled networks and country-based locations for broad geographical governance.
- Trust is Earned: Only mark a location as "Trusted" if you have complete control over the network security of that location. Never mark public Wi-Fi or home networks as trusted.
- Layered Security: Named Locations should never be your only security control. Always combine location data with MFA, device compliance, and risk-based signals for a robust defense.
- Test Before Enforcing: Always use the "Report-only" mode and the "What If" tool in Conditional Access to simulate the impact of your policies. This prevents self-inflicted lockouts and ensures a smooth user experience.
- Maintain Hygiene: Treat your Named Locations as configuration-as-code. Document why each location exists, who owns the IP ranges, and perform regular audits to remove obsolete entries.
- Consider IPv6: Modern network traffic is increasingly using IPv6. Ensure your location definitions account for modern networking standards to avoid gaps in your security coverage.
By mastering the configuration of Named Locations, you move beyond basic password-based security and into the realm of intelligent, context-aware access management. This not only protects your organization from unauthorized access but also enables a more flexible, productive environment for your legitimate users.
Not read yet
Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.
- Creating a Microsoft 365 Tenant
- Creating a Microsoft 365 Tenant Quiz5q
- Implementing and Managing Domains
- Implementing and Managing Domains Quiz5q
- Configuring Organization Settings
- Configuring Organization Settings Quiz5q
- Monitoring Microsoft 365 Service Health
- Monitoring Microsoft 365 Service Health Quiz5q
- Configuring Network Connectivity Insights
- Configuring Network Connectivity Insights Quiz5q
- Managing Software Updates in Microsoft 365
- Managing Software Updates in Microsoft 365 Quiz5q
- Monitoring Microsoft 365 Adoption and Usage
- Monitoring Microsoft 365 Adoption and Usage Quiz5q
- Configuring Microsoft 365 Backup
- Configuring Microsoft 365 Backup Quiz5q
- Creating and Managing Users in Microsoft Entra ID
- Creating and Managing Users in Microsoft Entra ID Quiz5q
- Managing External Users and Guest Access
- Managing External Users and Guest Access Quiz5q
- Creating and Managing Contacts
- Creating and Managing Contacts Quiz5q
- Creating and Managing Microsoft 365 Groups
- Creating and Managing Microsoft 365 Groups Quiz5q
- Managing Shared Mailboxes
- Managing Shared Mailboxes Quiz5q
- Managing Microsoft 365 Licenses
- Managing Microsoft 365 Licenses Quiz5q
- Performing Bulk User Management with PowerShell
- Performing Bulk User Management with PowerShell Quiz5q
- Implementing Group-Based Licensing
- Implementing Group-Based Licensing Quiz5q
- Implementing Roles in Microsoft 365
- Implementing Roles in Microsoft 365 Quiz5q
- Managing Microsoft Entra ID Roles
- Managing Microsoft Entra ID Roles Quiz5q
- Managing Permissions for Microsoft Defender XDR
- Managing Permissions for Microsoft Defender XDR Quiz5q
- Managing Delegation with Administrative Units
- Managing Delegation with Administrative Units Quiz5q
- Managing Roles with Privileged Identity Management
- Managing Roles with Privileged Identity Management Quiz5q
- Managing Microsoft Purview Permissions
- Managing Microsoft Purview Permissions Quiz5q
- Preparing for Identity Synchronization
- Preparing for Identity Synchronization Quiz5q
- Using IdFix for Directory Cleanup
- Using IdFix for Directory Cleanup Quiz5q
- Implementing Microsoft Entra Connect Sync
- Implementing Microsoft Entra Connect Sync Quiz5q
- Implementing Microsoft Entra Cloud Sync
- Implementing Microsoft Entra Cloud Sync Quiz5q
- Monitoring with Microsoft Entra Connect Health
- Monitoring with Microsoft Entra Connect Health Quiz5q
- Troubleshooting Synchronization Issues
- Troubleshooting Synchronization Issues Quiz5q
- Implementing Authentication Methods
- Implementing Authentication Methods Quiz5q
- Implementing Self-Service Password Reset
- Implementing Self-Service Password Reset Quiz5q
- Implementing Microsoft Entra Password Protection
- Implementing Microsoft Entra Password Protection Quiz5q
- Investigating Authentication Issues
- Investigating Authentication Issues Quiz5q
- Configuring Passwordless Authentication
- Configuring Passwordless Authentication Quiz5q
- Planning for Identity Protection
- Planning for Identity Protection Quiz5q
- Implementing Microsoft Entra Identity Protection
- Implementing Microsoft Entra Identity Protection Quiz5q
- Planning Conditional Access Policies
- Planning Conditional Access Policies Quiz5q
- Implementing Conditional Access Policies
- Implementing Conditional Access Policies Quiz5q
- Implementing Multifactor Authentication
- Implementing Multifactor Authentication Quiz5q
- Configuring Named Locations
- Configuring Named Locations Quiz5q
- Understanding Microsoft Security Exposure Management
- Understanding Microsoft Security Exposure Management Quiz5q
- Managing Microsoft Secure Score
- Managing Microsoft Secure Score Quiz5q
- Reviewing and Responding to Incidents
- Reviewing and Responding to Incidents Quiz5q
- Using Advanced Hunting in Defender XDR
- Using Advanced Hunting in Defender XDR Quiz5q
- Reviewing Defender XDR Reports
- Reviewing Defender XDR Reports Quiz5q
- Using Microsoft Defender Threat Intelligence
- Using Microsoft Defender Threat Intelligence Quiz5q
- Configuring Custom Detection Rules
- Configuring Custom Detection Rules Quiz5q
- Implementing Threat Policies in Defender for Office 365
- Implementing Threat Policies in Defender for Office 365 Quiz5q
- Configuring Alert Policies
- Configuring Alert Policies Quiz5q
- Investigating Email and Collaboration Threats
- Investigating Email and Collaboration Threats Quiz5q
- Managing Attack Simulation Training
- Managing Attack Simulation Training Quiz5q
- Managing Restricted Entities
- Managing Restricted Entities Quiz5q
- Onboarding Devices to Defender for Endpoint
- Onboarding Devices to Defender for Endpoint Quiz5q
- Configuring Endpoint Settings
- Configuring Endpoint Settings Quiz5q
- Using Vulnerability Management Dashboard
- Using Vulnerability Management Dashboard Quiz5q
- Responding to Endpoint Vulnerabilities
- Responding to Endpoint Vulnerabilities Quiz5q
- Managing Automated Investigation and Remediation
- Managing Automated Investigation and Remediation Quiz5q
- Configuring App Connector for Microsoft 365
- Configuring App Connector for Microsoft 365 Quiz5q
- Configuring Cloud Apps Policies
- Configuring Cloud Apps Policies Quiz5q
- Interpreting Activity Logs
- Interpreting Activity Logs Quiz5q
- Configuring Cloud App Discovery
- Configuring Cloud App Discovery Quiz5q
- Responding to Cloud App Discovery Issues
- Responding to Cloud App Discovery Issues Quiz5q
- Implementing Sensitive Information Types
- Implementing Sensitive Information Types Quiz5q
- Using Keywords and Regular Expressions
- Using Keywords and Regular Expressions Quiz5q
- Implementing Retention Labels and Policies
- Implementing Retention Labels and Policies Quiz5q
- Implementing Sensitivity Labels and Policies
- Implementing Sensitivity Labels and Policies Quiz5q
- Monitoring Label Usage with Content Explorer
- Monitoring Label Usage with Content Explorer Quiz5q
- Using Activity Explorer and Label Reports
- Using Activity Explorer and Label Reports Quiz5q
- Configuring Auto-Labeling Policies
- Configuring Auto-Labeling Policies Quiz5q
- Configuring DLP Policies for Exchange Online
- Configuring DLP Policies for Exchange Online Quiz5q
- Configuring DLP for SharePoint and OneDrive
- Configuring DLP for SharePoint and OneDrive Quiz5q
- Configuring DLP for Teams and Power BI
- Configuring DLP for Teams and Power BI Quiz5q
- Configuring DLP for Microsoft 365 Copilot
- Configuring DLP for Microsoft 365 Copilot Quiz5q
- Configuring Endpoint DLP
- Configuring Endpoint DLP Quiz5q
- Reviewing DLP Alerts and Events
- Reviewing DLP Alerts and Events Quiz5q
- Responding to DLP Reports
- Responding to DLP Reports Quiz5q
Spend your points to unlock exam-style practice questions
Spend points to unlock MS-102 exam-style practice questions.
Practice for MS-102