Shaykh Fawzān (hafidahullāh) in explaining the events surrounding Iblees’s disobedience of Allāh (The Mighty & Majestic) said,
Allah – jalla wa ‘alaa – commanded the angels to prostrate to Ādam; a prostration of greeting and not a prostration of worship, because prostration of worship is not allowed except for Allāh (t’āla). So all of the Angels prostrated together, except Iblīs, for indeed he was envious of Ādam (alayhis salām), and [Allaah said that Iblees] said,
He claimed that clay had no benefit within it, whilst claiming that fire has benefit. And this is a false analogy, because clay is better than fire; fire burns and does not bring forth (anything), whereas clay brings forth seedlings and agriculture/farming and yields goodness. Therefore clay, has goodness within it, however Iblīs was blinded of this and boasted about (being created from) fire,
And he did not envision what was in clay of goodness and blessing. (1)
Al-Imām ibn Bāz (rahimahullāh) in explanation of prostrating to Ādam and Yusuf (alayhimus salātu was salām) said,
This was a deed which was specified in the divine law revealed to Yoosuf [alayhis salaam], and likewise was the case when the Angels prostrated to Aadam- a specific prostration which Allaah allowed the Angels to perform and [likewise] the brothers of Yusuf.
As for the divine law that was revealed to Muhammad [sallal laahu alayhi wasallam], it is not permissible to prostrate to anyone elss besides Allaah alone. None is to prostrate to another person, neither to one’s father nor to a husband, nor anyone else. When some of the companions prostrated to the Prophet [sallal laahu alayhi wasallam], he forbade them from that. As for in the divine law that was revealed to Yusuf [alayhis salaam], that prostration was performed as an act greeting and a sign of respect, but not an act of worship. It was permissible in the divine law that was revealed to Yusuf [alayhis salaam] but forbidden in the divine law that was revealed to Muhammad.
Likewise, the prostration of the Angels to Aadam was a prostration of greeting and respect and not a prostration of worship. (2)
(1) Shaykh Fawzān’s explanation of Igāfatul Lahfān 1439-07-01
(2) Excerpt. Slightly paraphrased from Shaykh bin Bāz’s official website