This boils down to can a US court force an american entity to break a foreign law.
That's not a complex question. The unambiguous law in the USA is yes.
it would be interesting to see if the US would allow extradition of a US citizen for charges based on this scenario.
Almost all extradition treaties, and in particular all signed by the USA, prevent extradition when the actions would not be a crime in the country doing the extraditing. Since obeying a warrant is legal, no the extradition request could be rejected under the treaty. The USA courts would reject it because they want to encourage Americans to obey court orders not encourage them to disobey them.
can the court force Microsoft to direct the foreign entity to comply.
And the foreign entity (remember a Microsoft owned company) refuses, what can the court do to Microsoft?
At the extreme (assuming the executive were also onboard which remember they are the ones making the request) they could ultimately consider the foreign entity to be a criminal enterprise. If they did so, owning a criminal enterprise is racketeering which is a felony. So they could seize all of Microsoft's assets as well as arrest Americans involved (executives, board members, employees) involved in supporting MOIL.
I doubt things would go anywhere near that far, but they have done things like that to USA individuals who run foreign criminal enterprises. For example people involved in human trafficking, illegal environmental dumping, illegal arms sales or drugs outside USA borders.
The proposed bill presumably all about removing these ambiguities.
That's not the ambiguous part. The ambiguous part if what is the rightful scope for USA courts.