Since i ran into a couple of times getting unlicensed product on my Office 365 application running on RDS server, i tought i share my experience on how to solve it.

Most articles out there tell you to check if you have an active Office 365 subscription or your internet connection is working and even do a online repair of office 365.

What is this all doesn’t work? So first time i came across this issue i did all this.  i found one article that took another approach with cscript. Because it said not for shared Computer Licensing scenarios, wich a RDS implementation is, i contacted Microsoft to be sure.

to my surprise they told me to do exact the same cscript then in that article.

So here are the steps to fix it.

(This works on Windows 2012R2 server and Windows server 2016 with Office 365 applications)

  • start commmand prompt as administrator
  • go to C:\program files <x86>\Microsoft office\office16
  • use “cscript ospp.vbs /dstatus”
  • look for the value in bold in the output for “Last 5 characters of installed product key: WB569” (NOTE: you might see multiple licenses in the /dstatus report)
  • use cscript ospp.vbc /unpkey:”Last 5 characters of installed product key” In this example: cscript ospp.vbs /unpkey: WB569
  • repeat previous step for every key that was reported with /dstatus

make sure you see “Product key uninstall successful” after running /unpkey

After all this you have to remove the Token end identities listed below
Location: %Localappdata%\Microsoft\Office\16.0\Licensing

Do this for every user logged on RDS server (remark. i didn’t do it for all users since i had about 50 users on there and it worked too)

Now that a user starts an office application they need to log back in with there Office 365 account.

i hope this helps someone.