They would be employed by another company, and contracted to Microsoft. This is the arrangement for the majority of H1-B employees in general, but I do not know if Microsoft does this.
Tech companies do not generally do this for their product teams, but may do it for their internal IT and reporting systems.
Microsoft does this. my friend an electrical engineer on an h1b worked for them this way. Microsoft contracted a 3rd party where my friend was employed.