It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Noble Prophet (peace and blessings be upon him) used to take allegiance on the condition of listening and obeying, that according to ability (as much as possible, you will listen and obey).