No...I mean, whose lawfal order are we talking about here.
It makes a difference, though only slightly, what the definition of lawful order is based on who made the order.
A general order or regulation is lawful unless it is contrary to the Constitution, the laws of the United States, or lawful superior orders or for some other reason is beyond the authority of the official issuing it. Article 92
(2) includes all other lawful orders which may be issued by a member of the armed forces
, violations of which are not chargeable under Article 90, 91 or 92(1).
It also includes the violation of written regulations which are not general regulations, so other regulations created under military authority.
If its an order issued by a superior officer
, you need to look at Article 90. There is describes in detail all of the things related to that type of order.
Start reading at the bottom of the page.
If the order comes from something less than an officer, see here.
That's all very vague and has been refined by case law, so an attorney would have to research your specific order, the fact pattern involved and determine whether the order was lawful.