It is narrated from Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) that he wrote to Shurayh: "When a matter comes to you that is (found) in the Book of Allah, judge according to it, and do not let people turn you away from it. Then, if it is not in the Book of Allah, the Mighty and Majestic, but is in the Sunnah of the Messenger of Allah (peace and blessings be upon him), judge according to that. And if it is neither in the Book of Allah, the Mighty and Majestic, nor in the Sunnah of the Messenger of Allah (peace and blessings be upon him), judge according to what the rightly guided imams have judged. Then, if it is neither in the Book of Allah, nor in the Sunnah of the Messenger of Allah (peace and blessings be upon him), nor among the matters the rightly guided imams have already judged, you have the choice: if you wish, exercise ijtihad with your own opinion, and if you wish, consult me; and I consider consulting me to be the safer course for you."
Imam al-Bayhaqi (may Allah have mercy on him) said: Here Sayyiduna Umar (may Allah be pleased with him) pointed out the place for consultation, because he might have (Shari'ah) principles and evidences that had not reached Shurayh, and he would then inform him of them. 'Wallahu al-muwaffiq' (And Allah alone is the One who grants success).
Hadith Referenceإتحاف الخيرة المهرة بزوائد المسانيد العشرة / كتاب القضاء وما على القاضي في الخصوم والشهود / 4891
Hadith Gradingمحدثین:سكت عنه البوصيري، لم يُسق إسناده في هذا الموضع؛ وهو أثر موقوف على عمر من رواية الشعبي عنه، ولم يدركه
Hadith Takhrij«عزاه البوصيري إلى البيهقي بسنده إلى الشعبي؛ والشعبي ولد في خلافة عمر ولم يسمع منه (من الحفظ)، فهو منقطع.»