Ubaydullah bin Abi Yazid (may Allah have mercy on him) states: "Whenever Sayyiduna Ibn Abbas (may Allah be pleased with them both) was asked about a matter, if its answer was in the Book of Allah Almighty, he would give his verdict according to it. If the ruling was not found in the Book of Allah, the Mighty and Majestic, but a hadith had been narrated about it from the Messenger of Allah (peace and blessings be upon him), he would inform of that. If the matter was found neither in the Book of Allah nor in any judgement (qada') of the Messenger of Allah (peace and blessings be upon him), but something had been transmitted about it from Sayyiduna Abu Bakr and Sayyiduna Umar (may Allah be pleased with them both), he would adopt it. Then, if no guidance on it was found from those two elders either, he would exercise ijtihad (careful reasoning) with his own insight."
Ibn Abi Umar narrated this report through Sufyan.
Hadith Referenceالمطالب العالية بزوائد المسانيد الثمانية / كتاب القضاء والشهادات / 2180
Hadith Gradingمحدثین:إسناده صحيح
Hadith Takhrij«حکم الحدیث المطالب العالیہ محققاً تنسیق د. سعد بن ناصر بن عبد العزيز الشَّثري- مکتبہ شاملہ :إسناده صحيح. » «أخرجه المستدرك للحاكم برقم: 438، وأخرجه مسند الدارمي برقم: 168، وأخرجه السنن الكبرى للبيهقي برقم: 20405، وأخرجه مصنف ابن أبي شيبة برقم: 23448»