The Messenger of Allah ﷺ said, "Knowledge is of three kinds, and whatever is beyond that is extra: a clear verse, an established sunnah, or a just obligation."
حدثنا أحمد بن عمرو بن السرح أخبرنا ابن وهب حدثني عبد الرحمن بن زياد عن عبد الرحمن بن رافع التنوخي
أن رسول الله ﷺ قال العلم ثلاثة وما سوى ذلك فهو فضل آية محكمة أو سنة قائمة أو فريضة عادلة
[Its chain is daif] Ibn Majah recorded it in the Introduction, chapter on avoiding personal opinion and analogy, no. 54, from the hadith of Abdul-Rahman bin Ziyad Afriqi, and he is daif, as mentioned previously at 62, 514. The hadith has daif corroborating narrations.