WASHINGTON — Even his many critics conceded that the former national security adviser John R. Bolton brought useful credentials to the job: decades of foreign policy experience and a keen grasp of how the gears of government turn.

Mr. Bolton’s main problem, as it turned out, was that he knew too much. Confident in his experience to a fault, he was unwilling to shade his deeply held hawkish views, which he defended with a prickly personality that alienated colleagues — and ultimately President Trump himself, leading to his ouster last week.

Robert C. O’Brien, Mr. Trump’s choice to succeed Mr. Bolton, flips that equation. He is a former Los Angeles lawyer with limited government experience before he became the State Department’s point man for hostage negotiations. But his friends all cite an affable, ingratiating personality that has earned him allies throughout the Trump administration, notably including Secretary of State Mike Pompeo and Mr. Trump’s son-in-law and adviser, Jared Kushner, both of whom supported his appointment.

His physical appearance did not hurt, either. Whereas Mr. Trump was known to grouse about Mr. Bolton’s famous bushy mustache, the president has been taken with Mr. O’Brien’s well-tailored looks and easy demeanor, and thinks he “looks the part,” as one person close to the president said.