A man came to the Prophet ﷺ and said, "Messenger of Allah, you appointed so-and-so to office but did not appoint me."He replied, "After me you will see others preferred over you. Be patient until you meet me."
أن رجلا أتى النبي ﷺ فقال: يا رسول الله استعملت فلانا ولم تستعملني؟ قال: إنكم سترون بعدي أثرة فاصبروا حتى تلقوني.
Bukhari narrated it in the Book of Tribulations (7057), and Muslim in the Book of Leadership (1845: 48), both through the route of Shuba, from Qatada, from Anas bin Malik, from Usayd bin Hudayr, who narrated it as mentioned.