The White House said that Mr. Trump did not know that Mr. Flynn was acting as a foreign agent when Mr. Trump appointed him national security adviser, a position that gave him access to classified meetings and materials. But a person briefed on the matter, who insisted on anonymity to describe private conversations, said Mr. Flynn’s lawyer contacted a lawyer for Mr. Trump’s transition team before the inauguration to ask whether Mr. Flynn should register given his work for Inovo.

The transition lawyer offered no advice, saying it was up to Mr. Flynn. After the inauguration, the person said, Mr. Flynn and his lawyer each raised it again with a White House lawyer, only to be told once more it was up to him. Mr. Flynn had no comment on Friday. His lawyer wrote the Justice Department that Mr. Flynn decided to register retroactively “to eliminate any potential doubt.”

The White House said its lawyer considered it a private decision and saw no reason to intervene. “It’s not a question of raising a red flag,” said Sean Spicer, the White House press secretary. “It’s a question of whether or not they gave him the advice that they are supposed to, which is it is not up to them to make decisions as to what you need to do or not do.”

Vice President Mike Pence, who was upset that Mr. Flynn had misled him about the conversation with the Russian ambassador that got him dismissed, seemed less forgiving. News reports on the matter were “the first I heard of it,” the vice president said during an interview on Fox News Thursday night, “and I think it is an affirmation of the president’s decision to ask General Flynn to resign.”

Throughout the campaign, Mr. Flynn positioned himself as someone willing to call out a national security establishment that was too corrupt to keep America safe. When former colleagues criticized him for becoming overtly partisan, he shot back by castigating them for using their titles to enrich themselves by joining corporate boards.