Shaykhul-Islaam Ibn Taymiyyah (may Allah have mercy upon him) said:
It is not for anyone to take a covenant from someone that he agrees to everything that he (the one taking the covenant) wants, have an alliance with those who are in alliance with him and enmity to those who show enmity towards him.
Al-‘Allaamah ash-Shaykh Rabee’ (may Allah preserve him) commented:
It’s possible that the taking of a covenant from a person is not by (actual) speech. How it takes place, is when it is as if the person (taking the covenant) by way of his state (of behavior and stance) says with his tongue, ‘It’s a must that you take my view.’ We free ourselves to Allah every time the person takes our statement with his desires. This is something that Allah is not pleased with. If two people fall into dispute and you aid the one who you see to be upon the truth, even if the truth is with him but you aid him based upon your desires, you’re sinful. That’s because it is obligatory that you do things for the sake of Allah. You do not want anything except for the truth. And you do not support anything except for the truth. Allah states: