Microsoft has filed a lawsuit against the Internal Revenue Service (IRS) for snooping into Microsoft’s tax records from 2004 through 2009.

The software giant is seeking information about Quinn Emanuel Urquhart & Sullivan, a law firm hired by IRS which tried to look into how the software company books sales between subsidiaries.

The lawsuit filed with the District of Columbia federal court says that IRS has entered into a $2m contract to examine Microsoft tax returns between 2004 and 2009.

According to the Register it is not known whether the law firm was hired to investigate any specific transaction between Microsoft and its own foreign subsidiaries, or all of the transactions.

It is also suggested that Microsoft was trying to developing ways to reduce tax burden.

Microsoft said that the IRS did not fulfill a Freedom of Information request that related to IRS’s contract with Quinn Emanuel Urquhart & Sullivan.

In the court document Microsoft’s attorneys said: "Defendant’s failure to timely respond is arbitrary, capricious, an abuse of discretion, not in accordance with law, and without observance of procedure required by law, all in violation of the [Administrative Procedure Act]."

Prior to this, IRS gave a $234m bill to Amazon over unpaid taxes in a similar procedure.