Iblees was with the angles at that time though he was from the Jinn. When Allah gave the order, all were expected to obey. The only one who didn’t obey was Satan.

A friend asked when Allah (swt) ordered only angles to bow to Adam then why Allah said Iblis broken the commandment because he was a Jinn and the commandment was only for the angles?