The former first and deputy first ministers sent a letter to the billionaire tycoon in November, congratulating him on his election win.
In it, they said he could be “assured of a warm welcome” in Northern Ireland.
Political rivals have criticised that move, and SDLP leader Colum Eastwood said the invite should be withdrawn
The letter from DUP leader Mrs Foster and Sinn Féin’s Mr McGuinness was released after its existence was revealed by Fermanagh weekly paper The Impartial Reporter.
In the correspondence, the then ministers described Northern Ireland is a small region with “strong historical, economic and political ties to the United States”.
They informed Mr Trump that it has “become a magnet for American companies looking for a European base”.
Mrs Foster and Mr McGuinness told him that they “believe that our relationship has proved mutually beneficial for both your great country and our small but dynamic region”.
They also wished Mr Trump every success in his new role and extend an invitation to visit.
The invitation was not mentioned in a statement released by the Executive Office in November, but Mrs Foster did confirm in an interview at the time that it had been offered.
SDLP leader Colum Eastwood called for the invitation to Mr Trump be to rescinded.
He said it was “astounding” that Mrs Foster and Mr McGuinness had been “eager to appease a man of his character and sell out their principles so quickly”.
The Alliance Party’s Stewart Dickson described the invitation as “premature”, adding if a visit does happen it should not be an “exercise in toadying and sycophancy”.
The human rights organisation Amnesty International has pledged to organise protests if the president does travel to Northern Ireland.
But the Ulster Unionist leader Mike Nesbitt backed the invitation, arguing that “on this occasion” Mrs Foster and Mr McGuinness had “got something right in trying to get the leader of the wealthiest nation in the world to visit Northern Ireland”.
Michelle O’Neill, who replaced Mr McGuinness as Sinn Fein’s leader in Northern Ireland last month, said she believed immigration policies implemented by the US president “are wrong”.
“The actions of President Trump since taking office mean that an invitation to visit would not now be appropriate,” she said.
“If I was in the Executive Office at this time I wouldn’t issue an invitation, and I’m confident that Martin McGuinness wouldn’t either.”