Change office 365 licensed users
Open command prompt as an Administrator
Change directory to
C:\WINDOWS\system32>cd C:\Program Files (x86)\Microsoft Office\Office16>
Type the following command to display the license status. Note the last five characters of any and all license keys that display in the output:
cscript ospp.vbs /dstatus
Now run the following command as many times as needed to remove all of the license keys you noted from the previous step.
cscript ospp.vbs /unpkey:<last five characters of product key>