Gleason declined to discuss the details of what he told Cohen, or anything that resulted from either that call or from Dunleavy's contact with Trump.
But in his letter to the judge, Gleason said that "during my communications with Mr. Cohen I shared with him certain details of Schneiderman's vile attacks on these two women."
In an interview Friday, Gleason said that soon after he spoke with Cohen, Trump tweeted the following message, on Sept. 11, 2013.
Eliot Spitzer resigned as governor of New York in 2008 after his dalliance with a prostitute was revealed. Anthony Weiner, a congressman from New York, resigned his seat in 2011 after the exposure of salacious tweets he had made.
Jane Mayer, one of the New Yorker writers whose article about Schneiderman earlier this week led to his resignation, tweeted that "not one source for our story on Schneiderman has any ties to Trump or Michael Cohen."
In his letter to Wood, Gleason said he was motivated to seek an order protecting information about the women by alleged reckless behavior by Michael Avenatti, a lawyer for porn star Stormy Daniels.
On Tuesday, Avenatti had released a bombshell report about payments made to Cohen by several businesses.
Avenatti is seeking to be heard on a regular basis by Wood on the issue of the confidentiality of some of Cohen's files as they are reviewed by a court-appointed watchdog.
Those files purportedly contain information about Daniels, who was paid $130,000 by Cohen right before the 2016 presidential election in exchange for her keeping quiet about an alleged affair she had with Trump in 2006. Lawyers for Cohen, Trump, the Trump organization and Avenatti all have expressed concerns about files that could be subject to attorney-client privilege being seen by prosecutors investigating Cohen.
Avenatti scoffed at Gleason's concerns when asked about them by CNBC.
"Mr. Gleason has no idea what he is talking about regarding my behavior and appears to be doing the bidding for Mr. Cohen and Mr. Trump," Avenatti said.
"What are they hiding?"
In a separate statement to NBC News, Avenatti said, "Individuals and companies are finally coming to the realization that much more information is going to come to light regarding their dealings with Mr.Cohen and Mr. Trump."
"They are nervous and should be," the lawyer said.
Later Friday, Judge Wood directed Gleason to either file memorandum of law supporting his request to seal files related to the women he told Cohen about, or to withdraw that request.
Correction: The headline on an earlier version of this story misspelled the name of Eric Schneiderman.