Integrate with Microsoft OneDrive

Integrate with OneDrive

The official Microsoft OneDrive storage solution allows users to quickly access all of their files from their OneDrive account. Integrating Frame accounts with OneDrive is simple and can be done in a matter of minutes. This guide provides detailed instructions for installing, configuring, and using OneDrive with your Frame account.

Requirements

  • A Frame Account

  • The built-in OneDrive storage connector in Frame must be disabled in order for this integration to function properly.

    Warning

    OneDrive and all other storage connectors are approaching their EOL date on the Frame platform. Frame strongly recommends setting up the official OneDrive integration as described in this guide. Once the built-in storage connector has been disabled, it cannot be re-enabled.

  • Enterprise Profiles, Persistent Desktops, or another 3rd party method for user profile persistence must be utilized in order for the end user’s OneDrive credentials to persist between sessions.

Persisting OneDrive Authentication

By default, this configuration will require users to log on to OneDrive each time they start a Frame session. Enterprise Profiles can be configured to avoid this issue. Once Enterprise Profiles has been enabled for the account, the end user needs only to log in to OneDrive once within the session. From that point forward, OneDrive will automatically stay logged in using the credentials stored on the user’s profile disk.

Frame integrates with multiple cloud storage providers, including Microsoft OneDrive. OneDrive is an online storage space service in the cloud that is provided to individual licensed users in a Microsoft organization. It is typically used to access files across multiple devices, share files, and collaborate on documents.

Setup

In general, you would install OneDrive in your Frame account Sandbox and then publish your changes once configured.

For Windows 10, OneDrive installer is bundled with Windows 10 and is located at %WINDIR%\syswow64\onedrivesetup.exe. By default, upon each Windows user’s first login, the installer for OneDrive will execute for that user, installing OneDrive in a per-user context. Therefore, identify which type of OneDrive is currently installed on your system. If OneDrive was installed as a per-user application, then uninstall OneDrive and re-install OneDrive as a per-machine application.

For Windows Server 2016/2019, you may need to download OneDrive installer from Microsoft and install OneDrive as a per-machine application.

Identifying the OneDrive Install Type

The list of applications installed in an OS can be viewed through the Programs and Features applet (appwiz.cpl), but this doesn’t always tell you whether or not an application is installed per-user or per-machine. Luckily there are registry locations that help you to determine more information about the application installs. There are multiple locations in the registry that help you identify not only ALL the installed applications (even those not shown in Programs and Features), but also help you identify machine vs. user installations as well as 32-bit vs 64-bit installations. These registry locations are:

HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

64-bit per-machine installation

HKLM:\SOFTWARE\WOW6432Node\Windows\CurrentVersion\Uninstall

32-bit per-machine installation

HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

64-bit & 32-bit per-user installation

Using the above information, if you look at HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and see a subkey called OneDriveSetup.exe, then your OneDrive installation is per-user.

../../_images/onedrive_reg1.png

If you look at HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall and see a subkey called OneDriveSetup.exe, then your OneDrive installation is per-machine.

../../_images/onedrive_reg2.png

If you have to uninstall the per-user installation of OneDrive:

  1. Open an elevated PowerShell.

  2. Go to C:\Windows\SysWOW64 (cd $env:windir\syswow64).

  3. Run .\onedrivesetup.exe /uninstall.

This command will have no output. Verify uninstallation is complete via the Programs and Features applet (appwiz.cpl).

Then, reinstall OneDrive for the machine:

  1. Open an elevated PowerShell.

  2. Go to C:\Windows\SysWOW64 (cd $env:windir\syswow64).

../../_images/onedrive_ps0.png
  1. Run .\onedrivesetup.exe /allusers.

../../_images/onedrive_ps1.png

Note

This command will have no output in PowerShell, but the OneDrive installer window will be visible during the installation.

../../_images/onedrive_install.png
  1. Open the registry.

  2. Browse to HKLM:\Software\Microsoft\OneDrive. If the OneDrive key doesn’t exist, you will need to create it.

  3. Create a DWORD registry value called AllUsersInstall with a value of 1.

Customizing OneDrive

Microsoft OneDrive can be customized for a specific end user experience. In scenarios where group policies aren’t available, the customizations described below can be implemented in the Sandbox.

  1. If you want the OneDrive application to start for all users, after the user has logged in, execute in the Sandbox (or via GPO for domain-joined Frame accounts):

Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "OneDrive" -Value '"C:\Program Files (x86)\Microsoft OneDrive\OneDrive.exe /background"'
  1. For non-persistent Frame accounts, best practice is to configure OneDrive for Files On-Demand:

Set-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\OneDrive" -Name "FilesOnDemandEnabled" -Type DWord -Value 1
  1. To redirect “Windows Known Folders” to OneDrive using the Known Folders Move capability:

Set-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\OneDrive" -Name "KFMSilentOptIn" -Type String -Value "<your-AzureAdTenantID>"

For non-persistent Frame accounts with Enterprise Profiles enabled, this OneDrive feature can help keep the profile disk to a smaller size. The below screenshot shows which folders are allowed, but not enabled by default, by KFM.

../../_images/onedrive_customize3.png
  1. If you want to redirect the Desktop folder to OneDrive:

Set-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\OneDrive" -Name "KFMSilentOptInDesktop" -Type DWord -Value 1
  1. If you want to redirect the Documents folder to OneDrive:

Set-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\OneDrive" -Name "KFMSilentOptInDocuments" -Type DWord -Value 1
  1. If you want to redirect the Pictures folder to OneDrive:

Set-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\OneDrive" -Name "KFMSilentOptInPictures" -Type DWord -Value 1

Reference

For further information regarding Microsoft OneDrive in a VDI context, refer to Install Office on a master VHD image.