A hearing in the Supreme Court on Tuesday did not give any indication of which way the case would go, with conservative judges, like Chief Justice John Roberts and Justice Samuel Alito, backing the government's arguments, according to Reuters.
Liberals, like Ruth Bader Ginsburg and Sonia Sotomayor, asked whether the court needed to act, as Congress could legislate to cover such cases.
Microsoft was asked in 2013 by a Southern District of New York court to surrender emails which were stored in Ireland, based on a warrant which claimed they were sought in connection with a case of alleged drug trafficking.
But Microsoft then appealed the verdict to the US Court of Appeals for the Second Circuit based in New York. The decision was reversed in July 2016.
In January 2017, the US Court of Appeals for the Second Circuit split 4-4 on a government bid to get it to hear an appeal against its own verdict. The government then appealed to the Supreme Court.
The bill put forward by Republican Senator Orrin Hatch, titled The Law Enforcement Access to Data Stored Abroad Act, would make some changes to the 1986 Stored Communications Act. Both Microsoft and the government back the changes.
Had this bill been in force, then the ongoing case would be rendered moot.
First, authorities would have to obtain a warrant under the Electronic Communication Privacy Act to obtain any content stored abroad but the warrant would not make this compulsory unless the account holder was an "US person" - a US citizen, permanent resident or company incorporated in the US.
The warrant would have to be modified if a provider proves to the court that it would violate the laws of a foreign country in obeying the warrant.
Hatch's proposed bill also seeks to speed up requests made under mutual legal assistance treaties, by digitising the process.
Finally, it seeks to avoid making data providers subject to data localisation requirements. "Such requirements are incompatible with the borderless nature of the Internet, an impediment to online innovation, and unnecessary to meet the needs of law enforcement," it says.
Microsoft has 40 data centres outside the US and is the first American company to challenge a warrant seeking data that is stored abroad.
Disclosures by former NSA contractor Edward Snowden in June 2013 that the NSA was conducting blanket surveillance of all electronic communications has spooked many businesses.
Many American companies have been affected and email and data storage providers are now offering to hold data in the customers' own location as a form of reassurance. For example, in March 2016, Microsoft announced that it would be setting up cloud services in a German data centre, offering Microsoft Azure, Office 365 and Dynamics CRM Online.
In order to avoid a repeat of the ongoing Dublin imbroglio, Microsoft said it would have no access to the data unless permitted to do so; it said the keys, both logical and physical, that controlled access to customer data, would be held by a German company T-Systems, a subsidiary of Deutsche Telekom, that would act as a data trustee.
The Supreme Court verdict is expected before the end of June.