Use this powershell to review whats is the application is hanging the process:
Shift+F10 to open a command prompt (opens a cmd as system user with admin rights).
And install and execute the script with the tag -online (logging as Intune admin)
PowerShell.exe -ExecutionPolicy Bypass
Install-Script -name Get-AutopilotDiagnostics -Force
Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned
Get-AutopilotDiagnostics.ps1 -Online
You will get the application lists. Then you can check the app in the intune portal and the local logs in the IME folder logs.