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.
bayhaqi:5334Muḥammad b. ʿAbdullāh al-Ḥāfiẓ > Abū al-ʿAbbās Muḥammad b. Yaʿqūb > Muḥammad b. Isḥāq al-Ṣaghānī > Ibn Numayr from my father > ʿUbaydullāh > Nāfiʿ > Ibn ʿUmar

[Machine] The Messenger of Allah ﷺ said: "Listening and obeying is upon the Muslim in what he loves and hates, except if he is commanded to disobey. When he is commanded to disobey, then there is no listening and no obedience." 5335 Abu Ishaq Ibrahim ibn Muhammad ibn Ibrahim al-Isfaraini informed us, Abu Bakr Muhammad ibn Yazdad ibn Mas'ood narrated to us, Muhammad ibn Ayyub al-Razi narrated to us, Musaddad ibn Musarhad narrated to us, Yahya ibn Sa'eed narrated to us from Ubaydullah. He mentioned it in a similar manner, except that he said: unless he is commanded to disobey.  

البيهقي:٥٣٣٤أَخْبَرَنَا مُحَمَّدُ بْنُ عَبْدِ اللهِ الْحَافِظُ ثنا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ يَعْقُوبَ ثنا مُحَمَّدُ بْنُ إِسْحَاقَ الصَّغَانِيُّ ثنا ابْنُ نُمَيْرٍ ثنا أَبِي ثنا عُبَيْدُ اللهِ عَنْ نَافِعٍ عَنِ ابْنِ عُمَرَ

أَنَّ رَسُولَ اللهِ ﷺ قَالَ السَّمْعُ وَالطَّاعَةُ عَلَى الْمَرْءِ الْمُسْلِمِ فِيمَا أَحَبَّ وَكَرِهَ إِلَّا أَنْ يُؤْمَرَ بِمَعْصِيَةٍ فَإِذَا أُمِرَ بِمَعْصِيَةٍ فَلَا سَمْعَ وَلَا طَاعَةَ 5335 وَأَخْبَرَنَا أَبُو إِسْحَاقَ إِبْرَاهِيمُ بْنُ مُحَمَّدِ بْنِ إِبْرَاهِيمَ الْإِسْفَرَايِينِيُّ أنبأ أَبُو بَكْرٍ مُحَمَّدُ بْنُ يَزْدَادَ بْنِ مَسْعُودٍ ثنا مُحَمَّدُ بْنُ أَيُّوبَ الرَّازِيُّ ثنا مُسَدَّدُ بْنُ مُسَرْهَدٍ ثنا يَحْيَى بْنُ سَعِيدٍ عَنْ عُبَيْدِ اللهِ فَذَكَرَهُ بِمِثْلِهِ إِلَّا أَنَّهُ قَالَ مَا لَمْ يُؤْمَرْ بِمَعْصِيَةٍ  

رَوَاهُ الْبُخَارِيُّ فِي الصَّحِيحِ عَنْ مُسَدَّدٍ وَرَوَاهُ مُسْلِمٌ عَنْ مُحَمَّدِ بْنِ عَبْدِ اللهِ بْنِ نُمَيْرٍ