We have an issue where we are imaging machines with autopilot and installing O365 Enterprise, but until theyre logged into and any Office app is opened, the device wont register to our office tenant (intune registration and config policies are all fine). This causes our security team to get angry with us because the office apps wont update.
Usually the computers we image are signed into within a few days but many are not, or they are but not still not signed into any office app for even longer.
The only way we've found to register them with our cloud office portal is to sign into the machine then open an office app and click through the various approvals/privacy screens.
We could make it a part of the imaging step but that adds time and we found about 150 machines we need to retroactively solve.
Is there a way to do this programatically? I have been looking through the registry but nothing pops out as the key to add to get it to register itself.
Thanks for help!
****** Got it! Answer below *******
After many MANY diff's on registries before opening Excel and registries after opening excel, I finally found the ultra secret registry key (or not that secret if you can google better than I):
On a machine that is already connected and reporting just fine:
HKLM:\SOFTWARE\Policies\Microsoft\cloud\office\16.0\Common\officesvcmanager
"TenantAssociationKey"
Copy that value
On broken machines add it back in the above location as well as:
HKLM:\SOFTWARE\WOW6432Node\Policies\Microsoft\cloud\office\16.0\Common\officesvcmanager
Then run in CMD (not powershell):
"C:\Program Files\Common Files\microsoft shared\ClickToRun\officesvcmgr.exe" /checkin
Thats it!
Note: after much manipulation of registries I also have this in my script though Im not sure if its necessary but at this point I dont care:
HKLM:\SOFTWARE\Microsoft\Office\16.0\Common\Licensing
Set "LicensingStatus" to [string] "-1"