WASHINGTON — President Vladimir V. Putin of Russia directed a vast cyberattack aimed at denying Hillary Clinton the presidency and installing Donald J. Trump in the Oval Office, the nation’s top intelligence agencies said in an extraordinary report they delivered on Friday to Mr. Trump.

The officials presented their unanimous conclusions to Mr. Trump in a two-hour briefing at Trump Tower in New York that brought the leaders of America’s intelligence agencies face to face with their most vocal skeptic, the president-elect, who has repeatedly cast doubt on Russia’s role. The meeting came just two weeks before Mr. Trump’s inauguration and was underway even as the electoral votes from his victory were being formally counted in a joint session of Congress.

Soon after leaving the meeting, intelligence officials released the declassified, damning report that described the sophisticated cybercampaign as part of a continuing Russian effort to weaken the United States government and its democratic institutions. The report — a virtually unheard-of, real-time revelation by the American intelligence agencies that undermined the legitimacy of the president who is about to direct them — made the case that Mr. Trump was the favored candidate of Mr. Putin.

The Russian leader, the report said, sought to denigrate Mrs. Clinton, and the report detailed what the officials had revealed to President Obama a day earlier: Mr. Trump’s victory followed a complicated, multipart cyberinformation attack whose goal had evolved to help the Republican win.