The tech giant sued the government in April last year, but declared victory yesterday 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.
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.
More From This Section
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 per cent of these appeared to be indefinite demands for secrecy," he said.
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.