The sources give differing details of Yahya's name and origins. Historians such as al-Ya'qubi and al-Azdicall him "Yahya ibn Sa'id al-Harashi," while al-Tabari omits the patronymic and merely refers to him as "Yahya al-Harashi." Egyptian authors such as al-Kindi and Ibn Taghribirdi, on the other hand, describe him "Yahya ibn Dawud al-Kharsi," but OrientalistsEduard von Zambaur and Patricia Crone consider the latter form to be a likely corruption of his actual name. Crone identifies Yahya as a descendant of Sa'id ibn Amr al-Harashi, an Arab general and governor of Khurasan for the Umayyad Caliphate. Al-Kindi, providing a variant background, claims that Yahya was descended from a Turkish father and a mother who was the aunt of the king of Tabaristan, and that he and his brothers were at one time slaves of the Khurasani commander Ziyad ibn Abd al-Rahman al-Qushayri. Ibn Taghribirdi, writing much later, mentions that he was considered to be a member of the "people of Khurasan" or of those of Nishapur.
Career
Yahya is known to have been active during the reigns of the caliphs al-Mahdi and Harun al-Rashid. During that period he was posted to several provincial governorships, including over Isfahan, Tabaristan, Ruyan, and Jurjan, and the Jibal. In 779 he was appointed by al-Mahdi as governor of Egypt, with authority over both prayers/security and taxation. Upon his arrival to the province he found it to be suffering from a state of lawlessness and accordingly set out on a campaign to restore order, setting out to kill highway robbers and increase security in public spaces. His measures were unpopular but effective, and Ibn Taghribirdi later remarked that "he would have been among the best of the governors of Egypt had it not been for his severity." He remained in the province for thirteen months before being dismissed in favor of Salim ibn Sawadah al-Tamimi. In c. 794 Yahya and Yazid ibn Mazyad al-Shaybani were selected by Harun al-Rashid to lead a major campaign against the provinces of Arminiyah and Adharbayjan, which had fallen into rebel hands. Yahya, with 12,000 men under his command, proceeded to invade Adharbayjan, where he defeated the local rebels and pacified the region. He then advanced against Baylaqan and won another battle against an insurgent army sent against him; the city subsequently surrendered and he ordered its fortress to be razed. Following a fresh outbreak of unrest in Arminiyah in 795, Yahya was appointed by Harun as its governor and instructed to handle the situation; upon his arrival he "unleashed the sword" upon the people and eventually the disturbances were quelled. In 796 Yahya was made governor of Mosul and given jurisdiction over its security and finances. During his governorship he implemented a series of harsh measures and imposed several years' worth of back taxes on the populace. Many residents fled the district for Adharbayjan or turned to nomadism as a result, causing several villages to become depopulated and fall into ruin. The remote regions of the district also were beset by highway robbers, which prevented the collection of taxes until Yahya took action to curb their activities. After a term of approximately two years in office, he was replaced with Harthamah ibn Ayan. According to al-Maqrizi, Yahya may have later accompanied the future caliph al-Ma'mun during the latter's journey to Marv in 809.