Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Reset activation state for Microsoft 365 Apps for enterprise

This article is written and maintained by Eric Splichal, Senior Support Escalation Engineer, Matt Philipenko, Microsoft 365 Apps Ranger, and Tim Johnson, Customer Engineer.

You might need to perform tasks such as the following for your organization:

  • Tenant to tenant migration
  • Repurpose a device for a different user
  • Change the license mode for Microsoft 365 on a device

To complete these tasks, you need to clear prior activations of Microsoft 365 apps for enterprise to remove their related licenses and cached Office account information. This removal will reset the applications to a clean state. You can then activate them with a different Office account or change to a different license mode. To reset the activation state, close all Office applications and use one of the following methods.

Note

  • The steps also apply to Microsoft Project and Microsoft Visio.
  • The steps and scripts in this article apply to Windows installations of Office apps. For Office for Mac installations, see How to remove Office license files on a Mac.

Method: Use the Enterprise version of Microsoft Support and Recovery Assistant

The Enterprise version of the Assistant is a command-line version that can be scripted and is recommended to reset Office activation on multiple devices and on devices that you can't access immediately.

Method: Run the Microsoft 365 activation troubleshooter in Get Help

The Microsoft 365 activation troubleshooter helps you to resolve Microsoft 365 subscription activation issues.

Note

To run the Microsoft 365 activation troubleshooter, make sure that you're using the same Windows device that Microsoft 365 is installed on. Additionally, make sure that your device is running Windows 10 or a later version.

To run the troubleshooter, follow these steps:

  1. Select the following button to start the troubleshooter.

    If you receive a pop-up window that displays "This site is trying to open Get Help.", select Open.

  2. Follow the instructions in the Get Help app to run the troubleshooter.

After the troubleshooter finishes, it displays the results and provides additional information about how to resolve the issue.

Method: Use scripts to automate the cleanup process

Run the following scripts that automate each section of the process. We recommend that you run the OLicenseCleanup.vbs and signoutofwamaccounts.ps1 scripts listed below, while WPJCleanUp.cmd is required only if your device is Workplace Joined. For details about the specific steps that each script automates, select the associated Details link. Use the "Select if using automated scripts" link to navigate back to this method.

  1. To remove previous licenses and cached account information: download the OLicenseCleanup.zip file, extract the OLicenseCleanup.vbs script, and run it using elevated permissions. Details
  2. To clear the WAM accounts on the device that are associated with Office: download the signoutofwamaccounts.zip file, extract, and run the signoutofwamaccounts.ps1 script with elevated permissions. If you save signoutofwamaccounts.ps1 in the same location as OLicenseCleanup.vbs, then it will be executed automatically when you run OLicenseCleanup.vbs. Details
  3. To remove Workplace Joined accounts: download WPJCleanUp.zip, extract the WPJCleanUp folder, and run WPJCleanUp.cmd. Details

Method: Clear prior activation information manually

If you prefer to perform the steps for the cleanup process manually, use the information in this method. The process consists of the following sections.


Feedback

Was this page helpful?

Additional resources