WASHINGTON — For a brief moment, it looked as if America’s mayor just might become America’s diplomat.

But for Rudolph W. Giuliani, the bombastic former mayor of New York City, a wild year of being one of President-elect Donald J. Trump’s most passionate surrogates did not, in the end, land him the high-profile administration job he has long coveted.

Instead, Mr. Trump announced on Thursday that he would enlist Mr. Giuliani to share his “expertise and insight as a trusted friend” on the issue of cybersecurity. Mr. Giuliani, who has spent the last 16 years as a private security consultant, will “from time to time” assemble meetings between Mr. Trump and corporate executives who face cyberthreats, the transition team said.

“We’ve let our defense fall behind,” Mr. Giuliani told reporters on Thursday during a conference call. “Our offense is way ahead of our defense.”

Mr. Giuliani put on a happy face during the call, declaring it a “great privilege” to be taking on the role.

But the announcement — almost an afterthought, coming the day after lawmakers grilled Rex W. Tillerson, Mr. Trump’s nominee to be secretary of state, in his confirmation hearing — reflected how far Mr. Giuliani had fallen in the Trump universe.

He remains a close friend of Mr. Trump’s, according to associates. But he will not be moving to Washington, as he once hoped, and instead of having his political career rejuvenated after his failed run for president in 2008, he will continue to run his consulting firm.

Source: Rudy Giuliani’s Cybersecurity Role Reflects Diminished Place in Trump World