The advice President Obama has offered his successor is mostly under wraps. But the outgoing commander-in-chief made a point of going on the record with this wisdom for President-elect Donald Trump: hire a good lawyer and listen to him.

Trump has selected elections expert Don McGahn as his new White House counsel. McGahn will have a lot of work to do, mostly behind the scenes. Veterans of the office said if the White House counsel is doing their job the right way, hardly anyone knows their name.

The alternative goes something like this: "We have a cancer within, close to the presidency that's growing," then-White House counsel John Dean advised President Richard Nixon in March 1973, as the Watergate scandal festered. "It's growing daily."

Preventing scandals is a key part of any counsel's job. But the work gets even harder when the president-elect operates a multinational business empire and some of his cabinet choices have a lot of private investments.

"I think that will be a massive undertaking for the next White House counsel," said Kathryn Ruemmler, who served as White House counsel under President Obama. "I think it really adds to the complications, the areas around financial disclosure, conflict of interest."

"Really, it's a question of public confidence and can the people be confident that decisions were made for merits-based reasons and not because someone has personal financial interests or some other type of skin in the game," she said, describing the challenges for McGahn.

The White House counsel is supposed to defend the interests of the presidency, not the president himself. The goal is to leave the institution with as much clout as possible.

In recent years, the counsel has led a team of about 20 junior lawyers. It's like a medium sized law firm with the most interesting work in the country — helping pick Supreme Court justices and handling national security problems.

Some counsels have an easier time than others.

"I saw my role to try to keep the president out of trouble," Bernie Nussbaum, President Bill Clinton's counsel, told the Miller Center at the University of Virginia. "Six White House counsel in eight years. It shows. It was a tricky job, a difficult job. It's tough to be a strong lawyer sometime for a client who may not be as strong."

The counsel can only give advice. The president's not obliged to take it.

That's what happened with a last minute pardon Clinton gave fugitive Marc Rich in 2001. Then White House counsel Beth Nolan later told Congress she opposed the idea.

"We were in some heated discussion about one of the pardons and I said, 'Look, my job is to tell you my best judgment and tell you what I think about this, but I know who's president and who's not,'" Nolan testified.

Responding to demands from Capitol Hill is another part of a White House counsel's portfolio. The top lawyer for President George W. Bush spent months trying to navigate lawmakers' demands for information after the controversial firing of federal prosecutors.

President-elect Trump will face a Congress controlled by Republicans, so inquiries from Congress may not pose much of an early test for his lawyer. But navigating the relationship with the Justice Department could be tricky.

Trump and his top aides have been offering all sorts of opinions about whether or not to prosecute his political opponent Hillary Clinton. Those decisions are supposed to be made by independent prosecutors and FBI agents at the Department of Justice, not the White House.

"It's important that the White House counsel police, for lack of a better word, the lines of communication between the White House and the Justice Department," Ruemmler said. "Under President Obama, those communications were restricted."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.