OneDrive on AVD Desktops - Help!

We are deploying Onedrive for users on an account with AVD Desktops.  Several issues are happening that I could use some suggestions if anyone has run into these problems.

1.  Users are able to log in to Office/Outlook/Teams, but OneDrive won't let anyone log in. 
We enabled the insider preview and this allowed users to log in.

2. After setting up users to log in to Onedrive, after signing out of the desktop and back in, opnedrive prompts to log in again -- it doesn't auto log in with the user's credentials.

3. And today, one of the hosts doesn't even show onedrive installed, and it wasn't reimaged because its stil on the desktop image.

Anyone have issues like this?

Thanks,

Michael

1

Comments (8 comments)

Avatar
DStephenson
(Edited )

We found similar issues like this where it was taking too long for Intune or GPO to apply policies.

To work around it, we have the scripted action (see below) to uninstall the personal OneDrive, install Machine-Wide OneDrive, and then configure it with our preferred settings.

NOTE: Our configuration requires a TenantID SecureVariable (a.k.a. the Azure Tenant ID for the client.).
There may be a way to pull this direct from Nerdio, but when we made the script, it wasn't an option.

It may or not work for your issue/use case, but it's worth a shot. 🙂



Disclaimer:
I'm in no way a scripting expert.
This script was made from multiple different resources I found on the internet.

ScriptedAction: Install & Configure OneDrive (Per Machine)

#Requires the following Secure Variables to be configured at the account level: TenantID

<#
Remove Auto-Load User OneDrive
#>

#Create PSDrive for HKU
New-PSDrive -PSProvider Registry -Name HKUDefaultHive -Root HKEY_USERS

#Load Default User Hive
Reg Load "HKU\DefaultHive" "C:\Users\Default\NTUser.dat"

#Set OneDriveSetup Variable
$OneDriveSetup = Get-ItemProperty "HKUDefaultHive:\DefaultHive\Software\Microsoft\Windows\CurrentVersion\Run" | Select -ExpandProperty "OneDriveSetup"

#If Variable returns True, remove the OneDriveSetup Value
If ($OneDriveSetup) { Remove-ItemProperty -Path "HKUDefaultHive:\DefaultHive\Software\Microsoft\Windows\CurrentVersion\Run" -Name "OneDriveSetup" }

#Unload Hive
Reg Unload "HKU\DefaultHive\"

#Remove PSDrive HKUDefaultHive
Remove-PSDrive "HKUDefaultHive"







<#
Remove/Reinstall OneDrive
#>




$Processes = Get-Process
If ($Processes.ProcessName -Like "OneDrive") {

    Write-Host OneDrive is Running and will be shutdown

    taskkill /f /im OneDrive.exe

    If (Test-Path C:\Windows\SysWOW64\OneDriveSetup.exe){
        
        Write-Host "OneDrive installation found, OneDrive Personal will be removed"

        C:\Windows\SysWOW64\OneDriveSetup.exe /uninstall

            If (Test-Path C:\Windows\SysWOW64\OneDriveSetup.exe){
        
            Write-Host "OneDrive Machine installation found, OneDrive Machine Install will be installed"

            C:\Windows\SysWOW64\OneDriveSetup.exe /allusers

            }
            Else{
            Write-Host "OneDrive Machine Installation not found"
    }  
    }
    Else{
        Write-Host "OneDrive Personal Installation not found"
    }

}
Else{
    Write-Host OneDrive is not running
           
            If (Test-Path C:\Windows\SysWOW64\OneDriveSetup.exe){
        
            Write-Host "OneDrive Machine installation found, OneDrive Machine Install will be installed"

            C:\Windows\SysWOW64\OneDriveSetup.exe /allusers

            }
            Else{
            Write-Host "OneDrive Machine Installation not found"
            }
}

<# OneDrive configuration
#>
##Path to HKLM keys
$HKLMregistryPath = 'HKLM:\SOFTWARE\Policies\Microsoft\OneDrive'

##Path to max disk size key
$DiskSizeregistryPath = 'HKLM:\SOFTWARE\Policies\Microsoft\OneDrive\DiskSpaceCheckThresholdMB'




if(!(Test-Path $HKLMregistryPath)){New-Item -Path $HKLMregistryPath -Force}
if(!(Test-Path $DiskSizeregistryPath)){New-Item -Path $DiskSizeregistryPath -Force}

##Enable silent account configuration
New-ItemProperty -Path $HKLMregistryPath -Name 'SilentAccountConfig' -Value '1' -PropertyType DWORD -Force | Out-Null 

##Enable silent known folder redirect
New-ItemProperty -Path $HKLMregistryPath -Name 'KFMSilentOptIn' -Value $SecureVars.TenantID -PropertyType STRING -Force | Out-Null 

##Enable silent known folder redirect notification
New-ItemProperty -Path $HKLMregistryPath -Name 'KFMSilentOptInWithNotification' -Value '1' -PropertyType DWORD -Force | Out-Null 

##Set max OneDrive threshold before prompting
New-ItemProperty -Path $DiskSizeregistryPath -Name $SecureVars.TenantID -Value '102400' -PropertyType DWORD -Force | Out-Null
0
Avatar
Tony Cai

Also is it just OneDrive or all Microsoft Office apps?

0
Avatar
Michael O'Neill

It was onedrive only.  I had to install the Per Machine version on my image, and then re-image the hosts.  It appears the default Azure marketplace image may have the per-user onedrive set up.  Once we did that, everything seems to be working fine.

1
Avatar
Chris Morozin

We had the same problem and arrived at the same solution. 

1
Avatar
Christian Nancy
(Edited )

FYI for others who end-up here in the future. The fix above did not solve it for us, new user profiles (or existing users after their profile had been wiped from Azure Files FSLogix profile) could not sign-in to OneDrive. There was only one icon in the System Tray for OneDrive Personal because the OneDrive For Business process would crash on startup.

Manually starting OneDrive again would allow the user to get to the Sign-in screen but once they entered their email address and clicked Sign-in, the OD4B app would crash again.

I tried the suggestion in this post and confirmed that the issue happened whether OneDrive is installed per-user or per-machine.

I tried the registry trick from https://community.spiceworks.com/topic/2457197-one-drive-won-t-sign-in-on-avd-machines: didn't work.

I tried multiple versions of OneDrive installer, including the Deferred Ring version as suggested at Sign in issues with OneDrive in new AVD deployments - Microsoft Community: didn't work.

So far, I have confirmed this is happening to *all* our Nerdio client deployments, whether they use Azure AD DS or traditional AD DS + AAD Connect for the users' identity.

The only workaround I have found, following the information from https://learn.microsoft.com/en-us/sharepoint/deploy-on-windows, is to go to Start > Run and type odopen://launch. This launches the OD setup page but this time it doesn't crash once the user clicks on Sign-in, it proceeds properly through the Microsoft sign-in page and then completes the OD setup.

I have confirmed that this fix does follow the user's FSLogix profile (even across host pools for the same tenant), OD continues to silently sign-in the user on subsequent logins.

I also confirmed that nuking the user's profile gets you back to square one, where the user has to use the same launch command to get OD working properly. This to me indicates that the problem is probably somewhere around some registry setting or file that OD expects to find, doesn't find, and crashes. Launching the setup manually bypass whatever that problem is and goes beyond to a proper sign-in, after which that setting is present and OD starts up properly on subsequent logins.

I have a support ticket open with MS and I will report these findings to them, although I am not holding my breath that they will do much with that.

3
Avatar
Greg Richards

Christian - your solution appears to work.  Thank you so much!

1
Avatar
Christian Nancy

Greg Richards, glad it worked for you too! I am still waiting on Microsoft to confirm the error and provide a fix, although they did acknowledge that the issue appears to be a bad interaction between FsLogix and the OneDrive client.

1
Avatar
Rick Heemskerk

Using the shortcut odopen://launch works for us too, thanks!

Under my admin account the OneDrive sign-in was working at one point after a 'onedrive.exe /reset' and deletion of the HKCU\software\microsoft\onedrive key, this did not work for users.
After a re-image the problem returned and was not fixed by following the same steps. 

I will be following this thread, thank you! 

0

Please sign in to leave a comment.