|
| 1 | +--- |
| 2 | +title: Use Microsoft OneDrive with a RemoteApp - Azure Virtual Desktop |
| 3 | +description: Learn how to use Microsoft OneDrive with a RemoteApp in Azure Virtual Desktop. |
| 4 | +ms.topic: how-to |
| 5 | +author: dknappettmsft |
| 6 | +ms.author: daknappe |
| 7 | +ms.date: 09/27/2023 |
| 8 | +--- |
| 9 | + |
| 10 | +# Use Microsoft OneDrive with a RemoteApp in Azure Virtual Desktop |
| 11 | + |
| 12 | +You can use Microsoft OneDrive alongside a RemoteApp in Azure Virtual Desktop, allowing users to access and synchronize their files while using a RemoteApp. When a user connects to a RemoteApp, OneDrive can automatically launch as a companion to the RemoteApp. This article describes how to configure OneDrive to automatically launch alongside a RemoteApp in Azure Virtual Desktop. |
| 13 | + |
| 14 | +> [!IMPORTANT] |
| 15 | +> - You should only use OneDrive with a RemoteApp for testing purposes as it requires an Insider Preview build of Windows 11 for your session hosts. |
| 16 | +> |
| 17 | +> - You can't use the OneDrive setting **Start OneDrive automatically when I sign in to Windows**. |
| 18 | +
|
| 19 | +## User experience |
| 20 | + |
| 21 | +Once configured, when a user launches a RemoteApp, the OneDrive icon is integrated in the taskbar of their local Windows device. If a user launches another RemoteApp from the same host pool on the same session host, the same instance of OneDrive is used and another doesn't start. |
| 22 | + |
| 23 | +If your session hosts are joined to Microsoft Entra ID, you can [silently configure user accounts](/sharepoint/use-silent-account-configuration) so users are automatically signed in to OneDrive and start synchronizing straight away. Otherwise, users need to sign in to OneDrive on first use. |
| 24 | + |
| 25 | +The icon for the instance of OneDrive accompanying the RemoteApp in the system tray looks the same as if OneDrive is installed on a local device. You can differentiate the OneDrive icon from the remote session by hovering over the icon where the tooltip includes the word **Remote**. |
| 26 | + |
| 27 | +When a user closes or disconnects from the last RemoteApp they're using on the session host, OneDrive exits within a few minutes, unless the user has the OneDrive Action Center window open. |
| 28 | + |
| 29 | +## Prerequisites |
| 30 | + |
| 31 | +Before you can use OneDrive with a RemoteApp in Azure Virtual Desktop, you need: |
| 32 | + |
| 33 | +- A pooled host pool that is configured as a [validation environment](configure-validation-environment.md). |
| 34 | + |
| 35 | +- Session hosts in the host pool that: |
| 36 | + |
| 37 | + - Are running Windows 11 Insider Preview Enterprise multi-session, version 22H2, build 25905 or later. To get Insider Preview builds for multi-session, you need to start with a non-Insider build, join session hosts to the Windows Insider Program, then install the preview build. For more information on the Windows Insider Program, see [Getting started with the Windows Insider Program](https://www.microsoft.com/windowsinsider/getting-started). |
| 38 | + |
| 39 | + - Have the latest version of FSLogix installed. For more information, see [Install FSLogix applications](/fslogix/how-to-install-fslogix). |
| 40 | + |
| 41 | +## Configure OneDrive to launch with a RemoteApp |
| 42 | + |
| 43 | +To configure OneDrive to launch with a RemoteApp in Azure Virtual Desktop, follow these steps: |
| 44 | + |
| 45 | +1. Download and install the latest version of the [OneDrive sync app](https://www.microsoft.com/microsoft-365/onedrive/download) per-machine on your session hosts. For more information, see [Install the sync app per-machine](/sharepoint/per-machine-installation). |
| 46 | + |
| 47 | +1. If your session hosts are joined to Microsoft Entra ID, [silently configure user accounts](/sharepoint/use-silent-account-configuration) for OneDrive on your session hosts, so users are automatically signed in to OneDrive. |
| 48 | + |
| 49 | +1. On your session hosts, set the following registry value: |
| 50 | + |
| 51 | + - **Key**: `HKLM\Software\Microsoft\Windows\CurrentVersion\Run` |
| 52 | + - **Type**: `REG_SZ` |
| 53 | + - **Name**: `OneDrive` |
| 54 | + - **Data**: `"C:\Program Files\Microsoft OneDrive\OneDrive.exe" /background` |
| 55 | + |
| 56 | + You can configure the registry using an enterprise deployment tool such as Intune, Configuration Manager, or Group Policy. Alternatively, to set this registry value using PowerShell, open PowerShell as an administrator and run the following command: |
| 57 | + |
| 58 | + ```powershell |
| 59 | + New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name OneDrive -PropertyType String -Value '"C:\Program Files\Microsoft OneDrive\OneDrive.exe\" /background' -Force |
| 60 | + ``` |
| 61 | + |
| 62 | +## Test OneDrive with a RemoteApp |
| 63 | + |
| 64 | +To test OneDrive with a RemoteApp, follow these steps: |
| 65 | + |
| 66 | +1. Connect to a RemoteApp from the host pool and check that the OneDrive icon can be seen on the task bar of your local Windows device. |
| 67 | + |
| 68 | +1. Check that OneDrive is synchronizing files by opening the OneDrive Action Center. Sign in to OneDrive if you weren't automatically signed in. |
| 69 | + |
| 70 | +1. From the RemoteApp, check that you can access your files from OneDrive. |
| 71 | + |
| 72 | +1. Finally, close the RemoteApp and any others from the same session host, and within a few minutes OneDrive should exit. |
| 73 | + |
| 74 | +## OneDrive recommendations |
| 75 | + |
| 76 | +When using OneDrive with a RemoteApp in Azure Virtual Desktop, we recommend that you configure the following settings using the OneDrive administrative template. For more information, see [Manage OneDrive using Group Policy](/sharepoint/use-group-policy#manage-onedrive-using-group-policy) and [Use administrative templates in Intune](/sharepoint/configure-sync-intune). |
| 77 | + |
| 78 | +- [Allow syncing OneDrive accounts for only specific organizations](/sharepoint/use-group-policy#allow-syncing-onedrive-accounts-for-only-specific-organizations). |
| 79 | +- [Use OneDrive files On-Demand](/sharepoint/use-group-policy#use-onedrive-files-on-demand). |
| 80 | +- [Silently move Windows known folders to OneDrive](/sharepoint/use-group-policy#silently-move-windows-known-folders-to-onedrive). |
| 81 | +- [Silently sign-in users to the OneDrive sync app with their Windows credentials](/sharepoint/use-group-policy#silently-sign-in-users-to-the-onedrive-sync-app-with-their-windows-credentials). |
0 commit comments