Slaves were even harder to find, because there were much more tenants than slaves. At least after the structures in agriculture changed latest mid of the 1st century AD.
The slaves represented about 10-15% of the empires population and not only the agriculture slaves, so to say, were available to serve in the army. Given that the emperor was the greatest landowner in the Imperium, he would be able to recruit his own slaves, either the ones serving in the fields and the ones serving in the Imperial Mines.
The romans did not recruit slaves, but they recruited freedmen. Usually just for the Vigiles in Rome and the fleets. But in emergency case also for auxilia cohorts and most probably in rare cases also for legions. Augustus did it after the Clades Variana and Marcus Aurelius did it during the Marcomann Wars.
It is a good guess that some of these freedmen entered the recruiting office as a slave and left it as a free man with the citizen status needed for the respective unit.
It desperate cases that wasn't unusual. Like Cambyses The Mad said, Gracchus recruited slaves in 216 BC. In that year, Fabius Maximus and the Senate decided to induct volunteer slaves into the Roman armies and to have them serve in separate legions to win their freedom.
Another example, but one i can't confirm so it might be wrong, was that after the lost of the three legions in Teutoburg, slaves were conscripted to the legions because of the low number of volunteers and the growing unpopularity of conscription on Italia.
The romans also recruited prisoners of war, like the Numerus Vandalorum deployed to Egypt and the Numerus Sarmatorum in Britain. Well, not really prisoners. It was rather a kind of tribute as part of a peace contract. Technically free men, but not serving voluntarily.
They did, but most of the time such units weren't reliable. During the crisis of the third century, many emperors preferred to put the barbarians into no-win situations, so that they could go and make a deal with them, we don't kill you, but you must serve eight to ten years in my army. Against roman foes they were reliable, but against their own people they weren't that much.
Slave legions could work, but they had to be on a unit were slaves were the minority, lets say in a 1000 men unit they should only be 10-15% of the units' full strength. And with the promise of full citizenship and the rather high salary the legionaries received there is no great reason for them to revolt against the men that gave them freedom and a chance to buy, and free, their family.