Microsoft is suing the U.S. Justice Department, asking a federal judge to declare unconstitutional a provision of U.S. law that lets the government keep Microsoft and other tech companies from informing their customers when investigators seek access to emails and other cloud data.

The suit, filed moments ago in U.S. District Court in Seattle, targets Section 2705(b) of the Electronic Communications Privacy Act, which allows the government to seek and obtain secrecy orders preventing companies from letting their customers know when their data is the target of a federal warrant, subpoena or court order.

Microsoft says in its complaint, “This statute violates both the Fourth Amendment, which affords people and businesses the right to know if the government searches or seizes their property, and the First Amendment, which enshrines Microsoft’s rights to talk to its customers and to discuss how the government conducts its investigations—subject only to restraints narrowly tailored to serve compelling government interests.”

The complaint adds, “People do not give up their rights when they move their private information from physical storage to the cloud. Microsoft therefore asks the Court to declare that Section 2705(b) is unconstitutional on its face.”

Brad Smith, Microsoft’s president and chief legal officer, criticized the 30-year-old Electronic Communications Privacy Act as outdated during his testimony in February before the U.S. House Judiciary Committee — bringing along IBM’s first laptop, released the same year, to help illustrate his point.

In a post this morning about the lawsuit, Smith says, “We believe that with rare exceptions consumers and businesses have a right to know when the government accesses their emails or records. Yet it’s becoming routine for the U.S. government to issue orders that require email providers to keep these types of legal demands secret. We believe that this goes too far and we are asking the courts to address the situation.”

Microsoft says in the suit that federal courts have issued nearly 2,600 secrecy orders to the company over the past 18 months, and more than two-thirds of those orders didn’t have a defined ending date.

The suit is the latest battle between the Redmond, Wash.-based tech company and the U.S. government over issues of consumer privacy and cloud services. Microsoft and the government are already fighting an ongoing legal case over the government’s attempt to access a customer’s data stored on a server in Ireland.

It’s also the latest skirmish between the government and the tech industry, after a high-profile battle between Apple and the FBI over access to a terrorist’s iPhone. Microsoft, Amazon, Google and other tech companies sided with Apple in that case.

Box, the enterprise cloud storage company that partners with Microsoft, said in a statement that it will “fully support Microsoft’s effort to require more transparency in government data requests and the government’s full observance of the protections guaranteed by the First and Fourth Amendments to the U.S. Constitution.”

Here’s a copy of Microsoft’s suit, below.