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.
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/