On Thursday, the court rejected the request. Part of the reason, it said, was that Deutsche Bank had informed the court that “the only tax returns it has for individuals and entities named in the subpoenas are not those of the president.”

Current and former bank officials previously told The Times that Deutsche Bank had portions of Mr. Trump’s personal and corporate tax returns. The bank collected at least some of those tax records in 2011, when Deutsche Bank’s private-banking arm — which caters to the ultra-wealthy — took on Mr. Trump as a client. The returns and other financial documents were reviewed by a number of bank executives, according to the current and former officials.

Deutsche Bank relied on the information provided in the tax returns and other financial documents to approve a series of loans to Mr. Trump in early 2012 in connection with his Doral golf resort in Florida and his Chicago skyscraper.

Over the ensuing years, Deutsche Bank’s private-banking arm continued lending to Mr. Trump, including $170 million in 2014 to convert the Old Post Office building, a few blocks from the White House, into a hotel. By the time Mr. Trump was sworn in as president, he owed the bank more than $300 million, making it his largest creditor.

It is unclear when Deutsche Bank stopped retaining Mr. Trump’s tax returns. A former senior bank executive, who said he had seen the returns, said the normal practice was for Deutsche Bank to keep such materials on file.