Microsoft is dropping a lawsuit against the US government after the Department of Justice issued new rules limiting the use of secrecy orders that prevent firms from telling customers law enforcement has accessed their data.
The tech giant sued the government in April last year, but declared victory Monday and said it was ending its case after the DOJ announced it would revise its rules.
Brad Smith, Microsoft's chief legal officer, said the company had achieved "an unequivocal win for our customers" that protected the constitutional rights of US citizens.
"Until now, the government routinely sought and obtained orders requiring email providers to not tell our customers when the government takes their personal email or records," he wrote in a blog post.
"Sometimes these orders don't include a fixed end date, effectively prohibiting us forever from telling our customers that the government has obtained their data."
Smith acknowledged that secrecy orders were sometimes required for legitimate reasons -- such as protecting individuals at risk from harm or ensuring an investigation was not thwarted.
But, he added, at the time the lawsuit was filed, "the government appeared to be overusing secrecy orders in a routine fashion - even where the specific facts didn't support them".
"When we filed our case we explained that in an 18-month period, 2,576 of the legal demands we received from the U.S. government included an obligation of secrecy, and 68 percent of these appeared to be indefinite demands for secrecy," he said.
But in a memo issued last week, Deputy Attorney General Rod Rosenstein said any such gag order "should have an appropriate factual basis" and "should extend only as long as necessary to satisfy the government's interest".
While lauding the DOJ's decision, Microsoft repeated its call on US Congress to amend the 1986 Electronic Communications Privacy Act that regulates government access to contemporary electronic communications.
It comes as the US Supreme Court last week announced it would hear a separate privacy case that pits the Trump administration against Microsoft.
The case examines whether US law enforcement should be allowed to access evidence held on servers overseas during an investigation.
It comes after Microsoft refused to hand over emails during a US drug trafficking investigation on the basis the police's warrant did not extend to Ireland, where the messages were stored.