Specify the OneDrive location in a hybrid environment
Explanation
This setting defines whether the OneDrive sync app (OneDrive.exe) should authenticate against SharePoint Online or SharePoint Server 2019 if the identity exists in both identity providers. To use this setting, you must also enable "Specify SharePoint Server URL and organization name". This setting affects only OneDrive for Business sync functionality. It does not impact syncing team sites in SharePoint Online or SharePoint Server 2019.
If you enable this setting, you can select one of two options:
SharePoint Online: The sync app will look first in SharePoint Online for a user's OneDrive. If the sync app is already configured with SharePoint Online for the user, it will attempt to configure a OneDrive for Business instance in SharePoint Server 2019 for that user.
SharePoint Server 2019: The sync app will look first in SharePoint Server 2019 for a user's OneDrive for Business. If the sync app is already configured with SharePoint Server 2019 for the user, it will attempt to configure a OneDrive instance in SharePoint Online for that user.
If you disable or do not configure this setting, the sync app will look first in SharePoint Online for the user's OneDrive.
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive- Value name
- not defined in the ADMX
Enable / disable values: not defined in the ADMX (see the options below).
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: OneDrive/SharePointOnPremPrioritization
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\OneDrive'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Authenticate first against
# Possible options:
# SharePoint Online = 0
# SharePoint Server 2019 = 1
Set-ItemProperty -Path $k -Name 'SharePointOnPremPrioritization' -Value 0 -Type DWordDisable
# Disable: OneDrive/SharePointOnPremPrioritization
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": OneDrive/SharePointOnPremPrioritization
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\OneDrive'
Remove-ItemProperty -Path $k -Name 'SharePointOnPremPrioritization' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Authenticate first against:SharePointOnPremPrioritization_Dropdown | Drop-down listenum | SharePointOnPremPrioritization | REG_DWORD | Default choice (UI): #0
|
Application
Microsoft OneDrive (Microsoft) — October 2026 templates
October 2026 templates from pl4nty/web-admx-tool.