Brad Smith is the president of Microsoft.

The past seven days marked another bad week for the collision between technology and democracy. We live in an era when private emails and text messages typically are backed up and stored in the cloud by tech companies. When it comes to cybersecurity, the cloud bolsters protection. But now we’ve learned that the Trump Justice Department exploited this feature as part of a secret effort to obtain emails in investigations of the media and Congress, two institutions where transparency is essential.

The government cannot justify secrecy in such probes. The abuse of secrecy orders is neither new nor confined to a single administration, and certainly not limited to investigations involving members of Congress or the news media. Democracy rests on a fundamental principle of government transparency. Secrecy should be the rare exception — not the rule.

Not long ago, if the government wanted to serve a search warrant as part of a criminal investigation, it had to do so in person, with notice. An agent or officer needed to bring a signed warrant to a house or building and hand it to the target of the probe at the front door; only then could the government search the premises for documents, records and computer files. This was true for individuals, businesses and governments alike. If secrecy required getting a “sneak and peek” warrant because evidence would be destroyed in advance or a witness’s safety would be jeopardized, this required a heightened showing, beyond mere probable cause.

Those principles still hold true today. Yet with the expansion of cloud computing in every industry, the federal and state governments know they quickly can obtain data electronically from sources other than the target. So that’s what they do. In secret. By serving search warrants on companies such as Apple, Google and Microsoft to obtain emails and messages that belong to our customers. Government prosecutors also ask courts to impose gag orders on companies such as ours that prevent us from letting people know that copies of their emails are now in the government’s hands.

House Speaker Nancy Pelosi (D-Calif.) and other lawmakers responded June 13 to revelations about acts by former president Donald Trump's Justice Department. (Joshua Carroll/The Washington Post)

While there are times when secrecy is needed, prosecutors too often are exploiting technology to abuse our fundamental freedoms. Just consider the targets of the latest investigations: reporters at CNN, the New York Times and The Post. Members of the House Intelligence Committee; their aides and family members. These are not investigations of terrorism or international narcotics that threaten the nation’s safety.

The eyes of the world are watching what the Biden administration does next. As President Biden works to rebuild trust across the Atlantic, European leaders worry that a U.S. government that secretly goes to court to demand data from tech companies about its own reputable citizens will do the same thing to them as well. The hacking of German Chancellor Angela Merkel’s phone came to light in 2013, but the diplomatic wounds remain fresh. European governments increasingly are trying to keep their data out of data centers run by U.S. companies. Not necessarily because they distrust the companies, but because they distrust our government and secret court orders that can reach their data.

What needs to be done?

To start, Attorney General Merrick Garland needs to do what his predecessors have not: recognize this issue is critical and treat it as a personal priority.

We need changes in Justice Department policies to tighten the use of gag orders and probes of Congress and the news media. And, even more important, we need a bipartisan initiative to codify those changes by Congress.

Congress should prohibit the executive branch from conducting its investigations wholly in secret absent a strong showing of necessity supported by compelling evidence. And even when the government does meet that burden, any secrecy order should be narrowly tailored in time and scope. Third parties responding to such orders should have a mechanism to challenge them. And indefinite gag orders should be unlawful.

We also need a new generation of international agreements that define when and how governments will seek data stored within other countries’ borders, starting with our European allies. The United States cannot build a stronger alliance of the world’s democracies without clear international rules to protect the privacy of each other’s data.

Ultimately, the nation needs a holistic agenda that will put the Constitution back where it belongs — above the latest technology features and the expediencies of individual investigators. And this will require leadership from the top.

Read more: