Rudy Giuliani, former mayor of New York, speaks with reporters during the White House Sports and Fitness Day event on the South Lawn of the White House in Washington, D.C., U.S., on Wednesday, May 30, 2018.

Rudy Giuliani, President Donald Trump's top outside attorney in the Russia probe, has a message for administration officials who reportedly ripped the commander in chief in Bob Woodward's upcoming book: go find another job.

"If they said it, they should be questioning why they are there. Why don't they go get another job? That's the kind of disloyalty that leads to you leaving, not staying and undermining the president," Giuliani told CNBC in an interview.

Giuliani did note, however, that many of the events described in the book occurred before he joined the president's legal team. He is not a member of the White House staff.

Woodward's book, "Fear," which is due out Sept. 11, claims chief of staff John Kelly called Trump an "idiot," and told colleagues that the president was "unhinged" and that "he's gone off the rails," according to The Washington Post.

White House press secretary Sarah Huckabee Sanders called the book "nothing more than fabricated stories, many by former disgruntled employees, told to make the President look bad."

In a statement released by the White House, Kelly said: "The idea I ever called the President an idiot is not true."