“Your OneDrive folder can’t be created in the location you selected” with VMware App Volumes Writable Volume

By 3 min read

In non-persistent environment with VMware App Volumes Writable Volume (or similar product), OneDrive fails to get configure Sync folder and through an error says “Your OneDrive folder can't be created in the location you selected”.

Microsoft OneDrive setup error: Your OneDrive folder can't be created in the location you selected

There are few ways to fix the issue.
The first one is to assign a drive letter to the Writable Volume to fix it. But this is not the solution that everybody prefers due to security reasons. The end user can explore the drive, even though it made hidden for them.

The second option is creating a Sync Folder in the Master image and provide sufficient permission on it. Also, enforce OneDrive client to use that folder as a default location. This OneDrive setting can be achieved by Group Policy.

This article will show how-to for the second option.

To start with, create a Folder on the C: drive or any other preferred location. I am biased with C: drive location as this is for the non-persistent environment and it will be easy to demonstrate. The folder I created in the lab is called OneDriveSync.

A new folder named OneDriveSync created in the root of the C: drive

Now it’s time to set the permission to the folder. We need to provide sufficient permission to the Users (Local Computer\Users) account. By default, Computer\Users will not get the Modify Permission.

Security tab of the OneDriveSync folder properties with the Users group selected and the Edit button highlighted

To make my life much easier, I grant Full Control to the Computer\Users (It's for non-persistent). If your security policy requires tightening on it, you can explore the right permission require to complete the task.

Permissions for OneDriveSync dialog with the Allow checkboxes ticked for the Users group OneDriveSync folder properties showing the Users group with Modify and Write permissions allowed

Now it is time to fix the OneDriveSync folder as the default folder for OneDrive client wizard. This requires downloading OneDrive admx files. Place the OneDrive.admx and OneDrive.adml to group policy central store. Please do not use the files from the %localappdata%\Microsoft\OneDrive\BuildNumber\adm\ location mentioned in the number of Microsoft Article ( i failed with this one on my lab). Rather download it from Microsoft download site.

Windows PolicyDefinitions folder with the OneDrive.admx administrative template highlighted

Time to manually Edit the OneDrive.admx file. Please look for the policy named "DefaultRootDir". You will require adding newly created folder path on string variable and the Tenant ID on key (both are highlighted in the screenshot below). If you have multiple Tenant ID, please use the OneDrive_MultiTenant.admx.

OneDrive policy XML for DefaultRootDir with the OneDriveSync folder path and the registry key highlighted Policy XML line showing the OneDrive Tenants registry key and the valueName DefaultRootDir

It's time to set the policies for users. Open the Group Policy Management Console / Editor. Go to User Configuration > Policies > Administrative Templates > OneDrive. Enable the "Set the default location of the OneDrive Folder". This setting will set the default folder set on the admx file. If prefers, Enable "Prevent users from changing the location of their OneDrive". This will prevent users to select their desire folder for sync, which will through the error mentioned early.

Group Policy Management Editor with Set the default location of the OneDrive folder and Prevent users from changing the location enabled

Related guides

App Volumes

VMware App Volumes - Redirect HTTP to HTTPS

Redirect HTTP requests to HTTPS on the VMware App Volumes Manager by editing nginx.conf, so users never see a 403 or 404 error after port 80 is disabled.

App Volumes

App Volumes 2.11 Known Issues

Known issues in VMware App Volumes 2.11, from AppStack attach failures on instant clones to Windows 10 search problems, with workarounds where available.