Conditional Access Problems

How to Restrict SharePoint Access by IP Address or Network Location

Huda QurayshiHuda Qurayshi Oct 29, 2026 868 views

Question details

The user needs to configure SharePoint and OneDrive to allow access exclusively from approved workplace IP addresses while preserving administrator access.

How to Restrict SharePoint Access by IP Address or Network Location
Product
Microsoft SharePoint
Device & OS
not provided
Scenario
Securing organizational data by limiting tenant access to trusted corporate network locations.
Observed behavior
The goal is to successfully apply IP-based restrictions using CIDR notation without encountering format errors or locking out the administrator.
Before you start

Verify the exact public IP address of your current administration machine and gather all approved workplace IP ranges in proper CIDR notation to prevent accidentally locking yourself out.

Solution 1Recommended

Configure Network Location in SharePoint Admin Center

Use the Access Control settings in the SharePoint Admin Center to restrict access based on trusted IP addresses.

Network location policies allow administrators to restrict access to SharePoint and OneDrive resources based on specific IP addresses or ranges. Users attempting to connect from outside these permitted networks will be blocked.

It is critical to format the IP addresses using standard CIDR notation and ensure that none of the ranges overlap, or the system will reject the configuration.

1
Open SharePoint Admin Center

Log in to the Microsoft 365 admin center with your administrative credentials, expand the navigation menu, and open the SharePoint admin center.

2
Navigate to Access Control

In the left-hand navigation pane, expand the 'Policies' section and select 'Access control'.

3
Access Network Location Settings

Click on 'Network location' from the list of access control options to open the IP restriction settings panel.

4
Enable IP Restriction

Toggle the switch to turn on 'Allow access only from specific IP address locations'.

5
Enter CIDR Ranges

Enter your trusted workplace IP addresses or ranges separated by commas. You must use CIDR notation (e.g., 192.168.1.0/24) and ensure there are no overlapping network segments.

6
Add Admin IP and Save

Crucially, manually enter your current public IP address into the list to avoid losing access. Once verified, click 'Save' to apply the restrictions.

Configure Network Location in SharePoint Admin Center
CIDR Formatting Rules: The system mandates strict CIDR notation. If you receive an error when saving, double-check that your addresses are separated by commas, do not overlap, and your current IP is permitted.
Free Microsoft Office alternative

Looking for a secure and lightweight Office alternative?

While Microsoft 365 and SharePoint provide enterprise-grade network restriction features, they can be complex to manage. If your team needs a free, lightweight, and highly compatible alternative for document creation and team collaboration, WPS Office is an excellent choice. It offers seamless migration with a familiar interface without heavy administrative overhead.

  1. 1. Visit the Official Website: Go to the official WPS Office website to download the installer.
  2. 2. Install WPS Office: Run the downloaded installer and follow the on-screen instructions to set up the software.
  3. 3. Start Creating: Open WPS Office and immediately start creating, editing, or sharing documents with full Microsoft Office compatibility.
Fully compatible with Microsoft Office formats like .docx, .xlsx, and .pptx.Free and lightweight suite for Word, Excel, PowerPoint, and PDF editing.Built-in secure cloud collaboration features to share files easily within your organization.Familiar user interface that requires zero learning curve for users switching from Microsoft Office.
microsoft office alternative - wps office

Frequently Asked Questions

Why did I get an error when saving my IP addresses in SharePoint?

Errors usually occur if the IP addresses overlap, are not formatted using proper CIDR notation, or are not separated correctly by commas. Double-check your entries to ensure formatting is exact and ranges do not conflict.

Will restricting SharePoint access by IP also block OneDrive?

Yes, applying network location restrictions in the SharePoint admin center applies universally across the tenant, affecting both SharePoint sites and individual user OneDrive accounts.

What happens if I forget to add my own admin IP address?

If you do not include your current public IP address before enabling the restriction, you risk locking yourself out of the SharePoint admin center. The system typically warns you, but you should always manually verify your IP is on the allowed list.

Does this network restriction apply to users syncing files with the OneDrive app?

Yes, users attempting to sync files using the OneDrive desktop client from an unauthorized IP address or external network location will be blocked from accessing the data.