This story was produced by\u00a0ProPublica, a Pulitzer Prize-winning investigative newsroom. Eight years ago, the IRS, tired of seeing the country\u2019s largest corporations fearlessly stash billions in tax havens, decided to take a stand. The agency challenged what it saw as an epic case of tax dodging by one of the largest companies in the world, Microsoft. It was the biggest audit by dollar amount in the history of the agency. Microsoft had shifted at least $39 billion in U.S. profits to Puerto Rico, where the company\u2019s tax consultants, KPMG, had persuaded the territory\u2019s government to give Microsoft a tax rate of nearly 0%. Microsoft had justified this transfer with a ludicrous-sounding deal: It had sold its most valuable possession \u2014 its intellectual property \u2014 to an 85-person factory it owned in a small Puerto Rican city. Over years of work, the IRS uncovered evidence that it believed laid the scheme bare. In one document, a Microsoft senior executive celebrated the company\u2019s \u201cpure tax play.\u201d In another, KPMG plotted how to make the company Microsoft created to own the Puerto Rico factory \u2014 and a portion of Microsoft\u2019s profits \u2014 seem \u201creal.\u201d Meanwhile, the numbers Microsoft had used to craft its deal were laughable, the agency concluded. In one instance, Microsoft had told investors its revenues would grow 10% to 12% but told the IRS the figure was 4%. In another, the IRS found Microsoft had understated revenues by $15 billion. Determined to seize every advantage against a giant foe, the small team at the helm of the audit decided to be aggressive. It used special powers that the agency had shied away from using in the past. It took unprecedented steps like hiring an elite law firm to join the government\u2019s side. To Microsoft and its corporate allies, the nature of the audit posed a dire threat. This was not the IRS they knew. This was an agency suddenly committed to fighting and winning. If the aggression went unchecked, it would only encourage the IRS to try these tactics on other corporations. \u201cMost people, the 99%, they\u2019re afraid of the IRS,\u201d said an attorney who works on large corporate audits. \u201cThe other 1%, they\u2019re not afraid. They make the IRS afraid of them.\u201d Microsoft fought back with every tool it could muster. Business organizations, ranging from the U.S. Chamber of Commerce to tech trade groups, rallied, hiring attorneys to jump into the fray on Microsoft\u2019s side in court and making their case to IRS leadership and lawmakers on Capitol Hill. Soon, members of Congress, both Republicans and Democrats, were decrying the IRS\u2019 tactics and introducing legislation to stop the IRS from ever taking similar steps again. The outcome of the audit remains to be seen \u2014 the Microsoft case grinds on \u2014 but the blowback was effective. Last year, the company\u2019s allies succeeded in changing the law, removing or limiting tools the IRS team had used against the company. The IRS, meanwhile, has become notably less bold. Drained of resources by years of punishing budget cuts, the agency has largely retreated from challenging the largest corporations. The IRS declined to comment for this article. Recent years have been a golden age for corporate tax avoidance, with massive companies awash in profits routinely paying tax rates in the single digits, or even nothing at all. But how corporations manage to do this and keep the IRS at bay is mostly shrouded in secrecy. The audit process is confidential, and the IRS, for all its flaws, simply doesn\u2019t leak. Microsoft\u2019s war with the IRS offers a rare view into how a giant company maneuvers to avoid taxes \u2014 and how it responds when the government tries to crack down. ProPublica has reconstructed the fight from thousands of pages of court documents, information obtained through public records requests and accounts from current and former IRS employees. Microsoft declined to discuss its taxes in any detail. In response to extensive questions provided in writing, the company said it \u201cfollows the law and has always fully paid the taxes it owes.\u201d In 2010, the IRS announced that it was creating a new unit to audit international, intra-company deals. Tech, pharmaceutical and other giants had figured out how to use these dubious deals to avoid taxes on a colossal scale. It was hardly a secret: News articles had detailed how Google, Pfizer and others saved billions. Senate hearings ensued. Despite the publicity, nothing changed. The trend, which had taken off in the 2000s, intensified. The losses to the U.S. Treasury in uncollected taxes ran well into the hundreds of billions of dollars. In 2016 alone, according to an estimate by economists including Gabriel Zucman of the University of California, Berkeley, U.S. corporations avoided $61 billion in taxes by sending profits to tax havens. The concept was simple. A U.S. company sold its most valuable asset \u2014 for a tech company, its intellectual property \u2014 to a subsidiary in a place (Ireland, Singapore, Puerto Rico, etc.) where the tax rate was extremely low. The details of these deals were monstrously complex, making it difficult for the IRS to prove they were done solely to dodge taxes. Essentially, the IRS had to argue that the company had set the wrong price for its intellectual property. And to do that, the agency had to understand the company, its markets and its prospects top to bottom. It was a near-impossible task, and the IRS suffered some key losses in court, which only emboldened companies to stake out even more aggressive positions. In 2011, the IRS picked Samuel Maruca to lead the new unit. A partner at the prominent law firm Covington & Burling, Maruca had spent decades advising corporations on \u201ctransfer pricing,\u201d as this area of tax is called, and facing off against the agency on audits. He came to the job, he said, to help fix a broken system. Maruca is the picture of a tax lawyer (thinning hair, glasses). But unlike many of his colleagues, he expresses himself clearly, sometimes in moral terms. He told peers at industry conferences that the nation\u2019s corporations had grown excessively bold. \u201cWe would all benefit,\u201d he said, \u201cfrom a resurgence of moderation and heightened regard for principle.\u201d To restore balance, the IRS \u201cmust produce some winners,\u201d he said. \u201cI really want to make a difference.\u201d Maruca built a team of about 60 \u2014 agents, attorneys and economists \u2014 with half recruited from outside the agency. For the IRS, this was a notable influx of talent. But it was still modest when compared with the scale of the challenge. Among the key advisers on the new team was Eli Hoory, an attorney who had worked under Maruca at Covington and followed him over to the IRS a few months later. Hoory, then in his mid-30s, had a shaved head and prominent nose that gave him an angular appearance. Known for being extremely bright, he was also frank and outspoken, sometimes to a fault. A graduate of the U.S. Coast Guard Academy, he\u2019d served as a reservist during law school and studied at the London School of Economics before landing at Covington. Maruca and his team set about canvassing the IRS\u2019 inventory to find good targets for producing \u201csome winners,\u201d as he\u2019d put it. Microsoft\u2019s Puerto Rico deal almost slipped by. The week before Maruca started at the IRS in May 2011, the agency, which had already been auditing the transaction for four years, completed its work and sent Microsoft its findings. That 2011 assessment by the IRS isn\u2019t public, but it\u2019s clear Maruca and Hoory were unimpressed. The IRS, they thought, had been credulous, accepting too many of Microsoft\u2019s numbers. They also thought the IRS was set up for failure. The agency had been able to retain only one outside expert, an economist. If the case went to court, Microsoft would surely summon a cast of varied experts to undermine the IRS\u2019 position. It seems likely, given the size of Microsoft\u2019s Puerto Rico transaction, that the IRS in May 2011 had hit the company with a tax bill in the billions. But Maruca and Hoory thought the agency was thinking small. Maruca told Microsoft the IRS needed more time, and in early 2012, the IRS withdrew its findings. By then, Hoory had taken leadership of the audit. He began sending new document requests to Microsoft, asking for more interviews and considering what other experts the IRS needed to round out its case. Over the next three years, he and his team amassed tens of thousands of pages and conducted dozens of interviews with Microsoft personnel. (Hoory, who still works at the IRS, declined to comment.) The evidence they assembled told a story. It revealed how Microsoft had built a massive Rube Goldberg machine that channeled at least $39 billion in profits to Puerto Rico. It revealed a workshop of outside consultants, economists and attorneys who, as they had with other corporate clients, meticulously planned a structure that seemed to have a basis in the law, even if it violated common sense. The documents showed that Microsoft had been caught red-handed, Hoory believed. Despite all their care in preparing for an eventual audit, the deal\u2019s architects had left damning evidence that, he thought, made it possible for the IRS to expose the sham. In 2003, Microsoft had a decision to make. Since 1989, it had operated a manufacturing facility in the small city of Humacao at the eastern end of Puerto Rico. The factory existed because of a tax break, and that break was due to expire after 2005. A 2003 company memo laid out the quandary. Microsoft had about 85 employees in Humacao burning Windows and Office software onto CDs. Doing that in Puerto Rico had saved the company almost $200 million in taxes over the years. Closing the plant and outsourcing Microsoft\u2019s CD production when the tax break expired was the obvious choice. \u201cThe cost to manufacture one CD is from 1.4 to almost three times the cost of outsourcing,\u201d the memo said. There was one alternative to closing the plant, but it would \u201crequire very aggressive tax structuring and work,\u201d according to Microsoft\u2019s head of international tax, Glenn Cogswell, as cited in the 2003 memo. Microsoft could create a new tax advantage by using the factory as a means to stash U.S. profits. The memo dismissed that option as impractical. But the next year, Microsoft changed its mind. KPMG, one of the \u201cBig Four\u201d accounting firms, made a persuasive pitch. Microsoft should engage in that very aggressive tax structuring, after all. KPMG had \u201csignificant experience assisting Fortune 50 companies\u201d faced with the same problem, according to a July 2004 PowerPoint presentation to Microsoft executives. KPMG could do for Microsoft what it had done for those other giant American corporations: send U.S. profits to the island. Puerto Rico \u2014 which has an autonomous tax system even though it\u2019s a U.S. territory \u2014 didn\u2019t have a particularly low tax rate, but KPMG could fix that. Its partner in the San Juan office, the PowerPoint said, had \u201cpreviously advised several U.S. clients on migrations of this type and successfully negotiated significant tax holidays for U.S. companies with the Puerto Rican government.\u201d The next month, a team of Microsoft executives met with KPMG to hash out the details. They made sure not to leave a paper trail. \u201cThis needs to be a verbal briefing with no handouts and no e-mail,\u201d wrote Bill Sample, a senior Microsoft tax executive, in an email scheduling the meeting. \u201cWe will do this on the white board.\u201d Shuttling company profits from country to country was not a new idea for Microsoft. Not long before, it had conjured deals to send its profits in Asia to Singapore and its profits in Europe and Africa to Ireland. The Puerto Rico transaction, which would cover North and South America, would be the biggest and boldest yet. Here\u2019s how it would work. Microsoft\u2019s Puerto Rican subsidiary would produce all the CDs for the American market. Because it was the sole producer, it would buy the exclusive rights to Microsoft\u2019s technology. Those licenses would entitle the Puerto Rican company to a share of Microsoft\u2019s American profits. According to Hoory\u2019s calculations, the factory subsidiary would send the parent company about $31 billion over 10 years \u2014 and receive almost $70 billion in profits in return over the same period. Instead of being taxed in the U.S., where the rate was 35%, the $39 billion difference between those figures would be taxed in Puerto Rico at a rate near 0%. It was a long-term plan that could continue indefinitely. It didn\u2019t matter that the transaction was fundamentally absurd. Microsoft would never actually sell its most valuable asset to another company, let alone to a little tropical factory. Still, there were rules for constructing and valuing deals like this, and Microsoft and KPMG set out to prove they were following them. Minutes from meetings involving KPMG\u2019s experts show them straining to fit the details together. \u201cThis work needs to be very detailed and incredibly great documentation to refute any IRS issues,\u201d read the notes for one meeting in March 2005. One problem was that there was a rush to get the deal done that summer, but Microsoft\u2019s factory wouldn\u2019t be ready to produce 100% of the CDs that soon. As a result, the new Puerto Rican subsidiary would only be a company on paper, while the old Puerto Rican company was still pumping out CDs. In order for the transaction to seem genuine, the new Puerto Rican subsidiary needed to appear to be bona fide. \u201cWhat can we do to make this thing real?\u201d was the question, according to the notes for another KPMG meeting. They had an answer: \u201cGo out and do something substantial, so go out and use insurance. Point to a contract with a third party \u2026 shows that something real is being done.\u201d The spitballing continued when KPMG\u2019s team met with a group of Microsoft employees a few days later. \u201cWhat happens when all info sent online?\u201d was another conundrum, according to meeting notes. If customers downloaded the software instead of getting it on a CD that was produced in Puerto Rico, would the premise of the deal \u2014 that it was based on CD manufacturing \u2014 be undermined? They ultimately decided that wasn\u2019t a problem, \u201cbecause customers seem to want CDs, and we\u2019ll put the servers down in PR and send them CDs too.\u201d KPMG kept its promise to land a rock-bottom rate from the Puerto Rican government. In exchange for Microsoft\u2019s promise to hire an additional 46 full-time employees, Puerto Rico\u2019s secretary of state agreed to grant the company a tax rate that ranged from 0% to 2% for a period of 15 years. A spokesman for KPMG declined to comment. By the next year, Microsoft had shifted all CD production for the Americas to Puerto Rico. In a written self-evaluation, a Microsoft executive celebrated: \u201cThis was a pure tax play and because we took the factory live by July 1 we were able to start claiming the tax benefit as planned.\u201d But Microsoft wouldn\u2019t be telling the IRS the transaction was a pure tax play. The two sides of the transaction were supposed to arrive at a fair, \u201carm\u2019s length\u201d price, one that an unrelated company might pay to another. Of course, Microsoft was dealing with itself, and no company of its size had ever sold anything like what it was selling. So, to arrive at a price, KPMG\u2019s economists generated complicated models. These would provide protection if the IRS questioned Microsoft\u2019s numbers. The price was supposedly impartial, based on a thorough analysis of all the relevant variables. One document in particular exploded this fallacy, Hoory believed. Shortly after the deal went live, a consulting firm delivered a report to Microsoft about the Puerto Rican subsidiary. It valued the company at $30.4 billion. As Hoory later testified, the document was \u201ceffectively saying a company that was worth nothing or a nominal amount on June 30th, 2005, was worth $30 billion one day later.\u201d On Jan. 14, 2014, Hoory stepped in front of a room of Microsoft executives and attorneys from Baker McKenzie, Microsoft\u2019s law firm for the audit. It was his first presentation of his team\u2019s findings. He did not hold back, showing slide after slide that detailed the distortions and errors of the Puerto Rico deal. \u201cDeal of the Century Return on Investment\u201d said one slide. According to the IRS\u2019 analysis, the Puerto Rican subsidiary had been set up to reap a 200% annual return. It meant that Microsoft\u2019s price for the transaction was not remotely plausible. Hoory argued that just about every aspect of the deal should be valued differently. Just what those numbers were is not public, but it\u2019s clear he thought Microsoft had caused the Puerto Rican subsidiary to substantially underpay for the software rights while overestimating how much profit the U.S. operation could legitimately send to Puerto Rico. The presentation put Microsoft on notice. Their big, bold Puerto Rican deal was the target of a big, bold audit. After Hoory finished his presentation, Microsoft\u2019s tax team \u201csaid they had to think a little,\u201d Hoory later testified. It\u2019s routine for IRS agents to share initial findings with corporations under audit. The point is to see whether the two sides might come to an agreement or at least agree on certain aspects and narrow the number of issues under dispute. That was part of Hoory\u2019s mission that day. But a month later, Microsoft told Hoory and Maruca that it did not want to discuss resolution. Instead, the company wanted the IRS to finalize its findings. With that in hand, Microsoft could then move the fight to another part of the IRS: the Office of Appeals. There, Microsoft had good reason to think it would fare much better. The Office of Appeals provides taxpayers big and small with an independent review. If an agent has gotten it wrong, appeals can fix it. The office also aims to stem the flood of tax disputes into the courts. It\u2019s where taxpayers go looking to cut a deal. IRS agents often grouse about working hard on an exam only to see an appeals officer slash the amount of tax owed. To some veterans, the Office of Appeals is known as \u201cthe gift shop.\u201d \u201cNo question, Exam hates Appeals,\u201d said Gerry Ouellette, who served as an appeals officer on large corporate cases until 2012 and now works with a Boston firm that advises taxpayers facing audits. But there\u2019s a logic to the slashing, he said. One reason that tax bills are cut is because the IRS fears it may lose in court. Appeals officers are supposed to judge the \u201clitigation hazard\u201d of a case and put a number on it. For instance, an appeals officer who thinks the IRS is only 30% likely to prevail in court might settle for 30 cents on the dollar. That\u2019s particularly likely to happen on large, complex audits. According to a 2016 report by the IRS\u2019 inspector general, appeals of transfer pricing audits reduced the amount of tax owed by an average of 81%. Appeals officers often feel pressure to be lenient, said Willie Chin, a recently retired Appeals officer who handled corporate cases. \u201cIf I have to give up the penalty to resolve the case, to move the case along, that\u2019s the idea: to move the case along,\u201d he said. Large corporations rarely face penalties at all, a 2019 report by the IRS\u2019 inspector general found, and when they do, they can count on an appeal to reduce or eliminate the penalties 94% of the time. The story is different for taxpayers who aren\u2019t represented by a battalion of attorneys and CPAs, Chin said: \u201cIn my opinion, we hammer the little guys and we let the big guys go.\u201d Maruca and Hoory knew all this. It was no mystery why Microsoft was so eager to appeal. But they also knew they could prevent it. The IRS has the power to \u201cdesignate a case for litigation\u201d \u2014 in other words, force a taxpayer to skip Appeals and go straight to court. It is a move sure to anger a powerful adversary. Not only does an appeal offer the corporation a good opportunity to see the audit overturned, but it does so with the promise that it will keep the details quiet. The U.S. Tax Court, by contrast, is a public forum. In March 2014, Hoory told Microsoft that the IRS was considering designating the case for litigation. The case was just too big and unique to send to Appeals. \u201cIt is such a huge divergence in numbers,\u201d he later testified, \u201cand we have put a lot of energy into it.\u201d Hoory\u2019s move was aggressive, but not unprecedented. From 2010 through April 2019, the IRS designated 13 cases for litigation, according to agency documents ProPublica obtained through a public records request. The IRS refused to divulge a list of those cases, but the known instances include other large corporations facing transfer-pricing audits: Amazon, Coca-Cola and Facebook. Maruca and Hoory had other, more radical ideas on how to tackle such a massive case.They wanted to hire a high-powered outside attorney to help the IRS. In the past, they believed, the IRS had failed in court on big, complex cases for two main reasons. The first was that the agency hadn\u2019t done enough work uncovering evidence. It was an error they were well on their way to fixing, they thought. The other stumbling block was the agency\u2019s inability to make a persuasive argument and tell a compelling story to a judge. Maruca and Hoory wanted a legal star, someone with the experience of winning an enormously complex case against a gigantic foe. But such attorneys are typically found in elite law firms, where large corporate clients might balk at the firm representing the IRS. Maruca and Hoory concentrated on finding top attorneys who didn\u2019t usually handle tax matters. Their first choice was David Boies. He had beaten Microsoft before, when he represented the Justice Department in its landmark 1998 antitrust lawsuit against the company. But Boies had another case that created a conflict of interest and couldn\u2019t take the assignment. The IRS\u2019 next choice was Quinn Emanuel, which describes itself as a \u201cglobal litigation colossus without equal.\u201d That fit the bill. In May 2014, the two sides signed a $2.2 million contract. It provided for two of the firm\u2019s top partners, John Quinn and John Gordon, each of whom bill more than $1,000 an hour, to spend hundreds of hours on the case along with a small team of other Quinn Emanuel lawyers. The IRS did this quietly. It wasn\u2019t until late August 2014, on the third page of a letter to Microsoft about scheduling further employee interviews, that Hoory let word slip. The IRS \u201cwill have one or more contractors attend,\u201d he wrote. This \u201cmay include outside counsel from Quinn Emanuel.\u201d It didn\u2019t go unnoticed. For the next week, Hoory and Mike Bernard, then Microsoft\u2019s U.S. tax counsel, fired letters back and forth. Microsoft requested a copy of the IRS \u201cengagement letter\u201d with Quinn Emanuel. Hoory, apparently determined not to be too helpful, responded that there was none. When Bernard expressed disbelief and asked more generally for any contract, Hoory sent over a copy of the main section of the contract. Microsoft was \u201cdeeply concerned\u201d about the role of Quinn Emanuel, Bernard wrote, because the firm represented Microsoft competitors like Google and Motorola. He asked Hoory for more details. \u201cWe have conflict, confidentiality and ethical concerns,\u201d he wrote. Hoory responded but also urged Microsoft to make it clear whether it would allow the Quinn Emanuel attorneys to participate in the interviews. When Bernard again asked for more detail, Hoory wrote that he\u2019d been accommodating, but \u201cwe are at a decision point now.\u201d Would Microsoft prevent the Quinn Emanuel attorneys from questioning witnesses? \u201cIf you do not agree or do not respond, the Service will consider alternatives,\u201d Hoory wrote. A few weeks later, Hoory arrived at Microsoft\u2019s Redmond, Washington, headquarters with a team of a few other IRS employees, a couple hired experts and Gordon of Quinn Emanuel. On Microsoft\u2019s side, two senior tax executives and a group of Baker McKenzie attorneys attended the interviews. Microsoft\u2019s outside attorneys kept a close watch on Gordon, the IRS\u2019 outside attorney. Whenever Gordon repeatedly pressed a Microsoft employee for an answer, Daniel Rosen of Baker McKenzie jumped in. \u201cThis is being done under the proviso that you guys control this,\u201d Rosen told Hoory, according to a transcript of one interview. \u201cIf you don\u2019t control Mr. Gordon, then this is over.\u201d A few days later, when Gordon pushed another Microsoft employee to clarify an answer, the scene repeated. \u201cWe\u2019re done with this line of questioning,\u201d Rosen said. \u201cAnd Mr. Gordon\u2019s not directing this witness to answer any questions,\u201d he said, \u201cMr. Hoory can, but this gentleman cannot.\u201d By this time, the investigation had grown intense. Hoory and his team were racing to put their case together while pushing Microsoft to provide more documents. They were up against an approaching deadline. At the end of the year, the statute of limitations would expire. The law gives the IRS three years to complete an audit, and Microsoft had agreed several times to give the IRS more time, as large corporations often do. Microsoft had done this because it was hoping to resolve the audit without a messy court battle. Now that hope was gone, and there would be no more extensions. As the clock ticked down, Hoory considered his options. Microsoft had both buried the IRS in paper \u2014 sending over 1 million pages, much of which Hoory later said wasn\u2019t relevant \u2014 and, in his view, failed to send everything the IRS had asked for. If he hurriedly wrapped up the case, he ran the risk of missing crucial pieces of evidence. The stakes, he decided, were too high. So, yet again, he decided to take a remarkable step. In audits of large corporations, the law grants the IRS a special power. It can issue a \u201cdesignated summons\u201d for documents and interviews that, with the approval of a federal judge, temporarily stops the clock. After the summons is resolved, the clock starts again. It\u2019s a muscle move that wrenches away any control the corporation has over the audit. Before Maruca and Hoory arrived in 2011, the IRS had not used this tool since 1996. Partly, that was because it clashed with an IRS culture that valued amicable relations with the country\u2019s largest taxpayers. There was also the potential cost to antagonizing powerful opponents. But for Hoory, these were secondary concerns. In October 2014, the IRS issued a designated summons to Microsoft, demanding 48 categories of documents. The IRS also summoned for interviews a roster of Microsoft employees, including Steve Ballmer, who\u2019d recently left as CEO. KPMG, too, got a summons. The IRS then filed suit in a federal court in Seattle to enforce its demands. Microsoft set out to quash the summonses. Its attorneys argued that federal rules exclusively permit IRS employees to question witnesses. The IRS had broken the law by allowing the Quinn Emanuel attorneys to question witnesses, according to Microsoft, and by essentially putting them in charge of the audit. It was fundamentally wrong for the IRS to use high-powered litigators, one Microsoft attorney argued in a hearing, because \u201cthey know how to win, and that\u2019s very different\u201d than the IRS\u2019 mission. The IRS was supposed to work with taxpayers to \u201cfind the right number,\u201d she said, not focus on winning. The marks of Quinn Emanuel\u2019s obsession with winning were all over the IRS\u2019 actions, Microsoft\u2019s attorneys contended. It was the hired sharks who\u2019d prompted the agency to deluge Microsoft with more document and interview requests. It was their idea to force those interviews to be under oath, as opposed to the more common IRS practice of conducting \u201cinformal\u201d interviews. And it was their idea to knock on Ballmer\u2019s door with a summons. \u201cIt\u2019s not unusual, in high-stakes litigation,\u201d said one of Microsoft\u2019s attorneys, for law firms \u201cto try to put pressure on their opponent by doing things like asking to depose the CEO.\u201d The dispute over the summons became an opportunity for Microsoft to put Hoory \u2014 and the sort of IRS that he represented \u2014 on trial. Hoory took the stand to defend the IRS\u2019 actions. At the hearing in August 2015, Philip Beck handled the questioning for Microsoft. A top litigator, he\u2019d once been a hired gun for the government himself, having replaced Boies as counsel in the antitrust case against Microsoft. Now he was on Microsoft\u2019s side, arguing against the government\u2019s use of outside counsel. Beck found Hoory to be a frustrating quarry. He would not be pinned down and had a detailed explanation for everything. After an hour of this, Beck complained, \u201cYour Honor, we are never going to get done today if I get 10-minute answers for yes or no questions.\u201d The judge urged Hoory to be briefer. \u201cI will do my best, Your Honor,\u201d Hoory replied. Beck\u2019s frustrations continued as Hoory clouded the simplicity of Microsoft\u2019s case. But in one area, Hoory allowed a simple answer. Beck asked: Wasn\u2019t this \u201cthe first time in the history of the universe\u201d that the IRS had hired an outside law firm to help conduct an audit? Hoory said that was correct, adding, \u201cI guess I am a trailblazer.\u201d Microsoft\u2019s complaints grew louder when Hoory and a Justice Department attorney presented the IRS\u2019 side. In addition to laying out the Puerto Rico transaction, Hoory divulged details that made an obvious tax dodge look even worse. Microsoft\u2019s lawyers called that \u201cmudslinging\u201d meant to \u201cpunish\u201d the company \u201cfor daring to oppose the IRS.\u201d Hoory testified that Microsoft had used a growth rate of 4% for tax purposes while publicly reporting to investors expected growth of 10% to 12%. One error in their calculations, he said, had \u201cunderstated revenues by approximately $15 billion.\u201d After almost four hours of testimony, Hoory stepped down. \u201cIt has been a long day,\u201d U.S. District Court Judge Ricardo Martinez said. \u201cMr. Hoory talks a mile a minute, and it was hard to follow up on all of that.\u201d He added, turning to Hoory, \u201cWorking for the IRS is a good job for you.\u201d Microsoft, meanwhile, was fighting on other fronts, too. Its attorneys pursued Freedom of Information Act requests to dig up as much as they could about the Quinn Emanuel hiring, eventually filing several lawsuits to force the IRS to turn over documents. The company also turned to its friends in Congress for help. In May 2015, Sen. Orrin Hatch, R-Utah, then the chair of the committee that oversees the IRS, and who counted Microsoft as one of his top campaign contributors, fired off a letter to the IRS commissioner about \u201coutsourcing\u201d the agency\u2019s audit of \u201ca corporate taxpayer.\u201d That \u201cappears to violate federal law and the express will of the Congress,\u201d he wrote, and the $2.2 million contract \u201ccalls into question the IRS\u2019 use of its limited resources.\u201d By that time, Republicans in Congress had cut the IRS\u2019 budget by $1.5 billion from its 2010 peak. (A spokesperson for Hatch declined to comment.) Hatch asked the IRS \u201cto immediately halt\u201d Quinn Emanuel\u2019s work on the case. Microsoft filed a copy of the letter in court a few days later. But Martinez ruled in favor of the IRS and its use of the special summons to suspend the statute of limitations and demand additional documents. He wrote that he was \u201ctroubled\u201d by the IRS\u2019 use of outside counsel since it was unprecedented and that the hiring might \u201clead to further scrutiny by Congress.\u201d But, he wrote, \u201cMicrosoft has no factual basis for the grand assertion that Quinn Emanuel was or will be engaging in taxation or conducting the audit.\u201d Rather, the firm\u2019s role was \u201climited\u201d and \u201cunder the direct supervision of the IRS.\u201d The IRS had clear legal authority to hire Quinn Emanuel and for its attorneys to question witnesses, the judge ruled. Microsoft would have to comply with the summons. It was a setback for Microsoft. But as the court case ground on, the company and its allies went to work on Capitol Hill to make sure something like this never happened again. In the autumn of 2015, a new trade group emerged. It was called the Coalition for Effective and Efficient Tax Administration, or CEETA. Among the members were Microsoft, the U.S. Chamber of Commerce and a host of other business and tech groups. The new coalition hired lobbyists at PwC, another Big Four firm and one with a stable of well-connected former government officials and congressional staff. The new group\u2019s clout soon became clear. In October 2015, just a few days after CEETA members fired off a letter to the IRS decrying the use of outside counsel on audits, Pam Olson, one of CEETA\u2019s PwC lobbyists, sat down for a two-hour meeting with Doug O\u2019Donnell, the head of the IRS division that audits large corporations. \u201cWhen it comes to the tax law, I don\u2019t like the word \u2018enforcement,\u2019\u201d Olson, who oversaw tax policy as a Treasury Department official in the early 2000s, said in a speech to corporate tax executives that December. \u201cLet\u2019s remember that the agency is the Internal Revenue Service,\u201d she said. Olson forwarded a copy of her speech to O\u2019Donnell, who responded, according to emails obtained by ProPublica, \u201cThanks for sharing \u2014 I appreciate your perspective.\u201d He said he would pass it on to other senior IRS officials. CEETA\u2019s lobbyists stalked the halls of Congress, urging reforms in response to the IRS\u2019 newfound aggression. They found a ready audience. In late 2015, a senior aide to Hatch participated in an online seminar for tax professionals along with a senior Microsoft executive. According to a description, participants discussed \u201cthe actions of an increasingly aggressive IRS\u201d and the need for reform. (The aide, Christopher Armstrong, has since left Congress and now works as a lobbyist. He did not respond to requests for comment.) \u201cFocusing on litigation destroys cooperative relationships between taxpayers and the IRS,\u201d read a document distributed by CEETA\u2019s lobbyists to lawmakers around that time and obtained by ProPublica. The proposals targeted the three bold steps Hoory had taken in the Microsoft audit: CEETA wanted lawmakers to curtail the IRS\u2019 ability to block taxpayers\u2019 access to the Office of Appeals, rein in the use of designated summons and prohibit outside lawyers from questioning witnesses. The IRS had used these tools to audit one of the world\u2019s largest companies and in few other cases. From 2010 through 2019, it blocked appeals in 13 cases (not counting Microsoft\u2019s), used a designated summons in one case other than Microsoft\u2019s and hired an outside attorney on an audit once. By comparison, from 2010 through 2018, the IRS completed about 18,000 audits of corporations with assets above $1 billion. But CEETA members warned that the tactics posed a threat to small businesses. The leader of one tech group testified before the House Committee on Small Business about the IRS\u2019 use of \u201cintimidation tactics.\u201d And the Small Business and Entrepreneurship Council sent a letter to Sen. Rob Portman, R-Ohio, warning that small business owners \u201ccertainly do not have the resources to go up against a powerful $1,000-an-hour legal team in a tax dispute.\u201d A spokesman for CEETA, Brian Cove of Financial Executives International, said in a statement, \u201cCEETA believed that IRS audit process changes often spread from one part of the IRS to another and could have an impact on small businesses.\u201d Portman introduced a bill that followed all three of CEETA\u2019s recommendations. The next year, a bipartisan group of House lawmakers introduced a bill that largely mirrored Portman\u2019s. CEETA cheered both times. (The lawmakers declined to comment.) Microsoft, Coca-Cola and Facebook, all companies that had had their path to appeals blocked, lobbied to support one or both bills, along with a collection of tech and business groups. The ideas were ultimately included in a large, bipartisan bill called the \u201cTaxpayer First Act\u201d with a wide range of IRS reforms. The bill contained provisions similar to what CEETA had sought, though milder. The IRS would have a new process to follow in order to block appeals or designate summonses and would have to report to Congress when it did so. And the agency would now be barred from using an outside attorney to question a witness under oath. The bill passed overwhelmingly and was signed into law in July. CEETA\u2019s success sent a clear message to the IRS, one the agency appears to have heeded. In 2016, for example, when the IRS was locked in a battle with Facebook, the agency considered using a designated summons since the statute expiration was approaching. But the IRS did not use it, even though, according to an agency court filing, \u201cthe examination team had not completed its fact gathering efforts when the clock ran out.\u201d The era of daring, new initiatives has passed at the IRS. Instead, the agency appears to have largely avoided picking fights with large corporations and embraced the sort of cooperation urged by Microsoft and CEETA. In part, this is because the IRS is simply too weak. The agency has lost more than a third of its enforcement staff since 2010, and the result has been fewer audits. For corporations with assets over $20 billion, the audit rate has declined from about 100% in 2010 to under 50% in 2018. The makeup of those remaining audits tells a story, too. The number of contentious audits, where corporations disagreed with the agency\u2019s findings, have plummeted from 185 to 25, a drop of 86%. But audits that ended in agreement have stayed relatively steady over the years. Not surprisingly, audits ending in agreement tend to result in relatively small adjustments. Microsoft, meanwhile, has continued to reap the benefits of its offshore deals. In 2017, the last year before the new tax law cut the corporate rate from 35% to 21%, Microsoft paid $2.4 billion in taxes on $29.9 billion in income, a rate of 8%. By that point, Microsoft had stored $142 billion in profits offshore, according to its public filings. Only two other U.S. companies had accrued more, according to the Institute on Taxation and Economic Policy: Apple, with $246 billion, and Pfizer, with $199 billion. Bringing those foreign profits into the U.S., Microsoft disclosed in 2017, would have resulted in a $45 billion tax bill. Of course, the company didn\u2019t do that. Instead, like other companies that stashed profits offshore, it waited for a better deal. There was good reason to wait: Back in 2004, for example, Congress had passed a tax holiday that allowed multinationals to bring home foreign profits at a tax rate of 5.25%. At the end of 2017, the Trump administration and Republican Congress came through. The Tax Cuts and Jobs Act required U.S. companies to bring home those foreign profits, but at a one-time rate ranging from 8% to 15.5%. So, instead of a $45 billion tax bill, Microsoft says it will pay $18 billion under this provision, a savings of $27 billion. Time marches on. But the IRS and Microsoft are still in court, the clock still stopped. The two sides most recently brawled in 2016. As before, the fight involved Hoory and the IRS taking a relatively aggressive position, and Microsoft and its allies reacting with dismay. The dispute began when Microsoft refused to turn over some documents, most of them involving KPMG, in response to the summons. Microsoft argued the documents were protected by a privilege for tax advice. The government countered with an inflammatory claim: The Puerto Rico deal was, as Hoory put it in a filing, \u201cillusory in nature, serving no material economic purpose except to shift income to Puerto Rico\u201d and was thus a tax shelter. A tax shelter is something done mainly to avoid taxes, whether legally or illegally, and the law provides far less protection for advice on such a scheme. In response, Microsoft argued that its Puerto Rican company \u201cwas a real business with real risks and was not a tax shelter.\u201d Its allies jumped in to help, too. The Chamber of Commerce filed an amicus brief, arguing that \u201cthe extreme positions articulated by the government \u2026 would chill businesses from obtaining and relying on the uninhibited advice of their tax advisors.\u201d Other business groups made similar arguments. In May 2017, Martinez ruled that he would view the disputed documents privately and then decide whether they ought to be turned over. Nearly three years later, he has yet to issue a ruling. (The judge was still reviewing the question as of early January, according to a person in his chambers.) And so, 12 years after the IRS began its audit of the Puerto Rico deal, eight years after Hoory began his work on it, and five years after the IRS sued to enforce its summons, the audit continues. One day, the judge will issue his ruling. Soon after, perhaps, the summons will be fully resolved, and the clock will start again. A few months later, the IRS will, at long last, officially tell Microsoft what it owes. In all likelihood, Microsoft will then file a petition in U.S. Tax Court, thus beginning a new court battle. From there, the fight could shift to a U.S. appeals court. A further appeal to the U.S. Supreme Court is certainly possible. And then, eventually, perhaps someday in the mid-2020s, the audit of Microsoft\u2019s 2005 Puerto Rico deal will be done.