Saying its customers "have a right to know when the government obtains a warrant to read their emails" — and that Microsoft has a right to tell them about gag orders — the tech giant has filed a lawsuit against the U.S. Justice Department.

Microsoft is asking a judge to declare part of a federal law, specifically 18 U.S.C. § 2705(b), unconstitutional under both the First and Fourth Amendments.

As NPR's Aarti Shahani reports for our Newscast unit:

"According to the complaint filed in district court in Seattle, the company received about 5,600 demands for customer data from September 2014 up through last month. And nearly half of those came with gag orders — forbidding Microsoft to tell said customers that the government was looking at their emails or calendars or other files stored in the Microsoft cloud. And of those orders, the vast majority had no time limit."

In its complaint, Microsoft says the Electronic Communications Privacy Act, which dates to 1986, lets courts order companies not to inform customers whose email or other private information is being sought by the government. The company says the law lacks both a time limit for the secrecy orders and a useful threshold, as it requires that authorities have "a 'reason to believe' that disclosure might hinder an investigation."

Copyright 2016 NPR. To see more, visit