en-US onedrive computer

Specify the OneDrive location in a hybrid environment

Verified with Microsoft OneDrive 26.153.0809.0004 — updated on July 10, 2026

Microsoft OneDrive 26.153.0809.0004

Supported on: At least Windows Server 2008 R2 or Windows 7

Path in the GPO console

Computer Configuration\Administrative Templates\OneDrive

Description

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

HKLM SOFTWARE\Policies\Microsoft\OneDrive

More options available

Options

Authenticate first against:
SharePointOnPremPrioritization enum
  • SharePoint Online -> 0 (default)
  • SharePoint Server 2019 -> 1

Export Builder

BETA

Configure the state, scope and options, then generate .reg, PowerShell, Intune and SCCM outputs — or add the setting to a multi-setting collection.

These exports write the registry — this is not a managed GPO.

.reg file

Windows Registry Editor Version 5.00

; Exported from gporais.com
; Policy: Specify the OneDrive location in a hybrid environment
; State: Enabled
; Supported on: At least Windows Server 2008 R2 or Windows 7

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive]
"SharePointOnPremPrioritization"=dword:00000000
More formats (PowerShell, Intune, SCCM)

PowerShell

# Exported from gporais.com
# Policy: Specify the OneDrive location in a hybrid environment
# State: Enabled
# Supported on: At least Windows Server 2008 R2 or Windows 7

$path = 'HKLM:\SOFTWARE\Policies\Microsoft\OneDrive'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'SharePointOnPremPrioritization' -Value 0 -Type DWord

Building a multi-setting collection? Add this setting and generate combined .reg / PowerShell / GPO scripts.

Open the Builder

Embed this policy on your site

What to embed
Theme

Adds one script line: the theme follows your site’s appearance and the height fits the content. If your site blocks scripts, the embed follows the visitor’s system theme.

Preview