A major tech company and the US government are at odds once again. Microsoft has filed a lawsuit against the Justice Department, claiming that it's "unconstitutional" to force the company to remain silent and not inform customers when their cloud data has been searched or inspected by authorities. "Microsoft brings this case because its customers have a right to know when the government obtains a warrant to read their emails, and because Microsoft has a right to tell them," the complaint, filed today in a Washington District Court.

"As Microsoft’s customers increasingly store their most private and sensitive information in the cloud, the government increasingly seeks (and obtains) secrecy orders." In 2013, the company came out hard against the government following the Snowden disclosures of mass surveillance, though Microsoft itself got into hot water over email snooping two years ago.

In today's complaint, Microsoft says that Section 2705(b) of the Electronic Communications Privacy Act "sweeps too broadly" and simply gives the government too much power in gagging companies as it pursues investigations and alleged criminal activity. And indeed, the numbers seem rather startling. "Over the past 18 months, federal courts have issued nearly 2,600 secrecy orders, silencing Microsoft from speaking about warrants and other legal process seeking Microsoft customers’ data.

"Customers have a right to know when the government obtains a warrant to read their emails, and Microsoft has a right to tell them."

Perhaps even more concerning is that over two-thirds of those orders "contained no fixed end date," at worst making them permanent, and at best giving Microsoft no clear idea of when it can be transparent with affected customers. In all, between September 2014 and last month Microsoft received 5,624 demands for customer "information or data" from the federal government. Here's straight from the filing:

The vast majority of these secrecy orders related to consumer accounts and prevent Microsoft from telling affected individuals about the government’s intrusion into their personal affairs; others prevent Microsoft from telling business customers that the government has searched and seized the emails of individual employees of the customer.

The company admits that there may be "exceptional circumstances" where barring cloud providers from notifying users about searches is justified — but Microsoft insists it needs to be temporary. More from Microsoft's filing:

Under the statute, the assessment of adverse consequences need not be based on the specific facts of the investigation, and the assessment is made only at the time the government applies for the secrecy order, with no obligation on the government to later justify continued restraints on speech even if circumstances change because, for instance, the investigation is closed or the subject learns of it by other means.

Microsoft wants the court to "declare that Section 2705(b) is unconstitutional on its face," a ruling that could dramatically shift power between the technology companies that hold our personal data and authorities that demand access to it. This latest public battle follows a high-profile face off between the FBI and Apple over where to draw the line on government requests to get inside encrypted iPhones.

Microsoft court filing