The trio were arrested in June in Kantharalak District, near the disputed border with Cambodia, amid a territorial row between Thailand and its neighbour.
Police said at the time that they were carrying maps with military facilities marked on them, and two of the men were using the illegal stimulant methamphetamine.
The Thai was jailed for two years and four months while the Cambodian was handed two years and three months and the Vietnamese received two years, Kantharalak District Court Director Thongchanai Kothajit said by telephone.
The Thai and the Cambodian received longer sentences for drug charges.
The Thai-Cambodian border row saw 28 people killed in two outbreaks of fierce fighting earlier this year.
After the three men were detained, Thailand’s then Premier Abhisit Vejjajiva accused Phnom Penh of “violating Thai territory”, but Cambodia accused Bangkok of “deceitful fabrication”.
Phnom Penh denies the Cambodian man, Ung Kimthai, was a spy.
“Cambodia doesn’t need to send Mr Ung Kimthai to spy in Thailand,” Foreign Ministry spokesman Koy Kuong said in Phnom Penh.
Earlier this year, a Cambodian court jailed a high-profile Thai nationalist activist arrested at the border for eight years on spying and illegal entry charges, while six other Thais received lighter sentences.
Tensions between the two countries have eased since a July election victory by allies of ousted ex-leader Thaksin Shinawatra, who is a friend of Cambodian Prime Minister Hun Sen.
Cambodia in May launched a legal bid at the International Court of Justice in the Hague seeking to force Thailand to pull troops from a disputed strip of land near the 900-year-old Preah Vihear temple.
The court ruled in 1962 that the temple itself belonged to Cambodia but both Phnom Penh and Bangkok claim ownership of a 4.6-square-kilometre patch of nearby territory. – AFP