In parliament, Hartmann first served on the Committee on Transport and Digital Infrastructure from 2014 until 2015 before moving to the Committee on Internal Affairs. In his capacity as the SPD parliamentary group's rapporteur on integration and asylum, he was the co-author of landmark legislation aimed at regulating economic immigration and helping immigrants integrate into German society.[1] Since the 2021 elections, Hartmann has been serving as his parliamentary group's spokesperson for internal affairs.[2] Since 2022, he has also been a member of the Parliamentary Oversight Panel (PKGr), which provides parliamentary oversight of Germany's intelligence services BND, BfV and MAD.[3] That same year, he joined the Commission for the Reform of the Electoral Law and the Modernization of Parliamentary Work, co-chaired by Johannes Fechner and Nina Warken.[4]