Ibn Abbas (may Allah be pleased with him) narrated that I heard Umar bin Khattab (may Allah be pleased with him) saying that stoning (rajm) is obligatory in the Book of Allah for any married person, male or female, who commits adultery, provided that proper Shariah evidence is established, or the woman becomes pregnant, or they confess.
Hadith Referenceمسند الإمام الشافعي / كتاب الحدود / 1577