Usually used against enlisted with this article ART. 134. GENERAL ARTICLE
Though not specifically mentioned in this chapter, all disorders and neglects to the prejudice of good order and discipline in the armed forces, all conduct of a nature to bring discredit upon the armed forces, and crimes and offenses not capital, of which persons subject to this chapter may be guilty, shall be taken cognizance of by a general, special or summary court-martial, according to the nature and degree of the offense, and shall be punished at the discretion of that court.
(1) That the accused wrongfully had sexual intercourse with a certain person;
(2) That, at the time, the accused or the other person was married to someone else; and
(3) That, under the circumstances, the conduct of the accused was to the prejudice of good order and discipline in the armed forces or was of a nature to bring discredit upon the armed forces.
(1) Nature of offense. Adultery is clearly unacceptable conduct, and it reflects adversely on the service record of the military member.
(2) Conduct prejudicial to good order and discipline or of a nature to bring discredit upon the armed forces. To constitute an offense under the UCMJ, the adulterous conduct must either be directly prejudicial to good order and discipline or service discrediting. Adulterous conduct that is directly prejudicial includes conduct that has an obvious, and measurably divisive effect on unit or organization discipline, morale, or cohesion, or is clearly detrimental to the authority or stature of or respect toward a servicemember. Adultery may also be service discrediting, even though the conduct is only indirectly or remotely prejudicial to good order and discipline. Discredit means to injure the reputation of the armed forces and includes adulterous conduct that has a tendency, because of its open or notorious nature, to bring the service into disrepute, make it subject to public ridicule, or lower it in public esteem. While adulterous conduct that is private and discreet in nature may not be service discrediting by this standard, under the circumstances, it may be determined to be conduct prejudicial to good order and discipline. Commanders should consider all relevant circumstances, including but not limited to the following factors, when determining whether adulterous acts are prejudicial to good order and discipline or are of a nature to bring discredit upon the armed forces:
(a) The accused's marital status, military rank, grade, or position;
(b) The co-actor's marital status, military rank, grade, and position, or relationship to the armed forces;
(c) The military status of the accused's spouse or the spouse of co-actor, or their relationship to the armed forces;
(d) The impact, if any, of the adulterous relationship on the ability of the accused, the co-actor, or the spouse of either to perform their duties in support of the armed forces;
(e) The misuse, if any, of government time and resources to facilitate the commission of the conduct;
(f) Whether the conduct persisted despite counseling or orders to desist; the flagrancy of the conduct, such as whether any notoriety ensued; and whether the adulterous act was accompanied by other violations of the UCMJ;
(g) The negative impact of the conduct on the units or organizations of the accused, the co-actor or the spouse of either of them, such as a detrimental effect on unit or organization morale, teamwork, and efficiency;
(h) Whether the accused or co-actor was legally separated; and
(i) Whether the adulterous misconduct involves an ongoing or recent relationship or is remote in time.
(3) Marriage. A marriage exists until it is dissolved in accordance with the laws of a competent state or foreign jurisdiction.
(4) Mistake of fact. A defense of mistake of fact exists if the accused had an honest and reasonable belief either that the accused and the co-actor were both unmarried, or that they were lawfully married to each other. If this defense is raised by the evidence, then the burden of proof is upon the United States to establish that the accused's belief was unreasonable or not honest.".
IIRC in the 1990's a Retired USAF Col. was called back from retirement to face court martial for adultery.