Zhang Yizhi
In 675, Shen Quanqi obtained a magistrate degree. He then served several positions as a scholar at the imperial court, and was appointed by the government official Zhang Yizhi. However, the Wuzhou Dynasty was overthrown, and Zhang Yizhi was executed. Shen Quanqi was arrested and imprisoned on charges of bribery and corruption. He was then released, but sent in exile to Huanzhou of Annan Duhufu, which is known today as Vinh in Vietnam. In 706, he was pardoned, and recalled to resume his duties at the imperial court, where he eventually worked up to the position of imperial diarist and then grand secretary.