One of the dead was a German security guard.
At least four suicide bombers were involved in the attack, although security forces managed to kill two of the attackers before they were able to detonate their explosives.
“The first suicide attacker detonated at the entrance, the second detonated inside the premises, killing one foreign national,” Mohammad Omar, the governor of northern Kunduz province, told the AFP news agency.
It is thought 52 foreigners were in the building at the time.
“This morning six Taliban suicide bombers attacked the Untied States development organisation branch,” Taliban spokesperson Zabihullah Mujahid told AFP.