Microsoft is suing the US government for the right to inform its users when a federal agency is snooping on their emails.
The lawsuit argues that the government is violating the US constitution by preventing Microsoft from notifying thousands of customers about government requests for their emails and other documents.
It specifically cites the Fourth Amendment, the right for people and businesses to know if the government searches or seizes their property, and Microsoft's First Amendment right to free speech.
The Department of Justice is reviewing the filing, spokeswoman Emily Pierce said.
Microsoft's suit focuses on the storage of data on remote servers, rather than locally on people's computers, which Microsoft says has provided a new opening for the government to access electronic data.
The technology giant alleged that the government was increasingly using the Electronic Communications Privacy Act to direct investigations at the parties that store data in the cloud.
The 30-year-old law has long drawn scrutiny from technology companies and privacy advocates who say it was written before the rise of the commercial Internet and is therefore outdated.
"People do not give up their rights when they move their private information from physical storage to the cloud," Microsoft says in the lawsuit. It adds that the government "has exploited the transition to cloud computing as a means of expanding its power to conduct secret investigations."
Microsoft’s battle echoes the recent legal case between the US government and Apple, with the latter demanding access to an encrypted iPhone formerly owned by one of the San Bernadino shooters.
Apple refused to comply with the demands, arguing that it could potentially compromise the security of all iPhone’s for the sake of one case.
The issue was never concluded as the FBI dropped the case after admitting that it managed to bypass the security of the iPhone without Apple’s help.
However, the Justice Department recently decided to continue its legal efforts over encryption when it announced plans last week to continue with an appeal to gain access to an iPhone in an unrelated New York drug case.