Since iodine is the least active of the halogens, iodination occurs only if the reaction is carried out in the presence of an oxidising agent such as fuming nitric acid.
Iodo compounds are difficult to prepare by direct iodination because the reaction is reversible and HI produced is a strong reducing agent to reduce iodo-compound back to original compound.
This reaction is carried out in the presence of an oxidizing agent like iodic acid or nitric acid, which oxidizes HI formed in the reaction to iodine enabling the reaction to proceed in the forward direction.
5HI+HIO3→3H2O+3I2