The defendant, 31-year-old Mustufa Haidar Syed-Naqfi, was sentenced to four years and three months in prison "for working for a foreign intelligence service", a spokeswoman for Berlin's superior court said.
The court found he spied "against Germany and another NATO member", France, for the Quds Force, the foreign operations wing of the elite Revolutionary Guards.
Syed-Naqfi compiled dossiers on possible attack targets -- a German lawmaker who is the former head of a German-Israeli organisation, and a French-Israeli economics professor.
The court heard they detailed the targets' homes and work places, various access routes to them, as well as information on security guards, surveillance cameras and nearby police stations.
More From This Section
A representative of Germany's domestic intelligence service, which handles counterespionage, said it was alerted to the defendant by a "reliable" source.
The service suspected the Quds Force was preparing for a possible future conflict with the United States and Israel, when it could hit targets in Europe in a form of "asymmetrical warfare".
The defendant travelled to Iran at least twice, in October 2015 and February 2016, and received at least 2,052 euros (USD 2,237) for his intelligence activities.
He was arrested in July 2016 but declined to testify during the trial -- "out of fear", according to his lawyer.