Forum Discussion

WeberA's avatar
WeberA
Copper Contributor
Mar 21, 2025

Sharepoint - OneDrive Sync

Hi all,

(posted here but was asked to move to here: https://answers.microsoft.com/en-us/msoffice/forum/all/sharepoint-onedrive-sync/c0be1c73-ab62-4f25-aa8c-51c90a3dadce 


in my company we use a sharepoint: https://xxx.sharepoint.com/Name%20Public/i

 

i can open the site in edge, i can interact with the files and folders and i can push on the "sync" method and onedrive will start syncing manually.

 

Now to my problem: In intunes Admincenter I have a configuration policy with: "Configure team site libraries to sync automatically (user)" as follows:

Value: https://xxx.sharepoint.com/Name%20Public | 1c27e911-bb36-4ae7-8fd8-d3b68c4d6e8c

Name: xxx Public

 

The policy is successfully applied to the users.

However, one drive does not start synchronisation.

 

$OneDriveCmd = "C:\Program Files\Microsoft OneDrive\OneDrive.exe" Start-Process -FilePath $OneDriveCmd -ArgumentList "/url:$SiteURL /id:$LibraryID /automount"

 

Results in an error, something like "cannot open program, url not readable"

Path and library are given in variables to the script

 

 

Does anyone have an idea for me

 

2 Replies

  • GriJ's avatar
    GriJ
    Brass Contributor

    Hi,
    those steps solved my similar problem:

     

    1. Delay of up to 8 hours
    Microsoft states that it can take up to 8 hours after a user signs in for the automatic sync to begin.
    Fix: Be patient, or trigger the sync manually using a PowerShell script or registry tweak.

    2. Unsupported Operating System
    Fix: Use Windows 10 version 1709 or later, ideally Windows 11.

    3. OneDrive Files On-Demand Not Enabled
    The Files On-Demand feature must be enabled for automatic sync to work.

    Fix: Enable it via Group Policy or Intune:
    GPO path: Computer Configuration > Administrative Templates > OneDrive > Files On-Demand
    Intune OMA-URI: ./Device/Vendor/MSFT/OneDrive/FilesOnDemandEnabled

    4. Missing or Incorrect Library ID
    The policy requires a correctly formatted Library ID string. If it's missing or malformed, the sync won’t work.
    Fix: Use the correct format

  • GriJ's avatar
    GriJ
    Brass Contributor

    Hi,

    i had similar problems. Please check the following to solve those problems:

    • OneDrive File On-Demand activated? Is needed for this policy
    • 8 hours delay - can be changed via registry.
    • Check Registry-Key "TimerAutoMount"
    • Check Library ID String: 

    tenantId=<Tenant-ID>&siteId=<Site-ID>&webId=<Web-ID>&listId=<List-ID>&webUrl=https://<your-tenant>.sharepoint.com/sites/<sitename>

     

    BR

     

    PS: Sometimes you only have to wait a looong time ;-)

Resources