Abdullah bin Umar reported,

A man greeted the Prophet ﷺ while he was urinating, and he did not return it, meaning the greeting.Muhammad bin Yahya Nisaburi narrated to us, Muhammad bin Yusuf narrated to us, from Sufyan, from Dahhak, with this chain of transmission, something similar.

Tirmidhi 2720

Sahih

حدثنا محمد بن بشار ونصر بن علي قالا حدثنا أبو أحمد عن سفيان عن الضحاك بن عثمان عن نافع

عن ابن عمر

أن رجلا سلم على النبي ﷺ وهو يبول فلم يرد عليه يعني السلام حدثنا محمد بن يحيى النيسابوري حدثنا محمد بن يوسف عن سفيان عن الضحاك بهذا الإسناد نحوه

الترمذي 2720صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Permission and etiquette
Chapter
Disliking greeting one who is urinating
Numbering
Darussalam 2720
Tirmidhi 2720