We have found the AAD Broker Plugin is sometimes missing and this is what causes issues with Microsoft applications for end users.
First open power shell and paste this to see if the package is installed:
Get-AppxPackage Microsoft.AAD.BrokerPlugin
If that returns nothing you can install the package with this command:
if (-not (Get-AppxPackage Microsoft.AAD.BrokerPlugin)) { Add-AppxPackage -Register “$env:windir\SystemApps\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\Appxmanifest.xml” -DisableDevelopmentMode -ForceApplicationShutdown } Get-AppxPackage Microsoft.AAD.BrokerPlugin
Now lets remove the EnableADAL from registry if you added the Key:
Remove-ItemProperty -Path “HKCU:\Software\Microsoft\Office\16.0\Common\Identity” -Name “EnableADAL” cmdkey /list | ForEach-Object{if($_ -like “Target:“){cmdkey /del:($_ -replace ” “,”” -replace “Target:”,””)}}
you should now be able to login properly with Modern Auth.