Zhang Yanshang (張延賞) (727 – September 7, 787), né Zhang Baofu (張寶符), was an official of the Chinese dynasty, serving as a chancellor during the reign of Emperor Dezong.
Zhang Baofu was born in 727, during the reign of Emperor Xuanzong. His family traced its ancestry to the Jin Dynasty official Zhang Hua. His father Zhang Jiazhen had previously been a chancellor under Emperor Xuanzong, and continued to serve in prominent positions after his removal in 723. Zhang Jiazhen died in 729, however, when Zhang Baofu was only two years old. Near the end of Emperor Xuanzong's Kaiyuan era (713-741), the mayor of Jingzhao Municipality (京兆, i.e., the region of the Tang capital Chang'an), Han Chaozong (韓朝宗), who had previously been recommended by Zhang Jiazhen, stated to Emperor Xuanzong:
Your Imperial Majesty treated your chancellors with honor, when you commission them and when you remove them. Even after their deaths their descendants are allowed to serve you. Zhang Jiazhen had a son named Zhang Baofu when he was old, and Zhang Baofu does not yet have a commission.
Emperor Xuanzong, hearing this, was saddened, and he summoned Zhang Baofu and made him an army officer. Emperor Xuanzong also gave him a new name — Yanshang, meaning "extended favor." It was said that Zhang Yanshang was well-versed in the Confucian classics and histories, and he also became known for administrative talent. The official Miao Jinqing, who later served as a chancellor as well, was impressed with his talent, and gave him a daughter in marriage.
During the Anshi Rebellion, Emperor Xuanzong's son and successor Emperor Suzong was, for some time, at Fengxiang (鳳翔, in modern Baoji, Shaanxi), and while there, he made Zhang Yanshang an imperial censor, initially with the rank Jiancha Yushi (監察御史), then as Dianzhong Shiyushi (殿中侍御史). Thereafter, the general Wang Sili (王思禮), who then carried the title of military governor (Jiedushi) of Guanzhong Circuit, requested to have Zhang serve as his assistant, and when Wang was later made the military governor of Hedong Circuit (河東, headquartered in modern Taiyuan, Shanxi), Zhang served as the deputy mayor of Taiyuan Municipality under Wang. He was later recalled to Chang'an to serve as a low-level official at the ministry of justice (刑部, Xingbu).