The former service chiefs are Abayomi Olonisakin, former chief of defence staff; Tukur Buratai, former chief of army staff; Ibok-Ete Ibas, former chief of naval staff, and Sadique Abubakar, former chief of air staff.
Mohammed S Usman, former intelligence chief, was also confirmed.
The upper legislative chamber confirmed the appointment of the former service chiefs after Muhammed Bulkachuwa, chairman of the foreign affairs committee, presented a report for the consideration of the senate.
President Muhammadu Buhari appointed them as non-career ambassadors after they resigned their previous positions.
Some Nigerians had expressed their displeasure with the appointment on the grounds that the past service chiefs failed to quell the insurgency in the north-east and to keep the country safe.
While presenting the report on Thursday, Bulkachuwa said the nominees met the requirements expected of them.
“The nominees responded satisfactorily. At the end of the screening exercise; their nominations are in line with section 171 of the 1999 constitution,” the Bauchi senator said.
“That the nominees have been cleared by the Department of State Services (DSS). That the nominees have presented their code of conduct slips.
“That the nominees rose to a point of their career that has made them eminently qualified. The committee is satisfied with their character and performance.”
But Enyinnaya Abaribe, minority leader, drew the attention of the senate to a petition against the ex-service chiefs.
According to Abaribe, the petition borders on the integrity of the senate.
“That petition borders on the integrity of the senate; it said that we called for their removal, how then do we confirm them for another appointment,” the Abia senator said.
But Senate President Ahmad Lawan opposed the minority leader.
“The nomination cannot be nullified because we asked them to be changed,” the senate president said.
The nominations were confirmed after Lawan put them to a voice vote.