Bara bin Azib reported,

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

Bukhari 4349

Sahih

حدثني أحمد بن عثمان حدثنا شريح بن مسلمة حدثنا إبراهيم بن يوسف بن إسحاق بن أبي إسحاق حدثني أبي عن أبي إسحاق سمعت

البراء رضي الله عنه

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

البخاري 4349صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Expeditions
Chapter
Dispatch of Ali bin Abu Talib عليه السلام and Khalid bin Walid to Yemen before the Farewell Pilgrimage
Numbering
Darussalam 4349
Bukhari 4349