WASHINGTON — President Trump called the F.B.I. director, James B. Comey, weeks after he took office and asked him when federal authorities were going to put out word that Mr. Trump was not personally under investigation, according to two people briefed on the call.

Mr. Comey told the president that if he wanted to know details about the bureau’s investigations, he should not contact him directly but instead follow the proper procedures and have the White House counsel send any inquiries to the Justice Department, according to those people.

After explaining to Mr. Trump how communications with the F.B.I. should work, Mr. Comey believed he had effectively drawn the line after a series of encounters he had with the president and other White House officials that he felt jeopardized the F.B.I.’s independence. At the time, Mr. Comey was overseeing the investigation into links between Mr. Trump’s associates and Russia.

Those interactions included a dinner in which associates of Mr. Comey say Mr. Trump asked him to pledge his loyalty and a meeting in the Oval Office at which Mr. Trump told him he hoped Mr. Comey would shut down an investigation into Mr. Trump’s former national security adviser, Michael T. Flynn. Mr. Trump has denied making the request.