Anavem
Languagefr
Customize OneDrive Sync Root Folder Name via Intune

Customize OneDrive Sync Root Folder Name via Intune

Learn how to set a custom name for the local OneDrive sync root folder on Windows devices managed by Microsoft Intune, using imported ADMX templates or a PowerShell script.

Evan MaelEvan Mael
March 22, 2026 10 min
mediumonedrive 7 steps 10 min
By default, the local OneDrive for work or school folder is created as OneDrive {organization name}. In organizations with long tenant or brand names, this default naming convention increases path lengths and can cause sync issues when users work with deeply nested folders and files. Microsoft provides a dedicated policy Set a custom name for the OneDrive folder that lets administrators replace the default name with a shorter, controlled value across all managed Windows devices. Because this policy is not yet available in the Intune Settings Catalog, it must be deployed through Imported Administrative Templates (Preview). This requires importing the Windows ADMX template files first, followed by the OneDrive ADMX files. Once both templates are available in Intune, you create a new profile of type Imported Administrative Templates (Preview), navigate to Computer Configuration > OneDrive, enable the setting, and supply your Tenant ID along with the desired folder name. For users who are already syncing, the new folder name does not apply automatically: they must unlink and relink their OneDrive account before the change takes effect. As an alternative to ADMX templates, you can also deploy a PowerShell script that writes the custom name directly to the registry key HKLM:\SOFTWARE\Policies\Microsoft\OneDrive\CustomSyncRootFolderName. In both cases, keep the custom name as short as possible to preserve available path length and avoid Windows path-length limitations.
Implementation Guide

Full Procedure

01

02

03

04

05

06

07

Frequently Asked Questions

Does the policy rename the existing OneDrive folder for current users?+
No. The policy only applies to new OneDrive setups. Existing synced users must unlink and relink their OneDrive account for the new folder name to take effect.
Can I use the Settings Catalog instead of ADMX templates?+
Not yet. As of this article's publication date, the 'Set a custom name for the OneDrive folder' policy is not available in the Intune Settings Catalog. Use Imported Administrative Templates (Preview) or a PowerShell script instead.
Are there any naming restrictions for the custom folder name?+
Yes. The name must contain at least one character, cannot be 'OneDrive', cannot contain characters invalid for Windows folder names, and the full sync root path cannot exceed 120 characters.
How can I verify the policy was applied on a device?+
Check the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive\CustomSyncRootFolderName. The value should match the custom name you configured in Intune.
Evan Mael
Written by

Evan Mael

Microsoft MCSA-certified Cloud Architect | Fortinet-focused. I modernize cloud, hybrid & on-prem infrastructure for reliability, security, performance and cost control - sharing field-tested ops & troubleshooting.

Discussion

Share your thoughts and insights

Sign in to join the discussion