Going by the retirement age, three IAS officers from freshly empanelled batches of 1984 and 1985 may have the longest tenure as secretary to Govt of India.
From the 1984 batch, Ajay Prakash Sawhney (IAS:1984:AP), currently serving as Additional Secretary, Ministry of Petroleum & Natural Gas, will have a tenure till February 2022 whereas Sanjeev Ranjan (IAS:1985:TR) will hold his turf till January 2023. It may be noted that While serving as AS&FA, Ministry of Road Transport & Highways Ranjan was on 14 December 2016 given premature repatriation to parent cadre and later in February 2017 he became Chief Secretary of Tripura.
Ms. Usha Sharma (IAS:1985:RJ) may have the longest inning to serve as Union Secretary as she would retire in June 2023. On the sidelines, it may be mentioned that some lucky officers might exceed their innings by getting the coveted post of Cabinet, Home and Defence secretaries which having two years fixed tenure.