Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:21503Abū ʿAbdullāh al-Ḥāfiẓ And ʾAbū Saʿīd b. Abū ʿAmr > Abū al-ʿAbbās Muḥammad b. Yaʿqūb > Yaḥyá b. Abū Ṭālib > Yazīd b. Hārūn > Sufyān al-Thawrī Washarīk > ʿImrān b. Muslim b. Rabāḥ > ʿAbdullāh b. Maʿqil > ʿAlī

[Machine] I heard Ali say that al-walā' is a branch of lineage. So whoever preserves the inheritance has preserved al-walā' as well. I found it in this narration, but it is incorrect. It seems that Yazid incorporates the narration of Thawri over the narration of Shurayk, and it contains confusion or he himself is confused. So, anyone other than him...  

البيهقي:٢١٥٠٣أَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ وَأَبُو سَعِيدِ بْنُ أَبِي عَمْرٍو قَالَا ثنا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ يَعْقُوبَ ثنا يَحْيَى بْنُ أَبِي طَالِبٍ أنبأ يَزِيدُ بْنُ هَارُونَ أنبأ سُفْيَانُ الثَّوْرِيُّ وَشَرِيكٌ عَنْ عِمْرَانَ بْنِ مُسْلِمِ بْنِ رَبَاحٍ عَنْ عَبْدِ اللهِ بْنِ مَعْقِلٍ قَالَ

سَمِعْتُ عَلِيًّا ؓ يَقُولُ الْوَلَاءُ شُعْبَةٌ مِنَ النَّسَبِ فَمَنْ أَحْرَزَ الْمِيرَاثَ فَقَدْ أَحْرَزَ الْوَلَاءَ كَذَا وَجَدْتُهُ فِي هَذِهِ الرِّوَايَةِ وَهُوَ خَطَأٌ وَكَأَنَّ يَزِيدَ حَمَلَ رِوَايَةَ الثَّوْرِيِّ عَلَى رِوَايَةِ شَرِيكٍ وَشَرِيكٌ وَهِمَ فِيهِ أَوْ وَهِمَ فِيهِ يَزِيدُ فَمَنْ دُونَهُ