Conditional Access Problems

Restrict OneDrive for Business Access by IP Address

Rana GarciaRana Garcia Nov 25, 2026 869 views

Question details

The user wants to restrict access to OneDrive for Business content based on IP address.

How to Restrict OneDrive for Business Access by IP Address
Product
OneDrive for Business
Device & OS
not provided
Scenario
An organization wants users to access OneDrive content only from approved network locations.
Observed behavior
Access should be allowed from approved IP addresses and blocked from other locations.
Before you start

Collect the public IPv4 and IPv6 address ranges used by your approved networks and confirm that you have the required Microsoft Entra Conditional Access licensing and administrative permissions. Identify a small test group and exclude emergency access accounts to reduce the risk of an administrative lockout.

Solution 1Recommended

Restrict OneDrive Access with Microsoft Entra Conditional Access

Use a location-based Conditional Access policy to block OneDrive access outside approved public IP ranges.

OneDrive for Business is built on SharePoint Online, so a policy targeting Office 365 SharePoint Online also affects SharePoint access for the selected users. Conditional Access generally requires Microsoft Entra ID P1 licensing.

1
Create a named location

In the Microsoft Entra admin center, open Protection > Conditional Access > Named locations. Select IP ranges location and add the approved public IP ranges in CIDR notation.

2
Create a policy

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

3
Choose users and the app

Under Users, include your test group and exclude emergency access accounts. Under Target resources, select Office 365 SharePoint Online.

4
Set the location condition

Under Conditions > Locations, configure the policy to include any location and exclude the named location containing your approved IP ranges.

5
Block and test access

Under Grant, select Block access. Enable the policy in Report-only mode, review the results, and then turn it on after confirming that the intended users and locations are affected.

Restrict OneDrive Access with Microsoft Entra Conditional Access
Check the policy scope: The policy also applies to SharePoint Online for the selected users. To restrict other Microsoft 365 services, include the appropriate resources in a separate policy or adjust the scope after testing.
Free Microsoft Office alternative

Work with Office Files in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface and support for Microsoft Office formats, making it easy to move everyday document work to WPS. OneDrive IP restrictions still need to be managed in Microsoft Entra or your organization's access controls.

Open and edit Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTXUse a familiar interface for everyday document, spreadsheet, and presentation workWork with Office files while your organization manages OneDrive network access separatelyUse a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Can I restrict OneDrive for Business to specific IP addresses?

Yes. In Microsoft Entra Conditional Access, create a named location with your approved public IP ranges, then use a policy targeting Office 365 SharePoint Online to block access from other locations.

Will the policy affect SharePoint as well as OneDrive?

Yes. OneDrive for Business relies on SharePoint Online, so a policy targeting Office 365 SharePoint Online can affect both services for the users included in the policy.

Does limiting sync to domain-joined PCs block browser access?

No. The domain-joined PC setting under SharePoint admin center > Settings > Sync limits synchronization. Use an access policy if you also need to control browser access.

How can I test an IP restriction without immediately blocking users?

Enable the Conditional Access policy in Report-only mode and review its results before turning it on. Start with a test group and exclude emergency access accounts.