Sunan Ibn Majah 617
سنن ابن ماجه#617Da'ifIt was narrated from Abu Umamah that:The Messenger of Allah forbade a man to perform prayer when he was suppressing (the urge to urinate or defecate)
Scholarly Authentication
We show the most cautious grade (weakest-wins) as the overall label. Individual scholars graded it as follows:
Al-AlbaniDaif
Muhammad Fouad Abd al-BaqiSahih
Shuaib Al ArnautSahih Lighairihi
Zubair Ali ZaiSahih
In-book reference: 1:351