Having issues with Microsoft / Office Apps? A cluttered cache can sometimes lead to unexpected behavior. This guide demonstrates how to clear the Microsoft Apps cache on demand with Intune, potentially resolving various app-related problems.

Table of Contents

Benefits of Clearing the Microsoft Apps Cache

  • Improved Performance: Clearing the cache can streamline apps by removing potentially outdated or corrupted data.
  • Enhanced Stability: Removing cached data can sometimes resolve crashes, freezes, or other stability issues within apps.
  • Faster Troubleshooting: This method quickly eliminates the user cache as a potential culprit, allowing you to focus on other troubleshooting steps if necessary.

Clear Microsoft Apps Cache Manually

  1. Close all your Office Applications
  2. Open this folder: %LOCALAPPDATA%\Microsoft\Office\16.0\Wef\
    (you can copy an past the variable, it will automatically redirect you to the right location)
  3. Delete all the content in this folder
Manually clear the Cache of Microsoft 365 applications

Using a Script for Automatic Cleanup

Similar to the Teams cache cleanup, a PowerShell script can be created to automate the process for Microsoft Apps.

Here's a general outline:

  • The script identifies the cache location.
  • It checks if the applications are running.
  • If one or more applications are running, a prompt would inform the user to close it before proceeding.
  • Upon confirmation, the script closes the apps and clears the cache.

Setup the Remediation in Intune

Download the Script
Save the code as a .ps1 file (e.g., ClearMSAppsCache_DetectionAction.ps1) or download it from GitHub (above).

Create a Remediation Package in Intune

  1. Navigate to: Intune > Devices > Windows > Scripts and remediations
  2. Hit + Create
  3. Give your package a name and a optional description.
  4. Upload the previous saved PowerShell script.
    (Since everything in in one script, we only need the detection)
    • In addition, set the script to run as the logged-on user in in 64bit context.
  5. All the other points you can skip, including the assignment. Cause we will use it only for on-demand actions.

Remediation on-demand in action

Here is a video that shows you how the on-demand remediation to clear the Microsoft 365 Apps cache in Intune works. (The video is in real time.)

Alternative Solutions

  • Reinstall the App: If clearing the cache doesn't resolve the issue, consider reinstalling the Microsoft App. This will remove all app data and reinstall it from scratch.
  • Office Repair: This is a "light" option of the reinstall.