President Donald Trump had a private dinner with NBC News senior political analyst Mark Halperin last week, sources with knowledge of the meeting told CNNMoney.

The dinner, which took place in the White House residence, came as Halperin and his co-author John Heilemann are at work on a book about Trump and the 2016 campaign.

The sources also said President Trump has given senior advisers the go-ahead to speak with Halperin for the book, a move that indicates how much Trump has come to trust the "Game Change" co-author and former ABC News and Time Magazine reporter.

Related: Mark Halperin leaves Bloomberg

Outside the White House, Halperin's level of access has already raised eyebrows among political reporters who believe he is too cozy with the president. The Washington Post's Dana Milbank has called Halperin a "lap dog" for ignoring "that much of what Trump has done is a threat to democratic institutions," while The Daily Beast faulted him for "soft coverage of Trump" after he asked "truly laughable questions" in an interview.

At last week's joint press conference with Trump and German chancellor Angela Merkel, which came within 24 hours of the dinner, Halperin was given the first question.

In an interview with The Hill over the weekend, Halperin encouraged fellow journalists to take a less combative approach toward Trump and his administration.

The press "should not be combatants trying to beat the people we're covering," Halperin told the Hill, before listing four recommendations for fellow journalists. "One is not be biased. Two is just have fidelity of that core mission to hold all powerful interests accountable to the public interest. Three is recognize that we are not seen as fair and we need to have consistent performance."

"And lastly, I think we have to do all of this with a smile on our face," he continued. "I think with the current administration, too many people in the media have decided that we're going to be warriors in some kind of hostile confrontation with the people we cover, and we have to be aggressive and unyielding in what we do."

Neither Halperin nor NBC News responded to requests for comment late Wednesday night. The White House declined to comment on the dinner.