We were traveling with Ibn Umar when he passed by a certain place and turned aside from it. He was asked, "Why did you do that?"He replied, "I saw the Messenger of Allah ﷺ do this, so I did it."
حدثنا يزيد بن هارون أخبرنا سفيان يعني ابن حسين عن الحكم
كنا مع ابن عمر في سفر فمر بمكان فحاد عنه فسئل لم فعلت فقال رأيت رسول الله ﷺ فعل هذا ففعلت
Its isnad is sahih. Hakam is Ibn Utayba. The hadith is found in Majma al-Zawaid 1:174, where it is said, "Ahmad and Bazzar narrated it, and its narrators are deemed trustworthy."