Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:2:31

And He taught Adam the names - all of them. Then He showed them to the angels and said, "Inform Me of the names of these, if you are truthful."  

And He taught Adam the names, that is, the names of things named, all of them, by placing knowledge of them into his heart; then He presented them, these names, the majority of which concerned intellectual beings, to the angels and said, to them in reproach, ‘Now tell Me, inform Me, the names of these, things named, if you speak truly’, in your claim that I would not create anything more knowledgeable than you, or that you are more deserving of this vicegerency; the response to the conditional sentence is intimated by what precedes it.
القرآن:٢:٣١

وَعَلَّمَ آدَمَ الْأَسْمَاءَ كُلَّهَا ثُمَّ عَرَضَهُمْ عَلَى الْمَلَائِكَةِ فَقَالَ أَنْبِئُونِي بِأَسْمَاءِ هَٰؤُلَاءِ إِنْ كُنْتُمْ صَادِقِينَ  

{وعلَّم آدم الأسماء} أي أسماء المسميات {كلها} بأن ألقى في قلبه علمها {ثم عرضهم} أي المسميات وفيه تغليب العقلاء {على الملائكة فقال} لهم تبكيتاً {أنبئوني} أخبروني {بأسماء هؤلاء} المسميات {إن كنتم صادقين} في أني لا أخلق أعلم منكم أو أنكم أحق بالخلافة، وجواب الشرط دل عليه ما قبله.