The Prophet ﷺ said, "When Allah loves a servant, He calls Jibreel ﷺ and says, 'Jibreel, I love so-and-so, so love him.' Then Jibreel
loves him. Then Jibreel calls out to the inhabitants of heaven, 'Allah loves so-and-so, so love him,' and the inhabitants of heaven love him. Then acceptance is placed for him on earth.And when Allah
hates a servant, He calls Jibreel and says, 'Jibreel, I hate so-and-so, so hate him.' Then Jibreel hates him. Then Jibreel calls out to the inhabitants of heaven, 'Allah hates so-and-so, so hate him,' and the inhabitants of heaven hate him. Then hatred is placed for him on earth."
حدثنا عفان قال حدثنا أبو عوانة قال حدثنا سهيل عن أبيه
عن النبي ﷺ قال إن الله عز وجل إذا أحب عبدا دعا جبريل ﷺ فقال يا جبريل إني أحب فلانا فأحبه قال فيحبه جبريل عليه السلام قال ثم ينادي في أهل السماء إن الله يحب فلانا قال فيحبه أهل السماء ثم يوضع له القبول في الأرض وإن الله عز وجل إذا أبغض عبدا دعا جبريل فقال يا جبريل إني أبغض فلانا فأبغضه قال فيبغضه جبريل ثم ينادي في أهل السماء إن الله يبغض فلانا فأبغضوه قال فيبغضه أهل السماء ثم توضع له البغضاء في الأرض
Its isnad is sahih. Bukhari narrated it, 17/9, in the Book of Tawhid, chapter on the speech of the Lord with Jibreel, and Muslim narrated it, 2030/4, number 2637, in the Book of Righteousness, chapter on when Allah loves a servant.