Recently I ran into this problem where suddenly over night users logging in get a “unlicensed product” warning on the top banner of the Office 365 applications (Outlook, Word, Excel etc) on Windows 2012 Server running RDS.
I had followed the standard steps of the online repair, quick repair etc, license check and even speaking with Microsoft to verify licenses were ok, including some other red herrings.. nothing seemed to work but this:
*Please note this may work on other platforms with the same issue, but I’ve not tested this as yet.
From a command prompt type:
cscript.exe “%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs” /dstatus
This will return a 5 digit code. From that same command prompt run, type the following putting the 5 digit code where the XXXX is:
cscript.exe “%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs” /unpkey:XXXXX
I hope this helps someone else!