"We are looking into the matter, we are trying to get the various details corroborated, and we are going to see based on that what further steps are needed," Haq told reporters.
The comment followed Tuesday's demand by the Somali government for the envoy to leave after the country's Foreign Ministry accused him of meddling in the country's sovereign affairs and "blatantly violating protocols."
Haysom has held the post of UN special envoy for Somalia since September 2018.
The spokesman went on saying that UN Secretary-General Antonio Guterres strongly condemned the armed attacks against UN personnel in Somalia and urges local authorities to investigate the latest incident and bring those responsible to justice.
The statement referred to Tuesday's attack, when gunmen fired mortar bombs into a UN compound in Mogadishu, wounding two UN staff members.