Abu Musa Al-Ash'ari (May Allah be pleased with him) reported:
The Messenger of Allah (ﷺ) said, "Permission is to be sought thrice. If it is accorded, you may enter; otherwise, go back."[Al- Bukhari and Muslim].
App reference: Book 6, Hadith 26
Arabic/English book reference: Book 6, Hadith 870