“Sulaik Ghatafani entered the mosque when the Prophet (ﷺ) was delivering the sermon. He said: ‘Have you prayed?’ He said: ‘No.’ He said: ‘Then perform two Rak’ah.’”
Sunan Ibn Majah Book 5, Hadith 310