SharePointVault ~/gotchas/tooling ⌕ Search 459 pages, error messages, scripts…Ctrl K ★ Star
M↓ README.mdM↓ sync-restricted-to-domains-blocks-entra-joined-devices.md
sharepoint-vault›gotchas›tooling›sync-restricted-to-domains-blocks-entra-joined-devices.mdhistoryedit on GitHub
● GOTCHAtooling· 2 min read

“Allow syncing only on computers joined to specific domains” stops OneDrive sync on every Entra-joined PC

applies to: SharePoint Online, OneDrivereviewed: 2026-11-30#tooling#onedrive#sync#graph#entra#conditional-access

The sync restriction only understands Active Directory domain GUIDs. On a tenant whose PCs are joined only to Microsoft Entra ID — typically a cloud-only tenant without AD sync — switching it on stops the OneDrive sync app on every computer. Offer it only to hybrid tenants, with the domain GUIDs entered first; protect Entra-joined devices with Conditional Access instead.

Omezení synchronizace zná jen GUID domén Active Directory. Na tenantu, kde jsou počítače připojené jen k Entra ID (typicky bez synchronizace z místní AD), jeho zapnutí zastaví synchronizaci OneDrivu na všech počítačích – nabízet jen hybridním tenantům a až po zadání GUID domén, jinak podmíněný přístup s vyhovujícím zařízením.

Symptom

A governance tool (or a well-meant script) flags “sync from unmanaged devices isn't restricted” and offers a one-click fix. The admin applies it on a tenant that was born in the cloud — say, migrated from Google Workspace — with no on-premises AD. Within the next sync cycle, users report that OneDrive on their Windows PCs stopped syncing, although those PCs are company-owned and managed in Intune.

Cause

The setting has two halves that only work together:

Where Name
Microsoft Graph PATCH /admin/sharepoint/settings isUnmanagedSyncAppForTenantRestricted + allowedDomainGuidsForSyncApp
SharePoint Online Management Shell Set-SPOTenantSyncClientRestriction -Enable -DomainGuids "…"
SharePoint admin center Settings → Sync → Allow syncing only on computers joined to specific domains

Microsoft's documentation states it plainly: the setting “is only applicable to Active Directory domains. It doesn't apply to Microsoft Entra domains.” A computer that is only Entra-joined has no AD domain GUID to match, so it is treated as unmanaged and refused. Turning the flag on with an empty GUID list is the same outcome for every computer, hybrid or not.

Writing the flag through Graph is a single boolean — nothing in the API stops you from setting it to true with no domains.

Fix

Before recommending or applying the restriction, check two things:

# 1) Does the tenant sync from on-premises AD at all?
Connect-MgGraph -Scopes Organization.Read.All
(Get-MgOrganization).OnPremisesSyncEnabled     # $true = hybrid; empty/$false = cloud-only

# 2) On a domain controller: the GUID of each domain the company PCs are joined to
Get-ADDomain | Select-Object Name, ObjectGUID

Then, on a hybrid tenant only:

Connect-SPOService -Url https://contoso-admin.sharepoint.com
Set-SPOTenantSyncClientRestriction -Enable -DomainGuids "00000000-0000-0000-0000-000000000000"

For devices joined only to Entra ID, use a Conditional Access policy that targets Office 365 / SharePoint Online and requires a compliant (or hybrid-joined) device. The Microsoft article recommends exactly this for Entra-only devices.

If the restriction was already switched on by mistake, switch it off — Microsoft notes the change can take up to 24 hours to apply:

Remove-SPOTenantSyncClientRestriction

Notes

  • If you build a tool that writes tenant settings, guard this one in code: refuse true while allowedDomainGuidsForSyncApp is empty, and do not raise the finding on a tenant where AD sync is off or unmeasured — “not applicable” is the honest state there.
  • Source: Microsoft Learn, Allow syncing only on computers joined to specific domains (learn.microsoft.com/sharepoint/allow-syncing-only-on-specific-domains).
Was this helpful?ask or add your experience on GitHub →
Saved you an hour? A star on GitHub helps other SharePoint people find the vault.★ Star on GitHub
last reviewed: 2026-11-30last updated: 2026-11-30historyedit on GitHubview source