Skip to content
anavem.com logoanavem.com logo
Intune / OneDriveTutorialsMicrosoft Intune

Customize OneDrive Sync Root Folder Name via Intune

Set a custom name for the local OneDrive sync root folder using Intune imported ADMX templates or PowerShell. Shorten folder paths to avoid Windows path length limits.

Difficulty
Intermediate
Time required
15 minutes
Steps
5
Platform
Intune / OneDrive
A custom OneDrive sync root folder name configured through Microsoft Intune and applied across Windows and mobile devices.
View full image
Table of contents

Quick Answer

Go to the steps

Import windows.admx and OneDrive.admx into Intune. Create an Imported Administrative Templates profile. Enable the custom folder name setting, enter your tenant ID and desired name. Assign to devices.

  1. Copy your tenant ID from Entra ID > Overview > Properties.
  2. Import windows.admx then OneDrive.admx into Intune.
  3. Create an Imported Administrative Templates profile.
  4. Enable Computer Configuration > OneDrive > Set a custom name for the OneDrive folder.
  5. Enter tenant ID and custom name. Assign to devices.
Admin path
Intune admin center > Devices > Configuration > Import ADMX / Create > Imported Administrative Templates

Expected result: New OneDrive setups use the custom folder name. Registry key HKLM\SOFTWARE\Policies\Microsoft\OneDrive\CustomSyncRootFolderName shows the value.

Key takeaways

  • Import OneDrive.admx into Intune and enable CustomSyncRootFolderName to shorten the OneDrive sync folder name, reducing path length issues.

Before you start

Access
Access to the Intune admin center at intune.microsoft.com with Intune Administrator role.
Required roles
  • Intune Administrator
Required licenses
  • Microsoft Intune Plan 1
  • Microsoft 365 Business Basic or higher (for OneDrive)
  • Microsoft 365 Business Basic or higher
Environment
Windows 10 or later enrolled in Intune with OneDrive sync client installed. Your Entra ID tenant ID.
Vendor
Microsoft
Tested environment
Verified against Microsoft Learn OneDrive sync policies and MC1242782, July 2026.
  • Administrator permissions required

Warning: Existing users must unlink and relink

This policy only applies to new OneDrive setups. Users already syncing must unlink their OneDrive account, wait for the policy, then relink. They should stop Folder Backup first and choose Only in OneDrive to avoid data duplication.

Note: SharePoint library folders are not affected

This policy only changes the OneDrive sync root folder name. SharePoint library sync folders still use the organization name. The display name in File Explorer's navigation pane also remains unchanged.

1Copy your Entra ID tenant ID

Get the tenant ID needed by the CustomSyncRootFolderName policy.

Admin path
Entra admin center > Entra ID > Overview > Properties

Sign in to entra.microsoft.com. Go to Entra ID > Overview. Find and copy the Tenant ID value (a GUID like xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). You'll need this when configuring the policy.

Expected result: Tenant ID copied and ready for the policy configuration.

Note

Also available via PowerShell: (Get-MgOrganization).Id or in the Azure portal under Microsoft Entra ID > Properties.

2Import Windows and OneDrive ADMX templates into Intune

Make the OneDrive CustomSyncRootFolderName policy available in Intune.

Admin path
Intune admin center > Devices > Configuration > Import ADMX

Import in order: (1) windows.admx + windows.adml from C:\Windows\PolicyDefinitions. (2) OneDrive.admx + OneDrive.adml from the OneDrive installation folder, typically C:\Program Files\Microsoft OneDrive\{version}\adm\ or C:\Users\{username}\AppData\Local\Microsoft\OneDrive\{version}\adm\.

In the Intune admin center at intune.microsoft.com, go to Devices > Configuration > Import ADMX. Upload windows.admx first, wait for Available, then upload OneDrive.admx. Skip windows.admx if already imported from a previous setup.

Expected result: Both ADMX files show Available status. OneDrive policies accessible in Imported Administrative Templates.

Note

The OneDrive ADMX must be from a 2026 build (26.026+) to include CustomSyncRootFolderName. If the policy doesn't appear, update OneDrive on the source device and get a newer ADMX.

3Create the configuration profile

Configure the custom folder name policy with your tenant ID and desired name.

Admin path
Intune admin center > Devices > Windows > Configuration > Create > Imported Administrative Templates

In Intune, go to Devices > Windows > Configuration > Create > New policy. Platform: Windows 10 and later. Profile type: Templates > Imported Administrative Templates (Preview). Name it and go to Configuration settings.

Navigate to Computer Configuration > OneDrive > Set a custom name for the OneDrive folder. Set to Enabled. Enter your tenant ID in the Name field and the desired short folder name (e.g., Cloud or your company abbreviation) in the Value field. Assign to device groups. The full path cannot exceed 120 characters.

Expected result: Profile created. Registry key HKLM\SOFTWARE\Policies\Microsoft\OneDrive\CustomSyncRootFolderName\{TenantID} shows the custom name.

Note

Naming restrictions: at least one character, cannot be OneDrive, no invalid Windows folder characters. Keep it as short as possible to maximize available path length.

4Alternative: Deploy via PowerShell script

Set the custom folder name via registry as an alternative to ADMX templates.

Admin path
Intune admin center > Devices > Manage devices > Scripts and remediations > Platform scripts

Create a PowerShell script that creates HKLM:\SOFTWARE\Policies\Microsoft\OneDrive\CustomSyncRootFolderName and sets a string value with the tenant ID as name and the custom folder name as value. Upload via Platform Scripts with SYSTEM context. Don't use both ADMX and PowerShell methods simultaneously.

Expected result: Registry key HKLM\SOFTWARE\Policies\Microsoft\OneDrive\CustomSyncRootFolderName\{TenantID} contains the custom name.

Note

The ADMX method is Microsoft's recommended approach with better Intune reporting. Use PowerShell only if you prefer not to manage OneDrive ADMX imports.

5Handle existing users who are already syncing

Guide existing users through the unlink/relink process for the new name to take effect.

Existing syncing users must: (1) Go to OneDrive settings > Manage backup > Stop backup, choose Only in OneDrive. (2) Unlink the OneDrive account. (3) Wait for the policy to apply (verify via registry). (4) Relink the account and optionally restart Folder Backup.

After relinking, delete the original OneDrive folder to avoid confusion. The File Explorer sidebar name remains OneDrive - {org name}; only the on-disk folder name changes.

Expected result: After relinking, OneDrive syncs to the new custom-named folder.

Note

For a clean rollout, deploy the policy before users set up OneDrive on new devices. Time the unlink/relink process with device refreshes or OS upgrades when possible.

How to Confirm the Custom Folder Name

Confirm configuration

Check the registry at HKLM\SOFTWARE\Policies\Microsoft\OneDrive\CustomSyncRootFolderName. Your tenant ID should appear as a string value with the custom name as its data.

New OneDrive setups create the folder with the custom name. In Intune, the profile shows Succeeded in Device status.

Normal result: Registry shows custom name. New OneDrive setups use the shortened folder name.

Abnormal result: Registry key missing or OneDrive still uses default name. Check ADMX import, profile assignment, device sync. Existing users need unlink/relink.

Default

OneDrive - Contoso International Holdings LLC

Default long path consuming 60+ characters.

Custom

Cloud

Custom short name saving 40+ characters.

Abbreviation

CTH

Company abbreviation for maximum savings.

Troubleshooting

ADMX import fails with NamespaceMissing

Warning

Cause: OneDrive.admx depends on the Windows ADMX namespace.

Import windows.admx first from C:\Windows\PolicyDefinitions. Wait for Available status, then import OneDrive.admx.

Related step 2: Import Windows and OneDrive ADMX templates into Intune

CustomSyncRootFolderName not visible in the template

Warning

Cause: The OneDrive.admx version doesn't include CustomSyncRootFolderName (pre-2026 builds).

Get a newer OneDrive.admx from a device with OneDrive version 26.026 or later. Update OneDrive on the source device first if needed.

Related step 2: Import Windows and OneDrive ADMX templates into Intune

Existing OneDrive folder still uses the old name

Note

Cause: The policy only applies to new setups. Existing sync configurations keep the original name.

Users must unlink, verify the policy via registry, then relink. Stop Folder Backup first and choose Only in OneDrive to prevent duplication.

Related step 5: Handle existing users who are already syncing

OneDrive sync fails after relinking

Warning

Cause: Invalid characters in the name or full path exceeds 120 characters.

Remove any invalid characters (\/:*?"<>|). Check full path length: C:\Users\{username}\{name} must be under 120 characters. Use the shortest name possible.

Related step 3: Create the configuration profile

SharePoint library folders still use organization name

Note

Cause: CustomSyncRootFolderName only affects the OneDrive sync root, not SharePoint libraries.

This is a known limitation. The policy doesn't affect SharePoint library sync folders. No workaround exists as of July 2026.

Related step 3: Create the configuration profile

Frequently asked questions

Does the policy rename the existing OneDrive folder?

No. The policy only applies to new OneDrive setups. Existing users must unlink and relink their account. Stop Folder Backup first and choose Only in OneDrive before unlinking.

Can I use the Settings Catalog instead of ADMX?

As of July 2026, CustomSyncRootFolderName is not in the Settings Catalog. Use Imported Administrative Templates or a PowerShell registry script. Microsoft indicated Settings Catalog support would follow.

Does this change the display name in File Explorer's sidebar?

No. The display name in File Explorer's sidebar and OneDrive Activity Center remains OneDrive - {organization name}. Only the on-disk folder name changes, which is what affects path length.

Does this affect SharePoint library sync folders?

No. Per Microsoft Tech Community feedback, the policy only affects the OneDrive sync root folder. SharePoint library sync folders continue using the organization name. No workaround exists.

What naming restrictions apply?

At least one character, cannot be OneDrive, no invalid Windows folder characters. The full path (e.g., C:\Users\username\CustomName) cannot exceed 120 characters. Use as few characters as possible.

Conclusion

The CustomSyncRootFolderName policy replaces the default OneDrive folder name with a shorter custom name. Deploy it via Intune ADMX templates or a PowerShell registry script.

For a clean rollout, deploy before users set up OneDrive on new devices. Existing users need to unlink and relink.

Import OneDrive.admx into Intune and enable CustomSyncRootFolderName to shorten the OneDrive sync folder name, reducing path length issues.

Main path
Intune > Devices > Configuration > Imported Administrative Templates > OneDrive > Set a custom name for the OneDrive folder
Reader actions
Was this helpful?
Rate this articleRate
10 readers viewed this article

Reader reviews

Rate this articleBe the first to rate
No written reviews yetRate the article above, or be the first to share your experience.