Thus, it is hard to know with certainty how and where al-Isfahani was engaged in his capacity as a kātib. Nevertheless, al-Isfahani's association with the vizier, Abū Muḥammad al-Muhallabī (291–352/903–963), is well-documented. The friendship between the two began before al-Muhallabī's vizierate in 339/950.[111][lower-alpha 29] The firm relationship between them is supported by al-Isfahani's poetry collected by al-Thaʿālibī (350–429/961–1038): half of the fourteen poems are panegyrics dedicated to al-Muhallabī.[113] In addition, al-Isfahani's own work, al-Imāʾ al-shawāʿir (“Enslaved Women Who Composed Poetry”), refers to the vizier — presumably, al-Muhallabī — as his dedicatee.[114] His no longer surviving Manājīb al-khiṣyān (“The Noble Eunuchs”), which addresses two castrated male singers owned by al-Muhallabī, was composed for him.[115] His magnum opus, the Aghānī, was very likely intended for him, as well.[lower-alpha 30] As a return for his literary efforts, according to al-Tanūkhī, al-Isfahani frequently received rewards from the vizier.[116] Furthermore, for the sake of their long-term friendship and out of his respect for al-Isfahani's genius, al-Muhallabī exceptionally tolerated al-Isfahani's uncouth manners and poor personal hygiene.[117] The sources say nothing about al-Isfahani's fate, after al-Muhallabī's death.