The attackers were killed in an hours-long stand-off with security forces.
Two senior government officials, who asked not to be named, said the blasts might prompt a blame game and exacerbate political in-fighting.
The group, which also has bases in Pakistan, is believed to be significantly weakened after its leader Abdolmalek Rigi was captured and executed by Iran in 2010.
The attack will also increase public support for the Revolutionary Guards, who are viewed as the protectors of the country, and for Iran's efforts to combat IS, as happened when the jihadist group seized large swathes of territory in Iraq in 2014.
Multiple deaths in coordinated attacks. Police have surrounded the building, where a legislative session was underway, and heavy gunfire could be heard from outside.
It is now unclear how the attacker or attackers entered the parliament building, which has multiple security checkpoints.
Daesh has claimed the attacks, the first of which saw at least four assailants storm parliament.
The Intelligence Ministry said security forces had arrested another "terrorist team" planning a third attack.
The last major attack in Iran was in 2010 when a Sunni extremist group carried out a suicide attack against a mosque in Sistan-Baluchistan killing 39 people.
Italian Foreign Minister Angelino Alfano also noted that Tehran attacks underlined the necessity for a long-term strategy against terrorism.
In May 2016, the Iranian authorities announced that they had dismantled 20 terrorist cells and foiled a plot involving 50 different targets throughout the country.
The Mohiuddin al Nasser Martyrs Brigade, the armed wing of the Arab Struggle Movement for the Liberation of Ahwaz (ASMLA) has claimed responsibility for several attacks in Iran.
Yet the nuclear deal remains in place despite Trump's pledge during the presidential campaign to discard or renegotiate the pact.
Soon after the assault on parliament, another bomber detonated a suicide vest near the shrine of the Islamic Republic's revered founder, Ayatollah Khomeini, a few kilometres south of the city, Zolfaghari said. Iranian security officials have not said who they suspect is behind the attacks, though state media has referred to the attackers as "terrorists".
Lawmaker Tayebeh Siavoshi told Efe news that the situation was "very confusing and sensitive" and denied media reports that the situation was under control.
The broadcaster previously reported that one of the wounded included a security guard. Another image, carried in the semi-official Fars news agency, showed a toddler being handed off through a first-floor window to safety outside as an armed man looks on.