WASHINGTON — One by one, they came forward, almost as if in a virtual lineup. Not me, said the vice president. Nor me, said the secretary of state. Or me, said the attorney general.

In a spectacle that may be without precedent even for an administration that has seen many of those already, almost the entire cabinet and leadership team working for President Trump pleaded not guilty on Thursday to writing an extraordinary anonymous essay about plotting against him.

The unnamed author of the essay published by The New York Times was the target of a mole hunt by an infuriated president and the subject of an obsessive public guessing game that played out on television, online and in social media. While Mr. Trump and his staff lashed out at the news media, some privately wondered whether it would lead to a shake-up.

Senator Rand Paul of Kentucky, an ally of Mr. Trump’s, recommended that the president force members of his administration to take polygraph examinations, and there was at least briefly some discussion of that among advisers to the president. Another option mentioned by people close to Mr. Trump was asking senior officials to sign sworn affidavits that could be used in court if necessary. One outside adviser said the White House had a list of about 12 suspects.