Restrict Microsoft 365 Sign-ins by Location with Conditional Access
Question details
An administrator wants to restrict Microsoft 365 sign-ins based on client location and check whether their subscription supports 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.
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.
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.
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.
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.
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.
Under Conditions > Locations, include Any location and exclude the approved named location. Under Grant, select Block access.
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.

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.

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.




