Abdullah bin Abbas reported,

The Messenger of Allah ﷺ said, "Whoever angers Allah to please people, Allah will be angry with him, and He will turn against him those whom he sought to please by angering Him. But whoever pleases Allah at the cost of angering people, Allah رضي الله عنه will be pleased with him and will make pleased with him those whom he angered for His sake, until He adorns him and beautifies his words and deeds in their eyes."

Azami 13997

Hasan

عن ابن عباس، قال

قال رسول الله ﷺ: من أسخط الله في رضا الناس سخط الله عليه، وأسخط عليه من أرضاه في سخطه، ومن أرضى الله في سخط الناس رضي الله عنه وأرضى عنه من أسخطه في رضاه حتي يزينه ويزين قوله وعمله في عينه.

الأعظمي 13997حسن
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Superior moral conduct
Chapter
Noble character
Section
Whoever seeks the pleasure of Allah through the displeasure of the people
Numbering
Jami al-Kamil 13997 (2nd edition)
Azami 13997