Sunan Ibn Majah, Book 37, Hadith 84 (Ibn Majah 4187)

It was narrated from ‘Uqbah bin ‘Amr, Abu Mas’ud, that the Messenger of Allah (ﷺ) said:

“Among the words that people learned from the earlier Prophets are: ‘If you feel no shame, then do as you wish.’”