The issue raised questions about the legitimacy of Prime Minister Prayuth Chan-ocha's government, which took office in July.
Prayuth failed to include the phrase "I will also uphold and comply with the constitution of the kingdom in every aspect." It was unclear if the omission was accidental or intentional.
A statement from the court Wednesday said it lacked jurisdiction because the oath was a matter between the executive branch and the king.
It also mentioned that the king had issued a royal message, delivered late last month but dated the day of the oath-taking, encouraging the Cabinet members to perform their duties according to the oath they swore.
The king as a constitutional monarch is supposed to have no political role but holds a great amount of influence.
The court's decision appeared to preclude further legal challenges of Prayuth's omission. The lower house of Parliament is supposed to debate the matter on Sept. 18 at the request of the opposition, but the court's position gives Prayuth's government ammunition to stave off any political attacks.
The mention of the king's note giving moral support to the government helps it defend against criticism, because the monarchy is treated as an untouchable institution in Thailand, where a tough lese majeste law provides penalties of up to 15 years in prison for insulting the royal family.
The case went to the Constitutional Court after the state ombudsman forwarded complaints from two citizens who charged that Prayuth's failure to pledge allegiance to the constitution was a breach of the charter.
Opposition lawmakers pointed out the omission, and Prayuth responded that the matter was not a problem. The ombudsman's office said he told them he had completed the oath-taking, without elaborating.
The oath is written into the constitution that was adopted in 2017 when Prayuth headed a military government that took power in a 2014 coup.
He became prime minister again after a general election in March that was held according to laws the military regime wrote to favor its political allies.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.