Restrict OneDrive for Business Access by IP Address
Question details
The user wants to restrict access to OneDrive for Business content based on 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.
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.
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.
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.
Open Protection > Conditional Access > Policies and select New policy. Give the policy a descriptive name.
Under Users, include your test group and exclude emergency access accounts. Under Target resources, select Office 365 SharePoint Online.
Under Conditions > Locations, configure the policy to include any location and exclude the named location containing your approved IP ranges.
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.

Limit OneDrive Sync to Domain-Joined PCs
Use the SharePoint admin center when you want to limit synchronization, rather than block all OneDrive access by IP address.
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.

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.




