United States Uniformed Services Oath of Office

All officers of the seven Uniformed services of the United States swear or affirm an oath of office upon commissioning. It differs slightly from that of the oath of enlistment that enlisted members recite when they enter the service. It is required by statute, the oath being prescribed by Section 3331, Title 5, United States Code. It is traditional for officers to recite the oath upon promotion but as long as the officer's service is continuous this is not actually required. One notable difference between the officer and enlisted oaths is that the oath taken by officers does not include any provision to obey orders; while enlisted personnel are bound by the Uniform Code of Military Justice to obey lawful orders, officers in the service of the United States are bound by this oath to disobey any order that violates the Constitution of the United States.

Text of the Oath
Note that the last phrase is not required to be said if the speaker has a personal or moral objection, as is true of all oaths administered by the United States government; Article Six of the United States Constitution requires that there be no religious test for public office.

The oath is for an indeterminate period; no duration is specifically defined.

Officers of the National Guard of the various States, however, take an additional oath:

Commissioned Officers (O-1 through O-10 second lieutenant or ensign through general or admiral, and W-2 through W-5 (chief warrant officers)) are commissioned under the authority of the President of the United States with the advice and consent of the United States Senate, Warrant Officers (WO-1) are given a warrant under the authority of their respective Service Secretary (e.g. Secretary of the Army or Secretary of the Navy), National Guard officers are additionally committed to the authority of the governor of their state. They may be activated in the service of their state in time of local or state emergency in addition to Federal activation. Reserve officers may only be activated by the President of the United States.