If the house belongs to MS, and John was just allowed to live in it as an MS perk, and MS can withdraw the right at any time, then I think MS can say to Mrs Smith "If the house is no longer a facility for Mr Smith, then we're taking it back".
In other words, the court can force John to move out, but it cannot force MS to continue to provide the perk. The court could, however, demand that John obtain a comparable residence for Mrs Smith and the kids.
Although I'm not a lawyer it seems to me that,in some states at least,divorce courts have enormous power.I'd be willing to bet that some states would successfully overrule such an act by Microsoft.If I'm wrong my guess is that some lawyer will chime in and correct me.