Conditional Access Problems

Block Microsoft 365 Sign-Ins from Specific IP Addresses

Steve KSteve K Nov 20, 2026 868 views

Question details

An administrator wants to block Microsoft 365 sign-ins from specific IP addresses or ranges.

Block Microsoft 365 Sign-Ins from Specific IP Addresses
Product
Microsoft 365 and Microsoft Entra ID Conditional Access
Device & OS
not provided
Scenario
The administrator wants to restrict access to Microsoft 365 services based on the source IP address of a sign-in.
Observed behavior
Sign-ins from selected IP addresses or ranges should be blocked by a Conditional Access policy.
Before you start

Confirm that the affected users have the required Microsoft Entra ID P1 or eligible bundled licenses and that you have an appropriate Conditional Access administrator role. Collect the public IP addresses or ranges in CIDR notation, and identify an emergency access account to exclude from the policy.

Solution 1Recommended

Block selected IP ranges with Microsoft Entra Conditional Access

Create a named location for the unwanted IP ranges, then apply a block policy to Microsoft 365 sign-ins from that location.

Conditional Access evaluates the public IP address seen by Microsoft Entra ID, which may be a VPN or proxy address rather than the device's local IP address. It controls access after authentication; it does not prevent someone from submitting a sign-in attempt.

1
Create a named location

Sign in to the Microsoft Entra admin center and open Protection > Conditional Access > Named locations. Select IP ranges location, enter a name, add the public IP addresses or ranges in CIDR notation, and save.

2
Create a policy

Open Protection > Conditional Access > Policies and select New policy. Give the policy a descriptive name.

3
Select users and resources

Under Users, include the users or groups you want to protect and exclude your emergency access account. Under Target resources, select Cloud apps and choose the Office 365 app group.

4
Set the location and block action

Under Conditions > Locations, enable the condition and include the named location you created. Under Grant, select Block access, then choose Select.

5
Test and enable the policy

Set Enable policy to Report-only and create the policy. Review the Report-only results in Microsoft Entra sign-in logs and use the Conditional Access What If tool to check expected matches. When the results are correct, edit the policy and set Enable policy to On.

Block selected IP ranges with Microsoft Entra Conditional Access
Avoid unintended lockouts: Secure and monitor the excluded emergency access account separately. Check that shared VPN or proxy IP ranges will not inadvertently block legitimate users.
Free Microsoft Office alternative

Work with Microsoft Office files in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface and support for common Microsoft Office file formats, making it easy to move everyday document work. It does not replace Microsoft Entra Conditional Access or block Microsoft 365 sign-ins.

Free, lightweight apps for everyday office workCompatible with Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTXA familiar interface that helps users transition from Microsoft OfficeOpen and edit Office files independently of Microsoft 365 sign-in policy configuration
microsoft office alternative - wps office

Frequently Asked Questions

Can Conditional Access stop someone from attempting to sign in?

No. Conditional Access can block access when a sign-in matches the policy, but it does not stop someone from submitting credentials. Review attempts in Microsoft Entra admin center under Monitoring & health > Sign-in logs.

How do I add a single IP address to a named location?

In Conditional Access > Named locations, create or edit an IP ranges location and add the public address in CIDR notation, such as /32 for a single IPv4 address or /128 for a single IPv6 address.

Why is a legitimate user matching the blocked location?

Microsoft Entra ID evaluates the public source IP it sees. Check the IP address in the user's sign-in log; a shared VPN, proxy, or network gateway may use an address included in the blocked range.

Will report-only mode block sign-ins?

No. Report-only mode evaluates the policy without enforcing it. Check the Report-only results in the sign-in logs, then switch Enable policy to On when you are ready to enforce it.