A Jakarta court handed a 12-year sentence to Syahrial Alamsyah, 51, and nine years to his wife Fitria Diana, 21, after convicting them on terrorism charges for trying to kill then security minister Wiranto in October last year.
The sentences were below prosecutors' demands for a 16-year and 12-year term, respectively.
But the court rejected the couple's defense that they were solely motivated by anti-government sentiment, ruling that Alamsyah belonged to a local extremist group allied to IS.
"We rule that the defendant is guilty of terrorism together with his wife," presiding judge Masrizal, who like many Indonesians goes by one name, told the West Jakarta District Court.
A third defendant was also sentenced to five years on terror charges linked to a separate attack planned with Alamsyah last year.
The hearing was held by video conference due to coronavirus concerns, with lawyers and judges wearing facemasks with the defendants listening via videolink.
The trial had heard that Alamsyah stabbed the now 73-year-old Wiranto as he exited a car during a visit to Pandeglang regency on Java island.
Alamsyah and his wife, who injured a member of Wiranto's entourage, were wrestled to the ground by security personnel.
Wiranto sustained knife wounds to his abdomen, but survived the attack, in which several others were also injured.
Days before the assassination attempt, the pair pledged allegiance to late IS leader Abu Bakr al-Baghdadi, the court said in its ruling.
Alamsyah was a member Jamaah Ansharut Daulah (JAD), an IS-linked extremist group responsible for a string of attacks, including suicide bombings at churches in Indonesia's second-biggest city Surabaya in 2018 that killed a dozen people.
JAD is among dozens of radical groups that have pledged loyalty to IS in Indonesia, the world's biggest Muslim majority nation, which has long struggled with Islamist militancy.
The couple were radicalized through hardline rhetoric on social media and watching videos of Muslims fighting in Syria, their trial heard.
They also listened to speeches by jailed firebrand cleric Abu Bakar Bashir, believed to be behind the 2002 Bali bombings, and Aman Abdurrahman, who was sentenced to death for masterminding gun and suicide attacks in Jakarta in 2016.