He sought permission to enter upon the Prophet ﷺ and said, "Shall I come in?"The Prophet ﷺ said to his servant, "Go out to him, for he does not know how to seek permission properly. Tell him to say, 'Peace be upon you. May I enter?'"He said, "I heard him say that, so I said, 'Peace be upon you. May I enter?'" He then granted permission, or he said, "So I entered."
أنه استأذن على النبي ﷺ فقال: أألج؟ فقال النبي ﷺ لخادمه: اخرجي إليه، فإنه لا يحسن الاستئذان، فقولي له: فليقل: السلام عليكم أدخل؟ قال: فسمعته يقول ذلك، فقلت: السلام عليكم أدخل؟ قال: فأذن، أو قال فدخلت.
Reported by Ahmad (23127) - this is his wording - and Abu Dawud (5179), and Nasai in Amal al-Yawm wal-Layla (316), all of them via Shubah, from Mansur, from Rabi bin Harash, from a man of Banu Amir, who related it, and its chain of transmission is sahih.Abu Dawud also reported it (5178) through another route, from Mansur, from Rabi bin Harash, who said, "I was told that a man from Banu Amir asked permission to enter upon the Prophet ﷺ," with the same meaning.It may be that Rabi bin Harash first heard the hadith through an intermediary from a man of Banu Amir, then later heard it directly from him without an intermediary. The fact that the identity of the companion is unknown does not harm the report, and the hadith has many corroborating sources.