“Be careful of Iran. Perhaps Intelligence should go back to school!” Mr Trump tweeted.
The testy response came after a US intelligence report said Iran was not making nuclear weapons.
It also said that North Korea remained “unlikely to give up” its weapons stockpiles and production abilities.
National intelligence director Dan Coats and other intelligence chiefs presented the Worldwide Threat Assessment report to the Senate on Tuesday.
Last year, the US pulled out of the 2015 Iran nuclear deal, triggering widespread criticism from Washington’s allies.