In 1675 he purchased the title of clerk of the Apostolic Camera, and on 16 September 1681 he became "Auditor Camerae". In Rome he took the offices of General Commissioner of Army, Responsable of the mint and Prefect of the Annona with the responsibility for the grain supply to the city of Rome, engaging in these offices with great energy and strong character. He was also the governor of 1676 papal conclave that elected Pope Innocent XI.