Forum Discussion
Company Portal Installation failing due to missing Microsoft.UI.Xaml.2.7
Is the Company Portal the first app you install on your hybrid joined devices?
Which architecture and OS versions encounter this issue?
We could try some remediation magic or package the framework itself.
Good luck!
Hi Bogdan_Guinea
We setup device using Autopilot . Join Type is "Microsoft Entra hybrid joined". In ESP we did not select any apps to be installed during Autopilot process. In ESP we have set "Block device use until all apps and profiles are installed" is set to No.
We deploy below 2 Microsoft Store app (new) as required assignments.
1. Microsoft 365 Copilot.
2. Microsoft Company Portal.
Since we can't set the App Installation Order. So i can't say if Company Portal is 1st App that will be installed or not.
- Bogdan_GuineaJan 14, 2026Steel Contributor
Hi, you didn't answer me regarding which OS versions this is happening on?
So, no Win32 package as I can see right now...
At this point, you don't have many options. Deploying a platform script will take precedence over app installation in your case (Copilot and Company Portal). In theory, this could work. The problem is (that's why I asked about OS versions): winget is embedded only in Windows 11 and not on all Windows 10 versions.
The second option is calling NuGet directly in a script, but based on your firewall/proxy, I'm not sure if it will go through.
The Fallback Block Only in your case (from lines 15 to 35) should work. I compiled it, ran it myself, and it worked fine on a Windows 11 with no Company Portal.
Good luck!
# Standalone Microsoft.UI.Xaml.2.7 installer - downloads + installs # Run as SYSTEM (Intune script) or Admin # If Winget Present - Use it otherweise fallback to NuGet download + install try { $wingetPath = (Get-ChildItem "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe" | Sort-Object LastWriteTime -Descending | Select-Object -First 1).FullName if ($wingetPath) { & "$wingetPath\winget.exe" install --id 9P5VK8KZB5QZ --exact --silent --accept-source-agreements --scope machine --force Start-Sleep 3 } } catch { Write-Output "Winget not available, trying NuGet method..." } # Fallback - Direct NuGet download + install $nugetUrl = "https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml/2.7.3" $zipFile = "$env:TEMP\xaml27.zip" try { Invoke-WebRequest -Uri $nugetUrl -OutFile $zipFile -UseBasicParsing Expand-Archive -Path $zipFile -DestinationPath "$env:TEMP\xaml27" -Force # Install $appx64 = "$env:TEMP\xaml27\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.7.appx" if (Test-Path $appx64) { Add-AppxPackage -Path $appx64 -ErrorAction SilentlyContinue | Out-Null Write-Output "UI.Xaml x64 installed" } # Cleanup Remove-Item "$env:TEMP\xaml27" -Recurse -Force -ErrorAction SilentlyContinue Remove-Item $zipFile -Force -ErrorAction SilentlyContinue } catch { Write-Warning "NuGet method failed: $_" } # Verify <# $pkg = Get-AppxPackage -Name "Microsoft.UI.Xaml.2.7" -AllUsers -ErrorAction SilentlyContinue if ($pkg) { Write-Output "SUCCESS: Microsoft.UI.Xaml.2.7 v$($pkg.Version) installed" exit 0 } else { Write-Error "FAILED: Microsoft.UI.Xaml.2.7 not found after install" exit 1 } #>- Sriram_JastiJan 14, 2026Copper Contributor
Hi Bogdan_Guinea
I will check and get back to you regarding the OS version.
Thank you for sharing the script. I have Noted on the Platform Script option.
In order to fix on existing devices. Can i use the above script in Remediations ? If yes, Lines 37 to 46 can be used as detection script ?- Bogdan_GuineaJan 15, 2026Steel Contributor
Hi,
Yes, you can use these lines as detection logic for already provisioned or onboarded devices. For remediation, use either Winget or NuGet to determine which works, and add corresponding exit codes in the remediation blocks—for example, add "exit 0" after line 27 and "exit 1" after line 34 if using the NuGet method.
Good luck!