Anas bin Malik reported,

The Messenger of Allah ﷺ was returning from the expedition of Tabuk, and as he drew near Madinah he said, "There are people in Madinah who were with you every step of the way, every valley you crossed."The companions asked, "Messenger of Allah, even though they are in Madinah?"He replied, "Yes, even though they are in Madinah. A valid excuse kept them behind."

Azami 9277

Sahih

عن أنس

أن رسول الله ﷺ رجع من غزوة تبوك، فدنا من المدينة فقال: إن بالمدينة أقواما ما سرتم مسيرا ولا قطعتم واديا إلا كانوا معكم قالوا: يا رسول الله، وهم بالمدينة؟ قال: وهم بالمدينة، حبسهم العذر.

الأعظمي 9277صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Biography of the Prophet ﷺ
Chapter
Expedition of Tabuk, which was in the year nine without disagreement
Section
Return of the Prophet ﷺ to Madinah
Numbering
Jami al-Kamil 9277 (2nd edition)
Azami 9277