Musnad Ahmad 3249
Grading supplied with this record: Saheeh because of corroborating evidence, and its isnad is da'eef]
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
It was narrated that Ibn ‘Abbas (رضي الله عنه) said:
When the Prophet (ﷺ) was told to face towards the Ka'bah (in prayer), they said: O Messenger of Allah, what about those of our brothers who died before that, who died when they were facing towards Jerusalem? Then Allah, may He be glorified and exalted, revealed the words: "And Allah would never make your faith (prayers) to be lost (i.e. your prayers offered towards Jerusalem)" (al-Baqarah 2:143).
Full reference and source
Musnad Ahmad 3249 Arabic/English book : Book 25, Hadith 3249
View source on Sunnah.com (opens in a new tab)