A man of Banu Amir told that he asked the Prophet (ﷺ) for permission (to enter the house) when he was in the house, saying: May I enter ? The Prophet (ﷺ) said to his servant: Go out to this (man) and teach him how to ask permission to enter the house, and say to him: "Say : Peace be upon you. May I enter?" The man heard it and said: Peace be upon you! May I enter ? The Prophet (ﷺ) permitted him and he entered.
Sunan Abi Dawud Book 43, Hadith 405