بُلُوغُ الْمَرَامِ
Bulugh al-Maram 202
The Book of Prayer
وَلِلْبَيْهَقِيِّ نَحْوُهُ : عَنْ عَلِيٍّ مِنْ قَوْلِهِ [1] .
al-Baihaqi has reported a similar narration from the saying of 'Ali (RA).
Sunnah.com reference: Book 2, Hadith 65