Someone said to him, "Your Prophet has taught you everything, even how to relieve yourselves."He replied, "Indeed. The Messenger of Allah ﷺ forbade us from facing the qiblah while relieving ourselves, whether to defecate or urinate. He forbade us from cleaning ourselves with the right hand, from using fewer than three stones, and from cleaning ourselves with dung or bone."
حدثنا مسدد بن مسرهد حدثنا أبو معاوية عن الأعمش عن إبراهيم عن عبد الرحمن بن يزيد
قيل له لقد علمكم نبيكم كل شيء حتى الخراءة قال أجل لقد نهانا ﷺ أن نستقبل القبلة بغائط أو بول وأن لا نستنجي باليمين وأن لا يستنجي أحدنا بأقل من ثلاثة أحجار أو نستنجي برجيع أو عظم
Muslim narrated it in the Book of Purification, Chapter on Cleaning Oneself After Relieving Oneself, no. 262, from the hadith of Abu Muawiya Dareer through this route. Tirmidhi also narrated it, no. 16, as did Nasai, no. 41, and Ibn Majah, no. 316.