Outside the walls of Rome, the powers of the consuls were far more extensive in their role as commanders-in-chief of all Roman legions. It was in this function that the consuls were vested with full imperium. When legions were ordered by a decree of the Senate, the consuls conducted the levy in the Campus Martius. Upon entering the army, all soldiers had to take their oath of allegiance to the consuls. The consuls also oversaw the gathering of troops provided by Rome's allies.