Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) narrates: The Prophet (peace and blessings be upon him) was turned from Syria (that is, Bayt al-Maqdis) towards the qiblah, and he prayed facing the Ka'bah in the month of Rajab, in the seventeenth month after his arrival in Madinah.
Al-Tabarani recorded it in al-Mu'jam al-Kabir, and its narrators have been declared trustworthy.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 1974