All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
Iblees (i.e. Satan, the devil) is definitely not one of the angels; rather he is from the jinn. However, he was included by the order of Allaah to prostrate to Aadam . Allaah Says (what means): {(Allaah) said: "What prevented you (O Iblees) that you did not prostrate, when I commanded you?" Iblees said: "I am better than him (Aadam), You created me from fire, and him You created from clay."}[Quran 7:12]. Therefore, Allaah confirmed that Iblees was also meant by His order to prostrate to Aadam as Allaah would not punish him for something which He did not order him to do. Moreover, Iblees did not deny that he was meant by the Order, rather he gave an invalid excuse. Ibn Katheer when he interpreted the above verse, said: "The purpose is that when Allaah ordered the angels to prostrate to Aadam Iblees was included in the Order, because even though he was not an angel like them, yet he resembled them and was doing the actions of worship exactly like them, it is for this reason that the address included him and he was blamed for not abiding by the Order."
Finally, it should be noted that a Muslim should believe in and accept as true whatever Allaah informed us about and believe in His Ruling even if the purpose of such an Order or Ruling was not clear to him or that he found them ambiguous to him, because the Words of Allaah are the Truth and all that Allaah has legislated is just. Allaah Says (what means): {And the Word of your Lord has been fulfilled in truth and in justice.}[Quran 6:115]. Then, he may try to find out the truth about such an ambiguity by asking the scholars .
Allaah Knows best.