Integrating OneDrive with Azure Virtual Desktop's RemoteApp

 1. Prerequisites

1. Make sure the OS to be used for the Session Host is Windows 11, version 23H2

2.  Ensure that the custom image or Marketplace image is updated with the latest updates before creating the session hosts.
    

    

3. Install the latest version of FSLogix on the Image.
    

4. Make sure the end user is having appropriate license to use One Drive. In our scenario, the user is having Microsoft 365 Business Premium.
    

5. In a later section, you will need to use the GPO policy: 'Enable enhanced shell experience for RemoteApp.' For this GPO setting to appear in your Group Policy Management, you must have the updated Administrative templates. You can download these from the Windows 11 23H2 image VM that you created for the session hosts. Copy the Policy Definitions folder from the Windows 11 23H2 image to the central location on the AD Domain Controller, as shown below:



6. You will also need to use OneDrive GPOs. To do this, copy the OneDrive ADMX and ADML files from the Windows 11 23H2 image VM that you created for the session hosts. Place the .ADMX file into the PolicyDefinitions folder and the .ADML file into the en-US folder within the PolicyDefinitions folder.
    

7. Also, ensure that the session hosts being created are Microsoft Entra hybrid joined. I have already discussed this in the SSO configuration blog.

2. Install per-machine One Drive app:

NOTE: On the latest Windows 11 23H2 OS, OneDrive may already be installed in per-machine mode. However, to be certain, I have uninstalled and reinstalled the OneDrive app.

1. Firstly, go to Control Panel from the Start Menu, Under Programs->Uninstall a Program. Select One Drive and click on Uninstall. Once uninstalled, go to https://go.microsoft.com/fwlink/?linkid=844652 to download the latest version of One Drive.
    

2. Go to Command Prompt from the Start Menu, right click and select Run as Administrator.
    
    

3. Go to the folder where the One Drive.exe file is placed. In our case its in the Downloads folder. 
Type cd<space>Downloads
    

4. Then type .\OneDriveSetup.exe /allusers and hit Enter.
    

5. One Drive starts installing.


3. GPO configuration:

1. Enable the GPO setting: "Enable enhanced shell experience for RemoteApp"
Computer Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Remote Session Environment\Enable enhanced shell experience for RemoteApp

2. Enable the Registry setting: 
Key: HKLM\Software\Microsoft\Windows\CurrentVersion\Run
Type: REG_SZ
Name: OneDrive
Data: "C:\Program Files\Microsoft OneDrive\OneDrive.exe" /background

3. Enable 2 policies: "Silently move Windows known folders to One Drive " and "Silently Sign in users to the One Drive sync app with their Windows credentials"
    

4. Testing the One Drive with Remote App:

1.Log in to the Windows app using the end user's credentials. In our scenario, the user is user3@cloudazure.co.in. Two RemoteApps are assigned to user3. The user clicks on Word and enters their credentials.
    

2. As soon as user3 logs in, they are signed into OneDrive silently in the background. The OneDrive icon appears in the taskbar of their local Windows device. The icon for the instance of OneDrive associated with the RemoteApp in the system tray looks the same as if OneDrive were installed on a local device. You can differentiate the OneDrive icon from the remote session by hovering over it; the tooltip will include the word 'Remote.
    


3. Next, he clicks the Auto Save option to turn it ON. He then selects his default directory, and that's it
    


4.  The file is saved to OneDrive simultaneously.
    


5.  We close the Word file and open the Excel sheet. Save it. The same instance of OneDrive is used and another doesn't start.




Comments