Sahl bin Sa’d As-Sa’idi (May Allah be pleased with him) reported:
A man came to the Prophet (peace be upon him) and said, “O Messenger of Allah, guide me to such an action which, if I do Allah will love me and the people will also love me.” He (peace be upon him) said, “Have no desire for this world, Allah will love you; and have no desire for what people possess, and the people will love you.”
Riyad as-Salihin, Book 1, Hadith 472