This article relies largely or entirely on a single source. (May 2014)
He entered the papal household of Pope Benedict XIV in March 1745 as a privy chamberlain of His Holiness. On 22 May 1749, he became Referendary of the Tribunals of the Apostolic Signatura. He became a domestic prelate of His Holiness in June 1749. From 1754 to 1759, he was inquisitor in Malta. On 5 December 1759, he became vice-legate in Avignon, holding this position until 1766. In October 1766, he was made commissary general of the papal army. He joined the Apostolic Camera in 1766, becoming its auditor in April 1775.
Pope Pius VI made him a cardinal deacon in the consistory of 23 June 1777. He received the red hat on 26 June 1777, and the titular church of Santa Maria della Scala on 28 July 1777. He opted for the deaconry of Santa Maria in Cosmedin on 27 September 1780. He became prefect of the Tribunal of the Apostolic Signatura on 10 November 1780.
In January 1781, he became cardinal protector of the Kingdom of Ireland. He later became cardinal protector of the Conventual Franciscans in August 1783; of the Knights Hospitaller in February 1787; and of the Holy Land in December 1788.