Conditional Access Problems

Restrict Microsoft 365 Sign-ins by Location with Conditional Access

Jason MillerJason Miller Nov 14, 2026 868 views

Question details

An administrator wants to restrict Microsoft 365 sign-ins based on client location and check whether their subscription supports Conditional Access.

Restrict Microsoft 365 Sign-ins by Location with Conditional Access
Product
Microsoft 365 and Microsoft Entra Conditional Access
Device & OS
not provided
Scenario
Control access to Microsoft 365 services by allowing sign-ins only from approved locations.
Observed behavior
The desired outcome is a tested location-based sign-in policy supported by the organization's license.
Before you start

Sign in with an account authorized to manage Conditional Access, and identify the public IP ranges or countries you want to allow. Keep an emergency access account excluded from the policy to reduce the risk of an administrative lockout.

Solution 1Recommended

Configure a location-based Conditional Access policy

Use this approach to block Microsoft 365 sign-ins outside approved locations after confirming that the required licensing is available.

1
Check your subscription

In the Microsoft 365 admin center, open Billing > Your products to see your subscription. Check its included services and user license assignments; Conditional Access generally requires Microsoft Entra ID P1 or P2 licensing for covered users. Microsoft 365 Business Premium includes Entra ID P1.

2
Create a named location

In the Microsoft Entra admin center, open Protection > Conditional Access > Named locations. Select the option to create an IP range or country location, enter the approved ranges or countries, and save it.

3
Create a policy

Open Protection > Conditional Access > Policies and select New policy. Name the policy, select the users and Microsoft 365 resources to protect, and exclude an emergency access account.

4
Set the location condition

Under Conditions > Locations, include Any location and exclude the approved named location. Under Grant, select Block access.

5
Test before enabling

Set the policy to Report-only and save it. Review its results in Microsoft Entra sign-in logs for test accounts and locations, then change Enable policy to On when the results are correct.

Configure a location-based Conditional Access policy
Account for network routing: Location is typically evaluated from the public IP address seen by Microsoft Entra. VPNs, proxies, and mobile networks can make a user's apparent location differ from their physical location.
Free Microsoft Office alternative

Work with Office files using WPS Office

WPS Office is a free, lightweight alternative with a familiar interface and compatibility with Microsoft Office files for easier migration. It does not configure or replace Microsoft Entra Conditional Access.

Open and edit Microsoft Word, Excel, and PowerPoint formatsUse a familiar interface for everyday document workInstall a lightweight office suite for freeContinue working with Office files independently of Conditional Access policy management
microsoft office alternative - wps office

Frequently Asked Questions

Where can I check which Microsoft 365 plan my organization has?

In the Microsoft 365 admin center, go to Billing > Your products. Open the relevant subscription to review its details and confirm whether it includes the required Microsoft Entra licensing.

Does Microsoft 365 Business Premium include Conditional Access?

Microsoft 365 Business Premium includes Microsoft Entra ID P1, which supports Conditional Access. Verify that the appropriate licenses are assigned to the users covered by your policy.

How can I prevent a location policy from locking out administrators?

Exclude an emergency access account under the policy's Users settings, start in Report-only mode, and review Microsoft Entra sign-in logs before enabling the policy.

Can I use Exchange Online Client Access Rules instead?

Exchange Online Client Access Rules were deprecated and removed, so they are not a current alternative for restricting Microsoft 365 sign-ins. Use Microsoft Entra Conditional Access when your licensing supports it.

Why does a user's location look wrong in sign-in logs?

Microsoft Entra generally determines location from the public IP address used for the sign-in. A VPN, proxy, or mobile network can route traffic through a different location; review the IP address in the sign-in log and adjust named locations if appropriate.