Gunmen opened fire and hurled a grenade at the cabin of security guards of the United Nations High Commissioner for Refugees (UNHCR) at about 16:30 GMT on Monday, Kandahar's deputy commander Khan Muhammad said.
He added that the attackers, who were in a car, also fired from machine guns.
The guards returned the fire and the attackers fled. "There were no injuries," Muhammad said.
The attack follows a powerful blast in November outside another UN office in Kandahar, a former stronghold of the ousted Taliban regime.
One Afghan was injured in that attack.
Bush congratulates Karzai
The attack came as Afghanistan's power brokers filed away from a marathon Lya Jirga or grand assembly after agreeing on a constitution that is hoped will bring stability to the war-ravaged country.
US President George Bush called up Afghan President Hamid Karzai to congratulate him on the agreement.
"The president called President Karzai to congratulate him and the members of the Loya Jirga on their success yesterday in adoption of a new constitution," White House spokesman Scott McClellan said, speaking aboard Air Force One as Bush headed for St Louis, Missouri.
Adoption of the new constitution
will strengthen Karzai's position
"President Karzai thanked the president and said it was a great day for Afghanistan. The two briefly discussed the war on terrorism and the Kandahar-Kabul highway."
On Sunday, Bush had said the constitution would help pave the way for national elections later this year.
"This document lays the foundation for democratic institutions and provides a framework for national elections in 2004," the president said in a statement issued by the White House.
"A democratic Afghanistan will serve the interests and just aspirations of all of the Afghan people and help ensure that terror finds no further refuge in that proud land," Bush said.
The US president said the US would continue to help the Afghan people move forward.