How to restrict OneDrive sync to managed devices

Limit OneDrive sync, and desktop apps opening work files, to managed computers: with Conditional Access where computers are Microsoft Entra joined, or with the SharePoint domain restriction only where every Windows computer is joined to Active Directory.

Every Microsoft 365 security check · Collaboration & Sharing · NL-COL-007

What this check looks at

Checks whether OneDrive sync, and desktop apps opening work files, are limited to managed computers, and that the SharePoint domain restriction is not stopping sync on Entra joined computers.

The OneDrive sync app copies SharePoint libraries and OneDrive folders onto a computer’s disk and keeps them in step. By default it works on any Windows or Mac computer where someone signs in with their work account, including a personal laptop or a family PC. SharePoint’s "Allow syncing only on computers joined to specific domains" (Set-SPOTenantSyncClientRestriction, read in Microsoft Graph as isUnmanagedSyncAppForTenantRestricted) limits the Windows sync app to computers joined to the Active Directory domains you list by GUID, and can block sync on Macs.

The restriction checks the Active Directory domain a Windows computer is joined to. A computer that is only Microsoft Entra joined, as in a cloud-only organisation, is in no Active Directory domain, so turning the restriction on stops OneDrive syncing on it, even when Intune manages it. For those computers the supported control is a Conditional Access policy that requires a compliant or hybrid joined device. It also stops Word, Excel and Teams on a personal computer opening work files; the browser still works. Where the tenant has the licences for it, the fix offers that policy, created in report-only mode. It no longer turns the SharePoint restriction on for you.

A synced library is a full local copy. On a personal machine the business cannot enforce encryption, updates or antivirus, cannot wipe the files when the person leaves, and cannot see what happens to them next: copied to a USB stick, backed up to a personal cloud, or reached by whatever malware is on a family PC. One person can sync tens of thousands of files in minutes, which makes this the quietest bulk exfiltration route in Microsoft 365.

Why it matters

Unrestricted sync lets a user pull an entire document library onto a personal machine you cannot wipe, patch or audit. It is the quietest large-scale data exfiltration path in Microsoft 365.

A typical case: a sales director about to join a competitor syncs the Sales and Clients libraries to their home iMac in their last week. The audit log shows nothing more than sync activity, and after they leave the business can neither get the files back nor prove exactly what was taken, short of expensive legal action.

The reverse also happens: ransomware on a home PC encrypts the synced files, and the encrypted copies sync back to SharePoint. Version history can restore them, but only after a disruptive recovery. Under Cyber Essentials, a personal device that reaches organisational data is in scope and must meet the same controls; keeping unmanaged computers to browser access makes that boundary far easier to hold.

CIS Microsoft 365 Foundations Benchmark asked that OneDrive sync is restricted for unmanaged devices up to v6.0.0 (7.3.2); v7.0.0 withdrew it. It supports ISO 27001 A.8.1 (user endpoint devices) and the NCSC Cyber Assessment Framework’s B3.d on data on mobile devices.

How to fix it

Where: Entra admin centre → Conditional Access, or SharePoint admin centre → Settings → OneDrive → Sync

Before you start

  • Check the Join type of every company Windows computer in Entra ID → Devices. The SharePoint domain restriction stops sync on any computer that is Microsoft Entra joined only.
  • Conditional Access needs Microsoft Entra ID P1, and Intune for computers that are Entra joined.

Step by step

  1. Check how company computers are joined. In the Microsoft Entra admin centre, go to Entra ID > Devices > All devices and look at the Join type column. Microsoft Entra joined computers need Conditional Access. Only where every company Windows computer is Microsoft Entra hybrid joined (or domain joined) does the SharePoint domain restriction fit.
  2. Tell users. Let staff know that from the change date OneDrive sync, and Word, Excel and Teams opening work files, work only on company computers, and that on personal machines they can still use OneDrive and SharePoint in the browser.
  3. Computers Microsoft Entra joined: add Conditional Access. Where company computers are Microsoft Entra joined, or a mix, create a Conditional Access policy in the Entra admin centre (Entra ID > Conditional Access > Policies > New policy): all users except your emergency access accounts, target resource Office 365 SharePoint Online, condition Client apps set to Mobile apps and desktop clients, platforms Windows and macOS, grant "Require device to be marked as compliant" or "Require Microsoft Entra hybrid joined device". Start in Report-only and turn it on after checking the sign-in logs. It needs Microsoft Entra ID P1, and Intune for compliance.
  4. Computers joined to Active Directory: find your domain GUIDs. On a domain-joined computer with the Active Directory PowerShell module, run Get-ADDomain | Select-Object Name, ObjectGUID for each domain your company computers are joined to, and note the GUIDs.
  5. Computers joined to Active Directory: turn on the restriction. In the SharePoint admin centre, go to Settings and select Sync (under OneDrive). Tick "Allow syncing only on computers joined to specific domains", enter the domain GUIDs, and select Save. Never turn it on with no GUID, or while any company computer is Microsoft Entra joined only: sync stops on those computers.
  6. Computers joined to Active Directory: or use PowerShell, blocking Mac sync too. Connect with SharePoint Online PowerShell as a SharePoint Administrator: Connect-SPOService -Url https://<tenant>-admin.sharepoint.com. Run Set-SPOTenantSyncClientRestriction -Enable -DomainGuids "<guid1>; <guid2>" -BlockMacSync:$true. Leave out -BlockMacSync if company Macs need to sync.
  7. If sync has stopped after the restriction went on. Turn it off in the SharePoint admin centre: Settings > OneDrive > Sync, untick "Allow syncing only on computers joined to specific domains" and select Save. Or in PowerShell: Connect with SharePoint Online PowerShell as a SharePoint Administrator: Connect-SPOService -Url https://<tenant>-admin.sharepoint.com. Run Remove-SPOTenantSyncClientRestriction. If a computer still cannot sync an hour later, quit OneDrive from its icon and start it again.
  8. Confirm the change. Conditional Access shows the policy On, and its sign-in log shows personal computers refused for the desktop apps. For the domain restriction, Get-SPOTenantSyncClientRestriction shows TenantRestrictionEnabled True with your GUIDs in AllowedDomainList.

What users will notice

On a personal computer, OneDrive sync stops, and Word, Excel and Teams cannot open work files. The browser still works.

How to confirm it worked

Conditional Access shows the policy On, and its sign-in log shows personal computers refused for the desktop apps. For the domain restriction, Get-SPOTenantSyncClientRestriction shows TenantRestrictionEnabled True with your domain GUIDs in AllowedDomainList.

Frameworks and controls

This check maps to controls in 11 frameworks. Passing it is evidence that the setting is in place, not a certification against any of them.

The frameworks and controls NL-COL-007 maps to
FrameworkControl
NCSC CAFB3.d Mobile data
DSPTStandard 9: IT protection
NIS2Art. 21(2)(i) Access control and asset management
Microsoft Cloud Security BenchmarkIM-7 Restrict resource access based on conditions
Zero TrustEndpointsData
SOC 2CC6.7 Restricting the transmission, movement and removal of information
NIST SP 800-1713.1.1 Limit system access to authorised users, processes and devices
CMMC Level 2AC.L2-3.1.1 Authorized Access Control
ISO 27001:2022A.8.1 User endpoint devices
NIST CSF 2.0PR.DS-01: The confidentiality, integrity, and availability of data-at-rest are protected
NCSC 10 StepsData security

The framework mappings were last checked against the published standards in October 2026.

Microsoft’s documentation

The full Microsoft 365 security checklist, worst first

ConfigCheckup

Check this in every tenant.

ConfigCheckup runs this check on every tenant you connect and offers an approved fix. You see a dry run of exactly what will change, approve it, and can roll it back.

14 days of daily monitoring and alerts, every finding with its fix guide, and reports on up to 3 tenants, from your first connected tenant. No card. Then choose the plan that fits.Where this check fits: Microsoft 365 security assessment for MSPs