NASAI-KUBRA 8667: from Ibn ʿUmar —
"The Messenger of Allah said: 'The Muslim must hear and obey whether he likes it or not, unless he is commanded to commit an act of disobedience. If he is commanded to commit an act of disobedience, then he is not required to hear and obey."' (Using translation from Nasāʾī 4206)

الكبرى للنسائي ٨٦٦٧: عن ابن عمر —
قَالَ النَّبِيُّ ﷺ «عَلَى الْمَرْءِ الْمُسْلِمِ السَّمْعُ وَالطَّاعَةُ فِيمَا أَحَبَّ أَوْ كَرِهَ إِلَّا أَنْ يُؤْمَرَ بِمَعْصِيَةٍ فَإِذَا أُمِرَ بِمَعْصِيَةٍ فَلَا سَمْعَ عَلَيْهِ وَلَا طَاعَةَ»


No Grade (N/A)
Nasāʾī's Kubrá > Expeditions > § [Machine] Obedience in the common good
hadithunlocked.com