Microsoft 365 licenses include a subscription to Windows 10 Business (Pro) edition but for a PC to be eligible it must have a valid Windows 7 Pro license key. I don’t understand this, they should just give it to you as part of the subscription but there you go. If you have Windows 7 home edition then you must purchase a copy of Windows 7 or 10 pro and install that or upgrade first.
Assuming you are upgrading Windows 7 Pro edition then all you need to do is do an inplace upgrade or simply wipe the PC and do a fresh install.
You DO NOT NEED A LICENSE KEY to install Windows 10. Just install 10 pro and skip any license key requests.
To upgrade you can you any installation media you have but the easiest option is to download the Windows 10 Media Creation Tool and initiate an in place upgrade with that. Or you can use it to create an ISO image so you can perform a fresh install.
Once Downloaded run the tool.
Here you can choose to upgrade the PC now and keep all of the files and programs. Or you can choose to create a USB drive, DVD or ISO of the install media so you can perform a fresh install.
Once you have upgraded Windows to 10 Pro you now need to Join it to your Azure AD.
Click on the start menu then click the Settings icon.
Next click on Accounts.
Now click ‘Access work or school’ then Connect.
Next click ‘Join this device to Azure Active Directory’
Now enter the email address and password of a Microsoft 365 global administrator and press Next.
Now the PC is part of the Azure AD domain. Now lets see how to activate and license it.
As mentioned earlier you don’t need any Windows 10 license key and if you are prompted for it then click to enter it later, but here is how Microsoft 365 Windows licensing works.
When a Microsoft 365 user logs in Windows will periodically check to see if that user has a license which includes a Windows 10 Business subscription. If they do then Windows will automatically activate and register itself as Business edition!
If you login with a user who is not licensed then Windows will deactivate and not be licensed until a user with a valid license logs in again.