The Book of Divorce (Kitab Al-Talaq)

Muslim :: Book 9 : Hadith 3599

Abu Huraira (Allah be pleased with him) reported that Allah's Messenger (may peace be upon him) said: He who takes anyone as his ally without the consent of his previous master, there will be the curse of Allah and that of His angels upon him, and neither, any obligatory act of his nor the supererogatory one will be accepted (by Allah).

Source materials are from the University of Southern California MSA site
Hadith eBooks converted from Imaan Star