Bara bin Azib reported,

The Messenger of Allah ﷺ sent us with Khalid bin Walid to Yemen. Then he later sent Ali in his place and instructed him, "Tell Khalid's companions that whoever wishes to continue on with you may continue, and whoever wishes may return home."I was among those who continued on with him, and I gained a number of ounces of spoils.

Azami 9287

Sahih

عن البراء قال

بعثنا رسول الله ﷺ مع خالد بن الوليد إلى اليمن، قال: ثم بعث عليا بعد ذلك مكانه فقال: مر أصحاب خالد من شاء منهم أن يعقب معك فليعقب، ومن شاء فليقفل فكنت فيمن عقب معه، قال: فغنمت أواقي ذوات عدد.

الأعظمي 9287صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Biography of the Prophet ﷺ
Chapter
Events between the expedition of Tabuk and the Farewell Pilgrimage
Section
Khalid bin Walid's expedition to Yemen
Numbering
Jami al-Kamil 9287 (2nd edition)
Azami 9287