Fix Microsoft Store Error Code 0x87af0813 in Windows 11/10

Several users complained of getting an error code 0x87af0813 when they were trying to launch Microsoft Store or trying to download/upgrade applications over it. If you are one such user and are wondering what to do next, follow this guide till the end. We will discuss what possibly could have gone wrong in your system and how you may overcome this issue.

This error may also appear while opening Xbox or playing games over it. If that’s the case, browse this section instead of applying the Store fixes. 

Error Code 0x87af0813

What may cause an error code 0x87af0813?

The error code 0x87af0813 in Microsoft Store may appear when your system meets one or a combination of the below issues. The probable causes and their solutions are listed below – 

How to Fix Error Code 0x87af0813 in Windows 11/10 

Before you apply any fix, you need to check where exactly you are encountering this error code. If you face this issue on Microsoft Store, see the solutions provided below. However, if you are getting this problem while opening Xbox, switch to this section instead. 

1] Check your Network Connectivity

If you are getting an error 0x87af0813 while attempting to download or upgrade an application over Microsoft Store, this must be because of network issues. Open your default web browser and check if you can surf online. In case things are opening smoothly there, follow the solutions discussed below. Else, troubleshoot your network

2] Troubleshoot Windows Store Apps

Troubleshooter is a native app on Windows 11/10 that can easily find and resolve issues associated with the system apps. To run this built-in program, do the following – 

  • Right-click on the Windows icon and select Run.
  • Type “ms-settings:troubleshoot” and press Enter.
  • This will take you to the System > Troubleshoot.
  • Under Options, you may see Other troubleshooters
  • Well, click on it and scroll down to Microsoft Store Apps.
  • Click on the Run button and wait while this tool is troubleshooting Microsoft Store. 

Store Apps Troubleshooter on Windows 11

  • Once this is over, the troubleshooter will either resolve this issue or provide a fix.
  • Hit the “Apply this fix” button and wait for a few seconds more.

Restart your PC and check if the error 0x87af0813 resolves. If not, try the next set of solutions discussed below. 

3] Purge Microsoft Store Cache

Microsoft Store tends to store cookies and caches for each application that you download or upgrade from here. Over a period of time, these stored data become useless and may prevent users from opening the Store app or downloading apps from it. To fix this, you must clear all the stored cookies and caches. Let’s see how to perform this task in an easy manner –

  • Press Win + R to launch the Run dialog.
  • Type “WSReset.exe” and hit OK.

WSReset

  • This command will run on the elevated Windows Console and delete all the stored information.
  • After a few seconds of clearing the stored data, Microsoft Store will start automatically.

Check if you can now download apps from it. If not, follow the last solution discussed below. 

4] Reinstall Microsoft Store via PowerShell

In case the error 0x87af0813 is still occurring while opening the Store app, try uninstalling and then reinstalling Microsoft Store on your PC. Since there isn’t a direct way to remove this native app in Windows 11/10, you need to run a code on PowerShell.  

Here’s how to uninstall/reinstall the Store app –

  • Press Win + X and choose Windows Terminal (Admin). 
  • A prompt should appear next. Click Yes to authorize opening the Terminal as administrator.
  • By default, the terminal will launch into Windows PowerShell (Admin). 

Note: Windows 10 users may follow this article on how to start PowerShell having admin rights

  • On the elevated prompt, run this command – 

Get-AppxPackage -AllUsers | Select Name, PackageFullName

  • When this command runs successfully, look for Microsoft Store and copy what’s available under the column of “PackageFullName”.
  • Now, copy/paste the below command and press Enter –

Remove-AppxPackage -package PackageFullName

Note: Make sure to replace PackageFullName with the one that you copied before. This command will uninstall the Store app first and then install it back.

  • Restart your PC and check if the 0x87af0813 issue resolves. 

Hopefully, the last workaround should resolve the Store opening or apps downloading issue from Windows Store. Let’s know in the comment section if you face any trouble following the fixes explained above. 

How to Fix Error Code 0x87af0813 in Xbox?

If you are getting this error code while launching Xbox or playing a game on it, do the following to fix it –

  • Check Xbox Server Status – If you are facing trouble opening a game or playing it on Xbox, the problem may lie within the Xbox servers as well. Don’t attempt any solution unless you verify all services are up and running in Xbox Server Status
  • Power Cycle your Xbox console – Press and hold the Xbox button until it turns off completely. Remove all the connecting wires to it and wait for 10-15 seconds. Attach all the power cables back to your console and hit the power button. 

If neither of the above solutions works, you may reset the Xbox console to its factory settings. Here’s how to do this –

  • Launch Xbox and select Settings.
  • Go to System and then Console Info.
  • Here, you will find an option to reset the console.
  • Click Reset console and wait for this process to complete.

I hope, the error 0x87af0813 resolves now on your Xbox console. 

Tip: If you are facing update, activation, or driver issues on your Windows PC, try RESTORO PC Repair Tool. This software will scan your device for potential issues and resolve them automatically.

Leave a Reply