Microsoft - How to Connect a Microsoft Office Subscription
This Article outlines the steps to identify and correct an incorrectly connected Microsoft Office subscription on a device.
Procedures:
1. Remove the Identities folder from the Registry
Office 2016:
HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\Identity\Identities and delete the 'Identities' folder
Office 2015:
HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\Identity\Identities and delete the 'Identities' folder
Then run the scripts mentioned in below by running the command prompt as administrator
Office 2016:
cscript.exe '%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs' /dstatus
cscript.exe '%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs' /unpkey:XXXXX
Office 2015:
cscript.exe '%ProgramFiles(x86)%\Microsoft Office\Office15\ospp.vbs' /dstatus
cscript.exe '%ProgramFiles(x86)%\Microsoft Office\Office15\ospp.vbs' /unpkey:XXXXX
XXXXX is the last 5 digits of the Office key that is displayed from the /dstatus switch
2. Launch Office applications and activate with Office 365 credentials
Note: This can also be caused by a different version of office 365 being installed on the computer that is no longer licensed. If this is the case remove the office 365 version that is not licensed from the device.
Audit or Confirmation
Open an office application(e.g. Word, Excel, etc) and go to File>Account. At the upper right of the screen, it will show the subscription information.

References
See:https://support.hollandcomputers.com/kb/a126/office-365-subscription-message.aspx
See:https://365lab.net/2016/07/13/how-to-resolve-weve-run-into-a-problem-with-your-office-365-subscripti....
See:https://jaapwesselius.com/2014/11/12/weve-run-into-a-problem-with-your-office-365-subscription/