When the Prophet ﷺ sent him to Yemen, he asked, "How will you judge?"He replied, "I will judge by the Book of Allah."The Prophet ﷺ asked, "And if you do not find it in the Book of Allah?"He said, "Then by the Sunnah of the Messenger of Allah ﷺ."The Prophet ﷺ asked, "And if you do not find it in the Sunnah of the Messenger of Allah ﷺ?"He said, "I will exercise my own judgment."The Messenger of Allah ﷺ said, "Praise be to Allah, who has guided the messenger of the Messenger of Allah ﷺ to what pleases Him."
حدثنا عبد الله حدثني أبي حدثنا وكيع حدثنا شعبة عن أبي عون الثقفي
أن النبي ﷺ لما بعثه إلى اليمن فقال كيف تقضي قال أقضي بكتاب الله قال فإن لم يكن في كتاب الله قال فبسنة رسول الله ﷺ قال فإن لم يكن في سنة رسول الله ﷺ قال أجتهد رأيي قال فقال رسول الله ﷺ الحمد لله الذي وفق رسول رسول الله ﷺ