Hi,
Your Microsoft account which is an online account hosted on the Microsoft servers, can't be corrupted.
it could be possible that you were using OneDrive to backup your files and your files were corrupted or infected by a malware, and so when you logged in with your brand new computer and started OneDrive sync, the infected files came back to your computer.
you also mentioned roaming profile. was your computer part of a domain network?