The Prophet ﷺ said, "Whoever claims allegiance to a people without the permission of his masters, upon him be the curse of Allah, the angels, and all of mankind. No ransom or substitute will be accepted from him on the Day of Resurrection."
حدثنا حجاج بن أبي يعقوب حدثنا معاوية يعني ابن عمرو حدثنا زائدة عن الأعمش عن أبي صالح
عن النبي ﷺ قال من تولى قوما بغير إذن مواليه فعليه لعنة الله والملائكة والناس أجمعين لا يقبل منه يوم القيامة عدل ولا صرف
Muslim narrated it in the chapter on the prohibition of a freed slave taking a patron other than the one who freed him, in the Book of Manumission, hadith no. 1508, from the hadith of Zaidah, with this chain.