The Women - 4:59 Believers! Follow Allah and follow His messenger and those who are in charge of you, and if you disagree about anything, refer it to Allah and His messenger. If you believe in Allah and the Last Day. That is better for you and the best way of resolution.
For the believers, obedience to the Almighty is not unconditional:
The Woman Who Is Examined/60:12 O Prophet, when the believing women take refuge with you, and they swear by their oaths not to associate anything with Allah, not to steal, not to commit adultery, not to kill their children, not to fabricate a falsehood, and not to oppose you in righteousness, then accept their oaths and ask forgiveness from Allah for them. Allah is Forgiving, Merciful.