It is narrated from Ibn Abbas (may Allah be pleased with them) that he said: The people were commanded that their last act should be the circumambulation (Tawaf) of the House (Ka'bah), except that the Prophet ﷺ granted concession to the menstruating woman.
Hadith Referenceمسند الإمام الشافعي / كتاب الحج / 1033
Hadith Takhrijأخرجه البخاري، الحج، باب طواف الوداع (1755) مسلم، الحج، باب وجوب طواف الوداع (1348)۔