Saad bin Abu Waqqas reported,

The Messenger of Allah ﷺ set out for Tabuk and appointed Ali as his deputy in Madinah.Ali said, "Are you leaving me behind with the children and the women?"The Prophet ﷺ replied, "Are you not pleased to be to me what Harun was to Musa, except that there is no prophet after me?"

Azami 9913

Sahih

عن سعد بن أبي وقاص

أن رسول الله ﷺ خرج إلى تبوك، واستخلف عليا، فقال: أتخلفني في الصبيان والنساء؟ قال: ألا ترضى أن تكون مني بمنزلة هارون من موسى؟ إلا أنه ليس نبي بعدي.

الأعظمي 9913صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Virtues of the Companions and reports about them
Chapter
Virtues and reports of Ali bin Abu Talib
Section
Ali's position to the Prophet ﷺ is like Harun's position to Musa, except that there is no prophet after him
Numbering
Jami al-Kamil 9913 (2nd edition)
Azami 9913