It is narrated from Hazrat Ma'qil (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) forbade facing the Qiblah while sitting for urination or defecation.
Hadith Referenceمسند احمد / مسند الشاميين / 17840
Hadith Gradingحکم دارالسلام:إسناده ضعيف لجهالة أبى زيد مولى بني ثعلبة