His first tenure as Resident at Delhi began on 25 February 1811 for the East India Company, (from 1813 for British Government), and in 1819 he received from Lord Hastings the appointment of secretary in the secret and political department.