SEATTLE — Microsoft’s quiet pursuit to buy TikTok suddenly appeared dead a month ago, when President Trump said he wanted to ban the popular social media app for national security reasons. So Brad Smith, the tech giant’s president, went to work.
He called two dozen lawmakers, telling them that TikTok would be safe in Microsoft’s hands. Within 48 hours, he had what he needed.
Mr. Trump saw a tweet by Senator Lindsey Graham, a close ally of the president and one of the people Mr. Smith talked to, calling a Microsoft deal “win-win.” Soon, Satya Nadella, Microsoft’s chief executive, was on the phone with Mr. Trump, and got his blessing to proceed with acquisition talks.
It was another win for Microsoft’s quietly effective Washington influence operation.
The software giant was once a cautionary tale of an arrogant tech company caught off-guard by government scrutiny. But under the leadership of Mr. Nadella and Mr. Smith, it has built one of the most potent forces in the nation’s capital, one that could give it an advantage over the several potential bidders for TikTok if the company continues to pursue a deal.
It secured a coveted Pentagon contract widely expected to be awarded to Amazon. It has largely avoided antitrust scrutiny by Congress and federal regulators even though it is valued at more than $1.7 trillion, more than Google and Facebook, which are under investigation. And while it has disagreed publicly with the Trump administration on several issues, like immigration, it is one of the few big tech companies Mr. Trump and other politicians do not regularly denigrate.
The company does so despite spending less on lobbying than many of its peers. Last year, Microsoft spent $10.3 million on federal lobbying, several million less than Amazon, Facebook or Google, according to the Center for Responsive Politics. It currently has 100 in-house and outside federal lobbyists registered to work on its behalf.
People who have worked with Microsoft and those on the receiving end of its lobbying say it is particularly adept at employing a focused, long-game approach, building relationships with lawmakers and other Washington insiders over noncontroversial issues, like when Melania Trump visited Microsoft’s headquarters to discuss her Be Best campaign against online bullying. Its relationship with Mr. Graham extends back many years, with Microsoft supporting his push to ban forced arbitration in sexual harassment claims, and Mr. Graham backing a law granting law enforcement access to data that Microsoft had championed.
It also relies on a staff of policy experts rather than well-known public figures, contrasting with the approach taken by some of its peers. Amazon’s top policy executive is Jay Carney, a former White House press secretary, and Susan Molinari, a Republican former congresswoman from New York, ran Google’s federal lobbying for years.
“They learned their lesson,” said Jeff Hauser, the director of the Revolving Door Project, a progressive group that tracks tech’s influence. “I think they now see themselves as best served by having a permanent, discreet presence in the halls of power.”
Bill Gates, Microsoft’s co-founder, proudly eschewed Washington even as his company grew into a giant and he became the world’s richest man. The company didn’t hire an in-house lobbyist until 1995, 20 years after its founding, when it faced an antitrust inquiry from the Justice Department. The lobbyist, Jack Krumholtz, was a one-man shop, often making calls on his car phone between meetings, giving him the name “Jack in the Jeep.”
The lobbying effort grew quickly, but it did not hold the pressures at bay. Microsoft was sued by the government and pummeled in public. In 2002, a federal judge approved a five-year consent decree with the Justice Department that was extended twice.
By 2009, with its antitrust fights behind it and President Barack Obama taking office, Microsoft revamped its approach. It enlisted Fred Humphries, who had worked for Richard Gephardt, the former House majority leader, to run its Washington operations.
He pushed to open a big policy office on K Street, more than doubling the space for the same number of employees. One night it might host a fund-raiser for Senator Ted Cruz; on another, a panel for a tech industry association.
But Microsoft’s polite veneer was at times overshadowed by fights it picked with competitors, as with its aggressive campaign against Google led by the Democratic pollster Mark Penn. It dumped opposition research with journalists and lawmakers and ran alarmist ads on TV saying consumers were “Scroogled” by the search company.
Publicly, Microsoft looked petty. It also got few results. In 2013, regulators decided not to bring antitrust charges against Google after a high-profile investigation.
In 2014, Mr. Nadella took over the reins as Microsoft’s chief executive. The son of an idealist civil servant in India’s first generation after colonial rule, Mr. Nadella did not see government as something to be gamed and insisted on a more “principled” approach, Mr. Smith said.
Soon, the company’s Washington office got word that it was time to make nice. Scroogled was done. Mr. Penn left the company a year later.
Instead, the company methodically identified policies to pursue and then slowly ground through the interconnected power of lobbyists, regulators and lawmakers to make them happen. In 2015, Mr. Smith, then the general counsel, was also named Microsoft’s president, bolstering his role as the company’s chief statesman.
In 2017, Microsoft chose to push expanding broadband access in rural areas as a signature issue. The feel-good policy has business implications, since better connectivity means more cloud computing. It came with another key benefit: It had bipartisan appeal.
“One of the great things about the broadband issue is we do get to work with everybody,” Mr. Smith said.
Microsoft proposed using wireless frequencies that exist in the “white space” on unused broadcast channels. Television stations balked, saying the change would force broadcasters off the air.
Microsoft was undaunted. While initially adversarial, in early 2018 its lobbyists met with TV stations’ representatives at the National Association of Broadcasters’ Dupont Circle headquarters, hoping to find some common ground. Mr. Smith took the company’s argument to regulators. In December 2018, he visited multiple members of the Federal Communications Commission.
Many executives arrive for their meetings at the agency at the last possible minute, hoping to avoid attention. Mr. Smith instead showed up early and spent time in a waiting area schmoozing agency staff, according to two people who remembered the visit. They spoke on the condition of anonymity because they were not authorized to speak publicly about the visit.
Microsoft and the broadcasters reached an accord on several key points in 2019, and the F.C.C. has sought comment on some of Microsoft’s proposals, making it possible they could turn them into reality in the coming months.
“Over all, in the end, I think we got to a productive process,” said Patrick McFadden, deputy general counsel at the National Association of Broadcasters.
Despite its more subdued approach, the company still sometimes attacks competitors. Early in the race for a $10 billion Pentagon cloud computing contract, Microsoft joined a coalition including Oracle to oppose a technological approach widely seen as favoring Amazon. Microsoft later dropped out of the Oracle alliance, but the influence campaign helped slow the contracting process, a delay that gave Microsoft more time to improve its technology. Microsoft eventually won the contract, though the work is paused as part of Amazon’s lawsuit challenging the award.
“I’m not here to say that we’re candidates for some kind of sainthood,” Mr. Smith said. “We will stand up and take on battles.”
In July, Mr. Smith met with members of the House antitrust committee ahead of testimony from the chief executives of Amazon, Google, Facebook and Apple. Mr. Smith said he had spent most of his time telling them about Microsoft’s own experience facing antitrust scrutiny two decades earlier. But he concedes he spent “probably 10 percent of my time” with the committee saying the problems Microsoft had in the ’90s most closely resemble the way app stores today control how developers can reach customers, putting Apple in particular in its cross hairs.
In mid-August, Mr. Smith got tested for Covid-19 before flying by private jet to Washington for meetings at the White House and on Capitol Hill, trying to explain how Microsoft could address the security concerns related to TikTok’s data collection.
If the company’s bid is successful, Microsoft will face issues, like misinformation, that it has long avoided thanks to its focus on enterprise rather than consumer products.
“I think it will require the right kind of ambition,” Mr. Smith said. “But also an appreciation that if these problems were easy to solve, others already would have done so.”
Karen Weise reported from Seattle, and David McCabe from Washington.