Kathir bin Abdullah bin Awf narrates from his father, from his grandfather: We were with the Prophet (peace and blessings be upon him) when he came to Madinah, and he prayed facing Bayt al-Maqdis for seventeen months; then he was turned towards the Ka'bah.
Al-Bazzar and al-Tabarani in al-Mu'jam al-Kabir recorded it. The narrator Kathir is da'if (weak), though al-Tirmidhi graded his hadith hasan (good).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 1969