Before getting started, it is suggested to collect the Tenant ID. In case you do not know the process to find, you can visit the Azure Active Directory admin center to find it. Click on this link and sign in with your account to see the Tenant ID. You can enable this feature from the Local Group Policy Editor and Registry Editor. However, if you use the first method, it is mandatory to add OneDrive sync settings to the Local Group Policy Editor.

Prevent users from changing the location of their OneDrive folder

To prevent users from changing the OneDrive folder location using Group Policy Editor, follow these steps- Let’s check out these steps in detail. You will have to open the Local Group Policy Editor. For that, press Win+R, type gpedit.msc, and hit the Enter button. After that, navigate to this path- Double-click on the Prevent users from changing the location of their OneDrive folder and select the Enabled option. After that, click on the Show button.

You will have to select the Value name field and enter the Tenant ID that you copied earlier. Then, select the Value field, and enter 1.

Following that, click on the OK button to go back to the previous window. Here, click the Apply and OK buttons, respectively. The next method is all about Registry changes. Therefore, it is recommended to create a System Restore point and backup all Registry files.

Block users from changing the default OneDrive folder location using Registry

To block users from changing the default OneDrive folder location using Registry, follow these steps- Let’s check out the detailed version of these steps. At first, you will have to open the Registry Editor. Press Win+R, type regedit and hit the Enter button. If the UAC prompt appears, click the Yes button. Then, navigate to the following path- If you cannot find the OneDrive folder, right-click on Microsoft > New > Key, and name it as OneDrive. After that, right-click on OneDrive > New > DWORD (32-bit) Value and name it as DisableCustomRoot.

Double-click on DisableCustomRoot, and set the Value data as 1. Then, right-click on OneDrive > New > Key, and name it as DisableCustomRoot.

Now, right-click on DisableCustomRoot > New > String Value, and name it as your Tenant ID. Double-click on this String Value and set the Value data as 1.

Click the OK button to save changes. That’s all! Hope this tutorial helps.