Yesterday a suicide bomber blew himself up outside the embassy, allowing at least three other militants to breach the compound unleashing an hours-long gun battle.
Afghan officials initially said that no one had been killed in the assault, but the interior ministry later confirmed that two people - a woman and a guard - had died and two were policemen injured.
All embassy staff including Iraqi charge d'affairs were "unharmed", interior ministry spokesman Najib Danish said.
IS-K claimed responsiblity for the Kabul attack, according to a statement by IS's central propaganda agency Amaq.
More From This Section
It said two of its members attacked the embassy killing at least 27 guards and other embassy staff.
The militant group is known to often exaggerate its claims on the number of causalities inflicted.
IS has been expanding its footprint in eastern Afghanistan and has recently claimed responsibility for several devastating attacks in Kabul.
"(Yesterday's attack) proves that IS threat in Afghanistan is real," said Kabul-based security analyst Jawed Kohistani, adding that the group could continue to attack diplomatic missions in the Afghan capital.
"To avenge its defeat in Iraq, IS and its supporters attacked Iraqi embassy in Kabul. It is easy for them to conduct more attacks on soft targets in Afghanistan again," Kohistani told AFP.
A security source, who declined to be named, said IS could prove to be more dangerous than the Taliban in Afghanistan.
In April, the US military in Afghanistan dropped the so- called Mother Of All Bombs (MOAB) to target IS hideouts in a complex of tunnels and bunkers in eastern Nangarhar province, killing over 90 militants.
"The war (with IS) still goes on, its expanding and we need to be careful," Kohistani warned.