It was narrated that Ibn 'Umar said:
"A man passed by the Prophet (ﷺ) when he was urinating and greeted him with Salam, but he did not return his greeting." (AR)
Arabic/English book reference (AR): Vol. 1, Book 1, Hadith 37 (AR)