He was a close friend of Carlo Odescalchi and was pleased to learn that the pope named him as a cardinal on 10 March 1823. Strambi tried several times to secure his resignation from Pius VII but on one occasion the pope reprimanded him for using ill health as a vain excuse and dismissed him. Strambi tried once again in 1823 in a letter to Cardinal Ercole Consalvi to the pope but the letter arrived in Rome when the pontiff broke his thigh in a fall and died soon after.