Abu Ishaq reported: I heard al-Bara' saying: We prayed with the Messenger of Allah (ﷺ) (with our faces) towards Bait-ul-Maqdis for sixteen months or seventeen months. Then we were made to change (our direction) towards the Ka’bah.
Hadith ReferenceSahih Muslim / The Book of Mosques and Places of Prayer / Hadith: 525