Last updated on September 23, 2022 byRudyooms
This blog will be, again, about someUnpleasant problems with apps from the store🇧🇷 At the conclusion of my last blog, I already mentioned that I was investigating some problems with the start menu and OneDrive/Outlook connection that I was experiencing.
Microsoft Store apps and the city of a thousand missing structures
I will divide this blog into several parts.
- The question
- fixing the old fashioned way
- Problems solution
- Fixing it the new way
- If you don't want to fix it manually
- To main cause
- The possible first “trigger”?
- Microsoft ProfApi.dll
I don't think I need to mention how disgusting2022-05 update again,who broke down the facilities ofMS Storebut when looking for the first time, I noticed this problem from the store(15-02-2022) This issue has been around longer than the May 2022-05 Update.
Let me explain what stops working.
- Outlook can no longer connect
- OneDrive stops syncing because it can no longer connect (0x8004de44)/Trava no login
- Start menu does not respond to left click (right click still works)
For you to have a good idea of what's going on, I also record it so you can show exactly what was going on!

Looking at all the things that are breaking I think we could justbreak the deviceand that's it... but I think we have to fix it, otherwise we wouldn't be doing our jobs.

Now we know and we've seen what breaks, and if we didn't break our device, we need to see what events we'd get if this whole thing did break! open yourApplication event logand start looking out for all those big yellow notices!

Event identifier: 20
Fix triggered because LocalSettings operation against package Microsoft.AAD.BrokerPlugin_cw5n1h2txyeyy failed-2147024891.

Event ID: 21
Fix for LocalSettings operation in package Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy with error -2147024891 Error code returned:-2147024891.

Event ID: 23
Fix status locations triggered due to Failure of SettingsInitialize operation against package Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy:2147024891.

Event ID: 24
Fix state locations for SettingsInitialize operation against package failure Microsoft.AAD.BrokerPlugin_cw5n1h2txyeyy-2147024891returned error code: 0
It is quite obvious what we are dealing with2147024891 | 8007005 | Access deniederrors. But I'm not done yet because another mistake caught my attention! As shown below, he mentions the0xc000027bmistake.

The application event log isn't the only event log we need to look at, so let's take a look at the system event log. This event log shows us theKernel-General event 16mentioning app history in componentAppData\Local\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\Settings\settings.datIt has been deleted

Damn... I almost forgot an event log! As stated above, when you have trouble signing in with Onedrive and Outlook, it's always a good practice to check theAAD event log🇧🇷 As below, even AAD login record gives us the same0x80070005access denied error

When this strange issue started to occur, we didn't know exactly what was going on. at first, alonedeleted the corrupted profileto ensure that a beautiful and shiny new profile is created
To do this, we restart the device and log in with a local administrator user. After logging in, we start to remove thec:\users\%username%folder and removing theuser your profile key in the registry

With himold corrupted profile missingwe could start logging in with the user again so that the profile is recreated. Once signed in, open OneDrive and Outlook to ensure your Microsoft account is connected and working again.
Have in mind: With the release of the June update, we have also installed the June 2022-06 update which includes the store fix.
If we don't want to recreate the profile and go through all theproblems resyncing OneDriveetc. we also have another option to fix it. As always, I also looked to see if there was anything useful in theMS-Docs.
Microsoft Store Apps Won't Launch: Windows Client | Microsoft documents
Looking at the link above they mention something about howresolve potential store app issues.

This is definitely a bug (0xc000027b) that we noticed before, right? I think we're missing some permissions for“ALL APPLICATION PACKAGES” | Also known as S-1-15-2-1on some registry keys…. But which ones? because we have so many of them!
When you wonder what's going on in the registry, there's alwaysprocmon🇧🇷 Open Procmon and define the filter first as shown below

Looking at the error we got earlier2147024891–>Access denied.I'll just add the filter."Include"the value"ACCESS DENIED"

As shown above, you are mentioning "Access denied" about itHKU\S-1-12-1-2370815533-1185198546-48193434-4181760345\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorerit's himUser shell foldersregistry keys. I think these are the registry keys we need!
First, make sure your device has theUpdate 2022-06 installed🇧🇷 Why can the May update break it again?
When we are 100% sure that the device is up to date, open the registry (if you have permissions to do so, otherwise run Regedit as administrator and look for the correct user in the HKEY_USERS key) and validate the permissions on the following registry entries .
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
As mentioned earlier, these registry keys must have the extension "All app packagesuser” configured in the permissions and you also need to have the"File"checked box.
If he "ALL APPLICATION PACKAGES”the user doesn't have read permissions, you must add them manually!
Of course, you can also automate the fix using PowerShell. When looking at the following script which needs to be run as an administrator, it will first look for the SID of the Azure AD user. After getting the correct SID it will create anew-psdriveto ensure that we can connect to theHKEY_USERSWrench.
After PSDrive is created it will be addedread keypermits for missing personsALL APPLICATION PACKAGES” to the registry key
please changea$packagesto your own language
$Paquetes = "Todos os PAQUETES DE APLICAÇÃO"$key = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-12-1-*'$profiles = (Get-Item $key)New- PSDrive - Registro PSProvider -Nombre HKU -Root HKEY_USERSForeach ($perfil en $perfiles) {$sids = $perfil$sids = Ruta dividida -ruta $sids -hoja$usuario = "HKU:\$sids\"$prueba = rota de prueba $userif ($test -eq $true){ $Folder = "HKU:\$sids\Software\Microsoft\windows\currentversion\explorer\"$Acl = Get-ACL $folder$AccessRule= New-Object System.Security . AccessControl.RegistryAccessRule($Packages,"Readkey","ContainerInherit","None","Allow")$Acl.SetAccessRule($AccessRule)Set-Acl $pasta $Acl$Pasta = "HKU:\$sids\Software\ Microsoft\windows\currentversion\explorer\user shell folders"$Acl = Get-ACL $folder$AccessRule= New-Object System.Security.AccessControl.RegistryAccessRule($Packages,"Readkey","ContainerInherit","Ninguno"," Permitir")$Acl.SetAccessRule($AccessRule)Set-Acl $carpeta $Acl} }Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
After making sure that all the permissions are ok, let's first have a look if maybe we got some luck because changing the registry permissions solved it for75%of the devices
If the problem persists, make sure to log in to the device withUSER NAMEyou are having this problem (NOT ADMIN, the user's session! )
Once logged in, open 1Elevated PowerShellsession and an unraised 1 on the user's session. First, kill theexplorer.exeusing the task manager.
Have in mind:When you don't close explorer you may end up with some errors mentioningthe feature is currently in use!

To fix this problem I also added the-Force close the appto ensure that resources currently in use are forced off
NoHIGH(EXECUTE AS ADMINISTRATOR) PowerShell session:
Get-AppXPackage -Todos os usuários | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

Wait until you're ready! and just ignore the errors if you have any
NoNORMALPowerShell session (inuser session)
Get-AppXPackage *Microsoft.Windows.Search* |ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -ForceApplicationShutdown -Register "$($_.InstallLocation)\AppXManifest.xml"}Get-AppXPackage *MicrosoftWindows.Client.CBS* |ForEach -Object {Add-AppxPackage -DisableDevelopmentMode -ForceApplicationShutdown -Register "$($_.InstallLocation)\AppXManifest.xml"}Get-AppXPackage *Microsoft.Windows.ShellExperienceHost* |ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -ForceApplicationShutdown -Register "$($_.InstallLocation)\AppXManifest.xml"}Get-AppXPackage *Microsoft.AAD.BrokerPlugin* |ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -ForceApplicationShutdown -Register "$($_.InstallLocation)\AppXManifest.xml "}Get-AppXPackage *Microsoft.AccountsControl* |ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -ForceApplicationShutdown -Register "$($_.InstallLocation)\AppXManifest.xml"}Get-AppXPackage *Microsoft.Windows.CloudExperienceHost* |ForEach -Objeto {Add-AppxPackage -Des ativar eDevelopmentMode -ForceApplicationShutdown -Registrar "$($_.InstallLocation)\AppXManifest.xml"}

After running this PowerShell script, pleasereset deviceOr juststart explorer.exewith the use of Taskmanager and you will notice that everything is working again.
I guess we're all lazy admins sometimes! When you don't want to go through all the trouble of fixing it manually, you can always run a"New beginning"

But be careful, it will take more time before the user can use their device again becauseyou need to go through all device and ESP user again to install required apps🇧🇷 It is up to you to choose the solution you are satisfied with.
After comparing all devices with some people, we noticed that1 specific applicationhas been installed on these devices.

It seems that somehowClickShare appbroke at some point and at that time was responsible for messing up theALL APPLICATION PACKAGESpermissions on these registry keys.
Fortunately, Barco (ClickShare) is also confirming this issue and fixing it with the latest update. So make sure that when implementing the permissions fix you also make sure the ClickShare app is up to date.
Shall I tell you a little secret? Microsoft has their own PowerShell Script to fix it! Comparing this script with my own version, this script should run onuser session!where my script needs to run atsystem context.
It pretty much does the same thing 🙂... fixes missing permissions.
$acl1 = Get-Acl "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\"#$person = [System.Security.Principal.NTAccount]"todos os pacotes de aplicativos" ##S-1 -15 -2-1$sid = Novo objeto System.Security.Principal.SecurityIdentifier ("S-1-15-2-1")$person_temp = $sid.Translate( [System.Security.Principal.NTAccount]) $persona = $person_temp.Value.Split("\")[1]$access = [System.Security.AccessControl.RegistryRights]"ReadKey"$heritance = [System.Security.AccessControl.InheritanceFlags]"ContainerInherit,ObjectInherit"$ propagação = [System.Security.AccessControl.PropagationFlags]"Ninguno"$type = [System.Security.AccessControl.AccessControlType]"Allow"$rule = New-Object System.Security.AccessControl.RegistryAccessRule($persona,$acceso,$ herencia, $propagación,$tipo)$acl1.AddAccessRule($regla)$acl1 | Set-Aclif (-no (Get-AppxPackage Microsoft.AAD.BrokerPlugin)) { Add-AppxPackage -Register "$env:windir\SystemApps\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\Appxmanifest.xml" -DisableDevelopmentMode -ForceApplicationShutdown } Get-AppxPackage Microsoft .AAD.BrokerPlugin
ClickShare app is one of the apps that can mess up our start menu and break our Office365 apps connection, butWhat could have triggered this?I already had some ideas about what could have triggered this, but after seeing this post on Reddit, I was sure.
Intune: Mobile device management (reddit.com)

Looking at the Reddit post, the trigger could definitely be aself-service passwordredefined by the user himself! After asking some more, many answers were the same:
“The user reset the password a few days before the problem started."
UPDATE 2022-09-23 Official answer from Microsoft
Although this initially appeared to be a problem with thethird party app, now appears to be Microsoft code(profapi.dll)whatbreak permissionsthinking they need to be recovered. This can happen when a third party x32 process (such as ClickShare)use Office APIson a machine where Office is deployed using Office ClickToRun, due to aerror in AppvIsvSubsystem32.dllrecording hooks. In this case,profapi.etcwill start to recoverACL, but after a second failure,will not write the ACLs of all app packages,causing problems (crashes and registration failures) with packaged applications.
Error 41322218 registration error:_RecoverUserShellFolderKeys cannot restore default permissions
So it's related to a Click-to-run version of Office. And it makes sense, as the issues have been occurring since moving to the MS Apps 2202 Enterprise channel
All of these store app issues we've been experiencing for the last few months are horrible. Fortunately, most issues can be resolved. This blog will explain howcould solve problems with the Start menu, Onedrive and Outlook.

Have in mind: I'm still looking for the "why"! If I have more information, I will share it with you all!
If you are interested in troubleshooting your offline company portal app, check out this blog
Company portal not working after wipe/reset (call4cloud.nl)
FAQs
How do I fix unresponsive Start menu? ›
Restart Windows Explorer
Press Ctrl + Shift + Esc to open Task Manager. You may need to select More details at the bottom of the window to see everything. Select the Processes tab. Scroll down to Windows Explorer, select it, then select Restart.
Start Menu Button sometimes stops working because of issues with Windows Explorer. Simply restarting Explorer can often resolve problems affecting the Start Menu and the Taskbar. To restart Explorer: Hit Ctrl + Shift + Esc to open Task Manager.
Why does my apps keep saying not responding PC? ›If you keep getting the "application is not responding" error, updating your operating system may resolve it. Follow these steps to update your computer to the most recent version of Windows: To open the Settings app, press the Win + I key combination. Select the Update & Security option.
How do I fix Windows app store problem? ›Run the troubleshooter: Select the Start button, and then select Settings > Update & Security > Troubleshoot, and then from the list select Windows Store apps > Run the troubleshooter.
How do I rebuild my Start menu? ›Fix a frozen Windows 10 Start Menu by rebuilding the index
Click on 'Modify' in the bottom left of the Indexing Options window, then click the 'Show all locations' button. Untick all of the currently ticked boxes and click OK. Next, click on 'Advanced', go to the Troubleshooting section and click 'Rebuild'.
- Check for connection problems and make sure that you're signed in with a Microsoft account.
- Make sure Windows has the latest updates. Select Start > Settings > Windows Update > Check for updates.
- Check your time and location settings. ...
- Reset the Microsoft Store cache.
- Navigate to Settings > Apps > Apps & features.
- Locate the Microsoft Store entry and click on it.
- Click Advanced options.
- Under Reset, click the Reset button.
All the cache files in Windows Store will be cleared if you perform a reset or the cache files of Windows Store. It will permanently delete the app's data on your device including your sign-in details. Go to Settings> System> Apps & features> Click Store> Advanced options> Reset.
How do I recover my Start menu in Windows 10? ›Click on the Windows icon in the lower left of the screen and look up at the TOP left of the screen. You will see 3 little bars... click on that and the startup buttons show up again.
How do I reinstall the Microsoft Store app? ›Right-click on the Windows icon at the bottom of the screen and click on “Windows PowerShell(Admin)”. A blue screen will appear, type the command mentioned below and press Enter. The command will execute and look for MS Store files on the system and then reinstall them.
Why won't apps open on my computer? ›
Corrupted system files, registry errors, or other underlying issues can also cause problems with apps. Viruses, malware, or other forms of malicious code can damage app files and interfere with their normal functioning. Low memory or insufficient system resources may also prevent apps from opening as intended.
Why are my apps stuck on pending Microsoft Store? ›1. Sign-out and sign-in to your Microsoft Account in MS Store. Open Settings => Update & Security => Troubleshoot => Windows Store Apps => Run the Troubleshooter. >> Press the Windows Logo Key + R to open the Run dialog box, type wsreset.exe, and then select OK.
Will I lose apps if I reset Windows? ›All your applications will be removed after resetting the computer. The following apps that cannot be reinstalled from Microsoft Store, so you will need to reinstall these apps from the web or installation discs.
Can you uninstall Microsoft Store apps? ›Uninstall from the Microsoft Store
Open the Microsoft Store from the Start menu, and then browse for the application you want to uninstall. On the Store page, each installed application has an Uninstall button.
Uninstalling the Microsoft Store app is not supported, and uninstalling it may cause unintended consequences. There is no supported workaround to uninstall or reinstall Microsoft Store.
Is it safe to clear Windows Store cache? ›You can fix common Microsoft Store errors and other issues by clearing the app cache. If that does not work, reset the app to restore the default setting. If the issue persists, explore other issues that can prevent Microsoft Store from opening.
How do I refresh Microsoft Store? ›- Open settings. Press Start, then the settings cog in the Start menu, above the power button.
- Click on 'Apps'
- Open advanced options for the Microsoft Store. In the Settings side panel, click “Apps & features”. ...
- Reset the Microsoft Store.
- Reconfigure Internet properties.
- Set the date, time, and region correctly.
- Change the language to English.
- Update Microsoft Store.
- Check the services.
- Reset the Microsoft Store app.
- Reinstall Microsoft Store.
- Disable your antivirus and firewall.
Step 1: Press the Win + R keys together on your keyboard to open the Run command window. Step 2: In the Run command search box, type powershell and press the Ctrl + Shift + Enter shortcut key on your keyboard to open the Windows PowerShell in elevated mode. This will install or reinstall the Microsoft Store.
Why can't I install apps from Windows 10 store? ›If updates for Windows were recently installed, you'll need to restart your PC before you can install apps from Microsoft Store. Your PC isn't authorized to use Microsoft Store apps. You'll need to sign into the app with your Microsoft account.
Why is my Microsoft Store stuck? ›
Open Settings => Update & Security => Troubleshoot => Windows Store Apps => Run the Troubleshooter. >> Press the Windows Logo Key + R to open the Run dialog box, type wsreset.exe, and then select OK. 5. Use System File Checker to check and fix corrupted system files that may be the cause of the issue.
How do I fix Microsoft Store update error? ›If you get an error code while downloading and installing Windows updates, the Update Troubleshooter can help resolve the problem. Select Start > Settings > Update & Security > Troubleshoot > Additional troubleshooters.
How do I repair all Windows apps? ›Repair options from the Control Panel
In the search box on the taskbar, type control panel and select Control Panel from the results. Select Programs > Programs and Features. Right-click the program you want to fix and select Repair, or if that's not available, select Change. Then follow the directions on the screen.
Uninstall apps
You can uninstall applications through the Microsoft Store, Start menu or from Settings. You cannot uninstall a system app or the Microsoft Store itself.
Select Start then enter Microsoft Store. Select it to open the app. If Microsoft Store won't launch, get more info at Microsoft Store does not launch.
Why does it keep saying unable to install apps? ›Check your storage space
If your device is low on space, it can stop apps from downloading and installing. Your device may be low on space if: You get a notification about storage space. There's less than 1 GB available on your device.
An outdated or bug-ridden Windows 10 version may be the root cause of the app download failure you're experiencing on the Microsoft Store. So make sure you install the latest update on your computer. Go to Settings > Update & Security > Windows Update and click Check for Updates.
What causes applications not to install? ›Corrupted storage, especially corrupted SD cards, is one of the most common reasons why Android app not installed error occurs. Unwanted data might contain elements that disturb the storage location, causing Android app can't install error.