OneDrive sync settings
You can use these settings to control syncing files in OneDrive and SharePoint Online
Log into your M365 tenant
Go to OneDrive admin portal
All admin centers
https://admin.microsoft.com/Adminportal/Home?source=applauncher#/alladmincenters
click on OneDrive
click on Sync (on the left tab menu) or go from here https://admin.onedrive.com/?v=SyncSettings

By default any computer from any AD domain can sync OneDrive files
Select āallow syncing only on PCs joined to specific domainsā

To get your AD obejctGUID go to your Domain Controller
Run powershell as administrator
Run get-addomain <enter>
Copy the ObjectGUID value

Or you can only run the following
(get-addomain).objectguid

Now proceed with your setup
Before
After
Error when you try from a non-domain joined workstation
EN (English)
FR (French)
What if you had synced OneDrive before IT department made changes on sync settings?
After the settings are saved and replicated on M365 tenant youāll get the following warning


Files previously synced will continue on usersā profile if you block sync settings after users had already set this up.
After settings are replicated at M365/O365 you should see the following screen popping up

Additional settings (Next Article)
- Show the sync button on the OneDrive website
- Block sync on Mac OS
- Block syncing of specific file types (you have to specify them)
References
https://docs.microsoft.com/en-us/onedrive/allow-syncing-only-on-specific-domains
manage sharepoint online
Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version Install-Module -Name Microsoft.Online.SharePoint.PowerShell Ā Answer Y (yes) or A (yes to all) Ā $sposite = “https://yourtenantname-admin.sharepoint.com/” Connect-SPOService -Url $sposite -Credential admin@yourtenantname.onmicrosoft.com get-SPOTenantSyncClientRestriction Ā Ā |

Check my Github repositoryf
Thanks,
Thiago Beier



