Solving Office 365 activation issues

In some cases, your Office 365 offline installation remains in trial or unlicensed mode. When you try to activate Office 365, you receive an error message. This article provides a number of solutions for solving Office 365 activation issues.

 

 

Table of Contents

Introduction

You have installed Office 365 on your local machine and are excited to start working with it. And than your euphoria disappears due to the fact that you cannot activate your product.

You may see one or more of the following errors.

"Microsoft Office can't find your license for this application. A repair attempt was unsuccessful or was cancelled. Microsoft Office will now exit."

Solving Office 365 activation issues - Microsoft Office cannot find your license for this application

Or the following error: "Sorry, we can't connect to your account. Please try again later".

Solving Office 365 activation issues - Microsoft Office error sorry we cannot connect to your account

In the application event log, you find one or more errors with source Microsoft Office 16 and event ID 2011. The main message in the details states Office Subscription licensing exception.

Solving Office 365 activation issues - Microsoft Office licensing error eventlog

In case you build your master image using Citrix App Layering, make sure to check the following log files:

  • C:\Windows\Setup\Scripts\ActivateOffice_log.txt
  • C:\Windows\Setup\Scripts\kmsdir\kmssetup.log

Solving Office 365 activation issues - Office 365 log files Citrix App Layering

The remainder of this article shows you why these issues occur and how to solve Office 365 activation issues.

What causes Office 365 activation issues?

There are many possible causes for Office 365 activation errors, for example:

  • Office 365 was not installed on a clean machine; an older version of Microsoft Office was installed previously.
  • There is an issue connecting to the Internet, the Microsoft Office 365 portal (https://portal.office.com) or the ADFS server (sts.yourdomain.com) in your LAN or DMZ.
  • The user you are trying to sign-in with does not have a valid Office 365 subscription assigned.

These are but a few possible causes. In the following paragraph I outline a number of possible solutions which will hopefully solve your issue.

Solutions for Office 365 activation issues

On the Internet you find many articles, blogs and forum entries dealing with Office 365 activation issues, but unfortunately the information is not consolidated. You need to wade through multiple sources of information to finally get a solution to your problem.

And that is exactly where this article comes in. Here you find a comprehensive overview of all possible solutions on one page (including referrals to the original sources). In case I find other ways how to deal with the office activation problem in the future, I will update this article accordingly.

Office portal: assign a valid Office 365 subscription

The user account for which you want to activate Office 365 requires a valid Office 365 subscription.

  • Open a browser and go to the Office 365 portal (https://portal.office.com).
  • Logon as a (global) administrator.
  • Open the administrator portal and on the right side select the user with the activation issues.
    Solving Office 365 activation issues - Admin portal Active Users
  • After selecting the user, make sure that the correct Office 365 subscription is assigned.
    Solving Office 365 activation issues - Admin portal user product licenses

Office portal: remove registered Office installations

Sometimes there is an issue when the user's subscription changes. Whenever a user activates an Office 365 installation the name of the device is registered. You may need to remove old registrations.

  • Open a browser and go to the Office 365 portal (https://portal.office.com).
  • Logon as a (global) administrator.
  • Open the administrator portal and go to Active Users. On the right side, select the user with the activation issues.
    Solving Office 365 activation issues - Admin portal Active Users
  • After selecting the user, go to the section Office installs and select Edit. Remove all invalid registered Office installation(s) referring to the computer on which you are currently experiencing the error.

The previous two solutions involved the Office 365 portal. All of the remaining solutions described below concern the local machine on which you are experiencing the activation issue.

Check Services

Make sure that the necessary services are running. One of the services that needs to run is the Network List Service. To be on the save side, check all services that are configured to start automatically and start the ones that are in a stopped state.

Configure Internet Explorer security zone (Intranet zone)

Microsoft Office 365 in all its glory uses many different domain names for its many products and services. Want to know which ones? Check out the Microsoft article Office 365 URLs and IP address ranges. In the list below, you find a consolidated overview of the domain names mentioned in the article. According to this article, the required list of domain names are:

  • *.lync.com
  • *.live.com
  • *.office365.com
  • *.office.com
  • *.office.net
  • *.onmicrosoft.com
  • *.outlook.com
  • *.microsoft.com
  • *.microsoftonline.com
  • *.microsoftstream.com
  • *.msocdn.com
  • *.powerapps.com
  • *.sharepoint.com
  • *.sway.com

The optional domain names are:

  • *.cloudapp.net
  • *.gfx.ms
  • *.hockeyapp.net
  • *.localytics.com
  • *.oaspapps.com
  • *.outlookgroups.ms
  • *.windows.net
  • *.windowsazure.com
  • assets.onestore.ms
  • connect.facebook.net
  • dc.services.visualstudio.com
  • outlook.uservoice.com
  • platform.linkedin.com
  • prod.firstpartyapps.oaspapps.com.akadns.net

Make sure to add the necessary domain names to your Intranet zone in Internet Explorer. The default settings in the intranet zone ensure that all cloud based applications run with the same permissions and configurations as your internal, on-prem, applications.
In case you want to enable single sign-on to Office 365, please make sure that the Internet Explorer setting User Authentication \ Logon is set to Automatic logon only in Intranet zone or Automatic logon with current user name and password.

Solving Office 365 activation issues - Internet Explorer automatic user authentication

And last but not least, do not forget to add your ADFS server to the Intranet zone as well (e.g. sts.mydomain.com)!

In an enterprise environment you may want to use a Group Policy instead of manually configuring the local Internet Explorer settings. 😉

Configure your proxy server

The proxy server in your environment may very well be the cause of your activation issues. First of all, make sure that you have configured the correct proxy configurations in Internet Explorer:

  • Automatically detect settings (disabled or enabled)
  • Enter a proxy auto-config (PAC) file
  • Enter a proxy server and specify ports and exclusions

Solving Office 365 activation issues - Internet Explorer proxy settings

Make sure that your current user account and/or device is granted all required access rights on the proxy server.

If you are still experiencing issues, it may be that the proxy settings are not configured correctly to allow for Office activation. How can you check if the settings on your proxy server are to blame? Well, Fiddler to the rescue! As stated by the vendor, Fiddler is a free web debugging proxy which logs all HTTP(s) traffic between your computer and the Internet. Your can download Fiddler here.

Simply install Fiddler on the machine on which the activation issues occur and let it run. Start an Office application, wait for the activation window, logon and wait for the error. Now check the results in Fiddler.

Solving Office 365 activation issues - Office 365 Fiddler trace

First of all, in this example, you see that Microsoft contacts multiple web sites during the activation process. If all would have gone well, the HTTP return codes should have been 200 (this is the standard response for successful HTTP requests).
In this case, Fiddler detected multiple HTTP 407 results. The return code 407 means Proxy Authentication Required. In short, the activation failed because the required web sites could not be reached due to missing proxy access rights. For the full list of HTTP status codes see the article List of HTTP status codes on Wikipedia.

Remove old Office licenses

In case you installed Office 365 on a computer which contained a previous version of Office, there is a chance that older licenses are still registered and causing the activation issues.

 

 

Microsoft Office comes with a tool to configure and manage volume licenses called OSPP.vbs (Office Software Protection Platform). This VBScript is located in the directory C:\Program Files\Microsoft Office\OfficeXX (64-bit) or C:\Program Files (x86)\Microsoft Office\OfficeXX (32-bit). Replace the XX for the Office version (e.g. Office16).

The OSPP.vbs is launched as any other VBScript, except for the fact that it only supports the cscript.exe as the script host:

cscript.exe "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs"

To check for existing volume licenses on the local system, execute the following command:

cscript.exe "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs" /dstatus

Each existing license is displayed in a separate block containing detailed information.

Solving Office 365 activation issues - Microsoft Office OSPP.vbs script

To remove existing licenses, locate the last 5 digits of the product key, as shown in the screenshot above, and execute the following command (in our example, the last 5 digits are TCK7R):

cscript.exe "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs" /unpkey:TCK7R

Repeat this step for each product key you find. After having removed all licenses, run the following command once again:

cscript.exe "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs" /dstatus

The result should now be:

Solving Office 365 activation issues - Microsoft Office OSPP.vbs without licenses

Remove cached credentials from the Credential Manager

Previously cached credentials in the Microsoft Credential Manager may be the cause for your activation issues. Removing these cached credentials is an important step in the troubleshooting process.

On the local machine on which you are experiencing the activation issues, go to the Control Panel and open the Credential Manager. Remove all cached credentials relating to Microsoft Office (also if it refers to an older version of Microsoft Office). You can remove a cached credential by expanding an individual entry and selecting Remove from vault. Repeat this step for each Microsoft Office entry.Solving Office 365 license issues - Delete entries from the Microsoft Credential Manager

Reference: How to fix Office 365 error Microsoft office can't find your license for this application (YouTube video).

Cleanup the registry

Your current user registry hive may contain some invalid entries. Open the Registry Editor (regedit.exe) and delete the following values:

  • HKEY_CURRENT_USER \ SOFTWARE \ Microsoft \ Office \ 16.0 \ Common \ Identity \ Identities. Delete all GUID keys beneath Identities.
    Solving Office 365 activation issues - Office 365 registry HKCU identity identities
  • HKEY_CURRENT_USER \ SOFTWARE \ Microsoft \ Office \ 16.0 \ Common \ Identity \ Profiles. Delete all GUID keys beneath Profiles.
    Solving Office 365 activation issues - Office 365 registry HKCU identity profiles
  • HKEY_CURRENT_USER \ SOFTWARE \ Microsoft \ Office \ 16.0 \ Common \ Internet \ WebServiceCache \ AllUsers. Delete all subkeys under AllUsers.
    Solving Office 365 activation issues - Office 365 registry HKCU internet

Reference: How to fix Office 365 error Microsoft office can't find your license for this application (YouTube video).

Reinstall Office 365

One solution regarding activation problems is to reinstall Office 365. Go to Control Panel \ Programs and Features. Select Microsoft Office 365 + your edition (e.g. Microsoft Office 365 ProPlus - en-us) and hit Uninstall. After uninstalling Office, remove the current device from the registered Office installations in the Office portal. The following step obviously is to once again install Office 365.

Conclusion

If anything, this article shows that there are multiple causes as well as solutions for solving Office 365 activation issues. In case you found additional causes or solutions, please be so kind and share this information with me. I hope that this article was of some help to you.

Share this post:
Dennis Span on EmailDennis Span on LinkedinDennis Span on Twitter
Dennis Span
Dennis Span
Dennis Span works as a Senior Citrix Architect for a large insurance company in Vienna, Austria. He holds multiple certifications such as CCE-V, CCIA and CCEA. In 2017, Dennis became a Citrix Technology Advocate (CTA). Besides his interest in virtualization technologies and blogging, he loves spending time with his family as well as snowboarding, playing basketball and rowing. He is fluent in Dutch, English, German and Slovak and speaks some Spanish.

23 thoughts on “Solving Office 365 activation issues

  1. CMD Options fixed the issue for me. Must have had 5 product keys there, and each one was trial related. It is now working perfectly. Thank you.

  2. Thanks for this awesome post, I spent several hours trying to figure out how to activate an Office 365 Business subscription and I tried a lot of things related to network access, active directory, reinstall, etc.

    It ended up being solved by removing an activation key from a previous install that I found using the CMD method.

    • Hi Ehrich. I am happy you like the article and thanks for the suggestion concerning the removal tool. As suggested in the link you sent, you should first try to uninstall Office using Control Panel and use the removal tool as a secondary option. It is good to know that such a removal tool exists. I was not aware. Thanks!

  3. Most helpful article Google spat out! Your section on finding and removing old licence keys was exactly what I needed to get rid of a half dozen keys stuffed on the one machine. I get to keep my job a bit longer.

  4. In our case we had a situation where the network list service wasn't started. Enabling this service made it possible to activate O365.
    But thanks for your great article.

Leave a Reply

Your email address will not be published.

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.