Abū Alī Hasan ibn Muhammad ibn Abbās (Persian: ابو علی حسن بن محمد بن عباس), better known as Hasanak the Vizier (حسنک وزیر), also Hasanak Mīkālī (حسنک میکالی), was an Iranian statesman from the Mikalid family, who served as the vizier of the Ghaznavid Sultan Mahmud from 1024 to 1030. After having been removed from the vizier, Hasanak still continued to be an important and influential figure in the Ghaznavid state. However, he later fell out of favor and was executed by hanging during the reign of Mahmud's son Mas'ud I. Hasanak's official charge was infidelity which was a politically motivated charge, and his execution was ordered by the Abbasid caliph of Baghdad.
Hasanak was the son of a certain Abbas, and was a member of the Mikalid family, an Iranian family which traced its descent back to the Sogdian king Divashtich, and to the Sasanians. Not much is known about Hasanak's early life, except that at a young age he served as the governor of Khorasan. He also served as the rais of his native city, Nishapur. Later in 1023, Hasanak went to a pilgrimage in Mecca, and later went to Fatimid Egypt, where he was treated with honor by the Fatimid caliph Ali az-Zahir.
However, Hasanak's relations with the Fatimids made the Abbasid caliph al-Qadir distrust him of being a believer of Shia Islam, which was seen as a heretical faith by the Sunni Abbasids and other Sunni Muslims. This distrust made al-Qadir urge Mahmud to have Hasanak executed, which, Mahmud, however, declined. One year later, Mahmud appointed Hasanak as his vizier, thus succeeding the disgraced former vizier Ahmad Maymandi, who was an enemy of Hasanak. During Hasanak's vizierate, he became a prominent and influential figure.