The group includes 27 students, three teachers and nine family members, the state government said in a statement naming them all.
One student who died during the attack was named Benjamin Habila.
The governor of the state of Niger, Abubakar Sani Bello it has closed all boarding schools in the area and sent the military to rescue the abductees from the school, according to its chief press secretary, Mary Noel Barje.
President Buhari has condemned the kidnapping of school children.
“The president has led the Armed Forces and the Police, to ensure the immediate and safe return of all captives,” Buhari spokesman Garba Shehu said on Wednesday.
“The president has also sent to Minna, Niger State, a team of security chiefs to coordinate the rescue operation and meet with state officials, community leaders, as well as parents and school staff.” .
A former Nigerian senator, Shehu Sani, told CNN that the school had no perimeter fence and would have allowed easy access to militants.
Sani, who was also a student at the school, told CNN: “The city is at the epicenter of the insurgency in the state of Niger. Fulani bandits operate within the axis and there are thousands of people. displaced in this area. Bandits in northwestern Nigeria are increasingly lethal and destructive than Boko Haram. ”
Buhari has recently removed all heads of Nigerian security forces and appointed new ones, amid growing insecurity and kidnappings in the country.
“The security situation in Nigeria is ‘overwhelming and threatens the country’s peace,'” Sani told CNN.
“It is unfortunate that service chiefs were allowed to remain for so long,” he added.