That is handled through the military chain of command and working in conjunction with Congress not a king, a lord, or dictator.
Of course, it has to be determined a lawful order....
If not, it’s discarded....
However, you are wrong about Congress, they have no part in this process....They neither clarify or interpret existing law or CIC orders, they simply pass new laws...
Judicial branch handles any disagreements that can’t be handled administratively in the military chain of command