Configure Files On-Demand for Mac

This article describes the preferences and scriptable commands you can use to set up OneDrive Files On-Demand for Mac. For more info about using Files On-Demand on a Mac, see Try Files On-Demand for Mac.

Note

The following configurations are subject to change.

Preferences

PList Location

  • ~/Library/Preferences/com.microsoft.OneDrive.plist

Domain

  • com.microsoft.OneDrive
Setting Description Parameters Example Plist Entry
FilesOnDemandPolicy
This setting determines whether Files On-Demand should be enabled based on the OneDrive controlled rollout or the FilesOnDemandEnabled setting.
FilesOnDemandPolicy (Bool): When set to true, Files On-Demand will be enabled or disabled based on FilesOnDemandEnabled.
<key>FilesOnDemandPolicy</key>
<(Bool)/>
FilesOnDemandEnabled
This setting determines whether Files On-Demand should be enabled.
FilesOnDemandEnabled (Bool): When set to true, Files On-Demand will be enabled or disabled.
<key>FilesOnDemandEnabled</key>
<(Bool)/>
IsHydrationToastAllowed
This setting determines if a toast should appear when an application causes file contents to be downloaded.
IsHydrationToastAllowed (Bool): When set to false, toasts will not appear when applications trigger the download of file contents.
<key>IsHydrationToastAllowed</key>
<(Bool)/>
HydrationDisallowedApps
Applications will not be allowed to trigger the download of cloud-only files. You can use this setting to lock down applications that don't work correctly with your deployment of Files On-Demand.
HydrationDisallowedApps (String): Json in the following format
'[{"ApplicationId":"appId","MaxBundleVersion":"1.1","MaxBuildVersion":"1.0"}]'
AppID can be either the BSD process name or the bundle display name.
MaxBuildVersion denotes the maximum build version of the application that will be blocked
MaxBundleVersion denotes the maximum bundle version of the application that will be blocked
<key>HydrationDisallowedApps </key>
<string> [{"ApplicationId":"appId","MaxBundleVersion":"1.1","MaxBuildVersion":"1.0"}, {"ApplicationId":"appId2","MaxBundleVersion":"3.2","MaxBuildVersion":"2.0"},]]

Scriptable commands

To query and set the file and folder status, use:

Query file status

/Applications/OneDrive.app/Contents/MacOS/OneDrive /getpin

Set file status

/Applications/OneDrive.app/Contents/MacOS/OneDrive /pin /Applications/OneDrive.app/Contents/MacOS/OneDrive /unpin /Applications/OneDrive.app/Contents/MacOS/OneDrive /clearpin

(where "pin" sets the file to always available on the device, "unpin" to locally available, and "clearpin" to online-only)

For folders, add the /r parameter to set the status for all items within the folder.