Sure, Microsoft's lawsuit aims to protect civil liberties, but the company says it also wants to ensure it can continue to sell products that its customers can trust. The company argues that the government has placed it under an unlimited gag order, forcing it to refrain from informing customers when the authorities request emails and other information. And that the gag order violates the free speech protections of the First Amendment.

Microsoft says it understands there are times when secrecy is needed so that a suspect doesn't destroy evidence or further jeopardize an investigation. However, some of the requests prohibit from ever telling a customer the government accessed their data.

"Based on the many secrecy orders we have received, we question whether these orders are grounded in specific facts that truly demand secrecy," explained president and chief legal officer Brad Smith. "To the contrary, it appears that the issuance of secrecy orders has become too routine."

The company is no stranger to battles with the US government over customer privacy and security. In 2014, for example, Microsoft resisted a demand to seize offshore email accounts stored at a data center in Ireland. Redmond is not alone in the fight for more transparency when it comes to government requests, either. Both Google and Twitter want to be able to disclose more information on the number of national security letters it receives. Twitter filed a lawsuit in 2014, asking a court to declare the government's restrictions on what it's able to disclose in transparency reports a violation of the First Amendment.